From 39ca8d1f0bfc6f4fa1767413876d05fa33a81be2 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 12 Jan 2019 12:32:08 +0530 Subject: [PATCH] merge : ps --- .../list-pd/view-pd/view-pd.component.html | 4 +- .../list-pd/view-pd/view-pd.component.ts | 37 +++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index b93dd18bd..d28b5bf94 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -15,12 +15,12 @@ {{master.lender_applicant_id}}
{{master.pd_date_of_initiation}}

-    - +
{{master.pd_allocated_to | titlecase}} {{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 35ecf7c2d..a5182125c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -46,6 +46,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { "QC_COMPLETED" :'QC_COMPLETED', }; + mandatoryFieldsValidations: any=[]; + // @Input() childData: string; // @Output() loadParent = new EventEmitter(); public _EditPDtriggerForm:FormGroup; @@ -70,13 +72,10 @@ export class ViewPdComponent implements OnInit, OnDestroy { this._pd.editPdDetails(editID).subscribe( data => { if (data.status == 200) { - this.pdMasterData = data.records.pd_master_details; - this.pdMasterData = Object.keys(data.records.pd_master_details).map(function (key) - { - return data.records.pd_master_details[key]; - }); - // console.log(this.pdMasterData); - this.pd_QC_Rating = Number(this.pdMasterData[0].qc_rating); + let masterData: any = data.records.pd_master_details; + this.pdMasterData.push(masterData[0]); + this.mandatoryFieldsValidations = masterData[1].mandatory_fields; + this.pd_QC_Rating = Number(this.pdMasterData.qc_rating); this.pdApplicantData= data.records.applicants_details; this.pdDocumentsData=data.records.pd_documnets; this.masterPdLogsData=data.records.pd_logs.master; @@ -233,6 +232,30 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.router.navigate([ '../../pdRecord',pdID], { relativeTo: this.route }); } + // direct trigger the pd + directTriggerPD(data: any,pdid:string){ + if(data.length>0){ + this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); + } + else { + let lenderMasterArray = { + "pd_id": pdid, + } + this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => { + if (result.status == 200) { + this.notifier.notify('success', 'PD Status Updated.'); + this.viewPdDetails(this.viewID); + } + else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }//else + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + });//error closed + } + + } + // updateViewComponent(editBack:string) { // if(editBack=='1'){