console remove :ps
This commit is contained in:
parent
92a089ce51
commit
eec3532307
@ -229,8 +229,8 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
|
|
||||||
let data1 = this.company_list.filter(c => c.company_name == e.split('-')[1])[0];
|
let data1 = this.company_list.filter(c => c.company_name == e.split('-')[1])[0];
|
||||||
|
|
||||||
console.log('this.generalExistBusinessMonth',this.generalExistBusinessMonth);
|
// console.log('this.generalExistBusinessMonth',this.generalExistBusinessMonth);
|
||||||
console.log('this.generalExistBusinessYear',this.generalExistBusinessYear);
|
// console.log('this.generalExistBusinessYear',this.generalExistBusinessYear);
|
||||||
|
|
||||||
if(data1.business_month != null && data1.business_month != '' && data1.business_month != undefined){
|
if(data1.business_month != null && data1.business_month != '' && data1.business_month != undefined){
|
||||||
this.generalExistBusinessMonth = data1.business_month
|
this.generalExistBusinessMonth = data1.business_month
|
||||||
@ -299,7 +299,7 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
|
|
||||||
ValidateNetSalary(){
|
ValidateNetSalary(){
|
||||||
let salary = this.employmentForm.controls['net_monthly_salary'].value;
|
let salary = this.employmentForm.controls['net_monthly_salary'].value;
|
||||||
console.log('this.employmentForm.controls[amount_paid_in_cash].value',this.employmentForm.controls['amount_paid_in_cash'].value);
|
// console.log('this.employmentForm.controls[amount_paid_in_cash].value',this.employmentForm.controls['amount_paid_in_cash'].value);
|
||||||
|
|
||||||
if(salary != ''){
|
if(salary != ''){
|
||||||
// let cash_amount = this.employmentForm.controls['amount_paid_in_cash'].value;
|
// let cash_amount = this.employmentForm.controls['amount_paid_in_cash'].value;
|
||||||
|
|||||||
@ -603,7 +603,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
// submit form details
|
// submit form details
|
||||||
temp: number = 0;
|
temp: number = 0;
|
||||||
submitGeneralForm(formData: any) {
|
submitGeneralForm(formData: any) {
|
||||||
console.log('formData',formData);
|
// console.log('formData',formData);
|
||||||
if (this.customer_segment_abbr != 'SE-RI') {
|
if (this.customer_segment_abbr != 'SE-RI') {
|
||||||
this._generalForm.controls['rental_income_rcv_in_years'].clearValidators();
|
this._generalForm.controls['rental_income_rcv_in_years'].clearValidators();
|
||||||
this._generalForm.controls['rental_income_rcv_in_years'].updateValueAndValidity();
|
this._generalForm.controls['rental_income_rcv_in_years'].updateValueAndValidity();
|
||||||
|
|||||||
@ -311,19 +311,19 @@ loadFormData(){
|
|||||||
|
|
||||||
if(element.payment_mode){
|
if(element.payment_mode){
|
||||||
let ChildCtrl : any = control.controls[index];
|
let ChildCtrl : any = control.controls[index];
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode,'else if 2');
|
|
||||||
if(element.payment_mode.id == 1 && element.amount_received_cash){
|
if(element.payment_mode.id == 1 && element.amount_received_cash){
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode,'else if 2');
|
|
||||||
ChildCtrl.controls['amount_received_cash'].setValidators([Validators.required,Validators.max(element.monthly_rent_amount),Validators.min(element.monthly_rent_amount)]);
|
ChildCtrl.controls['amount_received_cash'].setValidators([Validators.required,Validators.max(element.monthly_rent_amount),Validators.min(element.monthly_rent_amount)]);
|
||||||
ChildCtrl.controls['amount_received_cash'].updateValueAndValidity();
|
ChildCtrl.controls['amount_received_cash'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
else if(element.payment_mode.id == 2 && element.amount_received_bank){
|
else if(element.payment_mode.id == 2 && element.amount_received_bank){
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode,'else if 2');
|
|
||||||
ChildCtrl.controls['amount_received_bank'].setValidators([Validators.required,Validators.max(element.monthly_rent_amount),Validators.min(element.monthly_rent_amount)]);
|
ChildCtrl.controls['amount_received_bank'].setValidators([Validators.required,Validators.max(element.monthly_rent_amount),Validators.min(element.monthly_rent_amount)]);
|
||||||
ChildCtrl.controls['amount_received_bank'].updateValueAndValidity();
|
ChildCtrl.controls['amount_received_bank'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
else if(element.payment_mode.id == 3 && element.amount_received_bank && element.amount_received_cash){
|
else if(element.payment_mode.id == 3 && element.amount_received_bank && element.amount_received_cash){
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode,'else if 2');
|
|
||||||
this.ValidatedRentAmount(element,index,1);
|
this.ValidatedRentAmount(element,index,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,17 +373,17 @@ loadFormData(){
|
|||||||
|
|
||||||
let ChildCtrl : any = control.controls[index];
|
let ChildCtrl : any = control.controls[index];
|
||||||
if(element.payment_mode_per_met.id == 1){
|
if(element.payment_mode_per_met.id == 1){
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode_per_met,'if');
|
|
||||||
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'].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();
|
ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
else if(element.payment_mode_per_met.id == 2){
|
else if(element.payment_mode_per_met.id == 2){
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode_per_met,'else if 1');
|
|
||||||
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'].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();
|
ChildCtrl.controls['amount_received_bank_per_met'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
else if(element.payment_mode_per_met.id == 3){
|
else if(element.payment_mode_per_met.id == 3){
|
||||||
console.log('asdasdasdasdasdads',element.payment_mode_per_met,'else if 2');
|
|
||||||
this.ValidatedRentAmount(element,index,2);
|
this.ValidatedRentAmount(element,index,2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -434,11 +434,11 @@ addMoreUnitDetails(){
|
|||||||
|
|
||||||
// generate payment dynamic fields
|
// generate payment dynamic fields
|
||||||
generatePaymentOptions(value:any,index:number,type: number){
|
generatePaymentOptions(value:any,index:number,type: number){
|
||||||
console.log(value,index,type);
|
|
||||||
if(type==1){
|
if(type==1){
|
||||||
let control: any = <FormArray>this._rentalForm.controls['property_unit_details'];
|
let control: any = <FormArray>this._rentalForm.controls['property_unit_details'];
|
||||||
let monthlyrentamt : number = value.monthly_rent_amount ;
|
let monthlyrentamt : number = value.monthly_rent_amount ;
|
||||||
console.log('monthlyrentamt',monthlyrentamt);
|
|
||||||
if(value && value.payment_mode.id==1){
|
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_bank');
|
||||||
@ -499,7 +499,7 @@ addMoreUnitDetails(){
|
|||||||
ChildCtrl.controls['amount_received_cash'].clearValidators();;
|
ChildCtrl.controls['amount_received_cash'].clearValidators();;
|
||||||
ChildCtrl.controls['amount_received_cash'].updateValueAndValidity();
|
ChildCtrl.controls['amount_received_cash'].updateValueAndValidity();
|
||||||
let monthlyrentamt : any = value.monthly_rent_amount ;
|
let monthlyrentamt : any = value.monthly_rent_amount ;
|
||||||
console.log('monthlyrentamt',monthlyrentamt);
|
|
||||||
|
|
||||||
if(monthlyrentamt != ''){
|
if(monthlyrentamt != ''){
|
||||||
|
|
||||||
@ -530,7 +530,7 @@ addMoreUnitDetails(){
|
|||||||
ChildCtrl.controls['amount_received_cash_per_met'].clearValidators();;
|
ChildCtrl.controls['amount_received_cash_per_met'].clearValidators();;
|
||||||
ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity();
|
ChildCtrl.controls['amount_received_cash_per_met'].updateValueAndValidity();
|
||||||
let paidmonthlyrentamt : any = value.paid_monthly_rent_per_met;
|
let paidmonthlyrentamt : any = value.paid_monthly_rent_per_met;
|
||||||
console.log(paidmonthlyrentamt,type);
|
|
||||||
|
|
||||||
if(paidmonthlyrentamt != ''){
|
if(paidmonthlyrentamt != ''){
|
||||||
|
|
||||||
@ -953,8 +953,8 @@ calculateFloorRentAmt(values: any, index: number){
|
|||||||
|
|
||||||
// save rental form
|
// save rental form
|
||||||
saveRental(formData: any) {
|
saveRental(formData: any) {
|
||||||
console.log('formData',formData);
|
|
||||||
console.log('formData.multistoried_building_details',formData.multistoried_building_details);
|
|
||||||
|
|
||||||
let ApplicantRentAmt : any ;
|
let ApplicantRentAmt : any ;
|
||||||
let TenantRentAmt : any ;
|
let TenantRentAmt : any ;
|
||||||
@ -962,8 +962,8 @@ saveRental(formData: any) {
|
|||||||
let TempArray2 : any = [];
|
let TempArray2 : any = [];
|
||||||
|
|
||||||
if(formData.property_unit_details.length > 0){
|
if(formData.property_unit_details.length > 0){
|
||||||
console.log('formData.property_unit_details',formData.property_unit_details);
|
|
||||||
console.log('formData.property_unit_details',formData.property_unit_details.length);
|
|
||||||
formData.property_unit_details.forEach((data,index) => {
|
formData.property_unit_details.forEach((data,index) => {
|
||||||
TempArray1[index] = data.monthly_rent_amount;
|
TempArray1[index] = data.monthly_rent_amount;
|
||||||
ApplicantRentAmt = TempArray1.reduce((sum, val) => sum + +val, 0);
|
ApplicantRentAmt = TempArray1.reduce((sum, val) => sum + +val, 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user