-
+
+
{{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
+ });
}
}