sheet changes : ps
This commit is contained in:
parent
b7617d9aa0
commit
97ec3bc3eb
@ -44,21 +44,21 @@
|
||||
<!-- <mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
<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-form-field>
|
||||
|
||||
<!--<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-form-field>-->
|
||||
|
||||
<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-form-field> -
|
||||
<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-form-field>
|
||||
|
||||
@ -113,8 +113,8 @@
|
||||
|
||||
</mat-form-field>
|
||||
<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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||
<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">{{"₹"}} {{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('pattern')">Enter valid amount. </mat-error>
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
|
||||
<mat-form-field style="width: 24%" *ngIf="pincodeflag[i]">
|
||||
<!-- *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-form-field>
|
||||
<div align="end" *ngIf="pdAddresses.controls.length > 1">
|
||||
@ -206,16 +206,16 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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-form-field>
|
||||
|
||||
<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-form-field> -
|
||||
<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-form-field>
|
||||
|
||||
@ -249,16 +249,16 @@
|
||||
</mat-form-field> -->
|
||||
|
||||
<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-form-field>
|
||||
|
||||
<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-form-field> -
|
||||
<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-form-field>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -35,16 +35,16 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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-form-field>
|
||||
<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> -->
|
||||
<mat-error *ngIf="pdMainApplicant.stdcode.hasError('maxlength') || pdMainApplicant.stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
|
||||
</mat-form-field> -
|
||||
<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-form-field>
|
||||
|
||||
@ -71,21 +71,21 @@
|
||||
</mat-form-field>
|
||||
|
||||
<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-form-field>
|
||||
|
||||
<!-- <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-form-field> -->
|
||||
<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> -->
|
||||
<mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Number. </mat-error>
|
||||
</mat-form-field> -
|
||||
<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-form-field>
|
||||
<!-- <mat-form-field style="width: 82%">
|
||||
|
||||
@ -152,19 +152,34 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
}
|
||||
else{
|
||||
let concat_landline1
|
||||
if(formValue.stdcode != null && formValue.landline != null){
|
||||
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;
|
||||
}
|
||||
// if(formValue.stdcode != null && formValue.landline != null){
|
||||
// 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;
|
||||
}
|
||||
else if(formValue.stdcode == '' && formValue.landline == ''){
|
||||
concat_landline1 = null;
|
||||
}else{
|
||||
concat_landline1 = null;
|
||||
else if(!formValue.stdcode && !formValue.landline){
|
||||
concat_landline1 = null;
|
||||
}
|
||||
else if(formValue.stdcode && formValue.landline){
|
||||
let std = formValue.stdcode == '' ? '' : formValue.stdcode;
|
||||
let landline = formValue.landline == '' ? '' : formValue.landline;
|
||||
concat_landline1 = std+'-'+landline;
|
||||
}
|
||||
else{
|
||||
concat_landline1 = null;
|
||||
}
|
||||
|
||||
let pd_applicant_details : any=[{
|
||||
@ -182,17 +197,31 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
formValue.coApplicantItems.forEach((itemElement, itemIndex) => {
|
||||
|
||||
let concat_landline
|
||||
if(itemElement.coapplicant_stdcode != null && itemElement.coapplicant_landline != null){
|
||||
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 == ''){
|
||||
// if(itemElement.coapplicant_stdcode != null && itemElement.coapplicant_landline != null){
|
||||
// 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;
|
||||
}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 landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline;
|
||||
concat_landline = std+'-'+landline;
|
||||
}
|
||||
else{
|
||||
concat_landline = null;
|
||||
}
|
||||
|
||||
@ -261,16 +290,7 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
closeEditComponent(): void {
|
||||
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
|
||||
validateAllFormFields(formGroup: any) {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
|
||||
@ -45,20 +45,20 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 29%">
|
||||
<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
|
||||
Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 10%">
|
||||
<input matInput placeholder="STD Code" formControlName="lender_stdcode" type="text"
|
||||
(keypress)="keyPress($event)">
|
||||
<input matInput placeholder="STD Code" formControlName="lender_stdcode" type="text" maxlength="5"
|
||||
OnlyNumber>
|
||||
<!-- <span matPrefix>+91</span> -->
|
||||
<mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter
|
||||
Valid STD Code. </mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 20%">
|
||||
<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
|
||||
Valid Landline Number. </mat-error>
|
||||
</mat-form-field>
|
||||
@ -123,10 +123,9 @@
|
||||
<mat-form-field style="width: 62%">
|
||||
<!-- <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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value != ''">{{"₹"}}
|
||||
{{loanAmtInWords}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value != ''">{{"₹"}} {{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('pattern')">Enter valid amount.
|
||||
</mat-error>
|
||||
@ -180,7 +179,7 @@
|
||||
<mat-form-field style="width: 24%" *ngIf="pincodeflag[i]">
|
||||
<!-- *ngIf="pdAddresses.pincode.value == 1" -->
|
||||
<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-form-field>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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 = <FormArray>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 = <FormArray>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 = <FormArray>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 = <FormArray>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 = <FormArray>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 = <FormArray>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 = <FormArray>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 = <FormArray>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 = <FormArray>this.businessForm.controls['select_business_activity_type'];
|
||||
const childControl = <FormArray>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 ;
|
||||
|
||||
}
|
||||
|
||||
@ -17,14 +17,14 @@
|
||||
<div fxFlex="100">
|
||||
<mat-card>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:17%">
|
||||
<!-- <input matInput> -->
|
||||
<mat-select placeholder="Name of Employer" formControlName="employer_name" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let cl of company_list" [value]="cl.company_order_id+'-'+cl.company_name">{{ cl.company_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div>
|
||||
<div>
|
||||
<label>Since how long working with this employer?</label>
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -32,11 +32,11 @@
|
||||
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Year" formControlName="how_long_year" required min='0'>
|
||||
</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>
|
||||
</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?"
|
||||
formControlName="was_met" required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -65,7 +65,7 @@
|
||||
</mat-select> -->
|
||||
</mat-form-field>
|
||||
</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 ?"
|
||||
formControlName="confirm_salary" required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -73,10 +73,25 @@
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
||||
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||
<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)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['confirm_salary_amount'].value != ''">{{"₹"}} {{employmentForm.controls['confirm_salary_amount'].value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<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 ?"
|
||||
formControlName="attendance_seen" required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -84,7 +99,7 @@
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</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 ?"
|
||||
formControlName="sal_reg_seen" required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -100,7 +115,10 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<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 style="width: 33%">
|
||||
<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>
|
||||
</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-select placeholder="Bonus Frequency" formControlName="bonus_frequency">
|
||||
<mat-option>Select</mat-option>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
width: 80%;
|
||||
}
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
margin: 0 1%;
|
||||
}
|
||||
.address .button {
|
||||
float: right;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 = <FormArray>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,
|
||||
|
||||
@ -34,6 +34,13 @@
|
||||
<input matInput placeholder="No of months" formControlName="loan_tenure" OnlyNumber type="text"
|
||||
autocomplete="off">
|
||||
</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-select multiple (selectionChange)="endUserChange($event.value)"
|
||||
|
||||
@ -101,6 +101,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr;
|
||||
this.productID = this.pd_all_details.pdmaster_details.fk_product_id;
|
||||
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.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
|
||||
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); }
|
||||
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
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') {
|
||||
@ -387,6 +394,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
loan_amount: [this.exist_loan_amt],
|
||||
loan_tenure:[''],
|
||||
sub_product:[''],
|
||||
end_use: [''],
|
||||
end_use_other: [''],
|
||||
is_transfer: [''],
|
||||
@ -655,6 +663,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
records.fk_createdby = this.pdid;
|
||||
records.loan_amount = this.loanDetailsForm.controls['loan_amount'].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
|
||||
let dataEnd_user_data = [];
|
||||
|
||||
@ -247,10 +247,8 @@ public viewerOptions: any = {
|
||||
// const dialogRef = this.dialog.open(RentalInfoComponent, {
|
||||
// data: {}
|
||||
// });
|
||||
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
|
||||
// });
|
||||
const dialogRef = this.dialog.open(RentalInfoComponent, {
|
||||
data: this.pd_all_details,
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||
</div>
|
||||
<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"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</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>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user