diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 8595c692a..d038e7b67 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -227,22 +227,22 @@ - + {{"₹"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only Given Value is More than Net Salary Given Value is Less than Net Salary - + {{"₹"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only Given Value is More than Net Salary Given Value is Less than Net Salary - - + + Select Validated Not Validated diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts index a3ffef586..8b9b6cfbf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts @@ -35,7 +35,7 @@ export class EmploymentInfoComponent implements OnInit { lender_applicant_id: any; main_applicant: any; - pageTitle: string = "Employement Information"; + pageTitle: string = "Employment Information"; parent_pdid: number; pdid: number; form_id: number; @@ -165,12 +165,16 @@ export class EmploymentInfoComponent implements OnInit { this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary); this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary); this.employmentForm.controls['mode_of_getting_salary'].setValue(value.records.mode_of_getting_salary); - if(value.records.mode_of_getting_salary == 'paid_in_cash' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){ - this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash); - } - if(value.records.mode_of_getting_salary == 'bank_transfer' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){ - this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank); - } + if(value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){ + this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash); + this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank); + } + // if(value.records.mode_of_getting_salary == 'paid_in_cash' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){ + // this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash); + // } + // if(value.records.mode_of_getting_salary == 'bank_transfer' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){ + // this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank); + // } this.employmentForm.controls['check_validated'].setValue(value.records.check_validated); this.employmentForm.controls['how_was_it_validated'].setValue(value.records.how_was_it_validated); @@ -512,12 +516,13 @@ export class EmploymentInfoComponent implements OnInit { records.confirm_salary = this.employmentForm.controls['confirm_salary'].value; if (this.employmentForm.controls['confirm_salary'].value == 'yes') { records.confirm_salary_amount = this.employmentForm.controls['confirm_salary_amount'].value; - records.total_business_experience = this.employmentForm.controls['total_business_experience'].value; - records.total_business_previous_experience = this.employmentForm.controls['total_business_previous_experience'].value; + }else if(this.employmentForm.controls['confirm_salary'].value == 'no'){ records.sal_amount_was_not_confirmed = this.employmentForm.controls['sal_amount_was_not_confirmed'].value; } + records.total_business_experience = this.employmentForm.controls['total_business_experience'].value; + records.total_business_previous_experience = this.employmentForm.controls['total_business_previous_experience'].value; records.attendance_seen = this.employmentForm.controls['attendance_seen'].value; records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value; records.from_date_the_salary_is_rcv = this.employmentForm.controls['from_date_the_salary_is_rcv'].value; @@ -526,12 +531,16 @@ export class EmploymentInfoComponent implements OnInit { records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value; records.mode_of_getting_salary = this.employmentForm.controls['mode_of_getting_salary'].value; - if(this.employmentForm.controls['mode_of_getting_salary'].value == 'paid_in_cash' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){ + if(this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){ records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value; - } - if(this.employmentForm.controls['mode_of_getting_salary'].value == 'bank_transfer' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){ records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; } + // if(this.employmentForm.controls['mode_of_getting_salary'].value == 'paid_in_cash' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){ + // records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value; + // } + // if(this.employmentForm.controls['mode_of_getting_salary'].value == 'bank_transfer' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){ + // records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; + // } records.check_validated = this.employmentForm.controls['check_validated'].value; records.how_was_it_validated = this.employmentForm.controls['how_was_it_validated'].value; records.why_was_it_not_validated = this.employmentForm.controls['why_was_it_not_validated'].value; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html index 78c5cf5b0..9a37a1685 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html @@ -342,6 +342,8 @@
+
+
As per Applicant Questions
Is Name of the Tenant(s)/Lessees(s) of the Let out Property Provided ? @@ -435,8 +437,10 @@ - +
+
+
As per rent agreement Questions
Rent Agreement Seen @@ -542,8 +546,11 @@ +
- + +
+
As per Tenant(s)/Lessee Met Questions
Tenant(s) / Lessee(s) Met During Visit of the Rented Property @@ -641,15 +648,16 @@ - - - What is the Reason for Difference in Rent Amount + + --> + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts index cc6497bb0..a9fe41411 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts @@ -376,25 +376,29 @@ export class ManageRentalVerificationComponent implements OnInit { element.amount_received_cash_per_met ? control.controls[index].addControl('amount_received_cash_per_met', new FormControl('')) : control.controls[index].removeControl('amount_received_cash_per_met'); element.amount_received_bank_per_met ? control.controls[index].addControl('amount_received_bank_per_met', new FormControl('')) : control.controls[index].removeControl('amount_received_bank_per_met'); element.payment_received_reason_per_met ? control.controls[index].addControl('payment_received_reason_per_met', new FormControl('', Validators.required)) : control.controls[index].removeControl('payment_received_reason_per_met'); - (element.met_tenant_lessees_options=="1") ? control.controls[index].addControl('payment_difference_per_met', new FormControl('')) : control.controls[index].removeControl('payment_difference_per_met'); + // (element.met_tenant_lessees_options=="1") ? control.controls[index].addControl('payment_difference_per_met', new FormControl('')) : control.controls[index].removeControl('payment_difference_per_met'); if(element.payment_mode_per_met){ + + if(element.payment_mode_per_met.id == 3){ + this.ValidatedRentAmount(element,index,2); + } - let ChildCtrl : any = control.controls[index]; - if(element.payment_mode_per_met.id == 1){ + // let ChildCtrl : any = control.controls[index]; + // if(element.payment_mode_per_met.id == 1){ - ChildCtrl.controls['amount_received_cash_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]); - ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity(); - } - else if(element.payment_mode_per_met.id == 2){ + // ChildCtrl.controls['amount_received_cash_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]); + // ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity(); + // } + // else if(element.payment_mode_per_met.id == 2){ - ChildCtrl.controls['amount_received_bank_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]); - ChildCtrl.controls['amount_received_bank_per_met'].updateValueAndValidity(); - } - else if(element.payment_mode_per_met.id == 3){ + // ChildCtrl.controls['amount_received_bank_per_met'].setValidators([Validators.required,Validators.max(element.paid_monthly_rent_per_met),Validators.min(element.paid_monthly_rent_per_met)]); + // ChildCtrl.controls['amount_received_bank_per_met'].updateValueAndValidity(); + // } + // else if(element.payment_mode_per_met.id == 3){ - this.ValidatedRentAmount(element,index,2); - } + // this.ValidatedRentAmount(element,index,2); + // } } }); } @@ -449,12 +453,14 @@ export class ManageRentalVerificationComponent implements OnInit { let monthlyrentamt : number = value.monthly_rent_amount ; if(value && value.payment_mode.id==1){ - control.controls[index].addControl('amount_received_cash', new FormControl(value.amount_received_cash ? value.amount_received_cash : '', [Validators.required,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)])); + // control.controls[index].addControl('amount_received_cash', new FormControl(value.amount_received_cash ? value.amount_received_cash : '', [Validators.required,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)])); control.controls[index].removeControl('amount_received_bank'); + control.controls[index].removeControl('amount_received_cash'); control.controls[index].removeControl('payment_received_reason'); } else if(value && value.payment_mode.id==2){ - control.controls[index].addControl('amount_received_bank', new FormControl(value.amount_received_bank ? value.amount_received_bank : '', [Validators.required,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)])); + // control.controls[index].addControl('amount_received_bank', new FormControl(value.amount_received_bank ? value.amount_received_bank : '', [Validators.required,Validators.max(monthlyrentamt),Validators.min(monthlyrentamt)])); + control.controls[index].removeControl('amount_received_bank'); control.controls[index].removeControl('amount_received_cash'); control.controls[index].removeControl('payment_received_reason'); } @@ -473,12 +479,14 @@ export class ManageRentalVerificationComponent implements OnInit { let control: any = this._rentalForm.controls['property_unit_details']; let paidmonthlyrentamt : any = value.paid_monthly_rent_per_met ; if(value && value.payment_mode_per_met.id==1){ - control.controls[index].addControl('amount_received_cash_per_met', new FormControl(value.amount_received_cash_per_met ? value.amount_received_cash_per_met : '', [Validators.required,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)])); + // control.controls[index].addControl('amount_received_cash_per_met', new FormControl(value.amount_received_cash_per_met ? value.amount_received_cash_per_met : '', [Validators.required,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)])); + control.controls[index].removeControl('amount_received_cash_per_met'); control.controls[index].removeControl('amount_received_bank_per_met'); control.controls[index].removeControl('payment_received_reason_per_met'); } else if(value && value.payment_mode_per_met.id==2){ - control.controls[index].addControl('amount_received_bank_per_met', new FormControl(value.amount_received_bank_per_met ? value.amount_received_bank_per_met : '', [Validators.required,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)])); + // control.controls[index].addControl('amount_received_bank_per_met', new FormControl(value.amount_received_bank_per_met ? value.amount_received_bank_per_met : '', [Validators.required,Validators.max(paidmonthlyrentamt),Validators.min(paidmonthlyrentamt)])); + control.controls[index].removeControl('amount_received_bank_per_met'); control.controls[index].removeControl('amount_received_cash_per_met'); control.controls[index].removeControl('payment_received_reason_per_met'); } @@ -492,15 +500,15 @@ export class ManageRentalVerificationComponent implements OnInit { control.controls[index].removeControl('amount_received_bank_per_met'); control.controls[index].removeControl('payment_received_reason_per_met'); } - let child = control.controls[index] as FormGroup; + // let child = control.controls[index] as FormGroup; - if(child.controls.payment_difference_per_met){ - child.controls.payment_difference_per_met.setValue(''); - child.controls.payment_difference_per_met.updateValueAndValidity(); - } - else{ - console.log('There is NO Control'); - } + // if(child.controls.payment_difference_per_met){ + // child.controls.payment_difference_per_met.setValue(''); + // child.controls.payment_difference_per_met.updateValueAndValidity(); + // } + // else{ + // console.log('There is NO Control'); + // } } @@ -772,7 +780,7 @@ export class ManageRentalVerificationComponent implements OnInit { control.controls[index].addControl('paid_monthly_rent_per_met', new FormControl('', Validators.required)); control.controls[index].addControl('period_of_stay_per_met', new FormControl('', Validators.required)); control.controls[index].addControl('payment_mode_per_met', new FormControl('', Validators.required)); - control.controls[index].addControl('payment_difference_per_met', new FormControl('')); + // control.controls[index].addControl('payment_difference_per_met', new FormControl('')); } else{ @@ -781,7 +789,7 @@ export class ManageRentalVerificationComponent implements OnInit { control.controls[index].removeControl('paid_monthly_rent_per_met'); control.controls[index].removeControl('period_of_stay_per_met'); control.controls[index].removeControl('payment_mode_per_met'); - control.controls[index].removeControl('payment_difference_per_met'); + // control.controls[index].removeControl('payment_difference_per_met'); // remove other owner details