diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index f7df7d64c..051688668 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -44,21 +44,21 @@ - + Enter Valid Mobile Number. - + Enter Valid STD Code Number. - - + Enter Valid LandLine Number. @@ -113,8 +113,8 @@ - - {{"₹"}} {{loanAmtInWords}} Only + + {{"₹"}} {{pdMain.loan_amount.value | numberToWords}} Only Enter valid amount. @@ -163,7 +163,7 @@ - +
@@ -206,16 +206,16 @@ - + Enter Valid Mobile Number. - + Enter Valid STD Code Number.   -   - + Enter Valid LandLine Number. @@ -249,16 +249,16 @@ --> - + Enter Valid Mobile Number. - + Enter Valid STD Code.   -   - + Enter Valid Landline Number. 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 b49203d34..3f951bd2d 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 @@ -41,7 +41,6 @@ export class AddPdComponent implements OnInit, OnDestroy { relationShipList: any; pincodeList: any = []; errorMessage: any; - loanAmtInWords: any; titleList: any; // Dynamic co applicant createWithLongContent = false; @@ -71,8 +70,7 @@ export class AddPdComponent implements OnInit, OnDestroy { this.getTitleMaster(); this.loadFormData(); - } - + } // load form data loadFormData() { this._PDtriggerForm = this._fb.group({ @@ -165,12 +163,12 @@ export class AddPdComponent implements OnInit, OnDestroy { //get sub product list based on prokduct id getSubproductList(productID: string) { - console.log('productID',productID); + // console.log('productID',productID); this.subProductList = this.productList.filter(item => item.product_id == productID); this.subProductList = this.subProductList[0].subproducts; this.subProductList = this.subProductList.filter(item => item.is_others == 0); this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); - if(productID != '4'){this._PDtriggerForm.controls['fk_subproduct_id'].setValue('')} + if(productID != '4'){this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null)} } @@ -345,12 +343,12 @@ export class AddPdComponent implements OnInit, OnDestroy { this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]); this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity(); - if(formValue.fk_product_id != '4'){ - this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]); - this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); - } - else{ - this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''); + // if(formValue.fk_product_id != '4'){ + // this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]); + // this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); + // } + if(formValue.fk_product_id == '4'){ + this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null); } this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]); @@ -395,12 +393,12 @@ export class AddPdComponent implements OnInit, OnDestroy { this._PDtriggerForm.controls['fk_product_id'].clearValidators(); this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity(); - if(this._PDtriggerForm.controls.fk_product_id.value != '4'){ - this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators(); - this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); - } - else{ - this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''); + // if(this._PDtriggerForm.controls.fk_product_id.value != '4'){ + // this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators(); + // this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); + // } + if(this._PDtriggerForm.controls.fk_product_id.value == '4'){ + this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null); } this._PDtriggerForm.controls['fk_pd_type'].clearValidators(); @@ -454,28 +452,30 @@ export class AddPdComponent implements OnInit, OnDestroy { let lender_landline_no; let applicant_landline_no; - - if (formValue.lender_stdcode != null || formValue.lender_landline != null) { - if (formValue.lender_stdcode != '' && formValue.lender_landline != '') { - lender_landline_no = formValue.lender_stdcode + '-' + formValue.lender_landline; - } - else { - lender_landline_no = null; - } + + if(!formValue.lender_stdcode || !formValue.lender_landline){ + lender_landline_no = null; } - else { + else if(!formValue.lender_stdcode && !formValue.lender_landline){ + lender_landline_no = null; + } + else if(formValue.lender_stdcode && formValue.lender_landline){ + lender_landline_no = formValue.lender_stdcode + '-' + formValue.lender_landline; + } + else{ lender_landline_no = null; } - if (formValue.applicant_stdcode != null || formValue.applicant_landline != null) { - if (formValue.applicant_stdcode != '' && formValue.applicant_landline != '') { - applicant_landline_no = formValue.applicant_stdcode + '-' + formValue.applicant_landline; - } - else { - applicant_landline_no = null; - } + if(!formValue.applicant_stdcode || !formValue.applicant_landline){ + applicant_landline_no = null; } - else { + else if(!formValue.applicant_stdcode && !formValue.applicant_landline){ + applicant_landline_no = null; + } + else if(formValue.applicant_stdcode && formValue.applicant_landline){ + applicant_landline_no = formValue.applicant_stdcode + '-' + formValue.applicant_landline; + } + else{ applicant_landline_no = null; } @@ -487,11 +487,11 @@ export class AddPdComponent implements OnInit, OnDestroy { "pd_contact_mobileno": formValue.lender_contact_mobile, "pd_contact_landline": lender_landline_no, "fk_product_id": formValue.fk_product_id, - "fk_subproduct_id": formValue.fk_product_id != 4 ? formValue.fk_subproduct_id : '', + "fk_subproduct_id": formValue.fk_product_id != 4 ? formValue.fk_subproduct_id != '' || formValue.fk_subproduct_id != 0 ? formValue.fk_subproduct_id : null : null, "fk_pd_type": formValue.fk_pd_type, "fk_customer_segment": formValue.fk_customer_segment, "loan_amount": formValue.loan_amount, - "addressline1": formValue.addresses[0].addressline1.toUpperCase(), + "addressline1": !formValue.addresses[0].addressline1 ? null : formValue.addresses[0].addressline1.toUpperCase(), "fk_city": formValue.addresses[0].fk_city, "fk_state": formValue.addresses[0].fk_state, "pincode": formValue.addresses[0].pincode, @@ -520,17 +520,30 @@ export class AddPdComponent implements OnInit, OnDestroy { let coapplicant_landline_no; - if (itemElement.coapplicant_stdcode != null || itemElement.coapplicant_landline != null) { - if (itemElement.coapplicant_stdcode != '' && itemElement.coapplicant_landline != '') { - coapplicant_landline_no = formValue.coapplicant_stdcode + '-' + itemElement.applicant_landline; - } - else { - coapplicant_landline_no = null; - } - } - else { + if(!itemElement.coapplicant_stdcode || !itemElement.coapplicant_landline){ coapplicant_landline_no = null; } + else if(!itemElement.coapplicant_stdcode && !itemElement.coapplicant_landline){ + coapplicant_landline_no = null; + } + else if(itemElement.coapplicant_stdcode && itemElement.coapplicant_landline){ + coapplicant_landline_no = formValue.coapplicant_stdcode + '-' + itemElement.applicant_landline; + } + else{ + coapplicant_landline_no = null; + } + + // if (itemElement.coapplicant_stdcode != null || itemElement.coapplicant_landline != null) { + // if (itemElement.coapplicant_stdcode != '' && itemElement.coapplicant_landline != '') { + // coapplicant_landline_no = formValue.coapplicant_stdcode + '-' + itemElement.applicant_landline; + // } + // else { + // coapplicant_landline_no = null; + // } + // } + // else { + // coapplicant_landline_no = null; + // } let obj1 = { "applicant_name":itemElement.coapplicant_name, @@ -547,7 +560,7 @@ export class AddPdComponent implements OnInit, OnDestroy { if (formValue.addresses.length > 0) { formValue.addresses.forEach((addressElement, itemIndex) => { let addressobj = { - "addressline1": addressElement.addressline1.toUpperCase(), + "addressline1": !addressElement.addressline1 ? null : addressElement.addressline1.toUpperCase(), "fk_city": addressElement.fk_city, "fk_state": addressElement.fk_state, "pincode": addressElement.pincode, @@ -627,16 +640,6 @@ export class AddPdComponent implements OnInit, OnDestroy { this.loadFormData(); this.disableAfterSubmit = false; } - /** On Key Press Event For Mobile Number */ - keyPress(event: any) { - // const pattern = /[0-9/ /./-]/; - const pattern = /[0-9]/; - - let inputChar = String.fromCharCode(event.charCode); - if (event.keyCode != 8 && !pattern.test(inputChar)) { - event.preventDefault(); - } - } // validate all form group and form array fields validateAllFormFields(formGroup: any) { Object.keys(formGroup.controls).forEach(field => { @@ -652,15 +655,4 @@ export class AddPdComponent implements OnInit, OnDestroy { }); } - /** To Convert Amount into Words */ - inWords(e, flag: number) { - switch (flag) { - case 1: - this.loanAmtInWords = this._pd.convertNumberToWords(e.target.value); - break; - default: - break; - } - } - } \ No newline at end of file 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 0fb502f71..7d861afd1 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 @@ -35,16 +35,16 @@ - + Enter Valid Mobile Number. - + Enter Valid STD Code.  -  - + Enter Valid Landline Number. @@ -71,21 +71,21 @@ - + Enter Valid Mobile Number. - + Enter Valid STD Number.  -  - + Enter Valid Landline Number. Enter Valid STD Code.  -  + type="text" maxlength="8" OnlyNumber> Enter Valid Landline Number. @@ -123,10 +123,9 @@ - {{"₹"}} - {{loanAmtInWords}} Only + {{"₹"}} {{pdMain.loan_amount.value | numberToWords}} Only Enter valid amount. @@ -180,7 +179,7 @@ + formControlName="other_pincode" OnlyNumber> 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 776528167..0c4cb638d 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 @@ -32,7 +32,7 @@ export class EditPdMasterComponent implements OnInit { // PDTriggerStatus: string; enablePDButton: boolean; currentPDStatus: string; - loanAmtInWords : any; + pincodeflag : any = []; public _EditPDtriggerForm:FormGroup; public notifier: NotifierService; @@ -54,7 +54,6 @@ export class EditPdMasterComponent implements OnInit { this.notifier=notifier this.currentPDStatus = data.records.pd_status; this.pdid = data.records.pd_id; - if(this.data.records.loan_amount){ this.loanAmtInWords = this._pd.convertNumberToWords(this.data.records.loan_amount); } } ngOnInit() { @@ -226,13 +225,14 @@ export class EditPdMasterComponent implements OnInit { //get sub product list based on prokduct id getSubproductList(productID:string){ - - this.subProductList= this.productList.filter(item => item.product_id == productID); - this.subProductList=this.subProductList[0].subproducts; - this.customerSegmentList=(productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); - - // this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:(this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')),this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue('')); - + if(productID != '4'){ + this.subProductList= this.productList.filter(item => item.product_id == productID); + this.subProductList=this.subProductList[0].subproducts; + this.customerSegmentList=this.customerSegmentAllList; + } + else if(productID == '4'){ + this.customerSegmentList=this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); + } } // //get city list details based on state id @@ -443,7 +443,7 @@ export class EditPdMasterComponent implements OnInit { "pd_contact_mobileno": my_array.pd_contact_mobileno, "pd_contact_landline": concat_landline, "fk_product_id": my_array.fk_product_id, - "fk_subproduct_id": my_array.fk_product_id != '4' ? my_array.fk_subproduct_id : '', + "fk_subproduct_id": my_array.fk_product_id != '4' ? my_array.fk_subproduct_id : null, "fk_pd_type": my_array.fk_pd_type, "fk_customer_segment": my_array.fk_customer_segment, "loan_amount": my_array.loan_amount, @@ -488,17 +488,6 @@ export class EditPdMasterComponent implements OnInit { closeEditMasterComponent(): void { this.dialogRef.close(); } - /** On Key Press Event For Mobile Number */ - keyPress(event: any) { - //const pattern = /[0-9/ /./-]/; - const pattern = /[0-9]/; - - let inputChar = String.fromCharCode(event.charCode); - if (event.keyCode != 8 && !pattern.test(inputChar)) { - event.preventDefault(); - } - } - // validate all form group and form array fields validateAllFormFields(formGroup: any) { Object.keys(formGroup.controls).forEach(field => { @@ -513,16 +502,4 @@ validateAllFormFields(formGroup: any) { } }); } -/** To Convert Amount into Words */ -inWords(e,flag:number){ - switch(flag){ - case 1 : - this.loanAmtInWords = this._pd.convertNumberToWords(e.target.value); - break; - default: - break; -} -} - - } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index 3f7db69fb..a38af0d33 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -82,10 +82,10 @@ export class BusinessInfoComponent implements OnInit { appxSalaryAmtInwords: any; isreadonlyyear:any = []; isreadonlymonth:any = []; - ManufacturingChecked: boolean; - RetailedChecked: boolean; - WholeSalesChecked: boolean; - ServiceChecked: boolean; + ManufacturingUnChecked: boolean; + RetailedUnChecked: boolean; + WholeSalesUnChecked: boolean; + ServiceUnChecked: boolean; temp_noofposmachine : any; temp_additiondetailofposmachine : any = []; @@ -672,14 +672,14 @@ export class BusinessInfoComponent implements OnInit { if(event.value.exist_status==true && event.value.type_of_activity_id==2){ - this.ManufacturingChecked = event.value.exist_status; + this.ManufacturingUnChecked = event.value.exist_status; let manufacturingControl = this.businessForm.controls['manufacturing_activity_details']; manufacturingControl.controls = []; manufacturingControl.setValue([]); } else if(event.value.exist_status==false && event.value.type_of_activity_id==2){ - this.ManufacturingChecked = event.value.exist_status; + this.ManufacturingUnChecked = event.value.exist_status; let manufacturingControl = this.businessForm.controls['manufacturing_activity_details']; manufacturingControl.push(this.createActivity()); @@ -687,40 +687,40 @@ export class BusinessInfoComponent implements OnInit { } if(event.value.exist_status==true && event.value.type_of_activity_id==3){ - this.RetailedChecked = event.value.exist_status; + this.RetailedUnChecked = event.value.exist_status; let retailControl = this.businessForm.controls['retail_trading_activity_details']; retailControl.controls = []; retailControl.setValue([]); } else if(event.value.exist_status==false && event.value.type_of_activity_id==3){ - this.RetailedChecked = event.value.exist_status; + this.RetailedUnChecked = event.value.exist_status; let retailControl = this.businessForm.controls['retail_trading_activity_details']; retailControl.push(this.createActivity()); } if(event.value.exist_status==true && event.value.type_of_activity_id==4){ - this.WholeSalesChecked = event.value.exist_status; + this.WholeSalesUnChecked = event.value.exist_status; let wholesaleControl = this.businessForm.controls['wholesale_trading_activity_details']; wholesaleControl.controls = []; wholesaleControl.setValue([]); } else if(event.value.exist_status==false && event.value.type_of_activity_id==4){ - this.WholeSalesChecked = event.value.exist_status; + this.WholeSalesUnChecked = event.value.exist_status; let wholesaleControl = this.businessForm.controls['wholesale_trading_activity_details']; wholesaleControl.push(this.createActivity()); } if(event.value.exist_status==true && event.value.type_of_activity_id==5){ - this.ServiceChecked = event.value.exist_status; + this.ServiceUnChecked = event.value.exist_status; let serviceControl = this.businessForm.controls['service_provider_activity_details']; serviceControl.controls = []; serviceControl.setValue([]); } else if(event.value.exist_status==false && event.value.type_of_activity_id==5){ - this.ServiceChecked = event.value.exist_status; + this.ServiceUnChecked = event.value.exist_status; let serviceControl = this.businessForm.controls['service_provider_activity_details']; serviceControl.push(this.createServiceActivity()); } @@ -746,8 +746,7 @@ export class BusinessInfoComponent implements OnInit { if(this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0){ this.changePOSMachinesAvailablity(this.businessForm.value.applicant_use_pos_machines,2); } - - if(this.ManufacturingChecked && this.RetailedChecked && this.WholeSalesChecked && this.ServiceChecked){ + if(this.ManufacturingUnChecked || this.ManufacturingUnChecked==undefined && this.RetailedUnChecked || this.RetailedUnChecked==undefined && this.WholeSalesUnChecked ||this.WholeSalesUnChecked==undefined && this.ServiceUnChecked || this.ServiceUnChecked==undefined){ this.ExportFlag = false; } } @@ -1766,69 +1765,55 @@ WholeSaleCounterArray: any = []; ServiceCounterArray: any = []; CheckExport(value,stringFlag,index){ + const parentControl = this.businessForm.controls['select_business_activity_type']; const childControl = parentControl.controls[0]; - - // childControl.forEach((datas,index) => { - - - // // exist_status==true && event.value.type_of_activity_id - - - // }); - - - - - + if(!this.ManufacturingUnChecked){ + if(stringFlag == 'MActivity' && value != "Within India"){ + this.ManufacturingCounterArray[index] = 1; + } + else if(stringFlag == 'MActivity' && value == "Within India"){ + this.ManufacturingCounterArray[index] = 0; + } + }else if (this.ManufacturingUnChecked && stringFlag == 'MActivity'){ + this.ManufacturingCounterArray[index] = 0; + } - if(!this.ManufacturingChecked){ - if(stringFlag == 'MActivity' && value != "Within India"){ - this.ManufacturingCounterArray[index] = 1; - } - else if(stringFlag == 'MActivity' && value != "Within India"){ - this.ManufacturingCounterArray[index] = 0; - } - }else if (this.ManufacturingChecked && stringFlag == 'MActivity'){ - this.ManufacturingCounterArray[index] = 0; - } - - if(!this.RetailedChecked){ + if(!this.RetailedUnChecked){ if(stringFlag == 'RActivity' && value != "Within India"){ this.RetailCounterArray[index] = 1; } - else if(stringFlag == 'RActivity' && value != "Within India"){ + else if(stringFlag == 'RActivity' && value == "Within India"){ this.RetailCounterArray[index] = 0; } } - else if(stringFlag == 'RActivity' && this.RetailedChecked){ + else if(stringFlag == 'RActivity' && this.RetailedUnChecked){ this.RetailCounterArray[index] = 0; } - - if(!this.WholeSalesChecked){ + + if(!this.WholeSalesUnChecked){ if(stringFlag == 'WActivity' && value != "Within India"){ this.WholeSaleCounterArray[index] = 1; } - else if(stringFlag == 'WActivity' && value != "Within India"){ + else if(stringFlag == 'WActivity' && value == "Within India"){ this.WholeSaleCounterArray[index] = 0; } } - else if(stringFlag == 'WActivity' && this.WholeSalesChecked){ + else if(stringFlag == 'WActivity' && this.WholeSalesUnChecked){ this.WholeSaleCounterArray[index] = 0; } - - if(!this.ServiceChecked){ + + if(!this.ServiceUnChecked){ if(stringFlag == 'SPActivity' && value != "Within India") { this.ServiceCounterArray[index] = 1; } - else if(stringFlag == 'SPActivity' && value != "Within India"){ + else if(stringFlag == 'SPActivity' && value == "Within India"){ this.ServiceCounterArray[index] = 0; } - - }else if(stringFlag == 'SPActivity'){ + }else if(stringFlag == 'SPActivity' && this.ServiceUnChecked){ this.ServiceCounterArray[index] = 0; } @@ -1840,10 +1825,8 @@ CheckExport(value,stringFlag,index){ let SumOfServiceCounter = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0); - let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ; - this.ExportFlag = overallCounter > 0 ? true : false ; } 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 3ca864c5b..e81c87134 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 @@ -17,14 +17,14 @@
- + Select {{ cl.company_name }} - + -
+

@@ -32,11 +32,11 @@ - +
- + Select @@ -65,7 +65,7 @@ -->
- + Select @@ -73,10 +73,25 @@ No - - - - +
+ + + {{"₹"}} {{employmentForm.controls['confirm_salary_amount'].value | numberToWords}} Only + + + + + Higher + + + + + + +
+ Select @@ -84,7 +99,7 @@ No - + Select @@ -100,7 +115,10 @@
- + + + + @@ -117,6 +135,26 @@ formControlName="bonus_incentive" (keypress)="keyPress($event)" required> + + + Select + Validated + Not Validated + + + + + + + + + + + Select diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss index 1da78ad94..9ce3b1694 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss @@ -11,7 +11,7 @@ width: 80%; } .matcard mat-form-field { - margin: 0 2%; + margin: 0 1%; } .address .button { float: right; 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 c7d4c40e7..a1f2c4885 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 @@ -118,13 +118,22 @@ export class EmploymentInfoComponent implements OnInit { this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary); if (value.records.confirm_salary_amount) { this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount); + // this.employmentForm.controls['salary_from_date'].setValue(value.records.salary_from_date); + // this.employmentForm.controls['salary_to_date'].setValue(value.records.salary_to_date); + this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience); + this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience); } this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen); this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen); - this.employmentForm.controls['which_date_the_salary_is_rcv'].setValue(value.records.which_date_the_salary_is_rcv); + this.employmentForm.controls['from_date_the_salary_is_rcv'].setValue(value.records.from_date_the_salary_is_rcv); + this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue(value.records.to_date_the_salary_is_rcv); 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['bonus_incentive'].setValue(value.records.bonus_incentive); + this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash); + this.employmentForm.controls['how_was_it_validated'].setValue(value.records.how_was_it_validated); + this.employmentForm.controls['why_was_it_not_validated'].setValue(value.records.why_was_it_not_validated); + this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank); this.employmentForm.controls['bonus_frequency'].setValue(value.records.bonus_frequency); this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type); this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other); @@ -161,12 +170,19 @@ export class EmploymentInfoComponent implements OnInit { designation_person_met: [''], confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], confirm_salary_amount: [''], + total_business_experience:[''], + total_business_previous_experience:[''], attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], - which_date_the_salary_is_rcv:[''], + from_date_the_salary_is_rcv:[''], + to_date_the_salary_is_rcv:[''], gross_monthly_salary: ['', Validators.compose([Validators.required])], net_monthly_salary: ['', Validators.compose([Validators.required])], bonus_incentive: ['', Validators.compose([Validators.required])], + amount_paid_in_cash: [''], + how_was_it_validated: [''], + why_was_it_not_validated: [''], + amount_paid_through_bank: [''], bonus_frequency: [''], bonus_type: [''], bonus_type_other: [''], @@ -178,13 +194,8 @@ export class EmploymentInfoComponent implements OnInit { filtercompanyrelationship(companyid,applicantid){ var array = companyid.split("-"); - // console.log(array[0]); - // console.log('companyid',companyid); - // console.log('applicantid',applicantid); - let data = this.company_related_applicants_list.filter(freq=>freq.relation_to_company == array[0] &&freq.applicant_name == applicantid); - + let data = this.company_related_applicants_list.filter(cmpy=>cmpy.relation_to_company == array[0] && cmpy.applicant_name == applicantid); if(data.length>0){ - this.filtered_company_relationship_list = this.company_relationship_list.filter(freq=>freq.company_relationship_id == data[0].company_relationship ); this.employmentForm.controls['designation_person_met'].setValue(this.filtered_company_relationship_list[0]['name'] +' '+array[1]); } @@ -225,13 +236,20 @@ 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; } records.attendance_seen = this.employmentForm.controls['attendance_seen'].value; records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value; - records.which_date_the_salary_is_rcv = this.employmentForm.controls['which_date_the_salary_is_rcv'].value; + records.from_date_the_salary_is_rcv = this.employmentForm.controls['from_date_the_salary_is_rcv'].value; + records.to_date_the_salary_is_rcv = this.employmentForm.controls['to_date_the_salary_is_rcv'].value; records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value; records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value; records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value; + records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].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; + records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; records.bonus_frequency = this.employmentForm.controls['bonus_frequency'].value; records.bonus_type = this.employmentForm.controls['bonus_type'].value; records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts index 47a10bbf4..19e51a7d4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts @@ -362,9 +362,9 @@ export class FamilyDetailsComponent implements OnInit { } selectedPerson(e,inx){ - + console.log('1)','e',e,'index',inx); this.FamilyMemberAsLabel[inx] = this.selectPerson.filter(item => item.pd_co_applicant_id == e)[0].applicant_name; - + console.log('2)','this.FamilyMemberAsLabel[inx]',this.FamilyMemberAsLabel[inx]); const control = this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details; let newControlLength: number; @@ -375,12 +375,12 @@ export class FamilyDetailsComponent implements OnInit { let arraydata : any; let data = this.apiFamilyMembers.filter(item => item.relation_to == e); - + console.log('3)','data',data); // data_gets_from:'GeneralForm' // data_gets_from:'BusinessForm' if(data.length > 0){ - + newControlLength = data.length; let index: number = 0; @@ -393,13 +393,14 @@ export class FamilyDetailsComponent implements OnInit { data.forEach((val,inx) => { - + console.log('b4 this.isReadOnly[inx]',this.isReadOnly[inx],val.age); // family_member_earning_status if(val.age){ this.isReadOnly[inx] = true; }else{ this.isReadOnly[inx] = false; } + console.log('aftr this.isReadOnly[inx]',this.isReadOnly[inx],val.age); arraydata = { 'family_member_name' : val.name, 'family_member_relationship' : val.relationship, 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 093d95fed..4e6522ac7 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 @@ -34,6 +34,13 @@ + + + Select + {{list.name }} ( {{list.abbr}} ) + + { - // }); const dialogRef = this.dialog.open(RentalInfoComponent, { data: this.pd_all_details, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 0c4ce1a5f..52ca499f2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -6,11 +6,11 @@ {{pdMasterList.customer_segment_name}}
-

{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}} +

{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}}

- {{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}} + {{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}}