diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index c7df44004..a99ba910b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -1,5 +1,5 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts index 956eff2f8..1f1a6702c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts @@ -15,12 +15,12 @@ import { NotifierService } from 'angular-notifier'; export class AllPdComponent implements OnInit, OnChanges { xpandStatus: boolean = false; - PRODUCTS: any; - ENTITY: any; - CITY: any; + PRODUCTS:any[]=[]; + ENTITY: any[]=[] + CITY: any[]=[] tempStore = new MatTableDataSource(); - PDType: any; - pdStatus: any; + PDType: any[]=[] + pdStatus: any[]=[] searchForm:FormGroup; pipe = new DatePipe('en-US'); public notifier : NotifierService; @@ -61,6 +61,7 @@ export class AllPdComponent implements OnInit, OnChanges { pd_name:[null], pd_applicant_id:[null], }); + this.getcommonDropDown(); } ngOnInit() { @@ -119,7 +120,7 @@ export class AllPdComponent implements OnInit, OnChanges { * sriram */ - getcommonDropDown() + getcommonDropDown(): void { this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=> { @@ -137,11 +138,11 @@ export class AllPdComponent implements OnInit, OnChanges { } }); - this._pd.getAllMasterDatas('CITY').subscribe(res=> + this._pd.getListOfCities().subscribe(res=> { if(res.dataStatus==true) { - this.CITY = res.records.filter(city=>city.isactive==1); + this.CITY = res.records; } }); this._pd.getAllMasterDatas('ENTITY').subscribe(res=> diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index e78ff84b5..6bffc56a4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -1,6 +1,6 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts index 7c2f35772..ded10cde3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts @@ -14,11 +14,11 @@ import { DatePipe } from '@angular/common'; export class CompletedPdComponent implements OnInit, OnChanges { xpandStatus: boolean = false; - PRODUCTS: any; - CITY: any; - ENTITY: any; - PDType: any; - pdStatus: any; + PRODUCTS: any[]=[]; + CITY: any[]=[]; + ENTITY: any[]=[]; + PDType: any[]=[]; + pdStatus: any[]=[]; recordStatus: boolean; errorMessage:any[]=[]; tabStatus:string="COMPLETED"; @@ -61,6 +61,7 @@ export class CompletedPdComponent implements OnInit, OnChanges { pd_name:[null], pd_applicant_id:[null], }); + this.getcommonDropDown(); } ngOnInit() { @@ -119,7 +120,7 @@ export class CompletedPdComponent implements OnInit, OnChanges { * sriram */ - getcommonDropDown() + getcommonDropDown(): void { this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=> { @@ -138,11 +139,18 @@ export class CompletedPdComponent implements OnInit, OnChanges { } }); - this._pd.getAllMasterDatas('CITY').subscribe(res=> + // this._pd.getAllMasterDatas('CITY').subscribe(res=> + // { + // if(res.dataStatus==true) + // { + // this.CITY = res.records.filter(city=>city.isactive==1); + // } + // }); + this._pd.getListOfCities().subscribe(res=> { if(res.dataStatus==true) { - this.CITY = res.records.filter(city=>city.isactive==1); + this.CITY = res.records; } }); this._pd.getAllMasterDatas('ENTITY').subscribe(res=> diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html index 11b419a2d..f4a00c56c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html @@ -1,5 +1,5 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts index 7ddb7474a..95a5fd103 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts @@ -12,11 +12,11 @@ import { DatePipe } from '@angular/common'; }) export class InprogressPdComponent implements OnInit, OnChanges { xpandStatus: boolean = false; - PRODUCTS: any; - ENTITY: any; - CITY: any; - PDType: any; - pdStatus: any; + PRODUCTS: any[]=[]; + ENTITY: any[]=[]; + CITY: any[]=[]; + PDType: any[]=[]; + pdStatus: any[]=[]; recordStatus: boolean; errorMessage:any[]=[]; tabStatus:string="INPROGRESS"; @@ -55,6 +55,7 @@ export class InprogressPdComponent implements OnInit, OnChanges { pd_name:[null], pd_applicant_id:[null], }); + this.getcommonDropDown(); } ngOnInit() { @@ -112,7 +113,7 @@ export class InprogressPdComponent implements OnInit, OnChanges { * sriram */ - getcommonDropDown() + getcommonDropDown() : void { this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=> { @@ -131,11 +132,18 @@ export class InprogressPdComponent implements OnInit, OnChanges { } }); - this._pd.getAllMasterDatas('CITY').subscribe(res=> + // this._pd.getAllMasterDatas('CITY').subscribe(res=> + // { + // if(res.dataStatus==true) + // { + // this.CITY = res.records.filter(city=>city.isactive==1); + // } + // }); + this._pd.getListOfCities().subscribe(res=> { if(res.dataStatus==true) { - this.CITY = res.records.filter(city=>city.isactive==1); + this.CITY = res.records; } }); this._pd.getAllMasterDatas('ENTITY').subscribe(res=> diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html index 6b7d3eec3..05b38c1eb 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html @@ -1,5 +1,5 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts index 6794173ad..97d4fc0e2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts @@ -14,11 +14,11 @@ import { DatePipe } from '@angular/common'; export class QcCompletedPdComponent implements OnInit, OnChanges { xpandStatus: boolean = false; - PRODUCTS: any; - ENTITY: any; - CITY: any; - PDType: any; - pdStatus: any; + PRODUCTS: any[] = []; + ENTITY: any[] = []; + CITY: any[] = []; + PDType: any[] = []; + pdStatus: any[] = []; recordStatus: boolean; errorMessage: any[] = []; tabStatus: string = "QC_COMPLETED"; @@ -59,6 +59,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges { pd_name: [null], pd_applicant_id: [null], }); + this.getcommonDropDown(); } ngOnInit() { @@ -115,7 +116,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges { * sriram */ - getcommonDropDown() { + getcommonDropDown():void { this._pd.getAllMasterDatas('PDSTATUS').subscribe(res => { if (res.dataStatus == true) { this.pdStatus = res.records.filter(status => status.isactive == 1 && status.pd_status_name == this.tabStatus); @@ -128,11 +129,19 @@ export class QcCompletedPdComponent implements OnInit, OnChanges { this.PDType = res.records.filter(type => type.isactive == 1); } }); - this._pd.getAllMasterDatas('CITY').subscribe(res => { - if (res.dataStatus == true) { - this.CITY = res.records.filter(city => city.isactive == 1); - } - }); + // this._pd.getAllMasterDatas('CITY').subscribe(res => { + // if (res.dataStatus == true) { + // this.CITY = res.records.filter(city => city.isactive == 1); + // } + // }); + this._pd.getListOfCities().subscribe(res=> + { + if(res.dataStatus==true) + { + this.CITY = res.records; + } + }); + this._pd.getAllMasterDatas('ENTITY').subscribe(res => { if (res.dataStatus == true) { this.ENTITY = res.records.filter(ent => ent.isactive == 1); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts index 795d78bc0..d102fd7e1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts @@ -66,12 +66,11 @@ export class SchedulePdComponent implements OnInit, OnDestroy { ngOnInit() { this.validateTime = setInterval(() => { let currentTime:any = new Date(); - currentTime = currentTime.getFullYear()+'-'+currentTime.getMonth()+'-'+currentTime.getDay()+currentTime.getHours()+'-'+currentTime.getMinutes(); + currentTime = currentTime.getFullYear()+'-'+currentTime.getMonth()+'-'+currentTime.getDay()+'-'+currentTime.getHours()+'-'+currentTime.getMinutes(); let existTime:any = this.selectedMoment.getFullYear()+'-'+this.selectedMoment.getMonth()+'-'+this.selectedMoment.getDay() +'-'+this.selectedMoment.getHours()+'-'+this.selectedMoment.getMinutes(); if(existTime < currentTime) { this.selectedMoment = new Date(); this.min = new Date(); - } },1000); } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html index ec5f4dcc3..97cdd5535 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html @@ -1,5 +1,5 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts index ddcdbe726..c31951f5d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts @@ -12,11 +12,11 @@ import { DatePipe } from '@angular/common'; }) export class ScheduledPdComponent implements OnInit, OnChanges { xpandStatus: boolean = false; - PRODUCTS: any; - ENTITY: any; - CITY: any; - PDType: any; - pdStatus: any; + PRODUCTS: any[]=[]; + ENTITY: any[]=[]; + CITY: any[]=[]; + PDType: any[]=[]; + pdStatus: any[]=[]; recordStatus: boolean; errorMessage:any[]=[]; tabStatus:string="SCHEDULED"; @@ -56,6 +56,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges { pd_name:[null], pd_applicant_id:[null], }); + this.getcommonDropDown(); } ngOnInit() { @@ -112,7 +113,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges { * sriram */ - getcommonDropDown() + getcommonDropDown() : void { this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=> { @@ -130,13 +131,21 @@ export class ScheduledPdComponent implements OnInit, OnChanges { this.PDType = res.records.filter(type=>type.isactive==1); } }); - this._pd.getAllMasterDatas('CITY').subscribe(res=> + // this._pd.getAllMasterDatas('CITY').subscribe(res=> + // { + // if(res.dataStatus==true) + // { + // this.CITY = res.records.filter(city=>city.isactive==1); + // } + // }); + this._pd.getListOfCities().subscribe(res=> { if(res.dataStatus==true) { - this.CITY = res.records.filter(city=>city.isactive==1); + this.CITY = res.records; } }); + this._pd.getAllMasterDatas('ENTITY').subscribe(res=> { if(res.dataStatus==true) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index c715e62ad..0af985710 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -112,9 +112,10 @@ export class StartPdComponent implements OnInit, OnDestroy { let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName[0].applicant_name; this.currentPDStatus = data.records.pdmaster_details.pd_status=='INPROGRESS' ? true : data.records.pdmaster_details.pd_status=='SCHEDULED' ? true :data.records.pdmaster_details.pd_status=='ALLOCATED' ? true : false; - this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]); + this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true); + // this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true); this.actualQuestions = this.categoryFormButtons.length; - let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered==true); + let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true); this.answeredQuestions = getAnsweredFormsCount.length; this.pdFullDetails = data.records diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index 202f6ff90..6ac7bb7ef 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -550,4 +550,13 @@ export class PdTrigerService { ); } + // get list of cities for p serach options + getListOfCities() { + return this._http.get(this.apiUrl + 'getListOfCities') + .pipe( + catchError(this.handleError('role', [])) + ) + } + + }