diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts
index b13f91512..fd77fd2ac 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts
@@ -498,7 +498,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
"fk_pd_type": formValue.fk_pd_type,
"fk_customer_segment": formValue.fk_customer_segment,
"loan_amount": formValue.loan_amount,
- "addressline1": !formValue.addresses[0].addressline1 ? null : this.titleCase.transform(formValue.addresses[0]),
+ "addressline1": !formValue.addresses[0].addressline1 ? null : this.titleCase.transform(formValue.addresses[0].addressline1),
"fk_city": formValue.addresses[0].fk_city,
"fk_state": formValue.addresses[0].fk_state,
"pincode": formValue.addresses[0].pincode,
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 f737a83bd..c244c50a9 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
@@ -189,18 +189,20 @@ export class AllPdComponent implements OnInit, OnChanges {
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
- console.log(JSON.stringify(this.searchForm.value));
+ console.log(JSON.stringify(this.searchForm.value));
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
{
this.xpandStatus = false;
if(res['dataStatus']==true)
{
this.dataSourceTab1.data = res['records'];
+ console.log('res[records]',res['records']);
this.dataSourceTab1.paginator = this.paginator;
}else{
// this.notifier.notify('warning', 'No Records Found');
this.dataSourceTab1 = this.tempStore;
+ console.log('this.tempStore',this.tempStore);
this.dataSourceTab1.paginator = this.paginator;
}
})
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html
index 748b63ce4..3f4830b81 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html
@@ -109,7 +109,7 @@
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts
index 7354bce7e..c5b9c654b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts
@@ -25,11 +25,14 @@ export class EditPdApplicantComponent implements OnInit {
relationShipList:any;
titleList: any;
CSAbbr:any;
+ disableAfterSubmit: boolean;
+
constructor(private _fb: FormBuilder,
private _pd: PdTrigerService, notifier: NotifierService, private dialogRef: MatDialogRef,
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
- this.notifier=notifier
+ this.notifier=notifier;
+ this.disableAfterSubmit = false;
}
ngOnInit() {
@@ -249,15 +252,19 @@ export class EditPdApplicantComponent implements OnInit {
}
pd_applicant_details.push(obj1)
});
- this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
+ this.disableAfterSubmit = true;
+ this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
if (result.status == 200) {
+ this.disableAfterSubmit = false;
this.notifier.notify('success', 'PD Details Updated.');
this.dialogRef.close();
}
else {
+ this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
}, error => {
+ this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
});
}
@@ -289,6 +296,7 @@ export class EditPdApplicantComponent implements OnInit {
}
/** To Reset Popup Data */
onReset() {
+ this.disableAfterSubmit = false;
if(this.data.records.length>0){
this.loadApplicantFormData();
}
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 ef4483f3a..dd12716fe 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
@@ -144,7 +144,7 @@
+ formControlName="addressline1" [value]="addresses.get('addressline1').value | titlecase">
@@ -223,7 +223,7 @@
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 46cc88071..0ba8c8814 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
@@ -35,6 +35,7 @@ export class EditPdMasterComponent implements OnInit {
// PDTriggerStatus: string;
enablePDButton: boolean;
currentPDStatus: string;
+ disableAfterSubmit: boolean;
pincodeflag : any = [];
public _EditPDtriggerForm:FormGroup;
@@ -57,6 +58,7 @@ export class EditPdMasterComponent implements OnInit {
this.notifier=notifier
this.currentPDStatus = data.records.pd_status;
this.pdid = data.records.pd_id;
+ this.disableAfterSubmit = false;
}
ngOnInit() {
@@ -471,17 +473,20 @@ export class EditPdMasterComponent implements OnInit {
// this.notifier.notify('warning', 'Something Wents Wrong in Address Try Again.!');
this.notifier.notify('warning', 'Something Wents Wrong in Address Section Try Again.!' + '-' + error.error_text + ' occur');
});
-
+ this.disableAfterSubmit = true;
this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => {
if (result.status == 200) {
+ this.disableAfterSubmit = false;
this.notifier.notify('success', 'PD Details Updated.');
this.dialogRef.close();
}
else {
+ this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}//else
}, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
});//error closed
}//else closed
@@ -489,6 +494,7 @@ export class EditPdMasterComponent implements OnInit {
}
/** To Reset Popup Data */
onReset() {
+ this.disableAfterSubmit = false;
this.loadFormData();
}
/** For Popup Close Button */
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts
index 2a5d3d2df..e38e5f79b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts
@@ -46,7 +46,7 @@ export class OtherIncomeComponent implements OnInit {
parent_pdid: string;
pdid: string;
form_id: number;
-
+ rental_form_id:number;
public otherIncomeForm: FormGroup;
private notifier: NotifierService;
frequencyData: any = [];
@@ -70,6 +70,7 @@ export class OtherIncomeComponent implements OnInit {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 9;
+ this.rental_form_id = 17;
this.notifier = notifier;
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
@@ -307,8 +308,43 @@ export class OtherIncomeComponent implements OnInit {
records.other_income = this.otherIncomeForm.controls['other_income'].value;
records.otherincome_remarks = this.otherIncomeForm.controls['otherincome_remarks'].value;
+
+
if (this.otherIncomeForm.controls['other_income'].value == 'Yes') {
records.income_details = this.otherIncomeForm.controls['income_details'].value;
+
+ let s: number = 0;
+ let rentOptionCount: number = 0;
+
+ records.income_details.forEach(option => {
+ console.log(option);
+ console.log(option.source);
+ if (+option.source == 5) {
+ rentOptionCount++;
+ console.log(option.source);
+ let params: any = {};
+ params.parent_pdid = this.parent_pdid;
+ params.pd_id = this.pdid;
+ params.pd_form_id = this.rental_form_id;
+ this._pd.retriveForm(params).subscribe(data => {
+ data.dataStatus == false ? s = 1 : s = 0;
+ console.log(s);
+ if(s == 1){
+ this.notifier.notify('warning', "You have choose "+ rentOptionCount +" rent option but you didn't fill the rental verification form please fill it");
+ s = 0;
+ rentOptionCount = 0;
+ return;
+ }
+
+ });
+ }
+ });
+ if(s == 1){
+ this.notifier.notify('warning', "You have choose "+ rentOptionCount +" rent option but you didn't fill the rental verification form please fill it");
+ s = 0;
+ rentOptionCount = 0;
+ return;
+ }
}
this._pd.saveForm(records).subscribe(data => {