From 7ced838009312f4aabf2b86e0cfaada0b51e12d0 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Mon, 30 Sep 2019 19:57:44 +0530 Subject: [PATCH] changes by suren --- .../contribute/contribute.component.html | 30 +++++------ .../contribute/contribute.component.scss | 8 ++- .../contribute/contribute.component.ts | 42 ++++++++++++--- .../project-detail.component.html | 4 +- .../project-detail.component.ts | 13 ++++- .../project-list/project-list.component.html | 2 +- .../project-list/project-list.component.ts | 2 +- .../layouts/admin/admin-layout.component.html | 8 +-- .../app/session/login/login-component.html | 2 +- .../menu-items/horizontal-menu-items.ts | 44 ++++++++-------- .../src/app/shared/menu-items/menu-items.ts | 48 +++++++++--------- .../src/app/shared/school-details.service.ts | 8 ++- .../src/assets/images/csr-img/error_img.jpg | Bin 0 -> 59508 bytes .../src/assets/images/csr-img/tn_logo.png | Bin 372038 -> 99220 bytes .../src/assets/images/csr-img/tn_logo1.png | Bin 0 -> 372038 bytes .../assets/styles/scss/core/_main-panel.scss | 8 +-- 16 files changed, 133 insertions(+), 86 deletions(-) create mode 100644 ng8-seed/src/assets/images/csr-img/error_img.jpg create mode 100644 ng8-seed/src/assets/images/csr-img/tn_logo1.png diff --git a/ng8-seed/src/app/components/contribute/contribute.component.html b/ng8-seed/src/app/components/contribute/contribute.component.html index f30372e..125f8d1 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.html +++ b/ng8-seed/src/app/components/contribute/contribute.component.html @@ -3,7 +3,7 @@
-
Contribute to Specific Need
+
Contribute to Specific Need

