From bce50abd9268166dfd16609446e4c740d5435538 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 26 Jan 2019 12:17:57 +0530 Subject: [PATCH 1/3] schedule pd changes --- .../manage-pd/list-pd/schedule-pd/schedule-pd.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } From a97df7732afc428861b0ab869274c32549935086 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 26 Jan 2019 12:18:23 +0530 Subject: [PATCH 2/3] merge : kms --- .../loan-details/loan-details.component.html | 6 +- .../loan-details/loan-details.component.ts | 114 +++++++----------- .../start-pd/forms/stock/stock.component.html | 56 ++++++--- 3 files changed, 86 insertions(+), 90 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index 439542d43..2791a7b2d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -116,7 +116,7 @@ - @@ -145,9 +145,9 @@ --> - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 4064169bb..375560841 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -86,32 +86,9 @@ export class LoanDetailsComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { this.applicants = this.pd_all_details.pdapplicants_detials; + // this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2) - this.companies = this.pd_all_details.pdapplicants_detials.filter(appt=>appt.applicant_type == 2 ) - - let modifyApplicantList: any=[]; - if(this.applicants.length > 0){ - modifyApplicantList = this.applicants.map(element => { - return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; - }); - this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) - } - - this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ - if(data.dataStatus){ - this.existCompanyList = data.records.filter(val =>val.is_active===true); - } - - let modifyCompanyList : any=[]; - if(this.existCompanyList.length>0){ - modifyCompanyList = this.existCompanyList.map(element => { - return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; - }); - this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) - } - - }); - + // this.companies = this.pd_all_details.pdapplicants_detials.filter(appt=>appt.applicant_type == 2 ) this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr; this.productID = this.pd_all_details.pdmaster_details.fk_product_id; this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name; @@ -151,29 +128,26 @@ export class LoanDetailsComponent implements OnInit { this.getM_StatusofCunstruction(); this.getM_BTLenderList(); - // this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ - // if(data.dataStatus){ - // this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); - // } - - // let modifyCompanyList : any=[]; - // if(this.existCompanyList.length>0){ - // modifyCompanyList = this.existCompanyList.map(element => { - // return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; - // }); - // this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) - // } - // let modifyApplicantList: any=[]; - // if(this.applicants.length > 0){ - // modifyApplicantList = this.applicants.map(element => { - // return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; - // }); - // this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) - // this.mergeCompanyApplicant.splice(this.mergeCompanyApplicant.indexOf(languague), 1); - // // this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1); - - // } - // }) + this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ + if(data.dataStatus){ + this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); + } + let modifyCompanyList : any=[]; + if(this.existCompanyList.length>0){ + modifyCompanyList = this.existCompanyList.map(element => { + return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; + }); + this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) + } + let modifyApplicantList: any=[]; + if(this.applicants.length > 0){ + modifyApplicantList = this.applicants.map(element => { + return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; + }); + this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) + // this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1); + } + }) let params: any = {}; @@ -358,42 +332,35 @@ getM_sourceofamount() { } getM_MortageTypeProperty() { - // this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe( this._pd.getAllMasterDatas('MORTAGEPROPERTIES').subscribe( data => { - - // this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); - // this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr); if(data.dataStatus==true){ let that = this; this.m_mortageTypeProperty = data.records.filter( function(data){ + console.log(data); if(that.productAbbr != "LAP"){ + console.log(that.productAbbr); if(data.group_name == that.productAbbr && data.isactive==1){ return data; } } else if(that.productAbbr == "LAP"){ - if(data.sub_group_name == that.subProductName && data.isactive==1){ + console.log(that.productAbbr); + console.log(that.subProductName); + console.log(data.sub_group_name); + if(data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive==1){ + console.log('lap with subproduct',data); return data; - } + } + else if(data.group_name == that.productAbbr && data.sub_group_name != null && data.isactive==1) { + console.log('lap with subproduct null',data); + return data; + } } - // if(data.isactive==1 && data.group_name != "LAP"){ - // if(data.group_name == that.productAbbr){ - // return data;} - // }else if(data.group_name == "LAP" && data.sub_group_name == that.subProductName){ - // return data; - // }else{ - // return ; - // } }); - // console.log(this.m_mortageTypeProperty); - // console.log(this.propertyType); - // this.mortage_type(this.propertyType); - // if(this.propertyType != ''){ - // this.mortage_type(this.propertyType); - // } + console.log(this.m_mortageTypeProperty); } }, error => { @@ -560,10 +527,11 @@ getM_sourceofamount() { records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value; // get end user final group data - let dataEnd_user_data = []; - this.loanDetailsForm.controls['end_use'].value.forEach(element => { + let dataEnd_user_data = []; + + this.loanDetailsForm.controls['end_use'].value.forEach(element => { dataEnd_user_data.push({end_use: element}) - }); + }); records.end_use_group = dataEnd_user_data; if (this.isOtherPurpose) { @@ -618,9 +586,9 @@ getM_sourceofamount() { dataOwner_name.push({owner_name: element}) }); records.owner_name_group = dataOwner_name; - // if(this.OtherOwnerFlag){ + // if(this.loanDetailsForm.controls['other_owners_name'].value != null){ // records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value; - // }else{ records.other_owners_name = ''; } + // }else{ records.other_owners_name = null; } records.construction_status = this.loanDetailsForm.controls['construction_status'].value; records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value; }else{ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index c253d9559..3aaff1eaa 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -72,14 +72,18 @@ +
+
+
+
@@ -144,18 +148,22 @@ +
+
+
+
@@ -220,14 +228,18 @@ +
+
+
+
@@ -304,14 +316,18 @@ --> +
+
+
+
@@ -376,14 +392,18 @@ +
+
+
+
@@ -462,14 +482,18 @@ +
+
+
+
@@ -534,14 +558,18 @@ +
+
+
+
From e2d00d6959f4d167ab00c288732932927d898108 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 26 Jan 2019 18:30:31 +0530 Subject: [PATCH 3/3] start pd layout change and pd search options changes --- .../list-pd/all-pd/all-pd.component.html | 6 ++-- .../list-pd/all-pd/all-pd.component.ts | 17 +++++----- .../completed-pd/completed-pd.component.html | 6 ++-- .../completed-pd/completed-pd.component.ts | 24 +++++++++----- .../inprogress-pd.component.html | 6 ++-- .../inprogress-pd/inprogress-pd.component.ts | 24 +++++++++----- .../qc-completed-pd.component.html | 6 ++-- .../qc-completed-pd.component.ts | 31 ++++++++++++------- .../scheduled-pd/scheduled-pd.component.html | 6 ++-- .../scheduled-pd/scheduled-pd.component.ts | 25 ++++++++++----- .../list-pd/start-pd/start-pd.component.ts | 5 +-- .../pd-service/pd-triger.service.ts | 9 ++++++ 12 files changed, 105 insertions(+), 60 deletions(-) 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/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', [])) + ) + } + + }