sheet changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-03-08 11:08:58 +05:30
parent b7617d9aa0
commit 97ec3bc3eb
15 changed files with 285 additions and 243 deletions

View File

@ -44,21 +44,21 @@
<!-- <mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error> --> <!-- <mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder="Lender's Mobile Number" formControlName="lender_contact_mobile" type="text" (keypress)="keyPress($event)" maxlength="10"> <input matInput autocomplete="off" placeholder="Lender's Mobile Number" formControlName="lender_contact_mobile" type="text" OnlyNumber maxlength="10">
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<!--<mat-form-field style="width: 32%"> <!--<mat-form-field style="width: 32%">
<input matInput autocomplete="off" placeholder="Lender Contact Number" formControlName="lender_contact_mobile" type="text" (keypress)="keyPress($event)" maxlength="10" required> <input matInput autocomplete="off" placeholder="Lender Contact Number" formControlName="lender_contact_mobile" type="text" OnlyNumber maxlength="10" required>
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field>--> </mat-form-field>-->
<mat-form-field style="width: 8%"> <mat-form-field style="width: 8%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="lender_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="lender_stdcode" type="text" maxlength="5" OnlyNumber>
<mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter Valid STD Code Number.</mat-error> <mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter Valid STD Code Number.</mat-error>
</mat-form-field> - </mat-form-field> -
<mat-form-field style="width: 17%"> <mat-form-field style="width: 17%">
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="lender_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Landline Number" formControlName="lender_landline" type="text" maxlength="8" OnlyNumber>
<mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error> <mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
</mat-form-field> </mat-form-field>
@ -113,8 +113,8 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off"> <input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" OnlyNumber required autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error> <mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
@ -163,7 +163,7 @@
<mat-form-field style="width: 24%" *ngIf="pincodeflag[i]"> <mat-form-field style="width: 24%" *ngIf="pincodeflag[i]">
<!-- *ngIf="pdAddresses.pincode.value == 1" --> <!-- *ngIf="pdAddresses.pincode.value == 1" -->
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" OnlyNumber>
<!-- <mat-error *ngIf="pdAddresses.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error> --> <!-- <mat-error *ngIf="pdAddresses.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error> -->
</mat-form-field> </mat-form-field>
<div align="end" *ngIf="pdAddresses.controls.length > 1"> <div align="end" *ngIf="pdAddresses.controls.length > 1">
@ -206,16 +206,16 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 38%"> <mat-form-field style="width: 38%">
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile_no" type="text" (keypress)="keyPress($event)" maxlength="10" required> <input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile_no" type="text" OnlyNumber maxlength="10" required>
<mat-error *ngIf="pdMain.mobile_no.hasError('maxlength') || pdMain.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="pdMain.mobile_no.hasError('maxlength') || pdMain.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 12%"> <mat-form-field style="width: 12%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="applicant_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="applicant_stdcode" type="text" OnlyNumber maxlength="5">
<mat-error *ngIf="pdMain.applicant_stdcode.hasError('maxlength') || pdMain.applicant_stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error> <mat-error *ngIf="pdMain.applicant_stdcode.hasError('maxlength') || pdMain.applicant_stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 22%"> <mat-form-field style="width: 22%">
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="applicant_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Landline Number" formControlName="applicant_landline" type="text" OnlyNumber maxlength="8">
<mat-error *ngIf="pdMain.applicant_landline.hasError('maxlength') || pdMain.applicant_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error> <mat-error *ngIf="pdMain.applicant_landline.hasError('maxlength') || pdMain.applicant_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
</mat-form-field> </mat-form-field>
@ -249,16 +249,16 @@
</mat-form-field> --> </mat-form-field> -->
<mat-form-field style="width: 38%"> <mat-form-field style="width: 38%">
<input matInput placeholder="Mobile Number" formControlName="coapplicant_mobile_no" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="Mobile Number" formControlName="coapplicant_mobile_no" type="text" maxlength="10" OnlyNumber>
<mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 12%"> <mat-form-field style="width: 12%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" maxlength="5" OnlyNumber>
<mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error> <mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
</mat-form-field> &nbsp; - &nbsp; </mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 22%"> <mat-form-field style="width: 22%">
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Landline Number" formControlName="coapplicant_landline" type="text" maxlength="8" OnlyNumber>
<mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error> <mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>

View File

