changes:ps
This commit is contained in:
parent
8cad63b52f
commit
218d9d3a1a
@ -88,7 +88,7 @@
|
|||||||
<input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
|
<input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
|
||||||
<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%">
|
||||||
|
|
||||||
<mat-select placeholder="Relationship With Main Applicant" formControlName="relationship">
|
<mat-select placeholder="Relationship With Main Applicant" formControlName="relationship">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
{{rel.name}}
|
{{rel.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
coapplicant_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
|
coapplicant_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
|
||||||
// landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
// landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
||||||
coapplicant_landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
coapplicant_landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
||||||
relationship: [listData.relation],
|
// relationship: [listData.relation],
|
||||||
applicant_type: [listData.applicant_type, Validators.compose([Validators.required])],
|
applicant_type: [listData.applicant_type, Validators.compose([Validators.required])],
|
||||||
company_name: [listData.company_name],
|
company_name: [listData.company_name],
|
||||||
});
|
});
|
||||||
@ -123,7 +123,7 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
coapplicant_stdcode: [null, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
|
coapplicant_stdcode: [null, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
|
||||||
coapplicant_landline: [null,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
coapplicant_landline: [null,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
||||||
//coapplicant_landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
|
//coapplicant_landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
|
||||||
relationship: [null],
|
// relationship: [null],
|
||||||
applicant_type: [0],
|
applicant_type: [0],
|
||||||
company_name: [null],
|
company_name: [null],
|
||||||
});
|
});
|
||||||
@ -176,7 +176,7 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
"mobile_no":formValue.mobile_no,
|
"mobile_no":formValue.mobile_no,
|
||||||
"landline":concat_landline1,
|
"landline":concat_landline1,
|
||||||
"applicant_type":formValue.applicant_type,
|
"applicant_type":formValue.applicant_type,
|
||||||
"relation":formValue.relationship,
|
// "relation":formValue.relationship,
|
||||||
"applicant_title_name": formValue.applicant_title_name,
|
"applicant_title_name": formValue.applicant_title_name,
|
||||||
"isactive":1
|
"isactive":1
|
||||||
}];
|
}];
|
||||||
@ -203,7 +203,7 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
"pd_co_applicant_id": itemElement.fk_applicant_primary_id,
|
"pd_co_applicant_id": itemElement.fk_applicant_primary_id,
|
||||||
"applicant_title_name":itemElement.applicant_title_name,
|
"applicant_title_name":itemElement.applicant_title_name,
|
||||||
"applicant_name":itemElement.coapplicantName,
|
"applicant_name":itemElement.coapplicantName,
|
||||||
"relation":itemElement.relationship,
|
// "relation":itemElement.relationship,
|
||||||
"mobile_no":itemElement.coapplicant_mobile_no,
|
"mobile_no":itemElement.coapplicant_mobile_no,
|
||||||
"landline":concat_landline,
|
"landline":concat_landline,
|
||||||
"applicant_type":itemElement.applicant_type,
|
"applicant_type":itemElement.applicant_type,
|
||||||
|
|||||||
@ -22,17 +22,17 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="50">
|
||||||
|
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
|
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
|
||||||
<input matInput placeholder="Address" formControlName="address" oninput="this.value = this.value.toUpperCase()" required autocomplete="off">
|
<input matInput placeholder="Address" formControlName="address" oninput="this.value = this.value.toUpperCase()" required autocomplete="off">
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<mat-select placeholder="Address Type" formControlName="address_type" required (selectionChange)="selectedAddressType($event.source.triggerValue)" >
|
<mat-select placeholder="Address Type" formControlName="address_type" required (selectionChange)="selectedAddressType($event.source.triggerValue)" >
|
||||||
<mat-option value="{{m_addressType.address_type_id}}"
|
<mat-option value="{{m_addressType.address_type_id}}"
|
||||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||||
@ -41,15 +41,15 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="addressForm.controls['address_type'].value == 1" fxFlex="33">
|
<div *ngIf="addressForm.controls['address_type'].value == 1" fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<input matInput placeholder="Specify Address Type *" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
<input matInput placeholder="Specify Address Type *" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
||||||
<mat-error *ngIf="!addressForm.controls['address_type_others'].valid">Address Type Required</mat-error>
|
<mat-error *ngIf="!addressForm.controls['address_type_others'].valid">Address Type Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||||
<mat-option value="{{m_locality.locality_id}}"
|
<mat-option value="{{m_locality.locality_id}}"
|
||||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||||
@ -58,24 +58,24 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="33">
|
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<input matInput placeholder="Specify Locality *" formControlName="locality_others" autocomplete="off">
|
<input matInput placeholder="Specify Locality *" formControlName="locality_others" autocomplete="off">
|
||||||
<!-- autofocus -->
|
<!-- autofocus -->
|
||||||
<mat-error *ngIf="!addressForm.controls['locality_others'].valid">Locality Required</mat-error>
|
<mat-error *ngIf="!addressForm.controls['locality_others'].valid">Locality Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="addressForm.controls.locality.value == 5" fxFlex="33">
|
<div *ngIf="addressForm.controls.locality.value == 5" fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<input matInput placeholder="Specify the MixUse *"
|
<input matInput placeholder="Specify the MixUse *"
|
||||||
formControlName="locality_mixuse" autocomplete="off">
|
formControlName="locality_mixuse" autocomplete="off">
|
||||||
<mat-error *ngIf="!addressForm.controls['locality_mixuse'].valid">MixUse Required</mat-error>
|
<mat-error *ngIf="!addressForm.controls['locality_mixuse'].valid">MixUse Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
||||||
<mat-option value="{{data.pd_location_approach_id}}"
|
<mat-option value="{{data.pd_location_approach_id}}"
|
||||||
*ngFor="let data of locationdata">{{data.description}}
|
*ngFor="let data of locationdata">{{data.description}}
|
||||||
@ -84,8 +84,8 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="50">
|
||||||
<mat-form-field style="width: 85%;">
|
<mat-form-field style="width: 92%;">
|
||||||
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
||||||
<mat-option value="{{data.comments_on_locality_id}}"
|
<mat-option value="{{data.comments_on_locality_id}}"
|
||||||
*ngFor="let data of commentData">{{data.rating}}
|
*ngFor="let data of commentData">{{data.rating}}
|
||||||
|
|||||||
@ -40,12 +40,12 @@
|
|||||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Property Type" formControlName="property_type" (selectionChange)="setRequiredValidation($event.value,detail,1)">
|
<mat-select placeholder="Property Type" formControlName="property_type" (selectionChange)="setRequiredValidation($event.value,detail,1)">
|
||||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
|
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="detail.get('property_type').value == 1" style="width:40%">
|
<mat-form-field *ngIf="detail.get('property_type').value == 1" style="width:45%">
|
||||||
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
@ -57,11 +57,23 @@
|
|||||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
|
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type" (selectionChange)="setRequiredValidation($event.value,detail,5)">
|
||||||
|
<mat-option *ngFor="let vehicle of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{ vehicle.vehicle_type_name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:45%" *ngIf="detail.get('vehicle_type').value == 1">
|
||||||
|
<input matInput placeholder=" Specify Vehicle" formControlName="other_vehicle_type" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <mat-form-field style="width:40%"> -->
|
||||||
<!--<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" autocomplete="off">
|
<!--<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler" autocomplete="off">
|
||||||
<mat-form-field style="width:30%">-->
|
<mat-form-field style="width:30%">-->
|
||||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
<!-- <input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_vehicle" autocomplete="off"> -->
|
||||||
|
<!-- </mat-form-field> -->
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<input matInput placeholder="Description of Vehicle (example -Toyota Altis)" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -117,27 +129,27 @@
|
|||||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput placeholder="Premium Paid" formControlName="premium_paid" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,s,6)">
|
<input matInput placeholder="Premium Paid" formControlName="premium_paid" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,s,6)">
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('premium_paid').value != ''">{{"₹"}} {{OtherPremiumPaidInwords[s]}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('premium_paid').value != ''">{{"₹"}} {{OtherPremiumPaidInwords[s]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Frequency" formControlName="frequency_mode" (selectionChange)="setRequiredValidation($event.value,detail,2)">
|
<mat-select placeholder="Frequency" formControlName="frequency_mode" (selectionChange)="setRequiredValidation($event.value,detail,2)">
|
||||||
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
|
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:40%" *ngIf="detail.get('frequency_mode').value == 1 ">
|
<mat-form-field style="width:45%" *ngIf="detail.get('frequency_mode').value == 1 ">
|
||||||
<input matInput placeholder="Specify Frequency" formControlName="other_frequency_mode" autocomplete="off">
|
<input matInput placeholder="Specify Frequency" formControlName="other_frequency_mode" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,s,8)">
|
<input matInput placeholder="Sum Assured" formControlName="sum_assured" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,s,8)">
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('sum_assured').value != ''">{{"₹"}} {{OtherSumAssuredInwords[s]}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('sum_assured').value != ''">{{"₹"}} {{OtherSumAssuredInwords[s]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput placeholder="Members Covered" formControlName="members_coverd" autocomplete="off">
|
<input matInput placeholder="Members Covered" formControlName="members_coverd" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@ -153,13 +165,13 @@
|
|||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Type" formControlName="investments_type" (selectionChange)="setRequiredValidation($event.value,detail,3)">
|
<mat-select placeholder="Type" formControlName="investments_type" (selectionChange)="setRequiredValidation($event.value,detail,3)">
|
||||||
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
|
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:40%" *ngIf="detail.get('investments_type').value == 1">
|
<mat-form-field style="width:45%" *ngIf="detail.get('investments_type').value == 1">
|
||||||
<input matInput placeholder="Specify Type" formControlName="other_investments_type" autocomplete="off">
|
<input matInput placeholder="Specify Type" formControlName="other_investments_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@ -167,7 +179,7 @@
|
|||||||
<input matInput autocomplete="off" placeholder="Name of organisation in which investment done" formControlName="in_which_organisation">
|
<input matInput autocomplete="off" placeholder="Name of organisation in which investment done" formControlName="in_which_organisation">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
||||||
|
|
||||||
<!--<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('amount_of_invest').value != ''">{{"₹"}} {{OtherAmtInvestInwords[i]}} Only</mat-hint>-->
|
<!--<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('amount_of_invest').value != ''">{{"₹"}} {{OtherAmtInvestInwords[i]}} Only</mat-hint>-->
|
||||||
@ -178,7 +190,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
|
||||||
<mat-form-field style="width:40%" *ngIf="detail.get('investments_type').value == 1 || detail.get('investments_type').value == 2 || detail.get('investments_type').value == 3">
|
<mat-form-field style="width:45%" *ngIf="detail.get('investments_type').value == 1 || detail.get('investments_type').value == 2 || detail.get('investments_type').value == 3">
|
||||||
<input matInput placeholder="Bank Name" formControlName="bank_name" autocomplete="off">
|
<input matInput placeholder="Bank Name" formControlName="bank_name" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
@ -211,12 +223,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,12)" (keypress)="keyPress($event)">
|
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,12)" (keypress)="keyPress($event)">
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('any_other_asset_value').value != ''">{{"₹"}} {{OtherAssetValueInwords[s]}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('any_other_asset_value').value != ''">{{"₹"}} {{OtherAssetValueInwords[s]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan">
|
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan">
|
||||||
<mat-option value="{{data.value}}" *ngFor="let data of m_any_asset_loan_type">{{data.viewValue}}</mat-option>
|
<mat-option value="{{data.value}}" *ngFor="let data of m_any_asset_loan_type">{{data.viewValue}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@ -228,7 +240,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--Desction Dynamic details : END -->
|
<!--Desction Dynamic details : END -->
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 5" style="width:40%">
|
<mat-form-field *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 5" style="width:45%">
|
||||||
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,2)">
|
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,2)">
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"₹"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('approximate_market_value').value != ''">{{"₹"}} {{OtherAppxMarketAmtInwords[i]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -264,14 +276,14 @@
|
|||||||
|
|
||||||
<span *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 1">
|
<span *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 1">
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
|
|
||||||
<mat-label>Age of Asset in Years</mat-label>
|
<mat-label>Age of Asset in Years</mat-label>
|
||||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
<input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||||
<!-- <mat-error> Invalid format</mat-error> -->
|
<!-- <mat-error> Invalid format</mat-error> -->
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
|
|
||||||
<mat-label>Purchase Year</mat-label>
|
<mat-label>Purchase Year</mat-label>
|
||||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="purchase_year" minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="purchase_year" minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
||||||
|
|||||||
@ -69,6 +69,8 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
public m_freqOfPurchase = [];
|
public m_freqOfPurchase = [];
|
||||||
|
|
||||||
|
public m_vehicle_type = [];
|
||||||
|
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
existCompanyList: any =[];
|
existCompanyList: any =[];
|
||||||
mergeCompanyApplicant: any=[];
|
mergeCompanyApplicant: any=[];
|
||||||
@ -146,6 +148,7 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
this.getM_FreqOfPurchase();
|
this.getM_FreqOfPurchase();
|
||||||
//this.getM_Relation();
|
//this.getM_Relation();
|
||||||
//this.getM_InsuranceType();
|
//this.getM_InsuranceType();
|
||||||
|
this.getM_Vehicle_Type();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================
|
// ======================
|
||||||
@ -211,6 +214,13 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getM_Vehicle_Type(){
|
||||||
|
this.pdTrigerService.getAllMasterDatas('VEHICLETYPE').subscribe(
|
||||||
|
data => {
|
||||||
|
this.m_vehicle_type = data.records.filter(data => data.is_active == 1);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// getM_InsuranceType() {
|
// getM_InsuranceType() {
|
||||||
// this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
|
// this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
|
||||||
// data => {
|
// data => {
|
||||||
@ -427,7 +437,9 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
load_Four_Weeler() {
|
load_Four_Weeler() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
manufacturer_model_vehicle: ['']
|
manufacturer_model_vehicle: [''],
|
||||||
|
vehicle_type:[''],
|
||||||
|
other_vehicle_type:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,7 +518,9 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
load_Four_WeelerWithData(data) {
|
load_Four_WeelerWithData(data) {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
manufacturer_model_vehicle: [data.manufacturer_model_vehicle]
|
manufacturer_model_vehicle: [data.manufacturer_model_vehicle],
|
||||||
|
vehicle_type:[''],
|
||||||
|
other_vehicle_type:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,7 +635,9 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
case '3': {
|
case '3': {
|
||||||
let array_data : any;
|
let array_data : any;
|
||||||
data.forEach((datas,i) => {
|
data.forEach((datas,i) => {
|
||||||
array_data = { 'manufacturer_model_vehicle': datas.manufacturer_model_vehicle };
|
array_data = { 'manufacturer_model_vehicle': datas.manufacturer_model_vehicle,
|
||||||
|
'vehicle_type':datas.vehicle_type,
|
||||||
|
'other_vehicle_type':datas.other_vehicle_type};
|
||||||
});
|
});
|
||||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||||
control.push(this.load_Four_WeelerWithData(array_data));
|
control.push(this.load_Four_WeelerWithData(array_data));
|
||||||
@ -842,9 +858,14 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
: item.controls.other_owner.clearValidators();
|
: item.controls.other_owner.clearValidators();
|
||||||
item.controls.other_owner.updateValueAndValidity();
|
item.controls.other_owner.updateValueAndValidity();
|
||||||
}
|
}
|
||||||
|
if(flag == 5){
|
||||||
|
value==1
|
||||||
|
? item.controls.other_vehicle_type.setValidators([Validators.required])
|
||||||
|
: item.controls.other_vehicle_type.clearValidators();
|
||||||
|
item.controls.other_vehicle_type.updateValueAndValidity();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/** Amount InWords */
|
/** Amount InWords */
|
||||||
inWords(e,i,flag){
|
inWords(e,i,flag){
|
||||||
|
|||||||
@ -66,6 +66,85 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
||||||
|
<div formArrayName="business_assets_for_address" fxFill>
|
||||||
|
<div *ngFor="let itemrow of _businessAssetsQuesFrom.controls.business_assets_for_address['controls']; let i=index; let last=last;">
|
||||||
|
<div [formGroupName]="i">
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,itemrow,7)">
|
||||||
|
<!-- (selectionChange)="selectedPropertyOwnedType($event.value,s,i)" -->
|
||||||
|
<mat-option value="owned">Owned</mat-option>
|
||||||
|
<mat-option value="rented">Rented</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:45%" *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
|
||||||
|
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" (keypress)="keyPress($event)" (keyup)="inWords($event,i,9)">
|
||||||
|
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{RentAmtInwords2[i]}} Only</mat-hint>
|
||||||
|
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="(itemrow.get('business_ownership_type').value == 'owned')">
|
||||||
|
<!-- {{itemrow.get('business_ownership_type').value}} -->
|
||||||
|
|
||||||
|
<!-- <mat-form-field *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 5" style="width:45%"> -->
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
||||||
|
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_approximate_market_value').value != ''">{{"₹"}} {{appxMarketAmtInwords2[i]}} Only</mat-hint>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,8)">
|
||||||
|
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||||
|
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||||
|
{{val.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-optgroup>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error>Asset Owned by Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- <mat-form-field style="width:45%">
|
||||||
|
<input matInput placeholder="business_name_of_the_owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
||||||
|
</mat-form-field> -->
|
||||||
|
<!-- -->
|
||||||
|
<mat-form-field style="width:45%" *ngIf="checkOthers2(itemrow.get('business_name_of_the_owner').value)===true">
|
||||||
|
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <span *ngIf="(sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3) && sup.get('business_ownership_type').value == 'owned'"> -->
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<mat-label>Approx Vintage</mat-label>
|
||||||
|
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||||
|
<!-- <mat-error> Invalid format</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<mat-label>Purchase Year</mat-label>
|
||||||
|
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year" minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
||||||
|
<!-- <mat-error> Invalid year format</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
<span>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
<mat-form-field style="width:95%" *ngIf="(itemrow.get('business_ownership_type').value == 'owned')">
|
||||||
|
<mat-select placeholder="Is There a Loan Existing Against This Asset?" formControlName="business_emi">
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
<!-- <div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
||||||
<mat-form-field style="width: 95%;">
|
<mat-form-field style="width: 95%;">
|
||||||
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"--
|
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"--
|
||||||
@ -137,7 +216,7 @@
|
|||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-card style="min-height: 550px;">
|
<mat-card style="min-height: 550px;">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title><p>Business Premises And Other Assets</p></mat-card-title>
|
<mat-card-title><p>Other Assets Used in Business</p></mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
@ -171,6 +250,9 @@
|
|||||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value == 1">
|
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value == 1">
|
||||||
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<input matInput placeholder="Address of the Property" formControlName="address_of_the_property" autocomplete="off" requried>
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -181,17 +263,20 @@
|
|||||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:45%">
|
|
||||||
<input matInput placeholder="Description of the Vehicle" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width:45%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type" (selectionChange)="setRequiredValidation($event.value,detail,5)">
|
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type" (selectionChange)="setRequiredValidation($event.value,detail,5)">
|
||||||
<mat-option *ngFor="let vehicle of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{ vehicle.vehicle_type_name }}</mat-option>
|
<mat-option *ngFor="let vehicle of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{ vehicle.vehicle_type_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:45%" *ngIf="detail.get('vehicle_type').value == 1">
|
<mat-form-field style="width:45%" *ngIf="detail.get('vehicle_type').value == 1">
|
||||||
<input matInput placeholder=" Specify Vehicle" formControlName="other_vehicle_type" autocomplete="off">
|
<input matInput placeholder=" Specify Vehicle" formControlName="other_vehicle_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
|
<input matInput placeholder="Description of Vehicle (example -Toyota Altis)" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -328,7 +413,7 @@
|
|||||||
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:45%" *ngIf="sup.get('business_assets_mode').value != ''">
|
<mat-form-field style="width:45%" *ngIf="sup.get('business_assets_mode').value != ''">
|
||||||
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,sup,3)">
|
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,sup,7)">
|
||||||
<!-- (selectionChange)="selectedPropertyOwnedType($event.value,s,i)" -->
|
<!-- (selectionChange)="selectedPropertyOwnedType($event.value,s,i)" -->
|
||||||
<mat-option value="owned">Owned</mat-option>
|
<mat-option value="owned">Owned</mat-option>
|
||||||
<mat-option value="rented">Rented</mat-option>
|
<mat-option value="rented">Rented</mat-option>
|
||||||
|
|||||||
@ -34,13 +34,16 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
{'value': "no",'viewValue': "No"},
|
{'value': "no",'viewValue': "No"},
|
||||||
]
|
]
|
||||||
appxMarketAmtInwords : any = [];
|
appxMarketAmtInwords : any = [];
|
||||||
|
appxMarketAmtInwords2:any=[];
|
||||||
// emiAmtInwords : any = [];
|
// emiAmtInwords : any = [];
|
||||||
// PremiumPaidInwords : any = [];
|
// PremiumPaidInwords : any = [];
|
||||||
// SumAssuredInwords: any = [];
|
// SumAssuredInwords: any = [];
|
||||||
// AmtInvestInwords: any = [];
|
// AmtInvestInwords: any = [];
|
||||||
AssetValueInwords: any = [];
|
AssetValueInwords: any = [];
|
||||||
|
|
||||||
// B_emiAmtInwords: any = [];
|
// B_emiAmtInwords: any = [];
|
||||||
RentAmtInwords:any=[];
|
RentAmtInwords:any=[];
|
||||||
|
RentAmtInwords2:any=[];
|
||||||
public m_propertyType = [];
|
public m_propertyType = [];
|
||||||
PropertyOwnedType : any = [];
|
PropertyOwnedType : any = [];
|
||||||
// public m_investmentType = [];
|
// public m_investmentType = [];
|
||||||
@ -109,7 +112,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||||
if(data.dataStatus){
|
if(data.dataStatus){
|
||||||
this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true && val.company_order_id==this.company_id);
|
this.existCompanyList = data.records.filter(val =>val.is_active===true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let modifyCompanyList : any=[];
|
let modifyCompanyList : any=[];
|
||||||
@ -143,7 +146,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
this.pdTrigerService.retriveForm(params).subscribe(data => {
|
this.pdTrigerService.retriveForm(params).subscribe(data => {
|
||||||
if(data.status == 200) {
|
if(data.status == 200) {
|
||||||
console.log(data.records);
|
// console.log(data.records);
|
||||||
|
|
||||||
this.addressLabel = '';
|
this.addressLabel = '';
|
||||||
|
|
||||||
@ -266,11 +269,19 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
business_address_availability:[value.business_address_availability],
|
business_address_availability:[value.business_address_availability],
|
||||||
business_is_pd_visited:[value.business_is_pd_visited],
|
business_is_pd_visited:[value.business_is_pd_visited],
|
||||||
business_pd_visited_remark:[value.business_pd_visited_remark],
|
business_pd_visited_remark:[value.business_pd_visited_remark],
|
||||||
|
business_assets_for_address: this._formBuilder.array([]),
|
||||||
// business_activity:[value.business_activity],
|
// business_activity:[value.business_activity],
|
||||||
// business_premises_additional_units: this._formBuilder.array([]),
|
// business_premises_additional_units: this._formBuilder.array([]),
|
||||||
business_assets_details : this._formBuilder.array([]),
|
business_assets_details : this._formBuilder.array([]),
|
||||||
business_assets_form_remark:[value.business_assets_form_remark || null]
|
business_assets_form_remark:[value.business_assets_form_remark || null]
|
||||||
});
|
});
|
||||||
|
if(value.business_address_availability == 'yes'){
|
||||||
|
this.addBusinessAssetsForAddress(value.business_assets_for_address);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
control.push(this.createBusinessAssetsForAddress());
|
||||||
|
}
|
||||||
// if(value.business_activity == 'yes'){
|
// if(value.business_activity == 'yes'){
|
||||||
// this.addBusinessUnitsWithData(value.business_premises_additional_units);
|
// this.addBusinessUnitsWithData(value.business_premises_additional_units);
|
||||||
// }
|
// }
|
||||||
@ -293,6 +304,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
// business_activity:[''],
|
// business_activity:[''],
|
||||||
business_is_pd_visited:[''],
|
business_is_pd_visited:[''],
|
||||||
business_pd_visited_remark:[''],
|
business_pd_visited_remark:[''],
|
||||||
|
business_assets_for_address: this._formBuilder.array([
|
||||||
|
this.createBusinessAssetsForAddress() ]),
|
||||||
// business_premises_additional_units: this._formBuilder.array([
|
// business_premises_additional_units: this._formBuilder.array([
|
||||||
// this.createUnits()
|
// this.createUnits()
|
||||||
// ]),
|
// ]),
|
||||||
@ -334,6 +347,20 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createBusinessAssetsForAddress(): FormGroup {
|
||||||
|
return this._formBuilder.group({
|
||||||
|
business_approximate_market_value: [''],
|
||||||
|
business_ownership_type:[''],
|
||||||
|
business_monthly_rented_amt:[''],
|
||||||
|
business_name_of_the_owner: [''],
|
||||||
|
business_name_of_the_other_owner: [''],
|
||||||
|
business_vintage: [''],
|
||||||
|
business_purchase_year: ['',Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||||
|
business_emi:['']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
selectedPropertyOwnedType(e,s,i){
|
selectedPropertyOwnedType(e,s,i){
|
||||||
|
|
||||||
// const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(i).get('business_details') as FormArray ;
|
// const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(i).get('business_details') as FormArray ;
|
||||||
@ -409,6 +436,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
property_type: [''],
|
property_type: [''],
|
||||||
other_property_type: [''],
|
other_property_type: [''],
|
||||||
|
address_of_the_property:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,6 +505,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
property_type: [data.property_type],
|
property_type: [data.property_type],
|
||||||
other_property_type: [data.other_property_type],
|
other_property_type: [data.other_property_type],
|
||||||
|
address_of_the_property:[data.address_of_the_property],
|
||||||
//property_type:['']
|
//property_type:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -553,6 +582,19 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
return formGroup;
|
return formGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createBusinessAssetsForAddressWithData(data): FormGroup {
|
||||||
|
return this._formBuilder.group({
|
||||||
|
business_approximate_market_value: [data.business_approximate_market_value],
|
||||||
|
business_ownership_type:[data.business_ownership_type],
|
||||||
|
business_monthly_rented_amt:[data.business_monthly_rented_amt],
|
||||||
|
business_name_of_the_owner: [data.business_name_of_the_owner],
|
||||||
|
business_name_of_the_other_owner: [data.business_name_of_the_other_owner],
|
||||||
|
business_vintage: [data.business_vintage],
|
||||||
|
business_purchase_year: [data.business_purchase_year,Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||||
|
business_emi:[data.business_emi]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
initBusinessDetailsWithdata(data) {
|
initBusinessDetailsWithdata(data) {
|
||||||
|
|
||||||
let formGroup= this._formBuilder.group({
|
let formGroup= this._formBuilder.group({
|
||||||
@ -573,6 +615,35 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadDetails: boolean;
|
loadDetails: boolean;
|
||||||
|
addBusinessAssetsForAddress(data){
|
||||||
|
var result = Object.keys(data).map(function (key) {
|
||||||
|
return data[key];
|
||||||
|
});
|
||||||
|
if (result.length > 0) {
|
||||||
|
result.forEach((datas,index) => {
|
||||||
|
this.RentAmtInwords2[index] = this.pdTrigerService.convertNumberToWords(datas.business_monthly_rented_amt);
|
||||||
|
this.appxMarketAmtInwords2[index] = this.pdTrigerService.convertNumberToWords(datas.business_approximate_market_value);
|
||||||
|
});
|
||||||
|
|
||||||
|
for (let val of result) {
|
||||||
|
let vals = {
|
||||||
|
business_approximate_market_value: val.business_approximate_market_value,
|
||||||
|
business_ownership_type:val.business_ownership_type,
|
||||||
|
business_monthly_rented_amt:val.business_monthly_rented_amt,
|
||||||
|
business_name_of_the_owner: val.business_name_of_the_owner,
|
||||||
|
business_name_of_the_other_owner: val.business_name_of_the_other_owner,
|
||||||
|
business_vintage: val.business_vintage,
|
||||||
|
business_purchase_year: val.business_purchase_year,
|
||||||
|
business_emi:val.business_emi
|
||||||
|
};
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
control.push(this.createBusinessAssetsForAddressWithData(vals));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
control.push(this.createBusinessAssetsForAddress());
|
||||||
|
}
|
||||||
|
}
|
||||||
// addBusinessUnitsWithData(data){
|
// addBusinessUnitsWithData(data){
|
||||||
|
|
||||||
// var result = Object.keys(data).map(function (key) {
|
// var result = Object.keys(data).map(function (key) {
|
||||||
@ -643,7 +714,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
case '2': {
|
case '2': {
|
||||||
let business_property_datas : any;
|
let business_property_datas : any;
|
||||||
data.forEach((datas,i) => {
|
data.forEach((datas,i) => {
|
||||||
business_property_datas = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type };
|
business_property_datas = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type,'address_of_the_property':datas.address_of_the_property };
|
||||||
// this.selectedPropertyOwnedType(datas.properties_ownership_type,i,val);
|
// this.selectedPropertyOwnedType(datas.properties_ownership_type,i,val);
|
||||||
});
|
});
|
||||||
const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
|
const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
|
||||||
@ -774,6 +845,16 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkOthers2(values){
|
||||||
|
if(values!=null) {
|
||||||
|
return values.id==0 ? true : false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// calculate vintage and purchase {}
|
// calculate vintage and purchase {}
|
||||||
calculateVintagePurchase(value: any, controlKey: any,type: number){
|
calculateVintagePurchase(value: any, controlKey: any,type: number){
|
||||||
if(type==1){
|
if(type==1){
|
||||||
@ -785,6 +866,15 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_purchase_year'].setValue(value) : control.controls[controlKey].controls['business_purchase_year'].setValue('');
|
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_purchase_year'].setValue(value) : control.controls[controlKey].controls['business_purchase_year'].setValue('');
|
||||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_vintage'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['business_vintage'].setValue('')
|
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_vintage'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['business_vintage'].setValue('')
|
||||||
}
|
}
|
||||||
|
if(type==3){
|
||||||
|
let control: any = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
control.controls[controlKey].controls['business_purchase_year'].setValue(value!='' ? parseInt(this.currentYear)-parseInt(value) : '');
|
||||||
|
}
|
||||||
|
else if(type==4) {
|
||||||
|
let control: any = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_purchase_year'].setValue(value) : control.controls[controlKey].controls['business_purchase_year'].setValue('');
|
||||||
|
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['business_vintage'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['business_vintage'].setValue('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** To Save/Edited Popup Data */
|
/** To Save/Edited Popup Data */
|
||||||
@ -959,6 +1049,24 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
: item.controls.other_property_type.clearValidators();
|
: item.controls.other_property_type.clearValidators();
|
||||||
item.controls.other_property_type.updateValueAndValidity();
|
item.controls.other_property_type.updateValueAndValidity();
|
||||||
}
|
}
|
||||||
|
if(flag == 7){
|
||||||
|
if(value == 'owned'){
|
||||||
|
item.controls.business_monthly_rented_amt.clearValidators();
|
||||||
|
item.controls.business_name_of_the_owner.setValidators([Validators.required]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
item.controls.business_monthly_rented_amt.setValidators([Validators.required]);
|
||||||
|
item.controls.business_name_of_the_owner.clearValidators();
|
||||||
|
}
|
||||||
|
item.controls.business_monthly_rented_amt.updateValueAndValidity();
|
||||||
|
item.controls.business_name_of_the_owner.updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if(flag == 8){
|
||||||
|
value==0
|
||||||
|
? item.controls.business_name_of_the_other_owner.setValidators([Validators.required])
|
||||||
|
: item.controls.business_name_of_the_other_owner.clearValidators();
|
||||||
|
item.controls.business_name_of_the_other_owner.updateValueAndValidity();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1003,6 +1111,12 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
case 8:
|
case 8:
|
||||||
this.RentAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
this.RentAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
break;
|
break;
|
||||||
|
case 9:
|
||||||
|
this.RentAmtInwords2[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
this.appxMarketAmtInwords2[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -647,17 +647,17 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
// businees activity type change event
|
// businees activity type change event
|
||||||
changeBusinessActivity(event: any){
|
changeBusinessActivity(event: any){
|
||||||
|
|
||||||
console.log('changeBusinessActivity');
|
// console.log('changeBusinessActivity');
|
||||||
|
|
||||||
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){
|
||||||
console.log('changeBusinessActivity 1');
|
// console.log('changeBusinessActivity 1');
|
||||||
this.ManufacturingChecked = event.value.exist_status;
|
this.ManufacturingChecked = 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){
|
||||||
console.log('changeBusinessActivity 2');
|
// console.log('changeBusinessActivity 2');
|
||||||
this.ManufacturingChecked = event.value.exist_status;
|
this.ManufacturingChecked = 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());
|
||||||
@ -665,40 +665,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){
|
||||||
console.log('changeBusinessActivity 3');
|
// console.log('changeBusinessActivity 3');
|
||||||
this.RetailedChecked = event.value.exist_status;
|
this.RetailedChecked = 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){
|
||||||
console.log('changeBusinessActivity 4');
|
// console.log('changeBusinessActivity 4');
|
||||||
this.RetailedChecked = event.value.exist_status;
|
this.RetailedChecked = 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){
|
||||||
console.log('changeBusinessActivity 5');
|
// console.log('changeBusinessActivity 5');
|
||||||
this.WholeSalesChecked = event.value.exist_status;
|
this.WholeSalesChecked = 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){
|
||||||
console.log('changeBusinessActivity 6');
|
// console.log('changeBusinessActivity 6');
|
||||||
this.WholeSalesChecked = event.value.exist_status;
|
this.WholeSalesChecked = 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){
|
||||||
console.log('changeBusinessActivity 7');
|
// console.log('changeBusinessActivity 7');
|
||||||
this.ServiceChecked = event.value.exist_status;
|
this.ServiceChecked = 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){
|
||||||
console.log('changeBusinessActivity 8');
|
// console.log('changeBusinessActivity 8');
|
||||||
this.ServiceChecked = event.value.exist_status;
|
this.ServiceChecked = 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());
|
||||||
@ -1778,10 +1778,10 @@ CheckExport(value,stringFlag,index){
|
|||||||
// console.log(datas[index].controls.exist_status.value);
|
// console.log(datas[index].controls.exist_status.value);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
console.log('CheckExport');
|
// console.log('CheckExport');
|
||||||
console.log(value,stringFlag,index);
|
// console.log(value,stringFlag,index);
|
||||||
|
|
||||||
console.log(this.ManufacturingChecked , this.RetailedChecked , this.WholeSalesChecked , this.ServiceChecked);
|
// console.log(this.ManufacturingChecked , this.RetailedChecked , this.WholeSalesChecked , this.ServiceChecked);
|
||||||
|
|
||||||
if(!this.ManufacturingChecked){
|
if(!this.ManufacturingChecked){
|
||||||
if(stringFlag == 'MActivity' && value != "Within India"){
|
if(stringFlag == 'MActivity' && value != "Within India"){
|
||||||
@ -1833,7 +1833,7 @@ CheckExport(value,stringFlag,index){
|
|||||||
}
|
}
|
||||||
|
|
||||||
let SumOfManufacturingCounter = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
|
let SumOfManufacturingCounter = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
console.log(SumOfManufacturingCounter,this.ManufacturingCounterArray);
|
// console.log(SumOfManufacturingCounter,this.ManufacturingCounterArray);
|
||||||
let SumOfRetailCounter = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
|
let SumOfRetailCounter = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
// console.log(SumOfRetailCounter , this.RetailCounterArray);
|
// console.log(SumOfRetailCounter , this.RetailCounterArray);
|
||||||
let SumOfWholeSaleCounter = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
|
let SumOfWholeSaleCounter = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
@ -1845,8 +1845,8 @@ CheckExport(value,stringFlag,index){
|
|||||||
|
|
||||||
|
|
||||||
this.ExportFlag = overallCounter > 0 ? true : false ;
|
this.ExportFlag = overallCounter > 0 ? true : false ;
|
||||||
console.log('overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter ' , overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter);
|
// console.log('overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter ' , overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter);
|
||||||
console.log('Current Flag Status : ',this.ExportFlag );
|
// console.log('Current Flag Status : ',this.ExportFlag );
|
||||||
}
|
}
|
||||||
|
|
||||||
inWords(e,flag){
|
inWords(e,flag){
|
||||||
|
|||||||
@ -369,13 +369,13 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
this._pd.getFamilyDetails(this.pdid).subscribe(data=>{
|
this._pd.getFamilyDetails(this.pdid).subscribe(data=>{
|
||||||
console.clear();
|
console.clear();
|
||||||
// console.log('data',data);
|
console.log('getFamilyDetails data',data);
|
||||||
if(data.dataStatus == true){
|
if(data.dataStatus == true){
|
||||||
|
|
||||||
let Temparr : any = [];
|
let Temparr : any = [];
|
||||||
|
|
||||||
// console.log('from_business_form',data.record.from_business_form);
|
console.log('from_business_form',data.record.from_business_form);
|
||||||
// console.log('from_general_form',data.record.from_general_form);
|
console.log('from_general_form',data.record.from_general_form);
|
||||||
|
|
||||||
if(data.record.from_general_form.length > 0){
|
if(data.record.from_general_form.length > 0){
|
||||||
let familyMembersGeneralForm = Object.keys(data.record.from_general_form).map(function (key) {
|
let familyMembersGeneralForm = Object.keys(data.record.from_general_form).map(function (key) {
|
||||||
@ -672,8 +672,11 @@ 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('this.apiFamilyMembers',this.apiFamilyMembers);
|
|
||||||
// console.log('selectedPerson data',data);
|
console.log('this.apiFamilyMembers',this.apiFamilyMembers);
|
||||||
|
console.log('selectedPerson data',data);
|
||||||
|
// data_gets_from:'GeneralForm'
|
||||||
|
// data_gets_from:'BusinessForm'
|
||||||
|
|
||||||
if(data.length > 0){
|
if(data.length > 0){
|
||||||
// console.log(control.length);
|
// console.log(control.length);
|
||||||
@ -690,7 +693,8 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
data.forEach((val,inx) => {
|
data.forEach((val,inx) => {
|
||||||
|
console.log('for loop',val.data_gets_from);
|
||||||
|
// family_member_earning_status
|
||||||
if(val.age){
|
if(val.age){
|
||||||
this.isReadOnly[inx] = true;
|
this.isReadOnly[inx] = true;
|
||||||
}else{
|
}else{
|
||||||
@ -700,10 +704,10 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
'family_member_name' : val.name,
|
'family_member_name' : val.name,
|
||||||
'family_member_relationship' : val.relationship,
|
'family_member_relationship' : val.relationship,
|
||||||
'family_member_age' : val.age,
|
'family_member_age' : val.age,
|
||||||
'family_member_earning_status': '',
|
'family_member_earning_status': val.data_gets_from == 'BusinessForm' ? '1' :'',
|
||||||
'earning_segment': '',
|
'earning_segment': '',
|
||||||
'earning_gross_income_per_month': '',
|
'earning_gross_income_per_month': '',
|
||||||
'earning_name_of_the_employer_or_business': '',
|
'earning_name_of_the_employer_or_business':'',
|
||||||
'earning_number_of_years_in_employment_or_business': '',
|
'earning_number_of_years_in_employment_or_business': '',
|
||||||
'earning_if_others_segment':'',
|
'earning_if_others_segment':'',
|
||||||
'non_earning_occupation': '',
|
'non_earning_occupation': '',
|
||||||
|
|||||||
@ -252,7 +252,7 @@
|
|||||||
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint> -->
|
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput placeholder="Considered Margin Profit Amount" formControlName="estimate_profit_margin" readonly>
|
<input matInput placeholder="Net Profit Amount Considered" formControlName="estimate_profit_margin" readonly>
|
||||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only </mat-hint>
|
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only </mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
@ -266,7 +266,7 @@
|
|||||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}} {{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
|
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}} {{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Considered Profit in %" formControlName="estimate_net_profit_percent" readonly>
|
<input matInput autocomplete="off" placeholder="Considered Net Profit" formControlName="estimate_net_profit_percent" readonly>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number" readonly>
|
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number" readonly>
|
||||||
@ -291,7 +291,7 @@
|
|||||||
<!-- // -->
|
<!-- // -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput placeholder="Considered Margin Loss Amount" formControlName="estimate_loss_margin" readonly>
|
<input matInput placeholder="Net Loss Amount Considered" formControlName="estimate_loss_margin" readonly>
|
||||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only </mat-hint>
|
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only </mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
@ -305,7 +305,7 @@
|
|||||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only </mat-hint>
|
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only </mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Considered Loss in %" formControlName="estimate_net_loss_percent" readonly>
|
<input matInput autocomplete="off" placeholder="Considered Net Loss" formControlName="estimate_net_loss_percent" readonly>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number" readonly>
|
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number" readonly>
|
||||||
|
|||||||
@ -862,7 +862,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
childArray.controls.financial_margin_of_profit.setValue('');
|
childArray.controls.financial_margin_of_profit.setValue('');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
loss_amt = loss_amt != 0 ? loss_amt * (-1) : loss_amt;
|
loss_amt = val.financial_net_loss != 0 ? val.financial_net_loss * (-1) : val.financial_net_loss;
|
||||||
prev_loss_amt = prev_loss_amt != 0 ? prev_loss_amt * (-1) : prev_loss_amt ;
|
prev_loss_amt = prev_loss_amt != 0 ? prev_loss_amt * (-1) : prev_loss_amt ;
|
||||||
|
|
||||||
let variation = (((profit_amt != '' ? profit_amt : loss_amt ) - (prev_profit_amt != '' ? prev_profit_amt : prev_loss_amt ))/ (prev_profit_amt != '' ? Math.abs(prev_profit_amt) : Math.abs(prev_loss_amt))) * 100;
|
let variation = (((profit_amt != '' ? profit_amt : loss_amt ) - (prev_profit_amt != '' ? prev_profit_amt : prev_loss_amt ))/ (prev_profit_amt != '' ? Math.abs(prev_profit_amt) : Math.abs(prev_loss_amt))) * 100;
|
||||||
@ -894,7 +894,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
childArray.controls.financial_variation.setValue('');
|
childArray.controls.financial_variation.setValue('');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
profit_margin = (profit_amt / annual_sale) * 100;
|
profit_margin = (val.financial_net_profit / val.financial_annual_sale) * 100;
|
||||||
childArray.controls.financial_margin_of_profit.setValue(profit_margin!= Infinity ? !(Number.isNaN(profit_margin)) ? profit_margin.toFixed(2):0:0);
|
childArray.controls.financial_margin_of_profit.setValue(profit_margin!= Infinity ? !(Number.isNaN(profit_margin)) ? profit_margin.toFixed(2):0:0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -919,14 +919,23 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
childArray.controls.financial_variation.setValue('');
|
childArray.controls.financial_variation.setValue('');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
loss_margin = (loss_amt/annual_sale) * 100 * (-1);
|
// console.log('loss_amt = val.financial_net_loss;',val.financial_net_loss);
|
||||||
|
// console.log('loss_amt',loss_amt);
|
||||||
|
// console.log('loss_amt/annual_sale',loss_amt/annual_sale);
|
||||||
|
// console.log('(loss_amt/annual_sale) * 100',(loss_amt/annual_sale) * 100);
|
||||||
|
// console.log('(loss_amt/annual_sale) * 100 * (-1)',(loss_amt/annual_sale) * 100 * (-1));
|
||||||
|
|
||||||
|
loss_margin = (val.financial_net_loss/val.financial_annual_sale) * 100 * (-1);
|
||||||
|
|
||||||
|
// console.log('loss_margin',loss_margin);
|
||||||
|
|
||||||
childArray.controls.financial_margin_of_loss.setValue(loss_margin != Infinity ? !(Number.isNaN(loss_margin)) ? loss_margin.toFixed(2) : 0 : 0);
|
childArray.controls.financial_margin_of_loss.setValue(loss_margin != Infinity ? !(Number.isNaN(loss_margin)) ? loss_margin.toFixed(2) : 0 : 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit : 0;
|
prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit: 0;
|
||||||
prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
|
prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
|
||||||
|
|
||||||
// if(index != 0 ){
|
// if(index != 0 ){
|
||||||
@ -949,19 +958,21 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
loss_margin = loss_margin !== undefined ? loss_margin : 0;
|
loss_margin = loss_margin !== undefined ? loss_margin : 0;
|
||||||
|
profit_margin = profit_margin !== undefined ? profit_margin:0;
|
||||||
let temp_prev_loss_margin = prev_loss_margin[index-1] !== undefined ? prev_loss_margin[index-1] : 0 ;
|
let temp_prev_loss_margin = prev_loss_margin[index-1] !== undefined ? prev_loss_margin[index-1] : 0 ;
|
||||||
let temp_prev_profit_margin = prev_profit_margin[index-1] !== undefined ? prev_profit_margin[index-1] : 0 ;
|
let temp_prev_profit_margin = prev_profit_margin[index-1] !== undefined ? prev_profit_margin[index-1] : 0 ;
|
||||||
|
|
||||||
profit_margin = profit_margin !== undefined ? profit_margin:0;
|
|
||||||
|
|
||||||
|
if(annual_sale != ''){
|
||||||
|
|
||||||
let variation_percent : any ;
|
let variation_percent : any ;
|
||||||
|
|
||||||
variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (temp_prev_profit_margin != 0 ? temp_prev_profit_margin : temp_prev_loss_margin ))/ (temp_prev_profit_margin != 0 ? Math.abs(temp_prev_profit_margin) : Math.abs(temp_prev_loss_margin))) * 100;
|
variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (temp_prev_profit_margin != 0 ? temp_prev_profit_margin : temp_prev_loss_margin) / (temp_prev_profit_margin != 0 ? Math.abs(temp_prev_profit_margin) : Math.abs(temp_prev_loss_margin))) * 100);
|
||||||
let final_percent = variation_percent != Infinity ? !(Number.isNaN(variation_percent)) ? variation_percent.toFixed(2) :0: 0;
|
let final_percent = variation_percent != Infinity ? !(Number.isNaN(variation_percent)) ? variation_percent != -Infinity ? variation_percent.toFixed(2) : 0 : 0 : 0 ;
|
||||||
|
|
||||||
childArray.controls.financial_profit_to_sale_variation.setValue(final_percent);
|
childArray.controls.financial_profit_to_sale_variation.setValue(final_percent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**************************** Calculating Sales's Profit Variation - ENDS HERE **************************************************************/
|
/**************************** Calculating Sales's Profit Variation - ENDS HERE **************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -223,7 +223,7 @@
|
|||||||
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;" (selectionChange)="updateCompanyRelation(i)">
|
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;" (selectionChange)="updateCompanyRelation(i)">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||||
{{comrelShip.name + ' of' | titlecase}}
|
{{comrelShip.name | titlecase}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="0" > Not Applicable </mat-option>
|
<mat-option value="0" > Not Applicable </mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|||||||
@ -151,6 +151,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
let exist_personsWithRelationships:any;
|
let exist_personsWithRelationships:any;
|
||||||
let exist_companyWithRelationships:any;
|
let exist_companyWithRelationships:any;
|
||||||
this._pd.retriveForm(params).subscribe(data => {
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
|
console.log('data',data);
|
||||||
if(data.dataStatus) {
|
if(data.dataStatus) {
|
||||||
this._generalForm.controls['general_remark'].setValue(data.records.general_remark ? data.records.general_remark : '');
|
this._generalForm.controls['general_remark'].setValue(data.records.general_remark ? data.records.general_remark : '');
|
||||||
|
|
||||||
@ -158,7 +159,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
exist_individuals=Object.keys(data.records.individuals).map(function(key) {
|
exist_individuals=Object.keys(data.records.individuals).map(function(key) {
|
||||||
return data.records.individuals[key];
|
return data.records.individuals[key];
|
||||||
});
|
});
|
||||||
|
console.log('exist_individuals',exist_individuals);
|
||||||
if(exist_individuals.length>0){
|
if(exist_individuals.length>0){
|
||||||
exist_individuals.forEach(element => {
|
exist_individuals.forEach(element => {
|
||||||
individualsControl.push(this.createIndividulas(element))
|
individualsControl.push(this.createIndividulas(element))
|
||||||
@ -234,6 +235,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.pd_applicants_details.forEach((element,key) => {
|
this.pd_applicants_details.forEach((element,key) => {
|
||||||
|
console.log('element element',element);
|
||||||
element.is_applicant=true;
|
element.is_applicant=true;
|
||||||
element.is_person_met=false;
|
element.is_person_met=false;
|
||||||
element.is_new=false;
|
element.is_new=false;
|
||||||
@ -447,6 +449,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if(dataresult.data.length>0){
|
if(dataresult.data.length>0){
|
||||||
dataresult.data.forEach((element,index) => {
|
dataresult.data.forEach((element,index) => {
|
||||||
|
console.log('element',element);
|
||||||
let individualsControl = <FormArray>this._generalForm.controls['individuals'];
|
let individualsControl = <FormArray>this._generalForm.controls['individuals'];
|
||||||
element.pd_co_applicant_id = this.count;
|
element.pd_co_applicant_id = this.count;
|
||||||
this.count = this.count+1;
|
this.count = this.count+1;
|
||||||
@ -475,6 +478,11 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
removeIndividuals(findex,details){
|
removeIndividuals(findex,details){
|
||||||
|
|
||||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||||
|
let individualsControl : any = <FormArray>control.controls[findex];
|
||||||
|
// individualsControl.controls.is_applicant.setValue(false);
|
||||||
|
|
||||||
|
// console.log(control.controls[findex].value.is_active);
|
||||||
|
// .controls.is_active.setValue(false);
|
||||||
// console.log('control',control.dirty);
|
// console.log('control',control.dirty);
|
||||||
// console.log('control',control.dirty);
|
// console.log('control',control.dirty);
|
||||||
// control.markAsDirty({onlySelf:true});
|
// control.markAsDirty({onlySelf:true});
|
||||||
@ -482,9 +490,12 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
control.removeAt(findex);
|
control.removeAt(findex);
|
||||||
|
|
||||||
let controls = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
let controls = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||||
|
|
||||||
// console.log('control',control);
|
// console.log('control',control);
|
||||||
let name = details.value.applicant_name;
|
let name = details.value.applicant_name;
|
||||||
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
||||||
|
// let personsWithRelationshipsControl : any = <FormArray>control.controls[index1];
|
||||||
|
// personsWithRelationshipsControl.controls.is_applicant.setValue(false);
|
||||||
// control.markAsDirty({onlySelf:true});
|
// control.markAsDirty({onlySelf:true});
|
||||||
// console.log('control',);
|
// console.log('control',);
|
||||||
controls.removeAt(index1);
|
controls.removeAt(index1);
|
||||||
|
|||||||
@ -86,7 +86,7 @@
|
|||||||
<input matInput placeholder="Specify End Use of Top Up" formControlName="other_end_use_topup" autocomplete="off">
|
<input matInput placeholder="Specify End Use of Top Up" formControlName="other_end_use_topup" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' && !isContribution">
|
||||||
|
|
||||||
<mat-form-field style="width: 64%">
|
<mat-form-field style="width: 64%">
|
||||||
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" (keyup)="inWords($event,4)" autocomplete="off">
|
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" (keyup)="inWords($event,4)" autocomplete="off">
|
||||||
|
|||||||
@ -49,6 +49,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
isOtherSource: boolean = false;
|
isOtherSource: boolean = false;
|
||||||
isPLSource: boolean = false;
|
isPLSource: boolean = false;
|
||||||
mortageCheck : boolean = true;
|
mortageCheck : boolean = true;
|
||||||
|
isContribution: boolean = false;
|
||||||
OtherOwnerFlag : boolean;
|
OtherOwnerFlag : boolean;
|
||||||
|
|
||||||
endUserList: any = [];
|
endUserList: any = [];
|
||||||
@ -106,6 +107,10 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||||
|
|
||||||
|
if(this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP'){
|
||||||
|
this.isContribution = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public viewerOptions: any = {
|
public viewerOptions: any = {
|
||||||
navbar: false,
|
navbar: false,
|
||||||
@ -159,7 +164,9 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||||
}
|
}
|
||||||
|
if(this.productAbbr != 'LAP'){
|
||||||
this.mergeCompanyApplicant.push({groupName:'OTHERS',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
this.mergeCompanyApplicant.push({groupName:'OTHERS',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -232,7 +239,13 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
if (value.records.other_bt_lender) {
|
if (value.records.other_bt_lender) {
|
||||||
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
|
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
|
||||||
}
|
}
|
||||||
if(value.records.is_transfer != 'yes'){
|
if((this.isContribution == true) && (value.records.is_transfer != 'yes')){
|
||||||
|
this.loanDetailsForm.controls['own_contribution'].setValue('');
|
||||||
|
this.loanDetailsForm.controls['other_source'].setValue('');
|
||||||
|
this.loanDetailsForm.controls['source'].setValue('');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(this.isContribution == false && value.records.is_transfer != 'yes'){
|
||||||
|
|
||||||
let source = Object.keys(value.records.source_group).map(function(key) {
|
let source = Object.keys(value.records.source_group).map(function(key) {
|
||||||
return value.records.source_group[key];
|
return value.records.source_group[key];
|
||||||
@ -260,6 +273,8 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
// this.loanDetailsForm.controls['personal_loan_source'].setValue(value.records.personal_loan_source);
|
// this.loanDetailsForm.controls['personal_loan_source'].setValue(value.records.personal_loan_source);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (value.records.lender_name_type) {
|
// if (value.records.lender_name_type) {
|
||||||
// this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
// this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
||||||
@ -306,6 +321,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL'){
|
if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL'){
|
||||||
this.mortageCardAccess = false;
|
this.mortageCardAccess = false;
|
||||||
|
this.loanDetailsForm.controls['owner_name'].setValue('');
|
||||||
this.loanDetailsForm.controls['owner_name'].clearValidators();
|
this.loanDetailsForm.controls['owner_name'].clearValidators();
|
||||||
this.loanDetailsForm.controls['owner_name'].updateValueAndValidity();
|
this.loanDetailsForm.controls['owner_name'].updateValueAndValidity();
|
||||||
|
|
||||||
@ -607,11 +623,18 @@ getM_sourceofamount() {
|
|||||||
|
|
||||||
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
|
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
|
||||||
// records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
|
// records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
|
||||||
|
// if((this.productAbbr != 'PL' || this.productAbbr != 'BL' || this.productAbbr != 'LAP') && (value.records.is_transfer != 'yes')){
|
||||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||||
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
|
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
|
||||||
}
|
}
|
||||||
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') {
|
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no'){
|
||||||
|
if(this.isContribution){
|
||||||
|
records.own_contribution = '';
|
||||||
|
records.source_group = '' ;
|
||||||
|
records.other_source = '';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
||||||
// records.source = this.loanDetailsForm.controls['source'].value;
|
// records.source = this.loanDetailsForm.controls['source'].value;
|
||||||
// if (this.loanDetailsForm.controls['source'].value == 'other') {
|
// if (this.loanDetailsForm.controls['source'].value == 'other') {
|
||||||
@ -628,6 +651,7 @@ getM_sourceofamount() {
|
|||||||
records.source_group = dataSource_list;
|
records.source_group = dataSource_list;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
|
// if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
|
||||||
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
||||||
|
|||||||
@ -251,7 +251,7 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
"do_know":element.do_know,
|
"do_know":element.do_know,
|
||||||
"did_not_know_the_business_operation":element.did_not_know_the_business_operation,
|
"did_not_know_the_business_operation":element.did_not_know_the_business_operation,
|
||||||
"how_long_do_know_in_year":element.how_long_do_know_in_year,
|
"how_long_do_know_in_year":element.how_long_do_know_in_year,
|
||||||
"how_long_do_know_month":element.how_long_do_know_month,
|
"how_long_do_know_in_month":element.how_long_do_know_in_month,
|
||||||
"is_applicant_owner":element.is_applicant_owner,
|
"is_applicant_owner":element.is_applicant_owner,
|
||||||
"organisation_owner":element.organisation_owner,
|
"organisation_owner":element.organisation_owner,
|
||||||
"other_organisation_owner":element.other_organisation_owner,
|
"other_organisation_owner":element.other_organisation_owner,
|
||||||
|
|||||||
@ -80,8 +80,8 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 45%">
|
<mat-form-field style="width: 45%">
|
||||||
<mat-select placeholder="Payment Mode" formControlName="manufacturing_payment_mode">
|
<mat-select placeholder="Payment Mode" formControlName="manufacturing_payment_mode">
|
||||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
<mat-option value="Payment made in Cash.">Payment made in Cash.</mat-option>
|
||||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
<mat-option value="Payment made through Banking channels.">Payment made through Banking channels.</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -130,8 +130,13 @@
|
|||||||
<mat-card style="margin: 12px;">
|
<mat-card style="margin: 12px;">
|
||||||
<h6 style="margin: 12px;padding:10px !important;">Trading Product #{{l+1}}</h6>
|
<h6 style="margin: 12px;padding:10px !important;">Trading Product #{{l+1}}</h6>
|
||||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width: 45%">
|
<!-- <mat-form-field style="width: 45%">
|
||||||
<input matInput placeholder="Trade Product Name" formControlName="trade_product_name">
|
<input matInput placeholder="Trade Product Name" formControlName="trade_product_name">
|
||||||
|
</mat-form-field> -->
|
||||||
|
<mat-form-field style="width: 45%">
|
||||||
|
<mat-select placeholder="Trading Product Name" formControlName="trade_product_name">
|
||||||
|
<mat-option *ngFor="let pm of m_tradingProducts" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 45%">
|
<mat-form-field style="width: 45%">
|
||||||
<input matInput placeholder="Supplier Name" formControlName="trade_supplier_name">
|
<input matInput placeholder="Supplier Name" formControlName="trade_supplier_name">
|
||||||
|
|||||||
@ -41,6 +41,10 @@ export class SupplierInfoComponent implements OnInit {
|
|||||||
//@Input() pdid: number;
|
//@Input() pdid: number;
|
||||||
pdid: string;
|
pdid: string;
|
||||||
form_id: number;
|
form_id: number;
|
||||||
|
|
||||||
|
public m_manufacturingProducts = [];
|
||||||
|
public m_tradingProducts = [];
|
||||||
|
|
||||||
company_id: string;
|
company_id: string;
|
||||||
public _supplierQuesFrom: FormGroup;
|
public _supplierQuesFrom: FormGroup;
|
||||||
public submitted = false;
|
public submitted = false;
|
||||||
@ -49,6 +53,7 @@ export class SupplierInfoComponent implements OnInit {
|
|||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
titleList: any=[];
|
titleList: any=[];
|
||||||
companyRelationShipList: any=[];
|
companyRelationShipList: any=[];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
notifier: NotifierService,
|
notifier: NotifierService,
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
@ -110,6 +115,29 @@ export class SupplierInfoComponent implements OnInit {
|
|||||||
// };
|
// };
|
||||||
let datas = data.records;
|
let datas = data.records;
|
||||||
this.initFormLoadDetails(datas.type_of_activity);
|
this.initFormLoadDetails(datas.type_of_activity);
|
||||||
|
this.m_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 2 ){return data}}).map(data=> [...data.prodcuts]);
|
||||||
|
// this.m_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 3){return data}}).map(data=> [...data.prodcuts]);
|
||||||
|
|
||||||
|
let api = Object.keys(datas.type_of_activity).map(function (key) {
|
||||||
|
return datas.type_of_activity[key];
|
||||||
|
});
|
||||||
|
if(api.length > 0){
|
||||||
|
api.forEach(val => {
|
||||||
|
if (val.type_of_activity_id == 3) {
|
||||||
|
if(val.prodcuts){
|
||||||
|
this.m_tradingProducts.push(val.prodcuts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val.type_of_activity_id == 4) {
|
||||||
|
if(val.prodcuts){
|
||||||
|
this.m_tradingProducts.push(val.prodcuts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.m_tradingProducts = [].concat.apply([], this.m_tradingProducts);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||||
this.noRecordsFound = false;
|
this.noRecordsFound = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user