From 216ca42eca69b404efc1519c58225c3437b5104e Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 21 Jan 2019 23:36:46 +0530 Subject: [PATCH] changes : ps --- .../edit-pd-master.component.html | 19 ++- .../edit-pd-master.component.ts | 22 ++- .../banking-details.component.html | 36 +---- .../loan-details/loan-details.component.html | 147 ++++++------------ .../list-pd/view-pd/view-pd.component.html | 6 +- .../list-pd/view-pd/view-pd.component.ts | 91 +++++++---- 6 files changed, 155 insertions(+), 166 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html index dffba6653..74244878b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html @@ -22,7 +22,8 @@ Select - + + {{LL.full_name}} @@ -49,6 +50,17 @@ Enter Valid Landline Number. + + + + + Select + + + {{LB.branch_name}} + + + @@ -152,8 +164,9 @@
- - + + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts index 1ef203c37..6a378bc3b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts @@ -21,6 +21,7 @@ export class EditPdMasterComponent implements OnInit { cityList:any; pdTypeList:any; billingList:any; + lenderBranchList: any; pincodeList: any = []; applicantLength:number; // draftStatus: string; @@ -66,10 +67,20 @@ export class EditPdMasterComponent implements OnInit { this._pd.getLenderDetails().subscribe( data => { if (data.status == 200) { - this.lenderList=data.records + this.lenderList=data.records; + let x = this.lenderList.filter(item => item.entity_id == this.data.records.fk_lender_id) + this.lenderBranchList = x[0]['branches']; } }, error => this.errorMessage = error); } + selectedLender(lender){ + // console.log(JSON.stringify(lender)); + // alert(JSON.stringify(lender['branches '])); + this.lenderBranchList = lender['branches']; + // console.log(this.lenderBranchList); + this._EditPDtriggerForm.controls.pd_branch_id.setValue(null); + + } getProductsList(){ this._pd.getProductsDetails().subscribe( data => { @@ -122,7 +133,7 @@ export class EditPdMasterComponent implements OnInit { } loadFormData() { - console.log('this.data.record',this.data.records); + // console.log('this.data.record',this.data.records); let stdcode; let landline; if(this.data.records.pd_contact_landline){ @@ -143,6 +154,7 @@ export class EditPdMasterComponent implements OnInit { pd_id: [this.data.records.pd_id], fk_lender_id: [this.data.records.fk_lender_id, Validators.compose([Validators.required])], lender_applicant_id: [this.data.records.lender_applicant_id, Validators.compose([Validators.required])], + pd_branch_id:[this.data.records.pd_branch_id, Validators.compose([Validators.required])], pd_contact_person: [this.data.records.pd_contact_person, Validators.compose([Validators.required])], pd_contact_mobileno: [this.data.records.pd_contact_mobileno, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], lender_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])], @@ -269,7 +281,8 @@ export class EditPdMasterComponent implements OnInit { } submitPdDetails(formValue: any, status:string) { - let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus; + // let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus; + let updateStatus = this.currentPDStatus; if(this._EditPDtriggerForm.invalid) { this.validateAllFormFields(this._EditPDtriggerForm); this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); @@ -301,6 +314,7 @@ export class EditPdMasterComponent implements OnInit { "pd_id": my_array.pd_id, "fk_lender_id": my_array.fk_lender_id, "lender_applicant_id": my_array.lender_applicant_id, + "pd_branch_id":my_array.pd_branch_id, "pd_contact_person": my_array.pd_contact_person, "pd_contact_mobileno": my_array.pd_contact_mobileno, "pd_contact_landline": concat_landline, @@ -316,7 +330,7 @@ export class EditPdMasterComponent implements OnInit { "remarks": my_array.remarks, } - console.log(lenderMasterArray); + // console.log(lenderMasterArray); this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => { if (result.status == 200) { this.notifier.notify('success', 'PD Details Updated.'); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index 1a53c07fa..3264a1536 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -86,7 +86,6 @@ - @@ -103,24 +102,10 @@ - - - - {{ btLen.lender_name }} @@ -136,14 +121,6 @@ {{ prop.name }} - @@ -170,10 +147,6 @@ {{"₹"}} {{amtInwords[i]}} Only -

@@ -186,14 +159,13 @@
- - - 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 c1d2779bc..afccb1b77 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 @@ -19,7 +19,6 @@ - {{"₹"}} {{loanAmtInWords}} Only @@ -94,21 +93,7 @@ - - - - + @@ -117,89 +102,57 @@ - - -

Details of Property being Mortgaged

- - - - {{ typeprop.property_name }} - - - - - {{CompanyApplicantGroupList2 | json}} - - - - - + + +

Details of Property being Mortgaged

+ + + + {{ typeprop.property_name }} + + - {{ status.applicant_name }} + + + + + + + + {{ status.applicant_name }} + + + + + + + + + + + + {{ status.name }} + + + + + + {{"₹"}} {{emvAmtInWords}} Only + - - -
- -
- - - - - - {{ status.name }} - - - - - - - - - - {{"₹"}} {{emvAmtInWords}} Only - - -
+
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 579ec64a2..e99dc07ec 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 @@ -21,6 +21,7 @@ QC Completed    +
{{master.pd_allocated_to | titlecase}} {{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} @@ -48,6 +49,8 @@ + + @@ -91,7 +94,8 @@
- + +
{{master.addressline1}},
{{master.city_name}},
{{master.state_name}}-{{master.pincode}}
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 ce1e56fd8..124fafbd1 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 @@ -48,7 +48,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { {'backEnd_FieldName':"pd_contact_person",'frontEnd_FieldName':"Lender Contact Person"}, {'backEnd_FieldName':"pd_contact_mobileno",'frontEnd_FieldName':"Lender's Mobile Number"}, {'backEnd_FieldName':"pd_branch_id",'frontEnd_FieldName':"Branch"}, - {'backEnd_FieldName':"pd_contact_landline",'frontEnd_FieldName':"Lender's Landline Number"}]; + {'backEnd_FieldName':"pd_contact_landline",'frontEnd_FieldName':"Lender's Landline Number"}, + {'backEnd_FieldName':"main_applicant",'frontEnd_FieldName':"Applicant Master"}]; // localMandatoryFields: any= // ['fk_lender_id', // 'lender_applicant_id', @@ -122,6 +123,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { pd_QC_Rating: Number; viewPdDetails(editID:string){ + this.pdMasterData = []; this._pd.editPdDetails(editID).subscribe( data => { if (data.status == 200) { @@ -161,6 +163,12 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.ListPdComponent.pdListLoad(true); } + Maponclick(master : any){ + let url = "https://www.google.com/maps/place/" + let concat_url = url+master.addressline1+'/'+master.city_name+','+master.pincode+','+master.state_name; + window.open(concat_url,'_blank'); + } + editPdMaster(masterData:any){ let record = { "records":masterData, @@ -179,7 +187,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.FilteredFieldNames.forEach(field => { ffd.push(field.frontEnd_FieldName); }); - this.notifier.notify('info', 'Please Fill ' + ffd.join(',') + ' are Fields.!'); + // this.notifier.notify('info', 'Please Fill ' + ffd.join(',') + ' are Fields.!'); + this.notifier.notify('warn', 'Please Fill ' + ffd.join(' , ') + ' Fields.!'); } }); dialogPDMaster.afterClosed().subscribe(dataresult => { @@ -294,43 +303,67 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.router.navigate([ '../../pdRecord',pdID], { relativeTo: this.route }); } + // // direct trigger the pd + // directTriggerPD(data: any,masterdetail : any){ + // let pdid = masterdetail.pd_id; + + // if(data.length>0){ + // let getValues = data.filter(val =>val).map(Val => Val); + // this.FilteredFieldNames = getValues.map(x => { + // let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x); + // return this.localMandatoryFields[findIndex]; + // }); + // this.localcount = 1; + // this.editPdMaster(masterdetail); + // } + + // 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 + // } + + // } + + // direct trigger the pd directTriggerPD(data: any,masterdetail : any){ -/** */ -let pdid = masterdetail.pd_id; -let getValues = data.filter(val =>val).map(Val => Val); -this.FilteredFieldNames = getValues.map(x => { - let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x); - return this.localMandatoryFields[findIndex]; -}); - + let pdid = masterdetail.pd_id; + let getValues = data.filter(val =>val).map(Val => Val); + this.FilteredFieldNames = getValues.map(x => { + let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x); + return this.localMandatoryFields[findIndex]; + }); if(data.length>0){ - - // FilteredFieldNames.forEach(field => { - - // }); - this.localcount = 1; - this.editPdMaster(masterdetail); - - // alert(this.localMandatoryFields); + this.localcount = 1; + this.editPdMaster(masterdetail); } else { - let lenderMasterArray = { - "pd_id": pdid, - } + 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 + 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.!'); + } }, error => { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - });//error closed + }); } }