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 @@