@ -41,7 +41,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
relationShipList: any; relationShipList: any;
pincodeList: any = []; pincodeList: any = [];
errorMessage: any; errorMessage: any;
loanAmtInWords: any;
titleList: any; titleList: any;
// Dynamic co applicant // Dynamic co applicant
createWithLongContent = false; createWithLongContent = false;
@ -72,7 +71,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.loadFormData(); this.loadFormData();
} }
// load form data // load form data
loadFormData() { loadFormData() {
this._PDtriggerForm = this._fb.group({ this._PDtriggerForm = this._fb.group({
@ -165,12 +163,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
//get sub product list based on prokduct id //get sub product list based on prokduct id
getSubproductList(productID: string) { getSubproductList(productID: string) {
console.log('productID',productID); // console.log('productID',productID);
this.subProductList = this.productList.filter(item => item.product_id == productID); this.subProductList = this.productList.filter(item => item.product_id == productID);
this.subProductList = this.subProductList[0].subproducts; this.subProductList = this.subProductList[0].subproducts;
this.subProductList = this.subProductList.filter(item => item.is_others == 0); 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')); 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'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
if(formValue.fk_product_id != '4'){ // if(formValue.fk_product_id != '4'){
this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]); // this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); // this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
} // }
else{ if(formValue.fk_product_id == '4'){
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''); this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
} }
this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]); 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'].clearValidators();
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
if(this._PDtriggerForm.controls.fk_product_id.value != '4'){ // if(this._PDtriggerForm.controls.fk_product_id.value != '4'){
this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators(); // this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators();
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity(); // this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
} // }
else{ if(this._PDtriggerForm.controls.fk_product_id.value == '4'){
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''); this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
} }
this._PDtriggerForm.controls['fk_pd_type'].clearValidators(); this._PDtriggerForm.controls['fk_pd_type'].clearValidators();
@ -455,25 +453,27 @@ export class AddPdComponent implements OnInit, OnDestroy {
let lender_landline_no; let lender_landline_no;
let applicant_landline_no; let applicant_landline_no;
if (formValue.lender_stdcode != null || formValue.lender_landline != null) { if(!formValue.lender_stdcode || !formValue.lender_landline){
if (formValue.lender_stdcode != '' && formValue.lender_landline != '') { lender_landline_no = null;
}
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; lender_landline_no = formValue.lender_stdcode + '-' + formValue.lender_landline;
} }
else{ else{
lender_landline_no = null; lender_landline_no = null;
} }
}
else {
lender_landline_no = null;
}
if (formValue.applicant_stdcode != null || formValue.applicant_landline != null) { if(!formValue.applicant_stdcode || !formValue.applicant_landline){
if (formValue.applicant_stdcode != '' && formValue.applicant_landline != '') {
applicant_landline_no = formValue.applicant_stdcode + '-' + formValue.applicant_landline;
}
else {
applicant_landline_no = null; applicant_landline_no = null;
} }
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{ else{
applicant_landline_no = null; applicant_landline_no = null;
@ -487,11 +487,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
"pd_contact_mobileno": formValue.lender_contact_mobile, "pd_contact_mobileno": formValue.lender_contact_mobile,
"pd_contact_landline": lender_landline_no, "pd_contact_landline": lender_landline_no,
"fk_product_id": formValue.fk_product_id, "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_pd_type": formValue.fk_pd_type,
"fk_customer_segment": formValue.fk_customer_segment, "fk_customer_segment": formValue.fk_customer_segment,
"loan_amount": formValue.loan_amount, "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_city": formValue.addresses[0].fk_city,
"fk_state": formValue.addresses[0].fk_state, "fk_state": formValue.addresses[0].fk_state,
"pincode": formValue.addresses[0].pincode, "pincode": formValue.addresses[0].pincode,
@ -520,17 +520,30 @@ export class AddPdComponent implements OnInit, OnDestroy {
let coapplicant_landline_no; let coapplicant_landline_no;
if (itemElement.coapplicant_stdcode != null || itemElement.coapplicant_landline != null) { if(!itemElement.coapplicant_stdcode || !itemElement.coapplicant_landline){
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; coapplicant_landline_no = formValue.coapplicant_stdcode + '-' + itemElement.applicant_landline;
} }
else{ else{
coapplicant_landline_no = null; coapplicant_landline_no = null;
} }
}
else { // if (itemElement.coapplicant_stdcode != null || itemElement.coapplicant_landline != null) {
coapplicant_landline_no = 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 = { let obj1 = {
"applicant_name":itemElement.coapplicant_name, "applicant_name":itemElement.coapplicant_name,
@ -547,7 +560,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
if (formValue.addresses.length > 0) { if (formValue.addresses.length > 0) {
formValue.addresses.forEach((addressElement, itemIndex) => { formValue.addresses.forEach((addressElement, itemIndex) => {
let addressobj = { let addressobj = {
"addressline1": addressElement.addressline1.toUpperCase(), "addressline1": !addressElement.addressline1 ? null : addressElement.addressline1.toUpperCase(),
"fk_city": addressElement.fk_city, "fk_city": addressElement.fk_city,
"fk_state": addressElement.fk_state, "fk_state": addressElement.fk_state,
"pincode": addressElement.pincode, "pincode": addressElement.pincode,
@ -627,16 +640,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.loadFormData(); this.loadFormData();
this.disableAfterSubmit = false; 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 // validate all form group and form array fields
validateAllFormFields(formGroup: any) { validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => { 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;
}
}
} }

View File

@ -35,16 +35,16 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 40%"> <mat-form-field style="width: 40%">
<input matInput placeholder="Mobile Number" formControlName="mobile_no" type="text" (keypress)="keyPress($event)" required> <input matInput placeholder="Mobile Number" formControlName="mobile_no" type="text" maxlength="10" OnlyNumber required>
<mat-error *ngIf="pdMainApplicant.mobile_no.hasError('maxlength') || pdMainApplicant.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="pdMainApplicant.mobile_no.hasError('maxlength') || pdMainApplicant.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput placeholder="STD Code" formControlName="stdcode" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="STD Code" formControlName="stdcode" type="text" maxlength="5" OnlyNumber>
<!-- <span matPrefix>+91</span> --> <!-- <span matPrefix>+91</span> -->
<mat-error *ngIf="pdMainApplicant.stdcode.hasError('maxlength') || pdMainApplicant.stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error> <mat-error *ngIf="pdMainApplicant.stdcode.hasError('maxlength') || pdMainApplicant.stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
</mat-form-field> &nbsp;-&nbsp; </mat-form-field> &nbsp;-&nbsp;
<mat-form-field style="width: 60%"> <mat-form-field style="width: 60%">
<input matInput placeholder="LandLine Number" formControlName="landline" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="LandLine Number" formControlName="landline" maxlength="8" type="text" OnlyNumber>
<mat-error *ngIf="pdMainApplicant.landline.hasError('maxlength') || pdMainApplicant.landline.hasError('minlength')">Enter Valid Landline Number. </mat-error> <mat-error *ngIf="pdMainApplicant.landline.hasError('maxlength') || pdMainApplicant.landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>
@ -71,21 +71,21 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 40%"> <mat-form-field style="width: 40%">
<input matInput placeholder="Mobile Number" formControlName="coapplicant_mobile_no" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="Mobile Number" formControlName="coapplicant_mobile_no" type="text" maxlength="10" OnlyNumber>
<mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('pattern') || coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('pattern') || coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field style="width: 40%" > <!-- <mat-form-field style="width: 40%" >
<input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" OnlyNumber>
<mat-error *ngIf=" coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Phone Number. </mat-error> <mat-error *ngIf=" coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Phone Number. </mat-error>
</mat-form-field> --> </mat-form-field> -->
<mat-form-field style="width: 15%"> <mat-form-field style="width: 15%">
<input matInput placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" maxlength="5" OnlyNumber>
<!-- <span matPrefix>+91</span> --> <!-- <span matPrefix>+91</span> -->
<mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Number. </mat-error> <mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Number. </mat-error>
</mat-form-field> &nbsp;-&nbsp; </mat-form-field> &nbsp;-&nbsp;
<mat-form-field style="width: 60%"> <mat-form-field style="width: 60%">
<input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" maxlength="8" OnlyNumber>
<mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error> <mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field style="width: 82%"> <!-- <mat-form-field style="width: 82%">

View File

@ -152,18 +152,33 @@ export class EditPdApplicantComponent implements OnInit {
} }
else{ else{
let concat_landline1 let concat_landline1
if(formValue.stdcode != null && formValue.landline != null){ // if(formValue.stdcode != null && formValue.landline != null){
if(formValue.stdcode == '' && formValue.landline == ''){ // if(formValue.stdcode == '' && formValue.landline == ''){
// concat_landline1 = null;
// }else {
// let std = formValue.stdcode == '' ? '' : formValue.stdcode;
// let landline = formValue.landline == '' ? '' : formValue.landline;
// concat_landline1 = std+'-'+landline;
// }
// }
// else if(formValue.stdcode == '' && formValue.landline == ''){
// concat_landline1 = null;
// }else{
// concat_landline1 = null;
// }
if(!formValue.stdcode || !formValue.landline){
concat_landline1 = null; concat_landline1 = null;
}else { }
else if(!formValue.stdcode && !formValue.landline){
concat_landline1 = null;
}
else if(formValue.stdcode && formValue.landline){
let std = formValue.stdcode == '' ? '' : formValue.stdcode; let std = formValue.stdcode == '' ? '' : formValue.stdcode;
let landline = formValue.landline == '' ? '' : formValue.landline; let landline = formValue.landline == '' ? '' : formValue.landline;
concat_landline1 = std+'-'+landline; concat_landline1 = std+'-'+landline;
} }
} else{
else if(formValue.stdcode == '' && formValue.landline == ''){
concat_landline1 = null;
}else{
concat_landline1 = null; concat_landline1 = null;
} }
@ -182,17 +197,31 @@ export class EditPdApplicantComponent implements OnInit {
formValue.coApplicantItems.forEach((itemElement, itemIndex) => { formValue.coApplicantItems.forEach((itemElement, itemIndex) => {
let concat_landline let concat_landline
if(itemElement.coapplicant_stdcode != null && itemElement.coapplicant_landline != null){ // if(itemElement.coapplicant_stdcode != null && itemElement.coapplicant_landline != null){
if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){ // if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){
// concat_landline = null;
// }else{
// let std = itemElement.coapplicant_stdcode == '' ? '' : itemElement.coapplicant_stdcode;
// let landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline;
// concat_landline = std+'-'+landline;
// }
// }else if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){
// concat_landline = null;
// }else{
// concat_landline = null;
// }
if(!itemElement.coapplicant_stdcode || !itemElement.coapplicant_landline){
concat_landline = null; concat_landline = null;
}else{ }
else if(!itemElement.coapplicant_stdcode && !itemElement.coapplicant_landline){
concat_landline = null;
}
else if(itemElement.coapplicant_stdcode && itemElement.coapplicant_landline){
let std = itemElement.coapplicant_stdcode == '' ? '' : itemElement.coapplicant_stdcode; let std = itemElement.coapplicant_stdcode == '' ? '' : itemElement.coapplicant_stdcode;
let landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline; let landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline;
concat_landline = std+'-'+landline; concat_landline = std+'-'+landline;
} }
}else if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){ else{
concat_landline = null;
}else{
concat_landline = null; concat_landline = null;
} }
@ -261,15 +290,6 @@ export class EditPdApplicantComponent implements OnInit {
closeEditComponent(): void { closeEditComponent(): void {
this.dialogRef.close(); this.dialogRef.close();
} }
/** On Key Press Event For Mobile Number */
keyPress(event: any) {
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 // validate all form group and form array fields
validateAllFormFields(formGroup: any) { validateAllFormFields(formGroup: any) {

View File

@ -45,20 +45,20 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 29%"> <mat-form-field style="width: 29%">
<input matInput placeholder="Lender Mobile Number" formControlName="pd_contact_mobileno" <input matInput placeholder="Lender Mobile Number" formControlName="pd_contact_mobileno"
type="text" (keypress)="keyPress($event)"> type="text" maxlength="10" OnlyNumber>
<mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter <mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter
Valid Mobile Number. </mat-error> Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 10%"> <mat-form-field style="width: 10%">
<input matInput placeholder="STD Code" formControlName="lender_stdcode" type="text" <input matInput placeholder="STD Code" formControlName="lender_stdcode" type="text" maxlength="5"
(keypress)="keyPress($event)"> OnlyNumber>
<!-- <span matPrefix>+91</span> --> <!-- <span matPrefix>+91</span> -->
<mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter <mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter
Valid STD Code. </mat-error> Valid STD Code. </mat-error>
</mat-form-field> &nbsp;-&nbsp; </mat-form-field> &nbsp;-&nbsp;
<mat-form-field style="width: 20%"> <mat-form-field style="width: 20%">
<input matInput placeholder="LandLine Number" formControlName="lender_landline" <input matInput placeholder="LandLine Number" formControlName="lender_landline"
type="text" (keypress)="keyPress($event)"> type="text" maxlength="8" OnlyNumber>
<mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter <mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter
Valid Landline Number. </mat-error> Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>
@ -123,10 +123,9 @@
<mat-form-field style="width: 62%"> <mat-form-field style="width: 62%">
<!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> --> <!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> -->
<input matInput placeholder="Loan Amount" formControlName="loan_amount" <input matInput placeholder="Loan Amount" formControlName="loan_amount"
(keypress)="keyPress($event)" (keyup)="inWords($event,1)" required OnlyNumber required
autocomplete="off"> autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
{{loanAmtInWords}} Only</mat-hint>
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. <mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount.
</mat-error> </mat-error>
@ -180,7 +179,7 @@
<mat-form-field style="width: 24%" *ngIf="pincodeflag[i]"> <mat-form-field style="width: 24%" *ngIf="pincodeflag[i]">
<!-- *ngIf="pdAddresses.pincode.value == 1" --> <!-- *ngIf="pdAddresses.pincode.value == 1" -->
<input matInput autocomplete="off" placeholder="Specify Pincode" <input matInput autocomplete="off" placeholder="Specify Pincode"
formControlName="other_pincode" (keypress)="keyPress($event)"> formControlName="other_pincode" OnlyNumber>
<!-- <mat-error *ngIf="pdAddresses.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error> --> <!-- <mat-error *ngIf="pdAddresses.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error> -->
</mat-form-field> </mat-form-field>

View File

@ -32,7 +32,7 @@ export class EditPdMasterComponent implements OnInit {
// PDTriggerStatus: string; // PDTriggerStatus: string;
enablePDButton: boolean; enablePDButton: boolean;
currentPDStatus: string; currentPDStatus: string;
loanAmtInWords : any;
pincodeflag : any = []; pincodeflag : any = [];
public _EditPDtriggerForm:FormGroup; public _EditPDtriggerForm:FormGroup;
public notifier: NotifierService; public notifier: NotifierService;
@ -54,7 +54,6 @@ export class EditPdMasterComponent implements OnInit {
this.notifier=notifier this.notifier=notifier
this.currentPDStatus = data.records.pd_status; this.currentPDStatus = data.records.pd_status;
this.pdid = data.records.pd_id; this.pdid = data.records.pd_id;
if(this.data.records.loan_amount){ this.loanAmtInWords = this._pd.convertNumberToWords(this.data.records.loan_amount); }
} }
ngOnInit() { ngOnInit() {
@ -226,13 +225,14 @@ export class EditPdMasterComponent implements OnInit {
//get sub product list based on prokduct id //get sub product list based on prokduct id
getSubproductList(productID:string){ getSubproductList(productID:string){
if(productID != '4'){
this.subProductList= this.productList.filter(item => item.product_id == productID); this.subProductList= this.productList.filter(item => item.product_id == productID);
this.subProductList=this.subProductList[0].subproducts; this.subProductList=this.subProductList[0].subproducts;
this.customerSegmentList=(productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); this.customerSegmentList=this.customerSegmentAllList;
}
// this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:(this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')),this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue('')); else if(productID == '4'){
this.customerSegmentList=this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
}
} }
// //get city list details based on state id // //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_mobileno": my_array.pd_contact_mobileno,
"pd_contact_landline": concat_landline, "pd_contact_landline": concat_landline,
"fk_product_id": my_array.fk_product_id, "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_pd_type": my_array.fk_pd_type,
"fk_customer_segment": my_array.fk_customer_segment, "fk_customer_segment": my_array.fk_customer_segment,
"loan_amount": my_array.loan_amount, "loan_amount": my_array.loan_amount,
@ -488,17 +488,6 @@ export class EditPdMasterComponent implements OnInit {
closeEditMasterComponent(): void { closeEditMasterComponent(): void {
this.dialogRef.close(); 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 // validate all form group and form array fields
validateAllFormFields(formGroup: any) { validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => { 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;
}
}
} }

View File

@ -82,10 +82,10 @@ export class BusinessInfoComponent implements OnInit {
appxSalaryAmtInwords: any; appxSalaryAmtInwords: any;
isreadonlyyear:any = []; isreadonlyyear:any = [];
isreadonlymonth:any = []; isreadonlymonth:any = [];
ManufacturingChecked: boolean; ManufacturingUnChecked: boolean;
RetailedChecked: boolean; RetailedUnChecked: boolean;
WholeSalesChecked: boolean; WholeSalesUnChecked: boolean;
ServiceChecked: boolean; ServiceUnChecked: boolean;
temp_noofposmachine : any; temp_noofposmachine : any;
temp_additiondetailofposmachine : 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){ 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 = <FormArray>this.businessForm.controls['manufacturing_activity_details']; let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.controls = []; manufacturingControl.controls = [];
manufacturingControl.setValue([]); manufacturingControl.setValue([]);
} }
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){ 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 = <FormArray>this.businessForm.controls['manufacturing_activity_details']; let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
manufacturingControl.push(this.createActivity()); 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){ 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 = <FormArray>this.businessForm.controls['retail_trading_activity_details']; let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
retailControl.controls = []; retailControl.controls = [];
retailControl.setValue([]); retailControl.setValue([]);
} }
else if(event.value.exist_status==false && event.value.type_of_activity_id==3){ 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 = <FormArray>this.businessForm.controls['retail_trading_activity_details']; let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
retailControl.push(this.createActivity()); retailControl.push(this.createActivity());
} }
if(event.value.exist_status==true && event.value.type_of_activity_id==4){ 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 = <FormArray>this.businessForm.controls['wholesale_trading_activity_details']; let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
wholesaleControl.controls = []; wholesaleControl.controls = [];
wholesaleControl.setValue([]); wholesaleControl.setValue([]);
} }
else if(event.value.exist_status==false && event.value.type_of_activity_id==4){ 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 = <FormArray>this.businessForm.controls['wholesale_trading_activity_details']; let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
wholesaleControl.push(this.createActivity()); wholesaleControl.push(this.createActivity());
} }
if(event.value.exist_status==true && event.value.type_of_activity_id==5){ 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 = <FormArray>this.businessForm.controls['service_provider_activity_details']; let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
serviceControl.controls = []; serviceControl.controls = [];
serviceControl.setValue([]); serviceControl.setValue([]);
} }
else if(event.value.exist_status==false && event.value.type_of_activity_id==5){ 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 = <FormArray>this.businessForm.controls['service_provider_activity_details']; let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
serviceControl.push(this.createServiceActivity()); 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){ 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); this.changePOSMachinesAvailablity(this.businessForm.value.applicant_use_pos_machines,2);
} }
if(this.ManufacturingUnChecked || this.ManufacturingUnChecked==undefined && this.RetailedUnChecked || this.RetailedUnChecked==undefined && this.WholeSalesUnChecked ||this.WholeSalesUnChecked==undefined && this.ServiceUnChecked || this.ServiceUnChecked==undefined){
if(this.ManufacturingChecked && this.RetailedChecked && this.WholeSalesChecked && this.ServiceChecked){
this.ExportFlag = false; this.ExportFlag = false;
} }
} }
@ -1766,69 +1765,55 @@ WholeSaleCounterArray: any = [];
ServiceCounterArray: any = []; ServiceCounterArray: any = [];
CheckExport(value,stringFlag,index){ CheckExport(value,stringFlag,index){
const parentControl = <FormArray>this.businessForm.controls['select_business_activity_type']; const parentControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
const childControl = <FormArray>parentControl.controls[0]; const childControl = <FormArray>parentControl.controls[0];
if(!this.ManufacturingUnChecked){
// childControl.forEach((datas,index) => {
// // exist_status==true && event.value.type_of_activity_id
// });
if(!this.ManufacturingChecked){
if(stringFlag == 'MActivity' && value != "Within India"){ if(stringFlag == 'MActivity' && value != "Within India"){
this.ManufacturingCounterArray[index] = 1; this.ManufacturingCounterArray[index] = 1;
} }
else if(stringFlag == 'MActivity' && value != "Within India"){ else if(stringFlag == 'MActivity' && value == "Within India"){
this.ManufacturingCounterArray[index] = 0; this.ManufacturingCounterArray[index] = 0;
} }
}else if (this.ManufacturingChecked && stringFlag == 'MActivity'){ }else if (this.ManufacturingUnChecked && stringFlag == 'MActivity'){
this.ManufacturingCounterArray[index] = 0; this.ManufacturingCounterArray[index] = 0;
} }
if(!this.RetailedChecked){ if(!this.RetailedUnChecked){
if(stringFlag == 'RActivity' && value != "Within India"){ if(stringFlag == 'RActivity' && value != "Within India"){
this.RetailCounterArray[index] = 1; this.RetailCounterArray[index] = 1;
} }
else if(stringFlag == 'RActivity' && value != "Within India"){ else if(stringFlag == 'RActivity' && value == "Within India"){
this.RetailCounterArray[index] = 0; this.RetailCounterArray[index] = 0;
} }
} }
else if(stringFlag == 'RActivity' && this.RetailedChecked){ else if(stringFlag == 'RActivity' && this.RetailedUnChecked){
this.RetailCounterArray[index] = 0; this.RetailCounterArray[index] = 0;
} }
if(!this.WholeSalesChecked){ if(!this.WholeSalesUnChecked){
if(stringFlag == 'WActivity' && value != "Within India"){ if(stringFlag == 'WActivity' && value != "Within India"){
this.WholeSaleCounterArray[index] = 1; this.WholeSaleCounterArray[index] = 1;
} }
else if(stringFlag == 'WActivity' && value != "Within India"){ else if(stringFlag == 'WActivity' && value == "Within India"){
this.WholeSaleCounterArray[index] = 0; this.WholeSaleCounterArray[index] = 0;
} }
} }
else if(stringFlag == 'WActivity' && this.WholeSalesChecked){ else if(stringFlag == 'WActivity' && this.WholeSalesUnChecked){
this.WholeSaleCounterArray[index] = 0; this.WholeSaleCounterArray[index] = 0;
} }
if(!this.ServiceChecked){ if(!this.ServiceUnChecked){
if(stringFlag == 'SPActivity' && value != "Within India") if(stringFlag == 'SPActivity' && value != "Within India")
{ {
this.ServiceCounterArray[index] = 1; this.ServiceCounterArray[index] = 1;
} }
else if(stringFlag == 'SPActivity' && value != "Within India"){ else if(stringFlag == 'SPActivity' && value == "Within India"){
this.ServiceCounterArray[index] = 0; this.ServiceCounterArray[index] = 0;
} }
}else if(stringFlag == 'SPActivity' && this.ServiceUnChecked){
}else if(stringFlag == 'SPActivity'){
this.ServiceCounterArray[index] = 0; this.ServiceCounterArray[index] = 0;
} }
@ -1840,10 +1825,8 @@ CheckExport(value,stringFlag,index){
let SumOfServiceCounter = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0); let SumOfServiceCounter = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ; let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ;
this.ExportFlag = overallCounter > 0 ? true : false ; this.ExportFlag = overallCounter > 0 ? true : false ;
} }

View File

@ -17,7 +17,7 @@
<div fxFlex="100"> <div fxFlex="100">
<mat-card> <mat-card>
<mat-form-field> <mat-form-field style="width:17%">
<!-- <input matInput> --> <!-- <input matInput> -->
<mat-select placeholder="Name of Employer" formControlName="employer_name" required> <mat-select placeholder="Name of Employer" formControlName="employer_name" required>
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -32,11 +32,11 @@
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Year" formControlName="how_long_year" required min='0'> <input matInput OnlyNumber type="text" autocomplete="off" placeholder="Year" formControlName="how_long_year" required min='0'>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month" formControlName="how_long_month" required min='0' (change)="ConvertMonthintoYear($event.target.value)"> <input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month" formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'"> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
<mat-select placeholder="Was the employer met?" <mat-select placeholder="Was the employer met?"
formControlName="was_met" required> formControlName="was_met" required>
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -65,7 +65,7 @@
</mat-select> --> </mat-select> -->
</mat-form-field> </mat-form-field>
</div> </div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'"> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
<mat-select placeholder="Salary amount confirmed ?" <mat-select placeholder="Salary amount confirmed ?"
formControlName="confirm_salary" required> formControlName="confirm_salary" required>
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -73,10 +73,25 @@
<mat-option value="no">No</mat-option> <mat-option value="no">No</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
<mat-form-field fxFlex="50">
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount" (keypress)="keyPress($event)"> <input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount" (keypress)="keyPress($event)">
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['confirm_salary_amount'].value != ''">{{"&#8377;"}} {{employmentForm.controls['confirm_salary_amount'].value | numberToWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-form-field fxFlex="25">
<input matInput placeholder="Total Work Experience"
formControlName="total_business_experience" OnlyNumber autocomplete="off">
<mat-error *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">Higher</mat-error>
</mat-form-field>
<!-- *ngIf="employmentForm.controls['how_long_year'].value > employmentForm.controls['total_business_experience'].value" -->
<mat-form-field fxFlex="25" *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">
<input matInput placeholder="Previous Work Experience Details"
formControlName="total_business_previous_experience">
</mat-form-field>
</div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
<mat-select placeholder="Attendance register seen ?" <mat-select placeholder="Attendance register seen ?"
formControlName="attendance_seen" required> formControlName="attendance_seen" required>
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -84,7 +99,7 @@
<mat-option value="no">No</mat-option> <mat-option value="no">No</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'"> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
<mat-select placeholder="Salary register seen ?" <mat-select placeholder="Salary register seen ?"
formControlName="sal_reg_seen" required> formControlName="sal_reg_seen" required>
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
@ -100,7 +115,10 @@
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex="100"> <div fxFlex="100">
<mat-form-field style="width: 33%"> <mat-form-field style="width: 33%">
<input matInput placeholder="Date of Salary" formControlName="which_date_the_salary_is_rcv" OnlyNumber type="text" min='1' max='31'> <input matInput placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv" OnlyNumber type="number" min='1' max='31'>
</mat-form-field>
<mat-form-field style="width: 33%">
<input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv" OnlyNumber type="number" min='1' max='31'>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 33%"> <mat-form-field style="width: 33%">
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" (keypress)="keyPress($event)" required> <input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" (keypress)="keyPress($event)" required>
@ -117,6 +135,26 @@
formControlName="bonus_incentive" (keypress)="keyPress($event)" required> formControlName="bonus_incentive" (keypress)="keyPress($event)" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 33%">
<mat-select placeholder="Amount paid in Cash ?"
formControlName="amount_paid_in_cash">
<mat-option>Select</mat-option>
<mat-option value="validated">Validated</mat-option>
<mat-option value="not validated">Not Validated</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'validated'">
<input matInput placeholder="How was it Validated"
formControlName="how_was_it_validated">
</mat-form-field>
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'not validated'">
<input matInput placeholder="Why was it not Validated"
formControlName="why_was_it_not_validated">
</mat-form-field>
<mat-form-field style="width: 33%">
<input matInput placeholder="Amount paid through Bank"
formControlName="amount_paid_through_bank">
</mat-form-field>
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' "> <mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
<mat-select placeholder="Bonus Frequency" formControlName="bonus_frequency"> <mat-select placeholder="Bonus Frequency" formControlName="bonus_frequency">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>

View File

@ -11,7 +11,7 @@
width: 80%; width: 80%;
} }
.matcard mat-form-field { .matcard mat-form-field {
margin: 0 2%; margin: 0 1%;
} }
.address .button { .address .button {
float: right; float: right;

View File

@ -118,13 +118,22 @@ export class EmploymentInfoComponent implements OnInit {
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary); this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
if (value.records.confirm_salary_amount) { if (value.records.confirm_salary_amount) {
this.employmentForm.controls['confirm_salary_amount'].setValue(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['attendance_seen'].setValue(value.records.attendance_seen);
this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_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['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_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['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_frequency'].setValue(value.records.bonus_frequency);
this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type); this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type);
this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other); this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other);
@ -161,12 +170,19 @@ export class EmploymentInfoComponent implements OnInit {
designation_person_met: [''], designation_person_met: [''],
confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
confirm_salary_amount: [''], confirm_salary_amount: [''],
total_business_experience:[''],
total_business_previous_experience:[''],
attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], 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])], 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])], gross_monthly_salary: ['', Validators.compose([Validators.required])],
net_monthly_salary: ['', Validators.compose([Validators.required])], net_monthly_salary: ['', Validators.compose([Validators.required])],
bonus_incentive: ['', 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_frequency: [''],
bonus_type: [''], bonus_type: [''],
bonus_type_other: [''], bonus_type_other: [''],
@ -178,13 +194,8 @@ export class EmploymentInfoComponent implements OnInit {
filtercompanyrelationship(companyid,applicantid){ filtercompanyrelationship(companyid,applicantid){
var array = companyid.split("-"); var array = companyid.split("-");
// console.log(array[0]); let data = this.company_related_applicants_list.filter(cmpy=>cmpy.relation_to_company == array[0] && cmpy.applicant_name == applicantid);
// 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);
if(data.length>0){ if(data.length>0){
this.filtered_company_relationship_list = this.company_relationship_list.filter(freq=>freq.company_relationship_id == data[0].company_relationship ); 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]); 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; records.confirm_salary = this.employmentForm.controls['confirm_salary'].value;
if (this.employmentForm.controls['confirm_salary'].value == 'yes') { if (this.employmentForm.controls['confirm_salary'].value == 'yes') {
records.confirm_salary_amount = this.employmentForm.controls['confirm_salary_amount'].value; 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.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
records.sal_reg_seen = this.employmentForm.controls['sal_reg_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.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value; records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].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_frequency = this.employmentForm.controls['bonus_frequency'].value;
records.bonus_type = this.employmentForm.controls['bonus_type'].value; records.bonus_type = this.employmentForm.controls['bonus_type'].value;
records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value; records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value;

View File

@ -362,9 +362,9 @@ export class FamilyDetailsComponent implements OnInit {
} }
selectedPerson(e,inx){ 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; 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 = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details; const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
let newControlLength: number; let newControlLength: number;
@ -375,7 +375,7 @@ export class FamilyDetailsComponent implements OnInit {
let arraydata : any; let arraydata : any;
let data = this.apiFamilyMembers.filter(item => item.relation_to == e); let data = this.apiFamilyMembers.filter(item => item.relation_to == e);
console.log('3)','data',data);
// data_gets_from:'GeneralForm' // data_gets_from:'GeneralForm'
// data_gets_from:'BusinessForm' // data_gets_from:'BusinessForm'
@ -393,13 +393,14 @@ export class FamilyDetailsComponent implements OnInit {
data.forEach((val,inx) => { data.forEach((val,inx) => {
console.log('b4 this.isReadOnly[inx]',this.isReadOnly[inx],val.age);
// family_member_earning_status // family_member_earning_status
if(val.age){ if(val.age){
this.isReadOnly[inx] = true; this.isReadOnly[inx] = true;
}else{ }else{
this.isReadOnly[inx] = false; this.isReadOnly[inx] = false;
} }
console.log('aftr this.isReadOnly[inx]',this.isReadOnly[inx],val.age);
arraydata = { arraydata = {
'family_member_name' : val.name, 'family_member_name' : val.name,
'family_member_relationship' : val.relationship, 'family_member_relationship' : val.relationship,

View File

@ -34,6 +34,13 @@
<input matInput placeholder="No of months" formControlName="loan_tenure" OnlyNumber type="text" <input matInput placeholder="No of months" formControlName="loan_tenure" OnlyNumber type="text"
autocomplete="off"> autocomplete="off">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:64%">
<mat-select placeholder="Sub Product"
formControlName="sub_product">
<mat-option>Select</mat-option>
<mat-option *ngFor="let list of m_endUseofLoad" [value]="list.subproduct_id"> {{list.name }} ( {{list.abbr}} ) </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<mat-select multiple (selectionChange)="endUserChange($event.value)" <mat-select multiple (selectionChange)="endUserChange($event.value)"

View File

@ -101,6 +101,7 @@ export class LoanDetailsComponent implements OnInit {
this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr; this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr;
this.productID = this.pd_all_details.pdmaster_details.fk_product_id; this.productID = this.pd_all_details.pdmaster_details.fk_product_id;
this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name; this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name;
console.log('this.pd_all_details.pdmaster_details',this.pd_all_details.pdmaster_details);
this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount : ''; this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount : '';
this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt); this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
this.form_id = 10; this.form_id = 10;
@ -195,6 +196,7 @@ export class LoanDetailsComponent implements OnInit {
if (value.records.loan_amount) { this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); } if (value.records.loan_amount) { this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
this.loanDetailsForm.controls['loan_tenure'].setValue(value.records.loan_tenure); this.loanDetailsForm.controls['loan_tenure'].setValue(value.records.loan_tenure);
this.loanDetailsForm.controls['sub_product'].setValue(value.records.sub_product || null);
if (value.records.end_use_other != null) { if (value.records.end_use_other != null) {
this.loanDetailsForm.controls['end_use_other'].setValue(value.records.end_use_other); this.loanDetailsForm.controls['end_use_other'].setValue(value.records.end_use_other);
@ -281,6 +283,11 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks); this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
} }
else{
if(this.pd_all_details.pdmaster_details.fk_subproduct_id){
this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id);
}
}
}) })
if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL') { if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL') {
@ -387,6 +394,7 @@ export class LoanDetailsComponent implements OnInit {
loan_amount: [this.exist_loan_amt], loan_amount: [this.exist_loan_amt],
loan_tenure:[''], loan_tenure:[''],
sub_product:[''],
end_use: [''], end_use: [''],
end_use_other: [''], end_use_other: [''],
is_transfer: [''], is_transfer: [''],
@ -655,6 +663,7 @@ export class LoanDetailsComponent implements OnInit {
records.fk_createdby = this.pdid; records.fk_createdby = this.pdid;
records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value; records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value;
records.loan_tenure = this.loanDetailsForm.controls['loan_tenure'].value; records.loan_tenure = this.loanDetailsForm.controls['loan_tenure'].value;
records.sub_product = this.loanDetailsForm.controls['sub_product'].value;
// get end user final group data // get end user final group data
let dataEnd_user_data = []; let dataEnd_user_data = [];

View File

@ -247,10 +247,8 @@ public viewerOptions: any = {
// const dialogRef = this.dialog.open(RentalInfoComponent, { // const dialogRef = this.dialog.open(RentalInfoComponent, {
// data: {} // data: {}
// }); // });
// dialogRef.afterClosed() // dialogRef.afterClosed()
// .subscribe(dataresult => { // .subscribe(dataresult => {
// }); // });
const dialogRef = this.dialog.open(RentalInfoComponent, { const dialogRef = this.dialog.open(RentalInfoComponent, {
data: this.pd_all_details, data: this.pd_all_details,

View File

@ -6,11 +6,11 @@
<small>{{pdMasterList.customer_segment_name}}</small> <small>{{pdMasterList.customer_segment_name}}</small>
</div> </div>
<div fxFlex="66" align="end"> <div fxFlex="66" align="end">
<h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}} <h4 class="mt-0">{{pdMasterList.product_name}}<span *ngIf="pdMasterList.subproduct_name">/{{pdMasterList.subproduct_name}}</span>
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above" <button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button> (click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</h4> </h4>
<small>{{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}}</small> <small>{{pdMasterList.lender_full_name}}<span *ngIf="pdMasterList.lender_applicant_id">/{{pdMasterList.lender_applicant_id}}</span></small>
</div> </div>
</mat-card-title> </mat-card-title>
</mat-card-header> </mat-card-header>