@@ -36,25 +36,23 @@
-
+
- + + +
- - - - - +
- + @@ -72,25 +70,25 @@ - + - + - + - + @@ -135,17 +133,17 @@ - + -
Contribute to General Development Fund
+
Contribute to General Development Fund
-
+
diff --git a/ng8-seed/src/app/components/contribute/contribute.component.scss b/ng8-seed/src/app/components/contribute/contribute.component.scss index d98078a..394aaa7 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.scss +++ b/ng8-seed/src/app/components/contribute/contribute.component.scss @@ -1,6 +1,12 @@ .calculated-shipping[_ngcontent-gen-c13]{ padding: 0px !important; } +.sidescroll{ + right: 45px !important; + height: fit-content; + position: fixed; + z-index: 1; +} a { text-decoration: underline; color: #4CAF50; @@ -16,7 +22,7 @@ a { td, th { width: 25%; - text-align: center; + // text-align: center; } table.shop-table { // border-collapse: separate; diff --git a/ng8-seed/src/app/components/contribute/contribute.component.ts b/ng8-seed/src/app/components/contribute/contribute.component.ts index 33493c2..0eee6fd 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.ts +++ b/ng8-seed/src/app/components/contribute/contribute.component.ts @@ -4,6 +4,7 @@ import { ApiService } from '../../shared/api.service'; import { FormGroup, FormBuilder, FormControl, Validators, } from '@angular/forms'; import { MatTableDataSource, MatPaginator, MatSort } from '@angular/material'; import { Router } from '@angular/router'; +import { SchoolDetailsService } from 'app/shared/school-details.service'; @@ -28,10 +29,11 @@ export class ContributeComponent implements OnInit { Total: any = []; grandTotal: any = []; finalData: any = []; + schRquId:any ; - constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) { + constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,public schInfo:SchoolDetailsService) { // Create 100 users - + } // ngOnInit() { @@ -53,6 +55,13 @@ export class ContributeComponent implements OnInit { this.initForm(); this.getSchoolReqList(); this.getSchoolReqList2(); + + this.schInfo.schReqId.subscribe(res=> + { + this.schRquId = res; + // console.log(res); + + }) // window.localStorage.clear(); } @@ -77,9 +86,19 @@ export class ContributeComponent implements OnInit { { if(schDet.dataStatus==true) { - this.dataLength = schDet.records.length; - this.dataSource.data = schDet.records; - + + let data =''; + // console.log(schDet.records); + if(this.schRquId.sch_req_id !='') + { + data = schDet.records.filter(sch=>sch.school_id==this.schRquId); + }else + { + data = schDet.records; + } + // console.log(data,this.schRquId); + this.dataSource.data = data; + this.dataLength = data.length; // console.log(this.material_category); // this.dataSource.data = schDet.records.map((val, i)=>{ // val['SerialNo'] = i + 2; @@ -89,6 +108,7 @@ export class ContributeComponent implements OnInit { } }) } + somethingChanged(e,i,item,mat_id){ // console.log(e,i,item); this.Total[i] = e*item; @@ -100,7 +120,7 @@ export class ContributeComponent implements OnInit { this.grandTotal = this.Total.reduce((acc, value) => acc + value, 0); } - + getSchoolReqList2() { @@ -146,6 +166,10 @@ export class ContributeComponent implements OnInit { }) // console.log('mat'+this.material_category); } + + reset(){ + this.Contribute.reset(); + } ngAfterViewInit() { // Hack: Scrolls to top of Page after page view initialized @@ -174,9 +198,11 @@ export class ContributeComponent implements OnInit { "contributions":this.finalData }}; - console.log(data); + // console.log(data); } - + refresh(): void { + window.location.reload(); +} } diff --git a/ng8-seed/src/app/components/project-detail/project-detail.component.html b/ng8-seed/src/app/components/project-detail/project-detail.component.html index a6b6543..5b34397 100644 --- a/ng8-seed/src/app/components/project-detail/project-detail.component.html +++ b/ng8-seed/src/app/components/project-detail/project-detail.component.html @@ -104,7 +104,7 @@
- +
@@ -184,7 +184,7 @@
RequirementSchool ImgSchool Img Required Qty {{row.qty}} {{row.qty}} Sponsor Qty Cost Per Unit (in RS) Cost Per Unit (in Rs) {{row.cost_per_unit === null?0:row.cost_per_unit}} Amount (in RS) Amount (in Rs) {{Total[i]}}
- +
diff --git a/ng8-seed/src/app/components/project-detail/project-detail.component.ts b/ng8-seed/src/app/components/project-detail/project-detail.component.ts index 838895b..86fda21 100644 --- a/ng8-seed/src/app/components/project-detail/project-detail.component.ts +++ b/ng8-seed/src/app/components/project-detail/project-detail.component.ts @@ -70,7 +70,7 @@ export class ProjectDetailComponent implements OnInit { ngAfterViewInit() { // Hack: Scrolls to top of Page after page view initialized let top = document.getElementById('top'); - console.log("d",top); + // console.log("d",top); if (top !== null) { top.scrollIntoView(); top = null; @@ -81,7 +81,16 @@ export class ProjectDetailComponent implements OnInit { this.sliderimg.goToSlide(index); } - + navigate(schReferId) + { + // console.log(schReferId); + let data = {'sch_req_id':schReferId}; + // console.log(88,data); + this.schInfo.updateSchRequ(schReferId); + this.router.navigate(['/contribute']); + } + + } \ No newline at end of file diff --git a/ng8-seed/src/app/components/project-list/project-list.component.html b/ng8-seed/src/app/components/project-list/project-list.component.html index a7c9b7f..1fb03e0 100644 --- a/ng8-seed/src/app/components/project-list/project-list.component.html +++ b/ng8-seed/src/app/components/project-list/project-list.component.html @@ -18,7 +18,7 @@
-
+
diff --git a/ng8-seed/src/app/components/project-list/project-list.component.ts b/ng8-seed/src/app/components/project-list/project-list.component.ts index 33690d4..a886411 100644 --- a/ng8-seed/src/app/components/project-list/project-list.component.ts +++ b/ng8-seed/src/app/components/project-list/project-list.component.ts @@ -50,7 +50,7 @@ export class ProjectListComponent implements OnInit { getschDetails(schDetails) { - let data = {'school_name':schDetails.school_name,'images':schDetails.images,'district_name':schDetails.district_name,'total_b':schDetails.total_b,'total_g':schDetails.total_g,'total':schDetails.total,'teach_tot':schDetails.teach_tot,'nonteach_tot':schDetails.nonteach_tot,'totstaff':schDetails.totstaff,'total_cost':schDetails.total_cost,'total_recevied':schDetails.total_recevied,'school_id':schDetails.school_id,'block_name':schDetails.block_name,'management':schDetails.management,'category':schDetails.category,'high_class':schDetails.high_class,'low_class':schDetails.low_class,'latitude':schDetails.longitude,'longitude':schDetails.longitude}; + let data = {'school_name':schDetails.school_name,'images':schDetails.images,'district_name':schDetails.district_name,'total_b':schDetails.total_b,'total_g':schDetails.total_g,'total':schDetails.total,'teach_tot':schDetails.teach_tot,'nonteach_tot':schDetails.nonteach_tot,'totstaff':schDetails.totstaff,'total_cost':schDetails.total_cost,'total_recevied':schDetails.total_recevied,'school_id':schDetails.school_id,'block_name':schDetails.block_name,'management':schDetails.management,'category':schDetails.category,'high_class':schDetails.high_class,'low_class':schDetails.low_class,'latitude':schDetails.longitude,'longitude':schDetails.longitude,'school_req_id':schDetails.school_req_id}; this.schInfo.updateDetails(data); this.router.navigate(['/home/project-detail']); diff --git a/ng8-seed/src/app/layouts/admin/admin-layout.component.html b/ng8-seed/src/app/layouts/admin/admin-layout.component.html index 0eded79..a259922 100644 --- a/ng8-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng8-seed/src/app/layouts/admin/admin-layout.component.html @@ -4,11 +4,11 @@