forms : ps
This commit is contained in:
parent
c23addbc7c
commit
1fff549130
@ -3,7 +3,8 @@
|
||||
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">- {{subproduct_abbr}} </span></span><br>
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">-
|
||||
{{subproduct_abbr}} </span></span><br>
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
@ -138,8 +139,8 @@
|
||||
|
||||
<div fxFlex="100" fxLayout="nowrap">
|
||||
<mat-form-field style="width: 46%;">
|
||||
<input matInput [placeholder]="placeholderName[i] ? placeholderName[i] : 'Estimated area of the (Address Type)'" formControlName="estimated_area"
|
||||
OnlyNumber type="text">
|
||||
<input matInput [placeholder]="placeholderName[i] ? placeholderName[i] : 'Estimated area of the (Address Type)'"
|
||||
formControlName="estimated_area" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 46%;">
|
||||
|
||||
@ -28,7 +28,7 @@ export class AddressComponent implements OnInit {
|
||||
main_applicant: any;
|
||||
|
||||
pageTitle: string = "PD Address Details";
|
||||
disableAfterSubmit : boolean = false;
|
||||
disableAfterSubmit: boolean = false;
|
||||
/**Declaration of FormField Variables */
|
||||
//@Input() pdid: number;
|
||||
pdid: number;
|
||||
@ -54,7 +54,7 @@ export class AddressComponent implements OnInit {
|
||||
uomData: any = [];
|
||||
|
||||
addressesList: any = [];
|
||||
otherPincodeFlag:any = [];
|
||||
otherPincodeFlag: any = [];
|
||||
|
||||
/**Declaration of FormField Variables */
|
||||
private notifier: NotifierService;
|
||||
@ -119,7 +119,7 @@ export class AddressComponent implements OnInit {
|
||||
control.push(this.createAddresses(null));
|
||||
// this.loadPDAddressesDetails();
|
||||
} else {
|
||||
data.records.addresses.forEach((datas,index) => {
|
||||
data.records.addresses.forEach((datas, index) => {
|
||||
let obj = {
|
||||
'address': datas.address,
|
||||
'address_type': datas.address_type,
|
||||
@ -137,12 +137,12 @@ export class AddressComponent implements OnInit {
|
||||
'uom': datas.uom,
|
||||
'uom_others': datas.uom_others
|
||||
}
|
||||
this.getCityAndPincodeDetails(datas.state,index);
|
||||
this.getOtherPincode(datas.pincode,index);
|
||||
this.getCityAndPincodeDetails(datas.state, index);
|
||||
this.getOtherPincode(datas.pincode, index);
|
||||
let selectedAddressType = this.addressData.filter(element => element.address_type_id == datas.address_type)[0];
|
||||
this.selectedAddressType(selectedAddressType.address_type,index);
|
||||
this.selectedAddressType(selectedAddressType.address_type, index);
|
||||
if (datas.address_type == 1) {
|
||||
this.selectedAddressType(datas.address_type_others,index);
|
||||
this.selectedAddressType(datas.address_type_others, index);
|
||||
}
|
||||
control.push(this.createAddresses(obj));
|
||||
});
|
||||
@ -201,7 +201,7 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.loadPDAddressesDetails();
|
||||
}
|
||||
// else {
|
||||
@ -210,7 +210,7 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
loadPDAddressesDetails(){
|
||||
loadPDAddressesDetails() {
|
||||
const control = <FormArray>this.addressForm.controls['addresses'];
|
||||
this._pd.getAddressesDetails(this.pdid).subscribe(
|
||||
data => {
|
||||
@ -219,7 +219,7 @@ export class AddressComponent implements OnInit {
|
||||
// console.log('this.addressesList',this.addressesList);
|
||||
|
||||
if (this.addressesList.length > 0) {
|
||||
this.addressesList.forEach((val,index)=>{
|
||||
this.addressesList.forEach((val, index) => {
|
||||
let obj = {
|
||||
'address': val.addressline1,
|
||||
'address_type': '',
|
||||
@ -237,8 +237,8 @@ export class AddressComponent implements OnInit {
|
||||
'uom': '',
|
||||
'uom_others': ''
|
||||
}
|
||||
this.getCityAndPincodeDetails(val.fk_state,index);
|
||||
this.getOtherPincode(val.pincode_id,index);
|
||||
this.getCityAndPincodeDetails(val.fk_state, index);
|
||||
this.getOtherPincode(val.pincode_id, index);
|
||||
control.push(this.createAddresses(obj));
|
||||
});
|
||||
}
|
||||
@ -282,9 +282,9 @@ export class AddressComponent implements OnInit {
|
||||
// this.uom = this.addressForm.controls['uom'];
|
||||
}
|
||||
|
||||
/** FOR Adress */
|
||||
createAddresses(AddressDetails): FormGroup {
|
||||
if(AddressDetails != null){
|
||||
/** FOR Adress */
|
||||
createAddresses(AddressDetails): FormGroup {
|
||||
if (AddressDetails != null) {
|
||||
return this.fb.group({
|
||||
address: [AddressDetails.address, Validators.compose([Validators.required])],
|
||||
address_type: [AddressDetails.address_type, Validators.compose([Validators.required])],
|
||||
@ -304,7 +304,7 @@ createAddresses(AddressDetails): FormGroup {
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
else {
|
||||
return this.fb.group({
|
||||
address: ['', Validators.compose([Validators.required])],
|
||||
address_type: ['', Validators.compose([Validators.required])],
|
||||
@ -323,17 +323,17 @@ createAddresses(AddressDetails): FormGroup {
|
||||
uom_others: ['']
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// addAddresses() {
|
||||
// const address_control = <FormArray>this.addressForm.controls['addresses'];
|
||||
// address_control.push(this.createAddresses(null));
|
||||
// }
|
||||
// addAddresses() {
|
||||
// const address_control = <FormArray>this.addressForm.controls['addresses'];
|
||||
// address_control.push(this.createAddresses(null));
|
||||
// }
|
||||
|
||||
// removeAddresses(index: number) {
|
||||
// const address_control = <FormArray>this.addressForm.controls['addresses'];
|
||||
// address_control.removeAt(index);
|
||||
// }
|
||||
// removeAddresses(index: number) {
|
||||
// const address_control = <FormArray>this.addressForm.controls['addresses'];
|
||||
// address_control.removeAt(index);
|
||||
// }
|
||||
|
||||
/** To Get Dropdown Data For Address Form */
|
||||
getMasterDetails(table: string, type: number) {
|
||||
@ -364,7 +364,7 @@ createAddresses(AddressDetails): FormGroup {
|
||||
/** To Get City And Pincode Data For Address Form
|
||||
* Param 'stateID' -> selected StateId
|
||||
*/
|
||||
getCityAndPincodeDetails(stateID: string,index) {
|
||||
getCityAndPincodeDetails(stateID: string, index) {
|
||||
this._pd.getStateWiseCities(stateID).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
this.cityData[index] = data.records.cities;
|
||||
@ -373,7 +373,7 @@ createAddresses(AddressDetails): FormGroup {
|
||||
});
|
||||
}
|
||||
|
||||
getOtherPincode(e,i){ this.otherPincodeFlag[i] = e == 1 ? true : false;}
|
||||
getOtherPincode(e, i) { this.otherPincodeFlag[i] = e == 1 ? true : false; }
|
||||
/** TO Save Address Forms Details*/
|
||||
onSubmit() {
|
||||
// let addressesArrayValues = this.addressForm.controls.addresses.value;
|
||||
@ -436,7 +436,7 @@ createAddresses(AddressDetails): FormGroup {
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.addressForm.value.bussiness_activity_remark == ''){
|
||||
if (this.addressForm.value.bussiness_activity_remark == '') {
|
||||
this.notifier.notify('warning', 'Fill Remark!');
|
||||
this.disableAfterSubmit = false;
|
||||
return;
|
||||
@ -500,7 +500,7 @@ createAddresses(AddressDetails): FormGroup {
|
||||
|
||||
/** For PlaceHolder
|
||||
* selected AddressType is concate with label */
|
||||
selectedAddressType(e: any,i) {
|
||||
selectedAddressType(e: any, i) {
|
||||
|
||||
this.placeholderName[i] = 'Estimated area of the ' + e;
|
||||
}
|
||||
|
||||
@ -2,11 +2,15 @@
|
||||
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">- {{subproduct_abbr}} </span></span><br>
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">-
|
||||
{{subproduct_abbr}} </span></span><br>
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
@ -28,7 +32,8 @@
|
||||
<div [formGroupName]="i">
|
||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select (selectionChange)="selectedAssetsType($event,i,1)" placeholder="Assets Type" formControlName="assets_mode" requried>
|
||||
<mat-select (selectionChange)="selectedAssetsType($event,i,1)" placeholder="Assets Type"
|
||||
formControlName="assets_mode" requried>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
|
||||
</mat-select>
|
||||
@ -42,13 +47,16 @@
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Property Type" formControlName="property_type" (selectionChange)="setRequiredValidation($event.value,i,s,1)">
|
||||
<mat-select placeholder="Property Type" formControlName="property_type"
|
||||
(selectionChange)="setRequiredValidation($event.value,i,s,1)">
|
||||
<mat-option>Select</mat-option>
|
||||
<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-form-field>
|
||||
<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>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -67,13 +75,16 @@
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Unit of Measurement" formControlName="uom_of_the_property" (selectionChange)="setRequiredValidation($event.value,detail,6)">
|
||||
<mat-select placeholder="Unit of Measurement" formControlName="uom_of_the_property"
|
||||
(selectionChange)="setRequiredValidation($event.value,detail,6)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let uom of m_uom_type" [value]="uom.uom_id">{{ uom.name }}</mat-option>
|
||||
<mat-option *ngFor="let uom of m_uom_type" [value]="uom.uom_id">{{ uom.name
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="detail.get('uom_of_the_property').value == 1" style="width:45%">
|
||||
<input matInput placeholder="Specify Unit of Measurement" formControlName="other_uom" autocomplete="off">
|
||||
<input matInput placeholder="Specify Unit of Measurement" formControlName="other_uom"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -85,13 +96,16 @@
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<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>Select</mat-option>
|
||||
<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-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">
|
||||
<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">
|
||||
@ -99,7 +113,8 @@
|
||||
<!-- <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">
|
||||
<input matInput placeholder="Description of Vehicle (example -Toyota Altis)"
|
||||
formControlName="manufacturer_model_vehicle" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
@ -118,7 +133,7 @@
|
||||
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:95%">
|
||||
<input matInput placeholder="Description" formControlName="equipment_manufacturing_description" >
|
||||
<input matInput placeholder="Description" formControlName="equipment_manufacturing_description">
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -158,29 +173,37 @@
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Premium Paid" formControlName="premium_paid" OnlyNumber type="text" 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>
|
||||
<input matInput placeholder="Premium Paid" formControlName="premium_paid"
|
||||
OnlyNumber type="text" 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 != ''">{{ "₹" + detail.get('premium_paid').value | numberToWords + 'Only'}} </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<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>Select</mat-option>
|
||||
<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-form-field>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured" OnlyNumber type="text" 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>
|
||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured"
|
||||
OnlyNumber type="text" 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-form-field>
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
@ -196,33 +219,40 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
|
||||
<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>Select</mat-option>
|
||||
<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-form-field>
|
||||
|
||||
<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 style="width:54%" *ngIf="detail.get('investments_type').value == 6 || detail.get('investments_type').value == 5 || detail.get('investments_type').value == 4">
|
||||
<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 style="width:45%">
|
||||
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,10)">
|
||||
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest"
|
||||
OnlyNumber type="text" 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="detail.get('amount_of_invest').value != ''">{{"₹"}} {{OtherAmtInvestInwords[i]}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('amount_of_invest').value != ''">{{"₹"}}
|
||||
{{OtherAmtInvestInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -237,7 +267,8 @@
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:95%">
|
||||
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" autocomplete="off">
|
||||
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -271,12 +302,16 @@
|
||||
</div>
|
||||
<!--Desction Dynamic details : END -->
|
||||
<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:45%">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value" OnlyNumber type="text" 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-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"
|
||||
OnlyNumber type="text" 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-form-field>
|
||||
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value != ''" style="width:45%"><!-- 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5 || sup.get('assets_mode').value == 6" style="width:45%"> -->
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value != ''" style="width:45%">
|
||||
<!-- 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5 || sup.get('assets_mode').value == 6" style="width:45%"> -->
|
||||
<!-- <mat-select placeholder="Name of the Owner" formControlName="name_of_the_owner" >
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name | titlecase}}</mat-option>
|
||||
</mat-select> -->
|
||||
@ -299,10 +334,10 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isOtherOwner[i]" style="width:45%">
|
||||
<input matInput placeholder="Specify Owner Name"
|
||||
formControlName="other_owner" autocomplete="off">
|
||||
<input matInput placeholder="Specify Owner Name" formControlName="other_owner"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- check -->
|
||||
<!-- check -->
|
||||
<!-- <mat-form-field *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5" style="width:40%">
|
||||
<mat-select placeholder="Relation" formControlName="relation" >
|
||||
<mat-option value="{{relations.relationship_id}}"
|
||||
@ -318,14 +353,16 @@
|
||||
<mat-form-field style="width:45%">
|
||||
|
||||
<mat-label>Age of Asset in Years</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal" minlength="1" maxlength="3" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal"
|
||||
minlength="1" maxlength="3" OnlyNumber type="text" (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="purchase_year" minlength="4" maxlength="4" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="purchase_year"
|
||||
minlength="4" maxlength="4" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
||||
<!-- <mat-error> Invalid year format</mat-error> -->
|
||||
|
||||
</mat-form-field>
|
||||
@ -334,7 +371,8 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value != ''" style="width:95%">
|
||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?" formControlName="emi">
|
||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?"
|
||||
formControlName="emi">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -355,7 +393,8 @@
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeAssetsDetails(i,1)"
|
||||
matTooltip="Delete Other Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1">
|
||||
matTooltip="Delete Other Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon"
|
||||
*ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -440,43 +479,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25"
|
||||
fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25"
|
||||
fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25"
|
||||
fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25"
|
||||
fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20"
|
||||
fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -486,8 +573,8 @@
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
@ -497,10 +584,13 @@
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button> -->
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="disableAfterSubmit===true" ><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above"
|
||||
type="submit" [disabled]="disableAfterSubmit===true">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
<notifier-container></notifier-container>
|
||||
@ -35,7 +35,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
main_applicant: any;
|
||||
pageTitle: string = "Other Assets Details";
|
||||
//@Input() pdid: number;
|
||||
pdid:string;
|
||||
pdid: string;
|
||||
//businessProfessionName :string;
|
||||
|
||||
public _assetsQuesFrom: FormGroup;
|
||||
@ -43,18 +43,18 @@ export class AssetsInfoComponent implements OnInit {
|
||||
public m_assets_type = [];
|
||||
|
||||
public applicants: any;
|
||||
otherEmiamtFlag : boolean = false;
|
||||
businessEmiAmtFlag : boolean = false;
|
||||
isOtherOwner:any = [];
|
||||
disableAfterSubmit : boolean = false;
|
||||
otherEmiamtFlag: boolean = false;
|
||||
businessEmiAmtFlag: boolean = false;
|
||||
isOtherOwner: any = [];
|
||||
disableAfterSubmit: boolean = false;
|
||||
|
||||
public m_any_asset_loan_type = [{'value': "yes",'viewValue': "Yes"},
|
||||
{'value': "no",'viewValue': "No"},
|
||||
{'value': "nan",'viewValue': "NA"}]
|
||||
public m_any_asset_loan_type = [{ 'value': "yes", 'viewValue': "Yes" },
|
||||
{ 'value': "no", 'viewValue': "No" },
|
||||
{ 'value': "nan", 'viewValue': "NA" }]
|
||||
// appxMarketAmtInwords : any = [];
|
||||
OtherAppxMarketAmtInwords : any = [];
|
||||
OtherAppxMarketAmtInwords: any = [];
|
||||
// emiAmtInwords : any = [];
|
||||
OtherEmiAmtInwords : any = [];
|
||||
OtherEmiAmtInwords: any = [];
|
||||
// PremiumPaidInwords : any = [];
|
||||
OtherPremiumPaidInwords: any = [];
|
||||
// SumAssuredInwords: any = [];
|
||||
@ -77,9 +77,9 @@ export class AssetsInfoComponent implements OnInit {
|
||||
public m_uom_type = [];
|
||||
|
||||
private notifier: NotifierService;
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
currentYear:any=new Date().getFullYear();
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
currentYear: any = new Date().getFullYear();
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
private _formBuilder: FormBuilder,
|
||||
@ -88,8 +88,8 @@ export class AssetsInfoComponent implements OnInit {
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.applicants = this.applicants.filter(val => val.applicant_type == 0 || val.applicant_type == 1)
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
this.notifier = notifier;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
@ -123,7 +123,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
|
||||
// });
|
||||
|
||||
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.existCompanyList = data.records.filter(val => val.is_active === true);
|
||||
}
|
||||
@ -137,12 +137,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
this.mergeCompanyApplicant.push({ groupName: 'COMPANIES', groupValues: modifyCompanyList })
|
||||
}
|
||||
// get applicant list
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
let modifyApplicantList: any = [];
|
||||
if (this.applicants.length > 0) {
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'APPLICANTS', groupValues: modifyApplicantList })
|
||||
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
this.getM_UOM_Type();
|
||||
}
|
||||
|
||||
// ======================
|
||||
// ======================
|
||||
|
||||
|
||||
getM_Assets_Type() {
|
||||
@ -221,7 +221,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
)
|
||||
}
|
||||
|
||||
getM_Vehicle_Type(){
|
||||
getM_Vehicle_Type() {
|
||||
this.pdTrigerService.getAllMasterDatas('VEHICLETYPE').subscribe(
|
||||
data => {
|
||||
this.m_vehicle_type = data.records.filter(data => data.is_active == 1);
|
||||
@ -231,9 +231,9 @@ export class AssetsInfoComponent implements OnInit {
|
||||
getM_UOM_Type() {
|
||||
this.pdTrigerService.getAllMasterDatas('UOM').subscribe(
|
||||
data => {
|
||||
this.m_uom_type = data.records.filter(data => data.isactive == 1 && data. is_land_uom == 1 || data. is_land_uom == 2);
|
||||
// console.log('this.m_uom_type',data.records,this.m_uom_type);
|
||||
//
|
||||
this.m_uom_type = data.records.filter(data => data.isactive == 1 && data.is_land_uom == 1 || data.is_land_uom == 2);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// )
|
||||
//}
|
||||
|
||||
// =============================
|
||||
// =============================
|
||||
|
||||
apiLoadFinish: boolean = false;
|
||||
getPdSupplierFormDetails() {
|
||||
@ -279,7 +279,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// this.initDetails(),
|
||||
]),
|
||||
// business_assets_details : this._formBuilder.array([]),
|
||||
assets_form_remark:[value.assets_form_remark]
|
||||
assets_form_remark: [value.assets_form_remark]
|
||||
});
|
||||
this.addAssetsDetailsWithData(value.assets_details);
|
||||
// this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||
@ -293,7 +293,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// business_assets_details : this._formBuilder.array([
|
||||
// this.initBusinessDetails(),
|
||||
// ]),
|
||||
assets_form_remark:['']
|
||||
assets_form_remark: ['']
|
||||
});
|
||||
}
|
||||
this.loadDetails = true;
|
||||
@ -313,19 +313,19 @@ export class AssetsInfoComponent implements OnInit {
|
||||
details: this._formBuilder.array([]),
|
||||
approximate_market_value: [''],
|
||||
name_of_the_owner: [''],
|
||||
other_owner:[''],
|
||||
other_owner: [''],
|
||||
// relation: [''],
|
||||
vintage_personal : [''],
|
||||
purchase_year: ['',Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||
vintage_personal: [''],
|
||||
purchase_year: ['', Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||
//purchase_month: [''],
|
||||
emi: [''],
|
||||
});
|
||||
}
|
||||
|
||||
show: boolean;
|
||||
selectedAssetsType(e: any, i: any,flag : any): void {
|
||||
selectedAssetsType(e: any, i: any, flag: any): void {
|
||||
let val = i;
|
||||
if(flag == 1){
|
||||
if (flag == 1) {
|
||||
const arr = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
arr.controls.splice(0);
|
||||
}
|
||||
@ -336,7 +336,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
switch (e.value) {
|
||||
case '1': {
|
||||
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.otherAssetsDescription());
|
||||
break;
|
||||
}
|
||||
@ -389,11 +389,11 @@ export class AssetsInfoComponent implements OnInit {
|
||||
return this._formBuilder.group({
|
||||
property_type: [''],
|
||||
other_property_type: [''],
|
||||
address_of_the_property :[''],
|
||||
describe_of_the_property_asset :[''],
|
||||
area_covered_by_this_property :[''],
|
||||
uom_of_the_property:[''],
|
||||
other_uom:['']
|
||||
address_of_the_property: [''],
|
||||
describe_of_the_property_asset: [''],
|
||||
area_covered_by_this_property: [''],
|
||||
uom_of_the_property: [''],
|
||||
other_uom: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@ -440,7 +440,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
//insurance_type: [''],
|
||||
premium_paid: [''],
|
||||
frequency_mode: [''],
|
||||
other_frequency_mode:[''],
|
||||
other_frequency_mode: [''],
|
||||
sum_assured: [''],
|
||||
members_coverd: ['']
|
||||
});
|
||||
@ -449,18 +449,18 @@ export class AssetsInfoComponent implements OnInit {
|
||||
loadInvestDescription() {
|
||||
return this._formBuilder.group({
|
||||
investments_type: [''],
|
||||
other_investments_type:[''],
|
||||
other_investments_type: [''],
|
||||
amount_of_invest: [''],
|
||||
bank_name: [''],
|
||||
in_which_organisation:['']
|
||||
in_which_organisation: ['']
|
||||
});
|
||||
}
|
||||
|
||||
load_Four_Weeler() {
|
||||
return this._formBuilder.group({
|
||||
manufacturer_model_vehicle: [''],
|
||||
vehicle_type:[''],
|
||||
other_vehicle_type:['']
|
||||
vehicle_type: [''],
|
||||
other_vehicle_type: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@ -474,11 +474,11 @@ export class AssetsInfoComponent implements OnInit {
|
||||
return this._formBuilder.group({
|
||||
property_type: [data.property_type],
|
||||
other_property_type: [data.other_property_type],
|
||||
address_of_the_property :[data.address_of_the_property],
|
||||
describe_of_the_property_asset :[data.describe_of_the_property_asset],
|
||||
area_covered_by_this_property :[data.area_covered_by_this_property],
|
||||
uom_of_the_property:[data.uom_of_the_property],
|
||||
other_uom : [data.other_uom]
|
||||
address_of_the_property: [data.address_of_the_property],
|
||||
describe_of_the_property_asset: [data.describe_of_the_property_asset],
|
||||
area_covered_by_this_property: [data.area_covered_by_this_property],
|
||||
uom_of_the_property: [data.uom_of_the_property],
|
||||
other_uom: [data.other_uom]
|
||||
//property_type:['']
|
||||
});
|
||||
}
|
||||
@ -526,7 +526,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
//insurance_type: [data.insurance_type],
|
||||
premium_paid: [data.premium_paid],
|
||||
frequency_mode: [data.frequency_mode],
|
||||
other_frequency_mode:[data.other_frequency_mode],
|
||||
other_frequency_mode: [data.other_frequency_mode],
|
||||
sum_assured: [data.sum_assured],
|
||||
members_coverd: [data.members_coverd]
|
||||
});
|
||||
@ -535,9 +535,9 @@ export class AssetsInfoComponent implements OnInit {
|
||||
loadInvestDescriptionWithData(data) {
|
||||
return this._formBuilder.group({
|
||||
investments_type: [data.investments_type],
|
||||
other_investments_type : [data.other_investments_type],
|
||||
other_investments_type: [data.other_investments_type],
|
||||
amount_of_invest: [data.amount_of_invest],
|
||||
in_which_organisation:[data.in_which_organisation],
|
||||
in_which_organisation: [data.in_which_organisation],
|
||||
bank_name: [data.bank_name]
|
||||
});
|
||||
}
|
||||
@ -545,8 +545,8 @@ export class AssetsInfoComponent implements OnInit {
|
||||
load_Four_WeelerWithData(data) {
|
||||
return this._formBuilder.group({
|
||||
manufacturer_model_vehicle: [data.manufacturer_model_vehicle],
|
||||
vehicle_type:[data.vehicle_type],
|
||||
other_vehicle_type:[data.other_vehicle_type]
|
||||
vehicle_type: [data.vehicle_type],
|
||||
other_vehicle_type: [data.other_vehicle_type]
|
||||
});
|
||||
}
|
||||
|
||||
@ -564,10 +564,10 @@ export class AssetsInfoComponent implements OnInit {
|
||||
details: this._formBuilder.array([]),
|
||||
approximate_market_value: [data.approximate_market_value],
|
||||
name_of_the_owner: [data.name_of_the_owner],
|
||||
other_owner:[data.other_owner || ''],
|
||||
other_owner: [data.other_owner || ''],
|
||||
//relation: [data.relation || ''],
|
||||
vintage_personal : [data. vintage_personal],
|
||||
purchase_year: [data. purchase_year,Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||
vintage_personal: [data.vintage_personal],
|
||||
purchase_year: [data.purchase_year, Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||
// purchase_month: [data.purchase_month],
|
||||
emi: [data.emi || 0],
|
||||
});
|
||||
@ -602,7 +602,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
assets_mode: val.assets_mode,
|
||||
approximate_market_value: val.approximate_market_value,
|
||||
name_of_the_owner: val.name_of_the_owner,
|
||||
other_owner:val.other_owner,
|
||||
other_owner: val.other_owner,
|
||||
// relation: val.relation,
|
||||
vintage_personal: val.vintage_personal,
|
||||
purchase_year: val.purchase_year,
|
||||
@ -615,7 +615,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
control.push(this.initDetailsWithdata(vals));
|
||||
this.setAssetsDetailsWithData(vals.assets_mode, val.details, control.length - 1)
|
||||
}
|
||||
result.forEach((datas,index) => {
|
||||
result.forEach((datas, index) => {
|
||||
// let Avaliablity = 1;
|
||||
// if(datas.name_of_the_owner.length>0){
|
||||
// datas.name_of_the_owner.forEach(option => {
|
||||
@ -626,7 +626,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// }
|
||||
// this.isOtherOwner[index] = Avaliablity == 0 ? true : false;
|
||||
this.OtherAppxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.approximate_market_value);
|
||||
this.setRequiredValidation(datas.name_of_the_owner,index,'',4);
|
||||
this.setRequiredValidation(datas.name_of_the_owner, index, '', 4);
|
||||
});
|
||||
}
|
||||
this.loadDetails = true;
|
||||
@ -645,9 +645,10 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
switch (assets_details_mode) {
|
||||
case '1': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
array_data = { 'any_other_assets': datas.any_other_assets,
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
array_data = {
|
||||
'any_other_assets': datas.any_other_assets,
|
||||
// 'name_of_the_owner':datas.name_of_the_owner,
|
||||
// 'other_owner':datas.other_owner,
|
||||
//'relation':datas.relation,
|
||||
@ -661,31 +662,35 @@ export class AssetsInfoComponent implements OnInit {
|
||||
break;
|
||||
}
|
||||
case '2': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
array_data = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type,
|
||||
'address_of_the_property' :datas.address_of_the_property,'describe_of_the_property_asset' :datas.describe_of_the_property_asset,
|
||||
'uom_of_the_property':datas.uom_of_the_property,
|
||||
'area_covered_by_this_property' :datas.area_covered_by_this_property,'other_uom':datas.other_uom };
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
array_data = {
|
||||
'property_type': datas.property_type, 'other_property_type': datas.other_property_type,
|
||||
'address_of_the_property': datas.address_of_the_property, 'describe_of_the_property_asset': datas.describe_of_the_property_asset,
|
||||
'uom_of_the_property': datas.uom_of_the_property,
|
||||
'area_covered_by_this_property': datas.area_covered_by_this_property, 'other_uom': datas.other_uom
|
||||
};
|
||||
});
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.loadPropertyWithData(array_data));
|
||||
break;
|
||||
}
|
||||
case '3': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
array_data = { 'manufacturer_model_vehicle': datas.manufacturer_model_vehicle,
|
||||
'vehicle_type':datas.vehicle_type,
|
||||
'other_vehicle_type':datas.other_vehicle_type};
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
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;
|
||||
control.push(this.load_Four_WeelerWithData(array_data));
|
||||
break;
|
||||
}
|
||||
case '4': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
array_data = { 'equipment_manufacturing_description': datas.equipment_manufacturing_description };
|
||||
});
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
@ -699,14 +704,14 @@ export class AssetsInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
case '6': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.premium_paid);
|
||||
this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.sum_assured);
|
||||
array_data = {
|
||||
'premium_paid': datas.premium_paid,
|
||||
'frequency_mode': datas.frequency_mode,
|
||||
'other_frequency_mode':datas.other_frequency_mode,
|
||||
'other_frequency_mode': datas.other_frequency_mode,
|
||||
'sum_assured': datas.sum_assured,
|
||||
'members_coverd': datas.members_coverd
|
||||
};
|
||||
@ -716,14 +721,16 @@ export class AssetsInfoComponent implements OnInit {
|
||||
break;
|
||||
}
|
||||
case '7': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
let array_data: any;
|
||||
data.forEach((datas, i) => {
|
||||
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
|
||||
array_data = { 'investments_type': datas.investments_type,
|
||||
'other_investments_type' : datas.other_investments_type,
|
||||
'in_which_organisation' : datas.in_which_organisation,
|
||||
array_data = {
|
||||
'investments_type': datas.investments_type,
|
||||
'other_investments_type': datas.other_investments_type,
|
||||
'in_which_organisation': datas.in_which_organisation,
|
||||
'amount_of_invest': datas.amount_of_invest,
|
||||
'bank_name': datas.bank_name };
|
||||
'bank_name': datas.bank_name
|
||||
};
|
||||
});
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.loadInvestDescriptionWithData(array_data));
|
||||
@ -738,16 +745,16 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
|
||||
/** Add More Asset using Flag Both "Other Asset" And "Business Asset" */
|
||||
addAssetDetails(e,flag) {
|
||||
if(flag == 1){
|
||||
addAssetDetails(e, flag) {
|
||||
if (flag == 1) {
|
||||
const control = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
||||
control.push(this.initDetails());
|
||||
}
|
||||
}
|
||||
|
||||
/** To remove The Added Asset using Flag Both "Other Asset" And "Business Asset" */
|
||||
removeAssetsDetails(i: number,flag) {
|
||||
if(flag == 1){
|
||||
removeAssetsDetails(i: number, flag) {
|
||||
if (flag == 1) {
|
||||
const control = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
||||
control.removeAt(i);
|
||||
}
|
||||
@ -765,15 +772,15 @@ export class AssetsInfoComponent implements OnInit {
|
||||
}
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
if (o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
|
||||
// check others
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
checkOthers(values) {
|
||||
if (values != null) {
|
||||
return values.id == 0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@ -782,17 +789,17 @@ export class AssetsInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// calculate vintage and purchase {}
|
||||
calculateVintagePurchase(value: any, controlKey: any,type: number){
|
||||
if(type==1){}
|
||||
else if(type==2) {}
|
||||
else if(type==3){
|
||||
calculateVintagePurchase(value: any, controlKey: any, type: number) {
|
||||
if (type == 1) { }
|
||||
else if (type == 2) { }
|
||||
else if (type == 3) {
|
||||
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
||||
control.controls[controlKey].controls['purchase_year'].setValue(value!='' ? parseInt(this.currentYear)-parseInt(value) : '');
|
||||
control.controls[controlKey].controls['purchase_year'].setValue(value != '' ? parseInt(this.currentYear) - parseInt(value) : '');
|
||||
}
|
||||
else if(type==4) {
|
||||
else if (type == 4) {
|
||||
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
|
||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['purchase_year'].setValue(value) : control.controls[controlKey].controls['purchase_year'].setValue('');
|
||||
value!='' && value<=this.currentYear ? control.controls[controlKey].controls['vintage_personal'].setValue(parseInt(this.currentYear)-parseInt(value)) : control.controls[controlKey].controls['vintage_personal'].setValue('')
|
||||
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['purchase_year'].setValue(value) : control.controls[controlKey].controls['purchase_year'].setValue('');
|
||||
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['vintage_personal'].setValue(parseInt(this.currentYear) - parseInt(value)) : control.controls[controlKey].controls['vintage_personal'].setValue('')
|
||||
}
|
||||
|
||||
}
|
||||
@ -815,12 +822,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// Save the data with help of Service
|
||||
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
|
||||
dataresult => {
|
||||
if(dataresult.status == 200) {
|
||||
if (dataresult.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
this.disableAfterSubmit = false;
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -844,13 +851,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// }
|
||||
|
||||
/** To calculating Loan Elapsed Tenure both "Other Asset" And "Business Asset" using Flag */
|
||||
loanTenureCalc(details ,flag)
|
||||
{
|
||||
if(flag == 1){
|
||||
loanTenureCalc(details, flag) {
|
||||
if (flag == 1) {
|
||||
let ElapsedValues;
|
||||
|
||||
if(details.value.original_loan_tenure != null && details.value.original_loan_tenure != '' && details.value.balance_tenure != null && details.value.balance_tenure != ''){
|
||||
ElapsedValues = details.value.original_loan_tenure - details.value.balance_tenure ;
|
||||
if (details.value.original_loan_tenure != null && details.value.original_loan_tenure != '' && details.value.balance_tenure != null && details.value.balance_tenure != '') {
|
||||
ElapsedValues = details.value.original_loan_tenure - details.value.balance_tenure;
|
||||
details.controls['elapsed_tenure'].setValue(ElapsedValues);
|
||||
}
|
||||
}
|
||||
@ -864,14 +870,14 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// }
|
||||
|
||||
}
|
||||
setRequiredValidation(value,ParInx,ChdInx,flag) {
|
||||
console.log('value',value,'ParInx',ParInx,'ChdInx',ChdInx,'flag',flag);
|
||||
setRequiredValidation(value, ParInx, ChdInx, flag) {
|
||||
|
||||
let ParCtrls = <FormArray>this._assetsQuesFrom.controls.assets_details;
|
||||
// console.log('ParCtrls',ParCtrls);
|
||||
let ChdCtrls:any = <FormArray>ParCtrls.controls[ParInx];
|
||||
// console.log('ChdCtrls',ChdCtrls);
|
||||
if(flag == 1){
|
||||
value==1
|
||||
|
||||
let ChdCtrls: any = <FormArray>ParCtrls.controls[ParInx];
|
||||
|
||||
if (flag == 1) {
|
||||
value == 1
|
||||
|
||||
// ? controls2[ChdInx].controls.other_property_type.setValidators([Validators.required])
|
||||
// : item.controls.other_property_type.clearValidators();
|
||||
@ -897,84 +903,84 @@ export class AssetsInfoComponent implements OnInit {
|
||||
// }
|
||||
if (flag == 4) {
|
||||
let Avaliablity = 1;
|
||||
// console.log('val',value);
|
||||
if(value.length>0){
|
||||
|
||||
if (value.length > 0) {
|
||||
value.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
if (option.id == 0 && option.group_id == 2) {
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Avaliablity == 0){
|
||||
console.log('if Avaliablity',Avaliablity);
|
||||
// console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
if (Avaliablity == 0) {
|
||||
|
||||
|
||||
ChdCtrls.controls.other_owner.setValidators([Validators.required]);
|
||||
this.isOtherOwner[ParInx] = true;
|
||||
// console.log('if this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
}else if(Avaliablity == 1){
|
||||
console.log('else Avaliablity',Avaliablity);
|
||||
// console.log('esle this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
|
||||
} else if (Avaliablity == 1) {
|
||||
|
||||
|
||||
ChdCtrls.controls.other_owner.setValue('');
|
||||
ChdCtrls.controls.other_owner.clearValidators();
|
||||
this.isOtherOwner[ParInx] = false;
|
||||
// console.log('else this.isOtherOwner[ParInx]',this.isOtherOwner[ParInx]);
|
||||
|
||||
}
|
||||
|
||||
ChdCtrls.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();
|
||||
// }
|
||||
// if(flag == 6){
|
||||
// value==1
|
||||
// ? item.controls.other_uom.setValidators([Validators.required])
|
||||
// : item.controls.other_uom.clearValidators();
|
||||
// item.controls.other_uom.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();
|
||||
// }
|
||||
// if(flag == 6){
|
||||
// value==1
|
||||
// ? item.controls.other_uom.setValidators([Validators.required])
|
||||
// : item.controls.other_uom.clearValidators();
|
||||
// item.controls.other_uom.updateValueAndValidity();
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e,i,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
/** Amount InWords */
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
// this.appxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
this.OtherAppxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 3 :
|
||||
case 3:
|
||||
// this.emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 4 :
|
||||
case 4:
|
||||
this.OtherEmiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 5 :
|
||||
case 5:
|
||||
// this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6 :
|
||||
case 6:
|
||||
this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7 :
|
||||
case 7:
|
||||
// this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 8 :
|
||||
case 8:
|
||||
this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 9 :
|
||||
case 9:
|
||||
// this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 10 :
|
||||
case 10:
|
||||
this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 11 :
|
||||
case 11:
|
||||
// this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 12 :
|
||||
case 12:
|
||||
this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 13:
|
||||
@ -986,7 +992,7 @@ inWords(e,i,flag){
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,91 +1,94 @@
|
||||
<!--<<<<<<< HEAD-->
|
||||
<!--<mat-card style="padding: 12px;">-->
|
||||
<!--<form [formGroup]="bankingForm" class="bankForm">-->
|
||||
<!--<div formArrayName="itemRows">-->
|
||||
<!--<mat-accordion-->
|
||||
<!--*ngFor="let itemrow of bankingForm.controls.itemRows.controls; let i=index"-->
|
||||
<!--[formGroupName]="i">-->
|
||||
<!--<mat-expansion-panel class="banlFields" [expanded]="step == i" (opened)="setStep(i)">-->
|
||||
<!--<mat-expansion-panel-header>-->
|
||||
<!--<mat-panel-title>-->
|
||||
<!--<h4>{{i+1}} Banking details<span *ngIf="i==0" style="float: right;">-->
|
||||
<!--<mat-icon (click)="addBankdetails($event)">add</mat-icon>-->
|
||||
<!--</span>-->
|
||||
<!--<span *ngIf="i > 0">-->
|
||||
<!--<mat-icon (click)="deleteBankdetails(i, $event)">delete</mat-icon>-->
|
||||
<!--</span></h4>-->
|
||||
<!--</mat-panel-title>-->
|
||||
<!--</mat-expansion-panel-header>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Applicant Name"-->
|
||||
<!--formControlName="applicant_name">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Bank Name" formControlName="bank_name">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<div formArrayName="itemRows">-->
|
||||
<!--<mat-accordion-->
|
||||
<!--*ngFor="let itemrow of bankingForm.controls.itemRows.controls; let i=index"-->
|
||||
<!--[formGroupName]="i">-->
|
||||
<!--<mat-expansion-panel class="banlFields" [expanded]="step == i" (opened)="setStep(i)">-->
|
||||
<!--<mat-expansion-panel-header>-->
|
||||
<!--<mat-panel-title>-->
|
||||
<!--<h4>{{i+1}} Banking details<span *ngIf="i==0" style="float: right;">-->
|
||||
<!--<mat-icon (click)="addBankdetails($event)">add</mat-icon>-->
|
||||
<!--</span>-->
|
||||
<!--<span *ngIf="i > 0">-->
|
||||
<!--<mat-icon (click)="deleteBankdetails(i, $event)">delete</mat-icon>-->
|
||||
<!--</span></h4>-->
|
||||
<!--</mat-panel-title>-->
|
||||
<!--</mat-expansion-panel-header>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Applicant Name"-->
|
||||
<!--formControlName="applicant_name">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Bank Name" formControlName="bank_name">-->
|
||||
<!--</mat-form-field>-->
|
||||
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Account Type"-->
|
||||
<!--formControlName="account_type">-->
|
||||
<!--<mat-option value="Savings">Savings</mat-option>-->
|
||||
<!--<mat-option value="Current">Current</mat-option>-->
|
||||
<!--<mat-option value="OD">OD</mat-option>-->
|
||||
<!--<mat-option value="CC">CC</mat-option>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Account Type"-->
|
||||
<!--formControlName="account_type">-->
|
||||
<!--<mat-option value="Savings">Savings</mat-option>-->
|
||||
<!--<mat-option value="Current">Current</mat-option>-->
|
||||
<!--<mat-option value="OD">OD</mat-option>-->
|
||||
<!--<mat-option value="CC">CC</mat-option>-->
|
||||
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Salary Credited in this account"-->
|
||||
<!--formControlName="salary">-->
|
||||
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||
<!--<mat-option value="No">No</mat-option>-->
|
||||
<!--<mat-option value="NA">NA</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Limit in case of OD / CC account"-->
|
||||
<!--formControlName="limit">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Is this the main business account"-->
|
||||
<!--formControlName="is_main">-->
|
||||
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||
<!--<mat-option value="No">No</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Approximate Vintage"-->
|
||||
<!--formControlName="vintage">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--</mat-expansion-panel>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Salary Credited in this account"-->
|
||||
<!--formControlName="salary">-->
|
||||
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||
<!--<mat-option value="No">No</mat-option>-->
|
||||
<!--<mat-option value="NA">NA</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Limit in case of OD / CC account"-->
|
||||
<!--formControlName="limit">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Is this the main business account"-->
|
||||
<!--formControlName="is_main">-->
|
||||
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||
<!--<mat-option value="No">No</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Approximate Vintage"-->
|
||||
<!--formControlName="vintage">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--</mat-expansion-panel>-->
|
||||
|
||||
<!--</mat-accordion>-->
|
||||
<!--</div>-->
|
||||
<!--<button mat-raised-button class="button" (click)="bankSubmit()">Submit-->
|
||||
<!--</button>-->
|
||||
<!--</mat-accordion>-->
|
||||
<!--</div>-->
|
||||
<!--<button mat-raised-button class="button" (click)="bankSubmit()">Submit-->
|
||||
<!--</button>-->
|
||||
<!--</form>-->
|
||||
<!--</mat-card>-->
|
||||
<!--=======-->
|
||||
<form [formGroup]="bankingForm" class="bankForm">
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">- {{subproduct_abbr}} </span></span><br>
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">-
|
||||
{{subproduct_abbr}} </span></span><br>
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
</h2>
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
|
||||
<mat-tab label="Questions">
|
||||
<mat-card>
|
||||
<mat-tab label="Questions">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div formArrayName="itemRows" autocomplete="off">
|
||||
<mat-accordion
|
||||
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||
[formGroupName]="i">
|
||||
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||
<mat-expansion-panel-header>
|
||||
@ -95,7 +98,8 @@
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.values.id,itemrow,1)">
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name"
|
||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.values.id,itemrow,1)">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
@ -103,26 +107,32 @@
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true" style="width:45%">
|
||||
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
|
||||
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true"
|
||||
style="width:45%">
|
||||
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name" (selectionChange)="setRequiredValidation($event.value,itemrow,2)">
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name"
|
||||
(selectionChange)="setRequiredValidation($event.value,itemrow,2)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{
|
||||
btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 1">
|
||||
<input matInput placeholder="Specify Bank Name"
|
||||
formControlName="other_bank" autocomplete="off">
|
||||
<input matInput placeholder="Specify Bank Name" formControlName="other_bank"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)" placeholder="Account Type" formControlName="account_type" >
|
||||
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)"
|
||||
placeholder="Account Type" formControlName="account_type">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{
|
||||
prop.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -136,8 +146,7 @@
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%;" *ngIf="salaryField">
|
||||
<mat-select placeholder="Salary Credited in this account"
|
||||
formControlName="salary" >
|
||||
<mat-select placeholder="Salary Credited in this account" formControlName="salary">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
@ -145,10 +154,12 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> -->
|
||||
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]">
|
||||
<!-- *ngIf="itemrow.get('account_type').value != 2"> -->
|
||||
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
|
||||
formControlName="limit" OnlyNumber type="text" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}}
|
||||
{{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
@ -156,10 +167,12 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Year(s)"
|
||||
formControlName="vintage_year" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
|
||||
<input matInput autocomplete="off" placeholder="Month(s)"
|
||||
formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -172,7 +185,8 @@
|
||||
</div>
|
||||
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details" matTooltipPosition="above" (click)="deleteBankdetails(i)" *ngIf="bankingForm.controls.itemRows.controls.length > 1">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details"
|
||||
matTooltipPosition="above" (click)="deleteBankdetails(i)" *ngIf="bankingForm.controls.itemRows.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -196,9 +210,9 @@
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
@ -249,43 +263,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -293,22 +355,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="banking_form_remark" ></textarea>
|
||||
<textarea matInput placeholder="Remarks" formControlName="banking_form_remark"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button class="mr-1 mb-1 hover-icon" type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()"><mat-icon>save</mat-icon>
|
||||
<button class="mr-1 mb-1 hover-icon" type="submit" mat-raised-button mat-icon-button type="submit"
|
||||
matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</mat-dialog-actions>
|
||||
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
@ -21,7 +21,7 @@ import {
|
||||
} from '@angular/material';
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
@Component({
|
||||
selector: 'app-banking-details',
|
||||
templateUrl: './banking-details.component.html',
|
||||
@ -33,23 +33,23 @@ export class BankingDetailsComponent implements OnInit {
|
||||
lender_applicant_id: any;
|
||||
main_applicant: any;
|
||||
pdid: number;
|
||||
pageTitle: string ="Banking Details of Individuals";
|
||||
pageTitle: string = "Banking Details of Individuals";
|
||||
public bankingForm: FormGroup;
|
||||
step: number;
|
||||
private notifier: NotifierService;
|
||||
public pd_cus_segment:string;
|
||||
public pd_cus_segment: string;
|
||||
public applicants: any;
|
||||
public companies: any;
|
||||
m_accountType= [];
|
||||
m_accountType = [];
|
||||
m_btLenderList = [];
|
||||
salaryField : boolean;
|
||||
OtherFlag : any = [];
|
||||
limitCaseFlag : any = [];
|
||||
amtInwords : any = [];
|
||||
emiAmtInwords : any = [];
|
||||
salaryField: boolean;
|
||||
OtherFlag: any = [];
|
||||
limitCaseFlag: any = [];
|
||||
amtInwords: any = [];
|
||||
emiAmtInwords: any = [];
|
||||
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -58,11 +58,11 @@ export class BankingDetailsComponent implements OnInit {
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||
this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
|
||||
this.pd_cus_segment = this.pd_cus_segment.substring(0, 3);
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.companies = this.pd_all_details.pdapplicants_detials.filter(val=>val.applicant_type==2)
|
||||
this.applicants = this.applicants.filter(val => val.applicant_type == 0 || val.applicant_type == 1)
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
this.companies = this.pd_all_details.pdapplicants_detials.filter(val => val.applicant_type == 2)
|
||||
this.notifier = notifier;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
@ -89,14 +89,14 @@ export class BankingDetailsComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
ngOnInit() {
|
||||
this.step = 0;
|
||||
this.initBankingForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active===true);
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.existCompanyList = data.records.filter(val => val.is_active === true);
|
||||
}
|
||||
|
||||
// let modifyCompanyList : any=[];
|
||||
@ -108,13 +108,13 @@ export class BankingDetailsComponent implements OnInit {
|
||||
// }
|
||||
|
||||
});
|
||||
let modifyApplicantList: any=[];
|
||||
let modifyApplicantList: any = [];
|
||||
|
||||
if(this.applicants.length > 0){
|
||||
if (this.applicants.length > 0) {
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'APPLICANTS', groupValues: modifyApplicantList })
|
||||
|
||||
}
|
||||
// let modifyCompanyList : any=[];
|
||||
@ -129,7 +129,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
this.getM_AccountType();
|
||||
this.getM_BTLenderList();
|
||||
|
||||
this.salaryField = this.pd_cus_segment.substring(0,2) == 'SE' ? false : true ;
|
||||
this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true;
|
||||
// this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||
// // console.log("(0,3): " + this.pd_cus_segment.substring(0,3));
|
||||
// this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
|
||||
@ -148,10 +148,10 @@ export class BankingDetailsComponent implements OnInit {
|
||||
if (result.length == 0) {
|
||||
control.push(this.createBankarray());
|
||||
} else {
|
||||
result.forEach((datas,index) => {
|
||||
result.forEach((datas, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit);
|
||||
// this.selectedBorrower(datas.applicant_name,index);
|
||||
this.selectedAccTypeChanges(+datas.account_type,index)
|
||||
this.selectedAccTypeChanges(+datas.account_type, index)
|
||||
|
||||
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
control.push(this.createBankarray());
|
||||
@ -178,7 +178,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
)
|
||||
}
|
||||
|
||||
getM_BTLenderList(){
|
||||
getM_BTLenderList() {
|
||||
this._pd.getAllMasterDatas('BTLENDERLIST').subscribe(
|
||||
data => {
|
||||
this.m_btLenderList = data.records.filter(data => data.isactive == 1 && data.lender_type == 1);
|
||||
@ -195,12 +195,12 @@ export class BankingDetailsComponent implements OnInit {
|
||||
createBankarray() {
|
||||
return this.fb.group({
|
||||
applicant_name: [''],
|
||||
other_applicant : [''],
|
||||
other_applicant: [''],
|
||||
bank_name: [''],
|
||||
other_bank: [''],
|
||||
account_type: [''],
|
||||
//salary: [''],
|
||||
salary: this.pd_cus_segment.substring(0,2) == 'SE' ? [''] : [''],
|
||||
salary: this.pd_cus_segment.substring(0, 2) == 'SE' ? [''] : [''],
|
||||
limit: [''],
|
||||
//is_main: [''],
|
||||
//is_main: [this.pd_cus_segment == 'SAL' ? '' : ''],
|
||||
@ -229,16 +229,16 @@ export class BankingDetailsComponent implements OnInit {
|
||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
setRequiredValidation(value,item,flag) {
|
||||
setRequiredValidation(value, item, flag) {
|
||||
|
||||
if(flag == 1){
|
||||
value==0
|
||||
if (flag == 1) {
|
||||
value == 0
|
||||
? item.controls.other_applicant.setValidators([Validators.required])
|
||||
: item.controls.other_applicant.clearValidators();
|
||||
item.controls.other_applicant.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 2){
|
||||
value==1
|
||||
if (flag == 2) {
|
||||
value == 1
|
||||
? item.controls.other_bank.setValidators([Validators.required])
|
||||
: item.controls.other_bank.clearValidators();
|
||||
item.controls.other_bank.updateValueAndValidity();
|
||||
@ -259,14 +259,14 @@ export class BankingDetailsComponent implements OnInit {
|
||||
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
// this.dialogRef.close();
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
@ -278,7 +278,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
if (control instanceof FormControl) {
|
||||
control.markAsTouched({onlySelf: true});
|
||||
control.markAsTouched({ onlySelf: true });
|
||||
} else if (control instanceof FormGroup) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
@ -297,16 +297,16 @@ export class BankingDetailsComponent implements OnInit {
|
||||
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
if (o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
|
||||
|
||||
// check others
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
checkOthers(values) {
|
||||
if (values != null) {
|
||||
return values.id == 0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@ -314,9 +314,9 @@ export class BankingDetailsComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
selectedAccTypeChanges(event: any,i){
|
||||
selectedAccTypeChanges(event: any, i) {
|
||||
|
||||
if(event == 2 || event == 1) {
|
||||
if (event == 2 || event == 1) {
|
||||
this.limitCaseFlag[i] = false;
|
||||
|
||||
// const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
@ -325,18 +325,18 @@ export class BankingDetailsComponent implements OnInit {
|
||||
// control.controls[0].get('limit').updateValueAndValidity();
|
||||
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.limitCaseFlag[i] = true;
|
||||
}
|
||||
|
||||
}
|
||||
/** To Convert Month into Year */
|
||||
ConvertMonthintoYear(itemrow,e){
|
||||
ConvertMonthintoYear(itemrow, e) {
|
||||
|
||||
let year = itemrow.controls.vintage_year.value;
|
||||
|
||||
let converted_month : number = e%12;
|
||||
let converted_year : number = e/12;
|
||||
let converted_month: number = e % 12;
|
||||
let converted_year: number = e / 12;
|
||||
|
||||
itemrow.controls.vintage_year.setValue(+year + +Math.floor(converted_year));
|
||||
itemrow.controls.vintage_month.setValue(Math.floor(converted_month));
|
||||
@ -344,12 +344,12 @@ export class BankingDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e,i,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_businessAssetsQuesFrom" (submit)="onSubmit()" novalidate>
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">- {{subproduct_abbr}}</span> </span><br>
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">-
|
||||
{{subproduct_abbr}}</span> </span><br>
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
@ -60,7 +61,8 @@
|
||||
|
||||
|
||||
<mat-form-field style="width: 95%;">
|
||||
<mat-select [placeholder]="placeholderName[i] ? placeholderName[i] :'Was any business activity seen at the Address Type during PD visit?'" formControlName="business_is_pd_visited">
|
||||
<mat-select [placeholder]="placeholderName[i] ? placeholderName[i] :'Was any business activity seen at the Address Type during PD visit?'"
|
||||
formControlName="business_is_pd_visited">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
|
||||
@ -33,8 +33,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
private notifier: NotifierService;
|
||||
public _businessAssetsQuesFrom: FormGroup;
|
||||
public submitted = false;
|
||||
isOtherOwnerForAddress : any = [];
|
||||
isOtherOwner : any = [];
|
||||
isOtherOwnerForAddress: any = [];
|
||||
isOtherOwner: any = [];
|
||||
loadDetails: boolean;
|
||||
|
||||
CustSegAbbr: any;
|
||||
@ -185,24 +185,22 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
}
|
||||
);
|
||||
}
|
||||
loadaddresses(){
|
||||
// console.log('function inside loaded');
|
||||
loadaddresses() {
|
||||
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '5';
|
||||
|
||||
this.pdTrigerService.retriveForm(params).subscribe(data => {
|
||||
// console.log('response',data);
|
||||
|
||||
if (data.status == 200) {
|
||||
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
|
||||
// console.log(data.records);
|
||||
// console.log(data.records.addresses);
|
||||
// console.log(dataOfAddress);
|
||||
|
||||
// // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||
|
||||
if(data.records.addresses.length > 0){
|
||||
data.records.addresses.forEach((data,inx)=>{
|
||||
// console.log(data);
|
||||
if (data.records.addresses.length > 0) {
|
||||
data.records.addresses.forEach((data, inx) => {
|
||||
|
||||
|
||||
this.addressLabel[inx] = '';
|
||||
|
||||
@ -214,7 +212,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
let addressLabel = address + ' / ' + addressType;
|
||||
|
||||
let vals = {
|
||||
address_label:addressLabel,
|
||||
address_label: addressLabel,
|
||||
business_years: '',
|
||||
business_month: '',
|
||||
business_address_availability: '',
|
||||
@ -234,17 +232,17 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
control.push(this.initBusinessAddressDetailsWithdata(vals));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||
control.push(this.initBusinessAddressDetails());
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||
control.push(this.initBusinessAddressDetails());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// business_years: [value.business_years],
|
||||
// business_month: [value.business_month],
|
||||
// business_address_availability: [value.business_address_availability],
|
||||
@ -288,7 +286,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
formid: ['22'],
|
||||
company_id: [this.company_id],
|
||||
business_assets_for_address: this._formBuilder.array([]),
|
||||
business_assets_details: this._formBuilder.array([ this.initBusinessDetails() ]),
|
||||
business_assets_details: this._formBuilder.array([this.initBusinessDetails()]),
|
||||
business_assets_form_remark: ['']
|
||||
});
|
||||
this.loadaddresses();
|
||||
@ -319,7 +317,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
|
||||
initBusinessAddressDetails() {
|
||||
return this._formBuilder.group({
|
||||
address_label:[''],
|
||||
address_label: [''],
|
||||
business_years: [''],
|
||||
business_month: [''],
|
||||
business_address_availability: [''],
|
||||
@ -489,7 +487,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
|
||||
initBusinessAddressDetailsWithdata(data) {
|
||||
return this._formBuilder.group({
|
||||
address_label:[data.address_label],
|
||||
address_label: [data.address_label],
|
||||
business_years: [data.business_years],
|
||||
business_month: [data.business_month],
|
||||
business_address_availability: [data.business_address_availability],
|
||||
@ -559,9 +557,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
this.appxMarketAmtInwordsForAddress[index] = this.pdTrigerService.convertNumberToWords(datas.business_approximate_market_value);
|
||||
let Avaliablity = 1;
|
||||
|
||||
if(datas.business_name_of_the_owner.length > 0){
|
||||
if (datas.business_name_of_the_owner.length > 0) {
|
||||
datas.business_name_of_the_owner.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
if (option.id == 0 && option.group_id == 2) {
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
@ -572,7 +570,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
|
||||
for (let val of result) {
|
||||
let vals = {
|
||||
address_label:val.address_label,
|
||||
address_label: val.address_label,
|
||||
business_years: val.business_years,
|
||||
business_month: val.business_month,
|
||||
business_address_availability: val.business_address_availability,
|
||||
@ -608,10 +606,10 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
this.appxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_approximate_market_value);
|
||||
this.RentAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_monthly_rented_amt);
|
||||
let Avaliablity = 1;
|
||||
console.log('datas.business_name_of_the_owner.length',datas.business_name_of_the_owner.length);
|
||||
if(datas.business_name_of_the_owner.length > 0){
|
||||
|
||||
if (datas.business_name_of_the_owner.length > 0) {
|
||||
datas.business_name_of_the_owner.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
if (option.id == 0 && option.group_id == 2) {
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
@ -780,18 +778,17 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
/** To Convert Month into Year */
|
||||
ConvertMonthintoYear(e,i) {
|
||||
ConvertMonthintoYear(e, i) {
|
||||
// const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
||||
// console.log(e);
|
||||
// console.log(i);
|
||||
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||
|
||||
// control.controls[i]['controls'].isactive.setValue(0);
|
||||
// address_control.controls[index].disable();
|
||||
// console.log(by);
|
||||
|
||||
// return;
|
||||
|
||||
// console.log('address_control',address_control);
|
||||
|
||||
|
||||
let business_year = control.controls[i]['controls'].business_years.value;
|
||||
|
||||
@ -827,7 +824,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
checkWithExistBusinessYear(e,i) {
|
||||
checkWithExistBusinessYear(e, i) {
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||
if (+e > this.generalExistBusinessYear) {
|
||||
this.yearErrorMessage[i] = "Higher than Business Vintage";
|
||||
@ -838,22 +835,22 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
this.yearErrorMessage[i] = '';
|
||||
}
|
||||
}
|
||||
setRequiredValidation2(value, ParInx,ChdInx, flag) {
|
||||
setRequiredValidation2(value, ParInx, ChdInx, flag) {
|
||||
if (flag == 4) {
|
||||
let ParCtrls = <FormArray>this._businessAssetsQuesFrom.controls.assets_details;
|
||||
let ChdCtrls:any = <FormArray>ParCtrls.controls[ParInx];
|
||||
let ChdCtrls: any = <FormArray>ParCtrls.controls[ParInx];
|
||||
|
||||
let Avaliablity = 1;
|
||||
value.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
if (option.id == 0 && option.group_id == 2) {
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
if(Avaliablity == 0){
|
||||
if (Avaliablity == 0) {
|
||||
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.setValidators([Validators.required]);
|
||||
this.isOtherOwner[ParInx] = true;
|
||||
}else{
|
||||
} else {
|
||||
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.setValue('');
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.clearValidators();
|
||||
@ -863,22 +860,22 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.updateValueAndValidity();
|
||||
|
||||
}
|
||||
if(flag == 8){
|
||||
if (flag == 8) {
|
||||
let ParCtrls = <FormArray>this._businessAssetsQuesFrom.controls.business_assets_for_address;
|
||||
let ChdCtrls:any = <FormArray>ParCtrls.controls[ParInx];
|
||||
let ChdCtrls: any = <FormArray>ParCtrls.controls[ParInx];
|
||||
|
||||
let Avaliablity = 1;
|
||||
value.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
if (option.id == 0 && option.group_id == 2) {
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
|
||||
if(Avaliablity == 0){
|
||||
if (Avaliablity == 0) {
|
||||
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.setValidators([Validators.required]);
|
||||
this.isOtherOwnerForAddress[ParInx] = true;
|
||||
}else{
|
||||
} else {
|
||||
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.setValue('');
|
||||
ChdCtrls.controls.business_name_of_the_other_owner.clearValidators();
|
||||
|
||||
@ -5,7 +5,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<mat-dialog-content>
|
||||
@ -15,8 +18,7 @@
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div formArrayName="itemRows" autocomplete="off">
|
||||
<mat-accordion
|
||||
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||
[formGroupName]="i">
|
||||
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||
<mat-expansion-panel-header>
|
||||
@ -29,7 +31,8 @@
|
||||
</mat-panel-description> -->
|
||||
</mat-expansion-panel-header>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,1)">
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name"
|
||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,1)">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
@ -37,32 +40,37 @@
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true" style="width:45%">
|
||||
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
|
||||
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true"
|
||||
style="width:45%">
|
||||
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name" (selectionChange)="setRequiredValidation($event.values,itemrow,2)">
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name"
|
||||
(selectionChange)="setRequiredValidation($event.values,itemrow,2)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{
|
||||
btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 1">
|
||||
<input matInput placeholder="Specify Bank Name"
|
||||
formControlName="other_bank" autocomplete="off">
|
||||
<input matInput placeholder="Specify Bank Name" formControlName="other_bank"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)" placeholder="Account Type" formControlName="account_type" >
|
||||
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)"
|
||||
placeholder="Account Type" formControlName="account_type">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{
|
||||
prop.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL'">
|
||||
<mat-select placeholder="Is this the main business account"
|
||||
formControlName="is_main" >
|
||||
<mat-select placeholder="Is this the main business account" formControlName="is_main">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
@ -71,8 +79,7 @@
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%;" *ngIf="salaryField">
|
||||
<mat-select placeholder="Salary Credited in this account"
|
||||
formControlName="salary" >
|
||||
<mat-select placeholder="Salary Credited in this account" formControlName="salary">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
@ -80,10 +87,12 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> -->
|
||||
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]">
|
||||
<!-- *ngIf="itemrow.get('account_type').value != 2"> -->
|
||||
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
|
||||
formControlName="limit" OnlyNumber type="text" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}}
|
||||
{{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
@ -91,10 +100,12 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Year(s)"
|
||||
formControlName="vintage_year" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
|
||||
<input matInput autocomplete="off" placeholder="Month(s)"
|
||||
formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -115,8 +126,8 @@
|
||||
|
||||
<!-- ngIf="i > 0" -->
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details" matTooltipPosition="above" (click)="deleteBankdetails(i)"
|
||||
*ngIf="bankingForm.controls.itemRows.controls.length > 1">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details"
|
||||
matTooltipPosition="above" (click)="deleteBankdetails(i)" *ngIf="bankingForm.controls.itemRows.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -184,43 +195,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -236,14 +295,16 @@
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="banking_form_remark" ></textarea>
|
||||
<textarea matInput placeholder="Remarks" formControlName="banking_form_remark"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button class="mr-1 mb-1 hover-icon" type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()"><mat-icon>save</mat-icon>
|
||||
<button class="mr-1 mb-1 hover-icon" type="submit" mat-raised-button mat-icon-button type="submit"
|
||||
matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
@ -21,7 +21,7 @@ import {
|
||||
} from '@angular/material';
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
|
||||
@Component({
|
||||
selector: 'app-business-banking-details',
|
||||
@ -35,22 +35,22 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
main_applicant: any;
|
||||
|
||||
pdid: number;
|
||||
pageTitle: string ="Banking Information";
|
||||
pageTitle: string = "Banking Information";
|
||||
public bankingForm: FormGroup;
|
||||
step: number;
|
||||
private notifier: NotifierService;
|
||||
public pd_cus_segment:string;
|
||||
public pd_cus_segment: string;
|
||||
public applicants: any;
|
||||
m_accountType= [];
|
||||
m_accountType = [];
|
||||
m_btLenderList = [];
|
||||
salaryField : boolean;
|
||||
OtherFlag : any = [];
|
||||
limitCaseFlag : any = [];
|
||||
amtInwords : any = [];
|
||||
emiAmtInwords : any = [];
|
||||
salaryField: boolean;
|
||||
OtherFlag: any = [];
|
||||
limitCaseFlag: any = [];
|
||||
amtInwords: any = [];
|
||||
emiAmtInwords: any = [];
|
||||
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
company_id: String;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -59,13 +59,13 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||
this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
|
||||
this.pd_cus_segment = this.pd_cus_segment.substring(0, 3);
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.applicants = this.applicants.filter(appt => appt.applicant_type != 2)
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
this.notifier = notifier;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' + this.pageTitle;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
@ -90,37 +90,37 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
ngOnInit() {
|
||||
this.step = 0;
|
||||
this.initBankingForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
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._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data => {
|
||||
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 */
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
let modifyCompanyList: any = [];
|
||||
if (this.existCompanyList.length > 0) {
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
return { id: element.company_order_id.toString(), name: element.company_name, group_id: 1 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'COMPANIES', groupValues: modifyCompanyList })
|
||||
|
||||
}
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
let modifyApplicantList: any = [];
|
||||
if (this.applicants.length > 0) {
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'APPLICANTS', groupValues: modifyApplicantList })
|
||||
}
|
||||
})
|
||||
|
||||
this.getM_AccountType();
|
||||
this.getM_BTLenderList();
|
||||
|
||||
this.salaryField = this.pd_cus_segment.substring(0,2) == 'SE' ? false : true ;
|
||||
this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true;
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '21';
|
||||
@ -136,10 +136,10 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
if (result.length == 0) {
|
||||
control.push(this.createBankarray());
|
||||
} else {
|
||||
result.forEach((datas,index) => {
|
||||
result.forEach((datas, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit);
|
||||
// this.selectedBorrower(datas.applicant_name,index);
|
||||
this.selectedAccTypeChanges(+datas.account_type,index)
|
||||
this.selectedAccTypeChanges(+datas.account_type, index)
|
||||
|
||||
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
control.push(this.createBankarray());
|
||||
@ -166,7 +166,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
)
|
||||
}
|
||||
|
||||
getM_BTLenderList(){
|
||||
getM_BTLenderList() {
|
||||
this._pd.getAllMasterDatas('BTLENDERLIST').subscribe(
|
||||
data => {
|
||||
this.m_btLenderList = data.records.filter(data => data.isactive == 1 && data.lender_type == 1);
|
||||
@ -183,12 +183,12 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
createBankarray() {
|
||||
return this.fb.group({
|
||||
applicant_name: [''],
|
||||
other_applicant : [''],
|
||||
other_applicant: [''],
|
||||
bank_name: [''],
|
||||
other_bank: [''],
|
||||
account_type: [''],
|
||||
//salary: [''],
|
||||
salary: this.pd_cus_segment.substring(0,2) == 'SE' ? [''] : [''],
|
||||
salary: this.pd_cus_segment.substring(0, 2) == 'SE' ? [''] : [''],
|
||||
limit: [''],
|
||||
//is_main: [''],
|
||||
//is_main: [this.pd_cus_segment == 'SAL' ? '' : ''],
|
||||
@ -231,14 +231,14 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
// this.dialogRef.close();
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
@ -250,7 +250,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
if (control instanceof FormControl) {
|
||||
control.markAsTouched({onlySelf: true});
|
||||
control.markAsTouched({ onlySelf: true });
|
||||
} else if (control instanceof FormGroup) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
@ -269,16 +269,16 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
if (o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
|
||||
|
||||
// check others
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
checkOthers(values) {
|
||||
if (values != null) {
|
||||
return values.id == 0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@ -286,9 +286,9 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
selectedAccTypeChanges(event: any,i){
|
||||
selectedAccTypeChanges(event: any, i) {
|
||||
|
||||
if(event == 2 || event == 1) {
|
||||
if (event == 2 || event == 1) {
|
||||
this.limitCaseFlag[i] = false;
|
||||
|
||||
// const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
@ -297,19 +297,19 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
// control.controls[0].get('limit').updateValueAndValidity();
|
||||
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.limitCaseFlag[i] = true;
|
||||
}
|
||||
|
||||
}
|
||||
/** To Convert Month into Year */
|
||||
ConvertMonthintoYear(itemrow,e){
|
||||
ConvertMonthintoYear(itemrow, e) {
|
||||
|
||||
|
||||
let year = itemrow.controls.vintage_year.value;
|
||||
|
||||
let converted_month : number = e%12;
|
||||
let converted_year : number = e/12;
|
||||
let converted_month: number = e % 12;
|
||||
let converted_year: number = e / 12;
|
||||
|
||||
itemrow.controls.vintage_year.setValue(+year + +Math.floor(converted_year));
|
||||
itemrow.controls.vintage_month.setValue(Math.floor(converted_month));
|
||||
@ -317,12 +317,12 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e,i,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
@ -330,16 +330,16 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
setRequiredValidation(value,item,flag) {
|
||||
setRequiredValidation(value, item, flag) {
|
||||
|
||||
if(flag == 1){
|
||||
value==0
|
||||
if (flag == 1) {
|
||||
value == 0
|
||||
? item.controls.other_applicant.setValidators([Validators.required])
|
||||
: item.controls.other_applicant.clearValidators();
|
||||
item.controls.other_applicant.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 2){
|
||||
value==1
|
||||
if (flag == 2) {
|
||||
value == 1
|
||||
? item.controls.other_bank.setValidators([Validators.required])
|
||||
: item.controls.other_bank.clearValidators();
|
||||
item.controls.other_bank.updateValueAndValidity();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right"
|
||||
mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
|
||||
@ -14,16 +16,19 @@
|
||||
<mat-card *ngIf="manufacturingForm">
|
||||
<h5 style="margin: 12px;padding:10px !important;">Manufacturing Product Details</h5>
|
||||
<div formArrayName="manufacturing_details">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.manufacturing_details['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<div formArrayName="main_raw_materials">
|
||||
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index" [formGroupName]="l">
|
||||
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index"
|
||||
[formGroupName]="l">
|
||||
<mat-card style="margin: 12px;">
|
||||
<h6 style="margin: 12px;padding:10px !important;">Product #{{l+1}}</h6>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Manufacturing Product Name" formControlName="manufacturing_product_name">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_manufacturingProducts[0]" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_manufacturingProducts[0]" [value]="pm.name">{{
|
||||
pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -47,7 +52,8 @@
|
||||
<input matInput placeholder="Client Contact Person Name" formControlName="manufacturing_contact_person_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation" (selectionChange)="selectedPersonDesignation(items,$event.value,1)" >
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
||||
(selectionChange)="selectedPersonDesignation(items,$event.value,1)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
@ -61,15 +67,18 @@
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="manufacturing_contact_person_mobile_number">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number"
|
||||
formControlName="manufacturing_contact_person_mobile_number">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode"
|
||||
type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number"
|
||||
formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -78,9 +87,11 @@
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select> -->
|
||||
<mat-select placeholder="Payment Terms" formControlName="manufacturing_payment_type" (selectionChange)="checkCard($event.value,1,l);">
|
||||
<mat-select placeholder="Payment Terms" formControlName="manufacturing_payment_type"
|
||||
(selectionChange)="checkCard($event.value,1,l);">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -88,7 +99,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="manufacturing_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment
|
||||
received through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -97,16 +109,21 @@
|
||||
<div fxLayout="row nowrap" style="padding-left: 2%;" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<mat-label>No of days of Credit provided to Client for payment</mat-label>
|
||||
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.main_raw_materials.controls.length > 1" (click)="removeRawMaterials(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"
|
||||
color="primary" matTooltip="Delete" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
@ -114,14 +131,15 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<div fxFlex="100" align="center">
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above" type="button"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addMoreRawMaterials($event); false"><strong>Add More Client</strong></button>
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above"
|
||||
type="button" class="mr-1 mb-1 hover-icon" (click)="addMoreRawMaterials($event); false"><strong>Add
|
||||
More Client</strong></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<mat-form-field style="width: 80%" *ngIf="mfgCreditCardFlag">
|
||||
<input matInput placeholder="What Percentage of Total Sales is done on Credit ?" formControlName="main_raw_materials_total_payments_percent_on_credit"
|
||||
type="number">
|
||||
<input matInput placeholder="What Percentage of Total Sales is done on Credit ?"
|
||||
formControlName="main_raw_materials_total_payments_percent_on_credit" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -131,16 +149,19 @@
|
||||
<mat-card *ngIf="tradingForm">
|
||||
<h5 style="margin: 12px;padding:10px !important;">Trading Product Details</h5>
|
||||
<div formArrayName="trade_details">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.trade_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.trade_details['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<div formArrayName="trading_products">
|
||||
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index" [formGroupName]="l">
|
||||
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index"
|
||||
[formGroupName]="l">
|
||||
<mat-card style="margin: 12px;">
|
||||
<h6 style="margin: 12px;padding:10px !important;">Trading Product #{{l+1}}</h6>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select placeholder="Trading Product Name" formControlName="trade_product_name">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_tradingProducts" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_tradingProducts" [value]="pm.name">{{
|
||||
pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!--<mat-form-field style="width: 100%">
|
||||
@ -163,7 +184,8 @@
|
||||
<input matInput placeholder="Client Contact Person Name" formControlName="trade_product_contact_person_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation" (selectionChange)="selectedPersonDesignation(items,$event.value,2)">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
||||
(selectionChange)="selectedPersonDesignation(items,$event.value,2)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
@ -177,15 +199,19 @@
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number" OnlyNumber type="text">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number"
|
||||
formControlName="trade_product_contact_person_mobile_number" OnlyNumber
|
||||
type="text">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode"
|
||||
type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number"
|
||||
formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -195,9 +221,11 @@
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="trade_product_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select> -->
|
||||
<mat-select placeholder="Payment Terms" formControlName="trade_product_payment_type" (selectionChange)="checkCard($event.value,2,l);">
|
||||
<mat-select placeholder="Payment Terms" formControlName="trade_product_payment_type"
|
||||
(selectionChange)="checkCard($event.value,2,l);">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -205,7 +233,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="trade_product_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment
|
||||
received through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -215,16 +244,21 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" style="padding-left: 2%;" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<mat-label>No of days of Credit provided to Client for payment</mat-label>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.trading_products.controls.length > 1" (click)="removeTradingProduct(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"
|
||||
color="primary" matTooltip="Delete" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
@ -232,14 +266,15 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<div fxFlex="100" align="center">
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above" type="button"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addMoretradeProduct($event); false"><strong>Add More Client</strong></button>
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above"
|
||||
type="button" class="mr-1 mb-1 hover-icon" (click)="addMoretradeProduct($event); false"><strong>Add
|
||||
More Client</strong></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<mat-form-field style="width: 80%" *ngIf="trdCreditCardFlag">
|
||||
<input matInput placeholder="What Percentage of Total Sales is done on Credit ?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
type="number">
|
||||
<input matInput placeholder="What Percentage of Total Sales is done on Credit ?"
|
||||
formControlName="trading_products_total_payments_percent_on_credit" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -249,16 +284,19 @@
|
||||
<mat-card *ngIf="serviceProviderForm">
|
||||
<!--<h5 style="margin: 12px;padding:10px !important;">Service Provider Product Details</h5>-->
|
||||
<div formArrayName="service_provider_details">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.service_provider_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.service_provider_details['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<div formArrayName="service_products">
|
||||
<div *ngFor="let items of item.controls.service_products['controls']; let l=index" [formGroupName]="l">
|
||||
<div *ngFor="let items of item.controls.service_products['controls']; let l=index"
|
||||
[formGroupName]="l">
|
||||
<mat-card style="margin: 12px;">
|
||||
<h6 style="margin: 12px;padding:10px !important;">Service Provided #{{l+1}}</h6>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select placeholder="Select the Service Provided" formControlName="service_provider_product_name">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_suplierProducts[0]" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_suplierProducts[0]" [value]="pm.name">{{
|
||||
pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%">
|
||||
@ -281,7 +319,8 @@
|
||||
<input matInput placeholder="Client Contact Person Name" formControlName="service_provider_product_contact_person_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation" (selectionChange)="selectedPersonDesignation(items,$event.value,3)">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
||||
(selectionChange)="selectedPersonDesignation(items,$event.value,3)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
@ -295,15 +334,18 @@
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="service_provider_product_contact_person_mobile_number">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number"
|
||||
formControlName="service_provider_product_contact_person_mobile_number">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode"
|
||||
type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number"
|
||||
formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -312,9 +354,11 @@
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="service_provider_product_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select> -->
|
||||
<mat-select placeholder="Payment Terms" formControlName="service_provider_product_payment_type" (selectionChange)="checkCard($event.value,3,l);">
|
||||
<mat-select placeholder="Payment Terms" formControlName="service_provider_product_payment_type"
|
||||
(selectionChange)="checkCard($event.value,3,l);">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -322,7 +366,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="service_provider_product_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment
|
||||
received through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -332,16 +377,21 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" style="padding-left: 2%;" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<mat-label>No of days of Credit provided to Client for payment</mat-label>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days From" formControlName="service_provider_product_credit_days_from" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days From" formControlName="service_provider_product_credit_days_from"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days To" formControlName="service_provider_product_credit_days_to" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days To" formControlName="service_provider_product_credit_days_to"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.service_products.controls.length > 1" (click)="removeServiceProduct(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"
|
||||
color="primary" matTooltip="Delete" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
@ -349,14 +399,15 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<div fxFlex="100" align="center">
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above" type="button"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addMoreServiceProduct($event); false"><strong>Add More Client</strong></button>
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above"
|
||||
type="button" class="mr-1 mb-1 hover-icon" (click)="addMoreServiceProduct($event); false"><strong>Add
|
||||
More Client</strong></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<mat-form-field style="width: 80%" *ngIf="spCreditCardFlag">
|
||||
<input matInput placeholder="What Percentage of Total Sales is done on Credit ?" formControlName="service_products_total_payments_percent_on_credit"
|
||||
type="number">
|
||||
<input matInput placeholder="What Percentage of Total Sales is done on Credit ?"
|
||||
formControlName="service_products_total_payments_percent_on_credit" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -376,7 +427,10 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||
matTooltipPosition="above" type="submit">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
|
||||
@ -45,8 +45,8 @@ export class ClientInfoComponent implements OnInit {
|
||||
|
||||
public m_paymentType = [];
|
||||
private notifier: NotifierService;
|
||||
companyRelationShipList: any=[];
|
||||
titleList: any=[];
|
||||
companyRelationShipList: any = [];
|
||||
titleList: any = [];
|
||||
|
||||
public m_manufacturingProducts = [
|
||||
{
|
||||
@ -85,7 +85,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
this.form_id = 2;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' + this.pageTitle;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
@ -114,8 +114,8 @@ export class ClientInfoComponent implements OnInit {
|
||||
noRecordsFound: Boolean = false;
|
||||
errorMessage: any = '';
|
||||
ngOnInit() {
|
||||
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,this.company_id).subscribe(data => {
|
||||
if(data.dataStatus){
|
||||
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid, this.company_id).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
// let datas = {
|
||||
// "profession_name": "Others",
|
||||
// "type_of_activity": [
|
||||
@ -138,22 +138,22 @@ export class ClientInfoComponent implements OnInit {
|
||||
// ]
|
||||
// };
|
||||
let datas = data.records;
|
||||
this.m_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 2 ){return data}}).map(data=> [...data.prodcuts]);
|
||||
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]);
|
||||
this.m_suplierProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 5 ){return data}}).map(data=> [...data.prodcuts]);
|
||||
this.m_suplierProducts = datas.type_of_activity.filter(data => { if (data.type_of_activity_id == 5) { 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){
|
||||
if (api.length > 0) {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.prodcuts){
|
||||
if (val.prodcuts) {
|
||||
this.m_tradingProducts.push(val.prodcuts);
|
||||
}
|
||||
}
|
||||
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.prodcuts){
|
||||
if (val.prodcuts) {
|
||||
this.m_tradingProducts.push(val.prodcuts);
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
}
|
||||
this.m_tradingProducts = [].concat.apply([], this.m_tradingProducts);
|
||||
this.initFormLoadDetails(datas.type_of_activity);
|
||||
}else {
|
||||
} else {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
this.noRecordsFound = false;
|
||||
this.errorMessage = data.msg;
|
||||
@ -175,8 +175,8 @@ export class ClientInfoComponent implements OnInit {
|
||||
// this.getM_FreqOfPurchase();
|
||||
this.getM_PaymentModeType();
|
||||
// this.getPdSupplierFormDetails();
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS',1);
|
||||
this.getMasterDetails('TITLES',2);
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS', 1);
|
||||
this.getMasterDetails('TITLES', 2);
|
||||
}
|
||||
|
||||
// retaildTradingForm: Boolean = false;
|
||||
@ -194,7 +194,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
this._supplierQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['2'],
|
||||
company_id:[this.company_id],
|
||||
company_id: [this.company_id],
|
||||
manufacturing_details: this._formBuilder.array([this.manufacturingFormCreation(record)]),
|
||||
trade_details: this._formBuilder.array([this.tradingFormCreation(record)]),
|
||||
service_provider_details: this._formBuilder.array([this.serviceProviderFormCreation(record)]),
|
||||
@ -207,12 +207,12 @@ export class ClientInfoComponent implements OnInit {
|
||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||
// return dataForm.main_raw_materials[key];
|
||||
// });
|
||||
if(dataForm.manufacturing_details){
|
||||
if (dataForm.manufacturing_details) {
|
||||
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
@ -224,13 +224,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
// return dataForm.trading_products[key];
|
||||
// });
|
||||
if(dataForm.trade_details){
|
||||
if (dataForm.trade_details) {
|
||||
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||
this.initTradingProductsDetails(api_trading_products);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
this.initTradingProductsDetails(null);-
|
||||
else {
|
||||
this.initTradingProductsDetails(null); -
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
|
||||
@ -245,12 +245,12 @@ export class ClientInfoComponent implements OnInit {
|
||||
// let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
||||
// this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||
// this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||
if(dataForm.service_provider_details){
|
||||
if (dataForm.service_provider_details) {
|
||||
let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
||||
this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.initServiceProviderProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
@ -265,7 +265,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
this._supplierQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['2'],
|
||||
company_id:[this.company_id],
|
||||
company_id: [this.company_id],
|
||||
manufacturing_details: this._formBuilder.array([this.manufacturingFormCreation(record)]),
|
||||
trade_details: this._formBuilder.array([this.tradingFormCreation(record)]),
|
||||
service_provider_details: this._formBuilder.array([this.serviceProviderFormCreation(record)]),
|
||||
@ -301,7 +301,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
this._supplierQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['2'],
|
||||
company_id:[this.company_id],
|
||||
company_id: [this.company_id],
|
||||
manufacturing_details: this._formBuilder.array([this.manufacturingFormCreation(record)]),
|
||||
trade_details: this._formBuilder.array([this.tradingFormCreation(record)]),
|
||||
service_provider_details: this._formBuilder.array([this.serviceProviderFormCreation(record)]),
|
||||
@ -386,8 +386,8 @@ export class ClientInfoComponent implements OnInit {
|
||||
if (datas === null) {
|
||||
control.push(this.initManufacturingProducts(null));
|
||||
} else {
|
||||
datas.forEach((val,inx) => {
|
||||
this.checkCard(val.manufacturing_payment_type,1,inx);
|
||||
datas.forEach((val, inx) => {
|
||||
this.checkCard(val.manufacturing_payment_type, 1, inx);
|
||||
control.push(this.initManufacturingProducts(val));
|
||||
});
|
||||
// for (let val of datas) {
|
||||
@ -402,34 +402,34 @@ export class ClientInfoComponent implements OnInit {
|
||||
manufacturing_product_name: [''],
|
||||
manufacturing_client_name: [''],
|
||||
manufacturing_contact_person_name: [''],
|
||||
manufacturing_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
manufacturing_contact_person_mobile_number: ['', Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
manufacturing_payment_type: [''],
|
||||
manufacturing_payment_mode:[''],
|
||||
manufacturing_payment_mode: [''],
|
||||
// manufacturing_credit_days: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
manufacturing_credit_days_from:[''],
|
||||
manufacturing_credit_days_to:['']
|
||||
person_title_name: [''],
|
||||
person_designation: [''],
|
||||
person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation: [''],
|
||||
manufacturing_credit_days_from: [''],
|
||||
manufacturing_credit_days_to: ['']
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
manufacturing_product_name: [records.manufacturing_product_name || null],
|
||||
manufacturing_client_name: [records.manufacturing_client_name || null],
|
||||
manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null],
|
||||
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null, Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
manufacturing_payment_type: [records.manufacturing_payment_type || null],
|
||||
manufacturing_payment_mode:[records.manufacturing_payment_mode || null],
|
||||
manufacturing_payment_mode: [records.manufacturing_payment_mode || null],
|
||||
manufacturing_credit_days: [records.manufacturing_credit_days || null],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
manufacturing_credit_days_from:[records.manufacturing_credit_days_from || null],
|
||||
manufacturing_credit_days_to:[records.manufacturing_credit_days_to || null]
|
||||
person_title_name: [records.person_title_name || null],
|
||||
person_designation: [records.person_designation || null],
|
||||
person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: [records.person_landline || null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation: [records.other_person_designation || null],
|
||||
manufacturing_credit_days_from: [records.manufacturing_credit_days_from || null],
|
||||
manufacturing_credit_days_to: [records.manufacturing_credit_days_to || null]
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -439,8 +439,8 @@ export class ClientInfoComponent implements OnInit {
|
||||
if (datas === null) {
|
||||
control.push(this.initTradingProducts(null));
|
||||
} else {
|
||||
datas.forEach((val,inx) => {
|
||||
this.checkCard(val.trade_product_payment_type,2,inx);
|
||||
datas.forEach((val, inx) => {
|
||||
this.checkCard(val.trade_product_payment_type, 2, inx);
|
||||
control.push(this.initTradingProducts(val));
|
||||
});
|
||||
// for (let val of datas) {
|
||||
@ -455,34 +455,34 @@ export class ClientInfoComponent implements OnInit {
|
||||
trade_product_name: [''],
|
||||
trade_client_name: [''],
|
||||
trade_product_contact_person_name: [''],
|
||||
trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
trade_product_contact_person_mobile_number: ['', Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
trade_product_payment_type: [''],
|
||||
trade_product_payment_mode:[''],
|
||||
trade_product_payment_mode: [''],
|
||||
trade_product_frequency_of_purchase: [''],
|
||||
trade_product_credit_days_from: [''],
|
||||
trade_product_credit_days_to: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
person_title_name: [''],
|
||||
person_designation: [''],
|
||||
person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation: [''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
trade_product_name: [records.trade_product_name],
|
||||
trade_client_name: [records.trade_client_name],
|
||||
trade_product_contact_person_name: [records.trade_product_contact_person_name],
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
trade_product_payment_type: [records.trade_product_payment_type],
|
||||
trade_product_payment_mode:[records.trade_product_payment_mode],
|
||||
trade_product_payment_mode: [records.trade_product_payment_mode],
|
||||
trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase],
|
||||
trade_product_credit_days_from: [records.trade_product_credit_days_from],
|
||||
trade_product_credit_days_to: [records.trade_product_credit_days_to],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
person_title_name: [records.person_title_name || null],
|
||||
person_designation: [records.person_designation || null],
|
||||
person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: [records.person_landline || null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation: [records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -492,8 +492,8 @@ export class ClientInfoComponent implements OnInit {
|
||||
if (datas === null) {
|
||||
control.push(this.initServiceProviderProducts(null));
|
||||
} else {
|
||||
datas.forEach((val,inx) => {
|
||||
this.checkCard(val.service_provider_product_payment_type,3,inx);
|
||||
datas.forEach((val, inx) => {
|
||||
this.checkCard(val.service_provider_product_payment_type, 3, inx);
|
||||
control.push(this.initServiceProviderProducts(val));
|
||||
});
|
||||
// for (let val of datas) {
|
||||
@ -508,34 +508,34 @@ export class ClientInfoComponent implements OnInit {
|
||||
service_provider_product_name: [''],
|
||||
service_provider_client_name: [''],
|
||||
service_provider_product_contact_person_name: [''],
|
||||
service_provider_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
service_provider_product_contact_person_mobile_number: ['', Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
service_provider_product_payment_type: [''],
|
||||
service_provider_product_payment_mode:[''],
|
||||
service_provider_product_payment_mode: [''],
|
||||
service_provider_product_frequency_of_purchase: [''],
|
||||
service_provider_product_credit_days_from: [''],
|
||||
service_provider_product_credit_days_to: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
person_title_name: [''],
|
||||
person_designation: [''],
|
||||
person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation: [''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
service_provider_product_name: [records.service_provider_product_name],
|
||||
service_provider_client_name: [records.service_provider_client_name],
|
||||
service_provider_product_contact_person_name: [records.service_provider_product_contact_person_name],
|
||||
service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
service_provider_product_payment_type: [records.service_provider_product_payment_type],
|
||||
service_provider_product_payment_mode: [records.service_provider_product_payment_mode],
|
||||
service_provider_product_frequency_of_purchase: [records.service_provider_product_frequency_of_purchase],
|
||||
service_provider_product_credit_days_from: [records.service_provider_product_credit_days_from],
|
||||
service_provider_product_credit_days_to: [records.service_provider_product_credit_days_to],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
person_title_name: [records.person_title_name || null],
|
||||
person_designation: [records.person_designation || null],
|
||||
person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: [records.person_landline || null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation: [records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -604,21 +604,21 @@ export class ClientInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// get all master details
|
||||
getMasterDetails(table:string,type:number){
|
||||
getMasterDetails(table: string, type: number) {
|
||||
this.pdTrigerService.getAllMasterDatas(table).subscribe(
|
||||
data => {
|
||||
if (data.dataStatus) {
|
||||
if(type==1){
|
||||
this.companyRelationShipList=data.records;// .filter(item => item.name != 'Others');
|
||||
if (type == 1) {
|
||||
this.companyRelationShipList = data.records;// .filter(item => item.name != 'Others');
|
||||
}
|
||||
if(type==2){
|
||||
this.titleList=data.records.filter(val=>val.isactive==1);
|
||||
if (type == 2) {
|
||||
this.titleList = data.records.filter(val => val.isactive == 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}, error => this.errorMessage = <any>error);
|
||||
}
|
||||
|
||||
|
||||
@ -635,14 +635,14 @@ export class ClientInfoComponent implements OnInit {
|
||||
var answerFormValues = this._supplierQuesFrom.value;
|
||||
|
||||
//To Remove The "Null" With Key also
|
||||
Object.keys(answerFormValues).forEach((key) => {if(answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === ''){ delete answerFormValues[key]}; });
|
||||
if(answerFormValues.manufacturing_details[0]==null){
|
||||
Object.keys(answerFormValues).forEach((key) => { if (answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === '') { delete answerFormValues[key] }; });
|
||||
if (answerFormValues.manufacturing_details[0] == null) {
|
||||
delete answerFormValues['manufacturing_details'];
|
||||
}
|
||||
if(answerFormValues.trade_details[0]==null){
|
||||
if (answerFormValues.trade_details[0] == null) {
|
||||
delete answerFormValues['trade_details'];
|
||||
}
|
||||
if(answerFormValues.service_provider_details[0]==null){
|
||||
if (answerFormValues.service_provider_details[0] == null) {
|
||||
delete answerFormValues['service_provider_details'];
|
||||
}
|
||||
// Add data with help of Service.
|
||||
@ -651,9 +651,9 @@ export class ClientInfoComponent implements OnInit {
|
||||
if (dataresult.status == 200) {
|
||||
|
||||
this.notifier.notify('success', 'Saved Successfully.!');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
// this.dialogRef.close();
|
||||
// alert("sample alert for Saving");
|
||||
}
|
||||
@ -676,58 +676,58 @@ export class ClientInfoComponent implements OnInit {
|
||||
// this._addQuesFrom.reset();
|
||||
}
|
||||
|
||||
selectedPersonDesignation(items,e,flag){
|
||||
if(flag == 1){
|
||||
e==1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(),items.controls['other_person_designation'].setValue('');
|
||||
selectedPersonDesignation(items, e, flag) {
|
||||
if (flag == 1) {
|
||||
e == 1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(), items.controls['other_person_designation'].setValue('');
|
||||
items.controls['other_person_designation'].updateValueAndValidity();
|
||||
}
|
||||
else if(flag == 2){
|
||||
e==1 ?items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
:items.controls['other_person_designation'].clearValidators(),items.controls['other_person_designation'].setValue('');
|
||||
else if (flag == 2) {
|
||||
e == 1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(), items.controls['other_person_designation'].setValue('');
|
||||
items.controls['other_person_designation'].updateValueAndValidity();
|
||||
}
|
||||
else if(flag == 3){
|
||||
e==1 ?items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
:items.controls['other_person_designation'].clearValidators(),items.controls['other_person_designation'].setValue('');
|
||||
else if (flag == 3) {
|
||||
e == 1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(), items.controls['other_person_designation'].setValue('');
|
||||
items.controls['other_person_designation'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
mfgCreditCardFlag : boolean = false;
|
||||
trdCreditCardFlag : boolean = false;
|
||||
spCreditCardFlag : boolean = false;
|
||||
mfgCreditCardFlag: boolean = false;
|
||||
trdCreditCardFlag: boolean = false;
|
||||
spCreditCardFlag: boolean = false;
|
||||
mfgCounter: any = [];
|
||||
trdCounter: any = [];
|
||||
spCounter: any =[];
|
||||
checkCard(e,flag,index){
|
||||
spCounter: any = [];
|
||||
checkCard(e, flag, index) {
|
||||
|
||||
if(flag == 3 && e==3){
|
||||
if (flag == 3 && e == 3) {
|
||||
this.spCounter[index] = 1;
|
||||
}
|
||||
else if(flag == 3 && e!=3){
|
||||
else if (flag == 3 && e != 3) {
|
||||
this.spCounter[index] = 0;
|
||||
}
|
||||
let SP = this.spCounter.reduce((sum, val) => sum + +val, 0);
|
||||
this.spCreditCardFlag = SP > 0 ? true : false ;
|
||||
this.spCreditCardFlag = SP > 0 ? true : false;
|
||||
|
||||
if(flag == 2 && e==3){
|
||||
if (flag == 2 && e == 3) {
|
||||
this.trdCounter[index] = 1;
|
||||
}
|
||||
else if(flag == 2 && e!=3){
|
||||
else if (flag == 2 && e != 3) {
|
||||
this.trdCounter[index] = 0;
|
||||
}
|
||||
let TRD = this.trdCounter.reduce((sum, val) => sum + +val, 0);
|
||||
this.trdCreditCardFlag = TRD > 0 ? true : false ;
|
||||
this.trdCreditCardFlag = TRD > 0 ? true : false;
|
||||
|
||||
if(flag == 1 && e==3){
|
||||
if (flag == 1 && e == 3) {
|
||||
this.mfgCounter[index] = 1;
|
||||
}
|
||||
else if(flag == 1 && e!=3){
|
||||
else if (flag == 1 && e != 3) {
|
||||
this.mfgCounter[index] = 0;
|
||||
}
|
||||
let MFG = this.mfgCounter.reduce((sum, val) => sum + +val, 0);
|
||||
this.mfgCreditCardFlag = MFG > 0 ? true : false ;
|
||||
this.mfgCreditCardFlag = MFG > 0 ? true : false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</h2>
|
||||
@ -25,7 +28,7 @@
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width:60% !important;">
|
||||
<mat-select (selectionChange)="selectedLoanChanges($event.value)" placeholder="Do you have any other existing loan"
|
||||
formControlName="existing_loan" >
|
||||
formControlName="existing_loan">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
@ -38,42 +41,55 @@
|
||||
<div *ngFor="let details of currentLoanForm.get('loan_details').controls; let i=index; let last=last"
|
||||
[formGroupName]="i">
|
||||
<mat-card-header>
|
||||
<mat-card-title><p>Loan Details {{details.get('label').value}}</p></mat-card-title>
|
||||
<mat-card-title>
|
||||
<p>Loan Details {{details.get('label').value}}</p>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<!-- {{frequencyData | json}} -->
|
||||
<!-- Loan type, Loan amount, Lender, Loan Taken By, Instalment Frequency, Instalment Amount, Original Tenure, Balance Tenure -->
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Loan Type" formControlName="loan_type" (selectionChange)="setRequiredValidation($event.value,details,1)">
|
||||
<mat-select placeholder="Loan Type" formControlName="loan_type"
|
||||
(selectionChange)="setRequiredValidation($event.value,details,1)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{types.existing_loan_type_id}}" *ngFor="let types of loanTypeData">{{types.loan_type_name}}</mat-option>
|
||||
</mat-select>
|
||||
<!-- <input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" > -->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('loan_type').value == 1 " style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Specify Loan Type" formControlName="others_loan_type">
|
||||
<input matInput autocomplete="off" placeholder="Specify Loan Type"
|
||||
formControlName="others_loan_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" OnlyNumber type="text" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('loan_amount').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Loan Amount"
|
||||
formControlName="loan_amount" OnlyNumber type="text"
|
||||
(keyup)="inWords($event,i,1)">
|
||||
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('loan_amount').value != ''">{{"₹"}}
|
||||
{{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Lender" formControlName="lender" (selectionChange)="setRequiredValidation($event.value,details,2)">
|
||||
<mat-select placeholder="Lender" formControlName="lender"
|
||||
(selectionChange)="setRequiredValidation($event.value,details,2)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let btLen of lenderData" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
<mat-option *ngFor="let btLen of lenderData" [value]="btLen.bt_lender_list_id">{{
|
||||
btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('lender').value == 1" style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Specify Lender" formControlName="others_lender" >
|
||||
<input matInput autocomplete="off" placeholder="Specify Lender"
|
||||
formControlName="others_lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<!-- <mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" (selectionChange)="selectedBorrower($event.value,i)">
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
<!-- <mat-option value= 0 >Others</mat-option> ->
|
||||
</mat-select> -->
|
||||
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value.id,details,3)">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by"
|
||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value.id,details,3)">
|
||||
<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>
|
||||
@ -82,38 +98,46 @@
|
||||
<!-- {{details.get('loan_taken_by').value}} -->
|
||||
<!-- <mat-form-field *ngIf="details.get('loan_taken_by').value == 0"> -->
|
||||
<mat-form-field style="width:45%;" *ngIf="checkOthers(details.get('loan_taken_by').value)===true">
|
||||
<input matInput autocomplete="off" placeholder="Specify Borrower" formControlName="others_loan_taken">
|
||||
<input matInput autocomplete="off" placeholder="Specify Borrower"
|
||||
formControlName="others_loan_taken">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Instalment Frequency" (selectionChange)="selectedfrequency($event.value,i);setRequiredValidation($event.value,details,4);"
|
||||
formControlName="frequency" >
|
||||
<mat-select placeholder="Instalment Frequency"
|
||||
(selectionChange)="selectedfrequency($event.value,i);setRequiredValidation($event.value,details,4);"
|
||||
formControlName="frequency">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('frequency').value == 1" style="width:45%">
|
||||
<input matInput autocomplete="off" placeholder="Specify Frequency" formControlName="other_frequency">
|
||||
<input matInput autocomplete="off" placeholder="Specify Frequency"
|
||||
formControlName="other_frequency">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('frequency').value != ''" style="width:45%">
|
||||
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" OnlyNumber type="text" (keyup)="inWords($event,i,2)">
|
||||
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' "
|
||||
formControlName="emi" OnlyNumber type="text" (keyup)="inWords($event,i,2)">
|
||||
<!-- <input matInput autocomplete="off" placeholder="details.get('loan_type').value + Instalment Amount " formControlName="emi" OnlyNumber type="text" (keyup)="inWords($event,i,2)"> -->
|
||||
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('emi').value != ''">{{"₹"}} {{emiAmtInwords[i]}} Only</mat-hint>
|
||||
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('emi').value != ''">{{"₹"}}
|
||||
{{emiAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Lender" formControlName="lender" >
|
||||
</mat-form-field> -->
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Original Tenure in Months" formControlName="original_tenure" (change)="checkTenure(details);calculateTenure(details)">
|
||||
<input matInput autocomplete="off" placeholder="Original Tenure in Months"
|
||||
formControlName="original_tenure" (change)="checkTenure(details);calculateTenure(details)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%">
|
||||
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure" (change)="calculateTenure(details)">
|
||||
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months"
|
||||
formControlName="current_balance_tenure" (change)="calculateTenure(details)">
|
||||
<mat-error>Invalid Balance Tenure.</mat-error>
|
||||
<!-- //*ngIf="current_balance_tenure.hasError('min')" class="mat-text-warn" -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure" autocomplete="off">
|
||||
<input matInput placeholder="Elapsed Tenure in Months"
|
||||
formControlName="elapsed_tenure" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -128,13 +152,17 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button *ngIf="currentLoanForm.controls.loan_details.controls.length > 1" type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)">
|
||||
<button *ngIf="currentLoanForm.controls.loan_details.controls.length > 1"
|
||||
type="button" class="mr-1 mb-1 hover-icon"
|
||||
mat-raised-button mat-icon-button matTooltip="Delete"
|
||||
matTooltipPosition="above" (click)="deleteLoanDetails(i)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addLoanDetails()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary"
|
||||
*ngIf="last">
|
||||
<strong>Add More Loan Details </strong>
|
||||
</button>
|
||||
</div>
|
||||
@ -209,43 +237,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -263,11 +339,13 @@
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="currentloan_remarks" ></textarea>
|
||||
<textarea matInput autocomplete="off" placeholder="Remarks" formControlName="currentloan_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentloan()"><mat-icon>save</mat-icon>
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit"
|
||||
matTooltipPosition="above" (click)="submitCurrentloan()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
@ -280,28 +358,28 @@
|
||||
<mat-card-content>
|
||||
<p>Existing Loan Obligations</p>
|
||||
<form [formGroup]="currentLoanForm" class="address"> -->
|
||||
<!-- <div fxLayout="row">
|
||||
<!-- <div fxLayout="row">
|
||||
<div fxFlex="60" class="pb-0 text-sm-left"> -->
|
||||
<!-- <mat-form-field style="width:60% !important;">
|
||||
<!-- <mat-form-field style="width:60% !important;">
|
||||
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Do you have any other existing loan"
|
||||
formControlName="existing_loan" >
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
<!-- </div>
|
||||
<!-- </div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<!-- <mat-card *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes'">
|
||||
<!-- <mat-card *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes'">
|
||||
<mat-card-header>
|
||||
<p>Loan Details<p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="loan_details">
|
||||
<div *ngFor="let details of currentLoanForm.get('loan_details').controls; let i=index"
|
||||
[formGroupName]="i"> -->
|
||||
<!-- {{frequencyData | json}} -->
|
||||
<!-- <mat-card-content class="matcard">
|
||||
<!-- {{frequencyData | json}} -->
|
||||
<!-- <mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" OnlyNumber type="text" >
|
||||
</mat-form-field>
|
||||
@ -334,10 +412,10 @@
|
||||
<mat-form-field *ngIf="details.get('lender').value == 3">
|
||||
<input matInput autocomplete="off" placeholder="Specify Others Loan Taken" formControlName="others_loan_taken">
|
||||
</mat-form-field> -->
|
||||
<!-- <mat-form-field>
|
||||
<!-- <mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Lender" formControlName="lender" >
|
||||
</mat-form-field> -->
|
||||
<!-- <mat-form-field>
|
||||
<!-- <mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Original Tenure in Months" formControlName="original_tenure" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -371,4 +449,3 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card> -->
|
||||
|
||||
|
||||
@ -35,8 +35,8 @@ export class CurrentLoanComponent implements OnInit {
|
||||
main_applicant: any;
|
||||
public currentLoanForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
pageTitle: string ="Existing Loan Obligations";
|
||||
pdid : number;
|
||||
pageTitle: string = "Existing Loan Obligations";
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
applicant_details: any;
|
||||
// @Input() pdid: number;
|
||||
@ -49,15 +49,15 @@ export class CurrentLoanComponent implements OnInit {
|
||||
propertyTypeData: any = [];
|
||||
addressTypeData: any = [];
|
||||
applicants: any;
|
||||
placeholderName : any = [];
|
||||
IDXval : any;
|
||||
OtherFlag : any = [];
|
||||
amtInwords : any = [];
|
||||
labelArr : any = [];
|
||||
emiAmtInwords : any = [];
|
||||
dataFromAssets : any = [];
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
placeholderName: any = [];
|
||||
IDXval: any;
|
||||
OtherFlag: any = [];
|
||||
amtInwords: any = [];
|
||||
labelArr: any = [];
|
||||
emiAmtInwords: any = [];
|
||||
dataFromAssets: any = [];
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -68,7 +68,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
this.form_id = 8;
|
||||
this.notifier = notifier;
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
//this.OtherFlag[0] = false;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
@ -93,37 +93,37 @@ export class CurrentLoanComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
ngOnInit() {
|
||||
console.clear();
|
||||
this.getMasterDetails('BTLENDERLIST',1);
|
||||
this.getMasterDetails('FREQUENCY',2);
|
||||
this.getMasterDetails('EXISTINGLOANTYPES',3);
|
||||
this.getMasterDetails('INVESTMENTTYPE',4);
|
||||
this.getMasterDetails('PROPERTIES',5);
|
||||
this.getMasterDetails('ADDRESSTYPE',6);
|
||||
this.getMasterDetails('BTLENDERLIST', 1);
|
||||
this.getMasterDetails('FREQUENCY', 2);
|
||||
this.getMasterDetails('EXISTINGLOANTYPES', 3);
|
||||
this.getMasterDetails('INVESTMENTTYPE', 4);
|
||||
this.getMasterDetails('PROPERTIES', 5);
|
||||
this.getMasterDetails('ADDRESSTYPE', 6);
|
||||
|
||||
this.initCurrentloanForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active===true);
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.existCompanyList = data.records.filter(val => val.is_active === true);
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
let modifyCompanyList: any = [];
|
||||
if (this.existCompanyList.length > 0) {
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
return { id: element.company_order_id.toString(), name: element.company_name, group_id: 1 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'COMPANIES', groupValues: modifyCompanyList })
|
||||
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
let modifyApplicantList: any = [];
|
||||
if (this.applicants.length > 0) {
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'APPLICANTS', groupValues: modifyApplicantList })
|
||||
|
||||
}
|
||||
})
|
||||
@ -150,27 +150,27 @@ export class CurrentLoanComponent implements OnInit {
|
||||
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
if (result.length > 0) {
|
||||
result.forEach((val,index) => {
|
||||
result.forEach((val, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(val.loan_amount);
|
||||
this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
this.selectedfrequency(val.frequency,index);
|
||||
this.selectedfrequency(val.frequency, index);
|
||||
//this.selectedLoanTakenBy(val.loan_taken_by,index);
|
||||
|
||||
let objs = {
|
||||
'label': val.label,
|
||||
'loan_amount': val.loan_amount,
|
||||
'frequency':val.frequency,
|
||||
'other_frequency':val.other_frequency,
|
||||
'frequency': val.frequency,
|
||||
'other_frequency': val.other_frequency,
|
||||
'emi': val.emi,
|
||||
'loan_type': val.loan_type,
|
||||
'others_loan_type': val.others_loan_type,
|
||||
'loan_taken_by':val.loan_taken_by,
|
||||
'others_loan_taken':val.others_loan_taken,
|
||||
'loan_taken_by': val.loan_taken_by,
|
||||
'others_loan_taken': val.others_loan_taken,
|
||||
'lender': val.lender,
|
||||
'others_lender':val.others_lender,
|
||||
'others_lender': val.others_lender,
|
||||
'original_tenure': val.original_tenure,
|
||||
'current_balance_tenure': val.current_balance_tenure,
|
||||
'elapsed_tenure':val.elapsed_tenure
|
||||
'elapsed_tenure': val.elapsed_tenure
|
||||
}
|
||||
control.push(this.createLoanDetail(objs));
|
||||
|
||||
@ -183,42 +183,45 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
} else {
|
||||
|
||||
this._pd.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
||||
// console.log('data',data);
|
||||
this._pd.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data => {
|
||||
|
||||
if(data.dataStatus == true){
|
||||
// console.log('data',data.record);
|
||||
// return;
|
||||
|
||||
if (data.dataStatus == true) {
|
||||
|
||||
let AssetData = data.record;
|
||||
|
||||
if(AssetData.business_address_asset.length>0){
|
||||
if (AssetData.business_address_asset.length > 0) {
|
||||
AssetData.business_address_asset.map(element => {
|
||||
this.dataFromAssets.push({mode:0,
|
||||
mode_name:element.address_label,
|
||||
details:[],
|
||||
owner_name:element.business_name_of_the_owner,
|
||||
form_type:'Data From Bussiness Address'})
|
||||
this.dataFromAssets.push({
|
||||
mode: 0,
|
||||
mode_name: element.address_label,
|
||||
details: [],
|
||||
owner_name: element.business_name_of_the_owner,
|
||||
form_type: 'Data From Bussiness Address'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if(AssetData.business_assets.length>0){
|
||||
if (AssetData.business_assets.length > 0) {
|
||||
AssetData.business_assets.map(element => {
|
||||
this.dataFromAssets.push({mode:element.business_assets_mode,
|
||||
mode_name:element.business_assets_mode_name,
|
||||
details:element.business_details,
|
||||
owner_name:element.business_name_of_the_owner,
|
||||
form_type:'Data From Business Assets'})
|
||||
this.dataFromAssets.push({
|
||||
mode: element.business_assets_mode,
|
||||
mode_name: element.business_assets_mode_name,
|
||||
details: element.business_details,
|
||||
owner_name: element.business_name_of_the_owner,
|
||||
form_type: 'Data From Business Assets'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if(AssetData.other_assests.length > 0){
|
||||
if (AssetData.other_assests.length > 0) {
|
||||
AssetData.other_assests.map(element => {
|
||||
this.dataFromAssets.push({mode:element.assets_mode,
|
||||
mode_name:element.assets_mode_name,
|
||||
details:element.details,
|
||||
owner_name:element.name_of_the_owner,
|
||||
form_type:'Data From Other Asset'
|
||||
this.dataFromAssets.push({
|
||||
mode: element.assets_mode,
|
||||
mode_name: element.assets_mode_name,
|
||||
details: element.details,
|
||||
owner_name: element.name_of_the_owner,
|
||||
form_type: 'Data From Other Asset'
|
||||
})
|
||||
});
|
||||
}
|
||||
@ -230,143 +233,143 @@ export class CurrentLoanComponent implements OnInit {
|
||||
// id: "3", name: "Vehicle", isactsive: "1", flag: "1", is_others: "0"
|
||||
// id: "1", name: "Others", isactive: "1", flag: "1", is_others: "1"}
|
||||
|
||||
if(this.dataFromAssets.length > 0){
|
||||
let labelarray : any = [];
|
||||
if (this.dataFromAssets.length > 0) {
|
||||
let labelarray: any = [];
|
||||
|
||||
this.dataFromAssets.forEach((val,index) => {
|
||||
if(val.mode == 0){
|
||||
this.dataFromAssets.forEach((val, index) => {
|
||||
if (val.mode == 0) {
|
||||
let owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
// labelarray[index] = ' : '+owner +' - '+ val.mode_name.split("/")[0] + ' ( ' + val.mode_name.split("/")[1] + ' )';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name;
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name;
|
||||
}
|
||||
|
||||
if(val.mode == 1){
|
||||
if (val.mode == 1) {
|
||||
let data;
|
||||
let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
let owner: any = "Owner Not Mentioned";
|
||||
val.details.forEach((v, index) => {
|
||||
data = v.any_other_assets;
|
||||
});
|
||||
if(val.owner_name.length>0){
|
||||
if (val.owner_name.length > 0) {
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
let description = data != '' ? ' ( ' + data + ' )' : '';
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 2){
|
||||
if (val.mode == 2) {
|
||||
|
||||
let data;
|
||||
let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
let owner: any = "Owner Not Mentioned";
|
||||
val.details.forEach((v, index) => {
|
||||
data = v.property_type;
|
||||
if(v.property_type != 1){
|
||||
if(val.form_type == 'Data From Business Assets'){
|
||||
if (v.property_type != 1) {
|
||||
if (val.form_type == 'Data From Business Assets') {
|
||||
data = this.addressTypeData.filter(item => item.address_type_id == v.property_type)[0].address_type;
|
||||
}
|
||||
else if(val.form_type == 'Data From Other Asset'){
|
||||
else if (val.form_type == 'Data From Other Asset') {
|
||||
data = this.propertyTypeData.filter(item => item.id == v.property_type)[0].name;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
data = '';
|
||||
}
|
||||
}else{
|
||||
data=v.other_property_type;
|
||||
} else {
|
||||
data = v.other_property_type;
|
||||
}
|
||||
if(val.owner_name.length>0){
|
||||
if (val.owner_name.length > 0) {
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
|
||||
});
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
let description = data != '' ? ' ( ' + data + ' )' : '';
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 3){
|
||||
let data;let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
if (val.mode == 3) {
|
||||
let data; let owner: any = "Owner Not Mentioned";
|
||||
val.details.forEach((v, index) => {
|
||||
data = v.manufacturer_model_vehicle;
|
||||
});
|
||||
if(val.owner_name.length>0){
|
||||
if (val.owner_name.length > 0) {
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
let description = data != '' ? ' ( ' + data + ' )' : '';
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 4){
|
||||
let data;let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
if (val.mode == 4) {
|
||||
let data; let owner: any = "Owner Not Mentioned";
|
||||
val.details.forEach((v, index) => {
|
||||
data = v.equipment_manufacturing_description;
|
||||
});
|
||||
if(val.owner_name.length>0){
|
||||
if (val.owner_name.length > 0) {
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
let description = data != '' ? ' ( ' + data + ' )' : '';
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 6){
|
||||
let owner : any = "Owner Not Mentioned";
|
||||
if(val.owner_name.length>0){
|
||||
if (val.mode == 6) {
|
||||
let owner: any = "Owner Not Mentioned";
|
||||
if (val.owner_name.length > 0) {
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
|
||||
labelarray[index] = ' : '+owner+' - '+ val.mode_name;
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name;
|
||||
}
|
||||
if(val.mode == 7){
|
||||
let data;let owner : any = "Owner Not Mentioned";
|
||||
val.details.forEach((v,index) => {
|
||||
if (val.mode == 7) {
|
||||
let data; let owner: any = "Owner Not Mentioned";
|
||||
val.details.forEach((v, index) => {
|
||||
data = v.investments_type != 1
|
||||
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
|
||||
: v.other_investments_type ;
|
||||
: v.other_investments_type;
|
||||
|
||||
});
|
||||
if(val.owner_name.length>0){
|
||||
if (val.owner_name.length > 0) {
|
||||
owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
}
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||
let description = data != '' ? '( ' + data + ' )' : '';
|
||||
labelarray[index] = ' : ' + owner + ' - ' + val.mode_name + description;
|
||||
}
|
||||
});
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
this.labelArr = labelarray;
|
||||
let arr : any = [];
|
||||
if(this.labelArr.length > 0){
|
||||
let arr: any = [];
|
||||
if (this.labelArr.length > 0) {
|
||||
this.currentLoanForm.controls['existing_loan'].setValue('Yes');
|
||||
this.labelArr.forEach((v,index) => {
|
||||
this.labelArr.forEach((v, index) => {
|
||||
arr = {
|
||||
'label': v,
|
||||
'loan_amount': '',
|
||||
'frequency':'',
|
||||
'other_frequency':'',
|
||||
'frequency': '',
|
||||
'other_frequency': '',
|
||||
'emi': '',
|
||||
'loan_type': '',
|
||||
'others_loan_type': '',
|
||||
'loan_taken_by':'',
|
||||
'others_loan_taken':'',
|
||||
'loan_taken_by': '',
|
||||
'others_loan_taken': '',
|
||||
'lender': '',
|
||||
'others_lender':'',
|
||||
'others_lender': '',
|
||||
'original_tenure': '',
|
||||
'current_balance_tenure': '',
|
||||
'elapsed_tenure':''
|
||||
'elapsed_tenure': ''
|
||||
}
|
||||
control.push(this.createLoanDetail(arr));
|
||||
});
|
||||
// this.currentLoanForm.controls['existing_loan'].setValue(arr);
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
|
||||
control.push(this.createLoanDetail(null));
|
||||
}
|
||||
@ -376,7 +379,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
checkTenure(details){
|
||||
checkTenure(details) {
|
||||
let originalTenure = details.value.original_tenure;
|
||||
// alert(originalTenure);
|
||||
details.controls.current_balance_tenure.setValidators([Validators.required, Validators.max(+originalTenure)]);
|
||||
@ -433,9 +436,9 @@ export class CurrentLoanComponent implements OnInit {
|
||||
// }
|
||||
// }
|
||||
|
||||
selectedfrequency(e,i){
|
||||
selectedfrequency(e, i) {
|
||||
|
||||
switch(+e){
|
||||
switch (+e) {
|
||||
case 1: this.placeholderName[i] = 'Instalment Amount'; break;
|
||||
case 2: this.placeholderName[i] = 'Annual Instalment Amount'; break;
|
||||
case 3: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
|
||||
@ -451,33 +454,33 @@ export class CurrentLoanComponent implements OnInit {
|
||||
return this.fb.group({
|
||||
label: data == null ? [''] : [data.label],
|
||||
loan_amount: null ? [''] : [data.loan_amount],
|
||||
frequency:null ? [''] : [data.frequency],
|
||||
other_frequency:null ? [''] : [data.other_frequency],
|
||||
frequency: null ? [''] : [data.frequency],
|
||||
other_frequency: null ? [''] : [data.other_frequency],
|
||||
emi: null ? [''] : [data.emi],
|
||||
loan_type: null ? [''] : [data.loan_type],
|
||||
others_loan_type: null ? [''] : [data.others_loan_type],
|
||||
loan_taken_by:null ? [''] : [data.loan_taken_by],
|
||||
others_loan_taken:null ? [''] : [data.others_loan_taken],
|
||||
loan_taken_by: null ? [''] : [data.loan_taken_by],
|
||||
others_loan_taken: null ? [''] : [data.others_loan_taken],
|
||||
lender: null ? [''] : [data.lender],
|
||||
others_lender:null ? [''] : [data.others_lender],
|
||||
others_lender: null ? [''] : [data.others_lender],
|
||||
original_tenure: null ? [''] : [data.original_tenure],
|
||||
current_balance_tenure: null ? [''] : [data.current_balance_tenure],
|
||||
elapsed_tenure:null ? [''] : [data.elapsed_tenure]
|
||||
elapsed_tenure: null ? [''] : [data.elapsed_tenure]
|
||||
});
|
||||
}
|
||||
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
if (o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
|
||||
|
||||
// check others
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
checkOthers(values) {
|
||||
if (values != null) {
|
||||
return values.id == 0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@ -494,12 +497,11 @@ export class CurrentLoanComponent implements OnInit {
|
||||
control.removeAt(index);
|
||||
}
|
||||
|
||||
calculateTenure(details)
|
||||
{
|
||||
calculateTenure(details) {
|
||||
let ElapsedValues;
|
||||
|
||||
if(details.value.original_tenure != null && details.value.original_tenure != '' && details.value.current_balance_tenure != null && details.value.current_balance_tenure != ''){
|
||||
ElapsedValues = details.value.original_tenure - details.value.current_balance_tenure ;
|
||||
if (details.value.original_tenure != null && details.value.original_tenure != '' && details.value.current_balance_tenure != null && details.value.current_balance_tenure != '') {
|
||||
ElapsedValues = details.value.original_tenure - details.value.current_balance_tenure;
|
||||
details.controls['elapsed_tenure'].setValue(ElapsedValues);
|
||||
}
|
||||
|
||||
@ -520,11 +522,11 @@ export class CurrentLoanComponent implements OnInit {
|
||||
records.loan_details = this.currentLoanForm.controls['loan_details'].value;
|
||||
}
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -543,65 +545,65 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
getMasterDetails(table:string,type:number){
|
||||
getMasterDetails(table: string, type: number) {
|
||||
this._pd.getAllMasterDatas(table).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if(type==1 && val.isactive == 1) {
|
||||
if (type == 1 && val.isactive == 1) {
|
||||
this.lenderData.push(val);
|
||||
}
|
||||
else if(type==2 && val.isactive == 1){
|
||||
else if (type == 2 && val.isactive == 1) {
|
||||
this.frequencyData.push(val);
|
||||
}
|
||||
else if(type==3 && val.isactive == 1){
|
||||
else if (type == 3 && val.isactive == 1) {
|
||||
this.loanTypeData.push(val);
|
||||
}
|
||||
else if(type==4 && val.isactive == 1){
|
||||
else if (type == 4 && val.isactive == 1) {
|
||||
this.investmentTypeData.push(val);
|
||||
}
|
||||
else if(type==5 && val.isactive == 1){
|
||||
else if (type == 5 && val.isactive == 1) {
|
||||
this.propertyTypeData.push(val);
|
||||
}
|
||||
else if(type==6 && val.isactive == 1){
|
||||
else if (type == 6 && val.isactive == 1) {
|
||||
this.addressTypeData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
/** Amount InWords */
|
||||
inWords(e,i,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
inWords(e, i, flag) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
setRequiredValidation(value,item,flag) {
|
||||
setRequiredValidation(value, item, flag) {
|
||||
|
||||
if(flag == 1){
|
||||
value==1
|
||||
if (flag == 1) {
|
||||
value == 1
|
||||
? item.controls.others_loan_type.setValidators([Validators.required])
|
||||
: item.controls.others_loan_type.clearValidators();
|
||||
item.controls.others_loan_type.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 2){
|
||||
if (flag == 2) {
|
||||
// value==1
|
||||
// ? item.controls.others_lender.setValidators([Validators.required])
|
||||
// : item.controls.others_lender.clearValidators();
|
||||
// item.controls.others_lender.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 3){
|
||||
value==0
|
||||
if (flag == 3) {
|
||||
value == 0
|
||||
? item.controls.others_loan_taken.setValidators([Validators.required])
|
||||
: item.controls.others_loan_taken.clearValidators();
|
||||
item.controls.others_loan_taken.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 4){
|
||||
value==1
|
||||
if (flag == 4) {
|
||||
value == 1
|
||||
? item.controls.other_frequency.setValidators([Validators.required])
|
||||
: item.controls.other_frequency.clearValidators();
|
||||
item.controls.other_frequency.updateValueAndValidity();
|
||||
|
||||
@ -5,7 +5,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
@ -21,7 +24,8 @@
|
||||
<!-- <input matInput> -->
|
||||
<mat-select placeholder="Name of Employer" formControlName="employer_name" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let cl of company_list" [value]="cl.company_order_id+'-'+cl.company_name">{{ cl.company_name }}</mat-option>
|
||||
<mat-option *ngFor="let cl of company_list" [value]="cl.company_order_id+'-'+cl.company_name">{{
|
||||
cl.company_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div>
|
||||
@ -29,16 +33,17 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Year" formControlName="how_long_year" required min='0'>
|
||||
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Year"
|
||||
formControlName="how_long_year" required min='0'>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month" formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
|
||||
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month"
|
||||
formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
<mat-select placeholder="Was the employer met?"
|
||||
formControlName="was_met" required>
|
||||
<mat-select placeholder="Was the employer met?" formControlName="was_met" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -47,7 +52,8 @@
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||
<mat-form-field fxFlex="50">
|
||||
<!-- <input matInput placeholder="Name of Person Met" formControlName="name_person_met" required> -->
|
||||
<mat-select placeholder="Name of Person Met" formControlName="name_person_met" required (selectionChange)="filtercompanyrelationship(employmentForm.controls['employer_name'].value,$event.value)">
|
||||
<mat-select placeholder="Name of Person Met" formControlName="name_person_met"
|
||||
required (selectionChange)="filtercompanyrelationship(employmentForm.controls['employer_name'].value,$event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let person of person_met_list" [value]="person.pd_co_applicant_id">
|
||||
{{person.applicant_name | titlecase}}
|
||||
@ -55,7 +61,8 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex="50">
|
||||
<input matInput placeholder="Designation of Person Met" formControlName="designation_person_met" required>
|
||||
<input matInput placeholder="Designation of Person Met" formControlName="designation_person_met"
|
||||
required>
|
||||
<!-- <mat-select placeholder="Designation of Person Met" formControlName="designation_person_met" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
@ -66,8 +73,8 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
<mat-select placeholder="Salary amount confirmed ?"
|
||||
formControlName="confirm_salary" required>
|
||||
<mat-select placeholder="Salary amount confirmed ?" formControlName="confirm_salary"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -75,33 +82,35 @@
|
||||
</mat-form-field>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
||||
<mat-form-field fxFlex="50">
|
||||
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount" (keypress)="keyPress($event)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['confirm_salary_amount'].value != ''">{{"₹"}} {{employmentForm.controls['confirm_salary_amount'].value | numberToWords}} Only</mat-hint>
|
||||
<input matInput placeholder="What is the salary amount confirmed?"
|
||||
formControlName="confirm_salary_amount" (keypress)="keyPress($event)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['confirm_salary_amount'].value != ''">{{"₹"}}
|
||||
{{employmentForm.controls['confirm_salary_amount'].value | numberToWords}}
|
||||
Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="25">
|
||||
<input matInput placeholder="Total Work Experience"
|
||||
formControlName="total_business_experience" OnlyNumber autocomplete="off">
|
||||
<input matInput placeholder="Total Work Experience" formControlName="total_business_experience"
|
||||
OnlyNumber autocomplete="off">
|
||||
<mat-error *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">Higher</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- *ngIf="employmentForm.controls['how_long_year'].value > employmentForm.controls['total_business_experience'].value" -->
|
||||
<mat-form-field fxFlex="25" *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">
|
||||
<input matInput placeholder="Previous Work Experience Details"
|
||||
formControlName="total_business_previous_experience">
|
||||
<input matInput placeholder="Previous Work Experience Details" formControlName="total_business_previous_experience">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
<mat-select placeholder="Attendance register seen ?"
|
||||
formControlName="attendance_seen" required>
|
||||
<mat-select placeholder="Attendance register seen ?" formControlName="attendance_seen"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
<mat-select placeholder="Salary register seen ?"
|
||||
formControlName="sal_reg_seen" required>
|
||||
<mat-select placeholder="Salary register seen ?" formControlName="sal_reg_seen"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -115,37 +124,38 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv" OnlyNumber type="number" min='1' max='31'>
|
||||
<input matInput placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv"
|
||||
OnlyNumber type="number" min='1' max='31'>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv" OnlyNumber type="number" min='1' max='31'>
|
||||
<input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv"
|
||||
OnlyNumber type="number" min='1' max='31'>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" (keypress)="keyPress($event)" required>
|
||||
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary"
|
||||
(keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:33%">
|
||||
<input matInput placeholder="Net Monthly Salary"
|
||||
formControlName="net_monthly_salary" (keypress)="keyPress($event)" required>
|
||||
<input matInput placeholder="Net Monthly Salary" formControlName="net_monthly_salary"
|
||||
(keypress)="keyPress($event)" required>
|
||||
<!-- <input matInput placeholder="Net Take Home"
|
||||
formControlName="net_take_home"> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="Bonus or Incentive"
|
||||
formControlName="bonus_incentive" (keypress)="keyPress($event)" required>
|
||||
<input matInput placeholder="Bonus or Incentive" formControlName="bonus_incentive"
|
||||
(keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%">
|
||||
<mat-select placeholder="Amount paid in Cash ?"
|
||||
formControlName="amount_paid_in_cash">
|
||||
<mat-select placeholder="Amount paid in Cash ?" formControlName="amount_paid_in_cash">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="validated">Validated</mat-option>
|
||||
<mat-option value="not validated">Not Validated</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'validated'">
|
||||
<input matInput placeholder="How was it Validated"
|
||||
formControlName="how_was_it_validated">
|
||||
<input matInput placeholder="How was it Validated" formControlName="how_was_it_validated">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'not validated'">
|
||||
<input matInput placeholder="Why was it not Validated"
|
||||
@ -158,16 +168,17 @@
|
||||
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
|
||||
<mat-select placeholder="Bonus Frequency" formControlName="bonus_frequency">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let fd of frequency_data" [value]="fd.frequency_id">{{ fd.name }}</mat-option>
|
||||
<mat-option *ngFor="let fd of frequency_data" [value]="fd.frequency_id">{{
|
||||
fd.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
|
||||
<mat-select placeholder="Type of Bonus"
|
||||
formControlName="bonus_type">
|
||||
<mat-select placeholder="Type of Bonus" formControlName="bonus_type">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="fixed">Fixed</mat-option>
|
||||
<mat-option value="variable depending on performance">Variable depending on performance</mat-option>
|
||||
<mat-option value="variable depending on performance">Variable
|
||||
depending on performance</mat-option>
|
||||
<mat-option value="others">Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -175,8 +186,7 @@
|
||||
<input matInput placeholder="Bonus Type Others" formControlName="bonus_type_other">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<mat-select placeholder="Any Delays"
|
||||
formControlName="any_delays">
|
||||
<mat-select placeholder="Any Delays" formControlName="any_delays">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -244,43 +254,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -301,7 +359,9 @@
|
||||
<div fxFlex="40" align="end">
|
||||
|
||||
<!-- <button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon></button> -->
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit"
|
||||
matTooltipPosition="above" (click)="submitDetails()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
@ -21,7 +21,7 @@ import {
|
||||
} from '@angular/material';
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-employment-info',
|
||||
@ -34,20 +34,20 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
lender_applicant_id: any;
|
||||
main_applicant: any;
|
||||
|
||||
pageTitle: string ="Employement Information";
|
||||
pageTitle: string = "Employement Information";
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
//pd_all_details:any;
|
||||
|
||||
public employmentForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
public pd_cus_segment:string;
|
||||
public frequency_data:any[];
|
||||
public company_list:any[];
|
||||
public person_met_list:any[];
|
||||
public company_related_applicants_list:any[];
|
||||
public company_relationship_list:any[];
|
||||
public filtered_company_relationship_list:any[];
|
||||
public pd_cus_segment: string;
|
||||
public frequency_data: any[];
|
||||
public company_list: any[];
|
||||
public person_met_list: any[];
|
||||
public company_related_applicants_list: any[];
|
||||
public company_relationship_list: any[];
|
||||
public filtered_company_relationship_list: any[];
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -81,24 +81,24 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
ngOnInit() {
|
||||
console.log('clear');
|
||||
|
||||
console.clear();
|
||||
this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||
this.initemploymentForm();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
console.log('abcd');
|
||||
|
||||
let param: any = {};
|
||||
param.pd_id = this.pdid;
|
||||
param.pd_form_id = '18';
|
||||
this._pd.retriveForm(param).subscribe(data => {
|
||||
if(data.dataStatus) {
|
||||
console.log(data.records);
|
||||
this.company_list = data.records.companies.filter(com=>com.is_active == true );
|
||||
this.person_met_list = data.records.individuals.filter(app=>app.is_person_met == true && app.is_active == true);
|
||||
if (data.dataStatus) {
|
||||
|
||||
this.company_list = data.records.companies.filter(com => com.is_active == true);
|
||||
this.person_met_list = data.records.individuals.filter(app => app.is_person_met == true && app.is_active == true);
|
||||
this.company_related_applicants_list = data.records.company_with_relationships;
|
||||
}
|
||||
});
|
||||
@ -146,7 +146,7 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.frequency_data = data.records;
|
||||
this.frequency_data = this.frequency_data.filter(freq=>freq.isactive == 1 );
|
||||
this.frequency_data = this.frequency_data.filter(freq => freq.isactive == 1);
|
||||
}
|
||||
});
|
||||
|
||||
@ -155,7 +155,7 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
if (data.status == 200) {
|
||||
this.company_relationship_list = data.records.filter(item => item.isactive == 1);
|
||||
this.company_relationship_list = data.records.filter(item => item.name != 'Others');
|
||||
this.company_relationship_list.push({'company_relationship_id':0,'name':'Not Applicable'});
|
||||
this.company_relationship_list.push({ 'company_relationship_id': 0, 'name': 'Not Applicable' });
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -165,17 +165,17 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
employer_name: ['', Validators.compose([Validators.required])],
|
||||
how_long_year: ['', Validators.compose([Validators.required])],
|
||||
how_long_month: [''],
|
||||
was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
name_person_met: [''],
|
||||
designation_person_met: [''],
|
||||
confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
confirm_salary_amount: [''],
|
||||
total_business_experience:[''],
|
||||
total_business_previous_experience:[''],
|
||||
attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
from_date_the_salary_is_rcv:[''],
|
||||
to_date_the_salary_is_rcv:[''],
|
||||
total_business_experience: [''],
|
||||
total_business_previous_experience: [''],
|
||||
attendance_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
sal_reg_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
from_date_the_salary_is_rcv: [''],
|
||||
to_date_the_salary_is_rcv: [''],
|
||||
gross_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||
net_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||
bonus_incentive: ['', Validators.compose([Validators.required])],
|
||||
@ -192,24 +192,24 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
filtercompanyrelationship(companyid,applicantid){
|
||||
filtercompanyrelationship(companyid, applicantid) {
|
||||
var array = companyid.split("-");
|
||||
let data = this.company_related_applicants_list.filter(cmpy=>cmpy.relation_to_company == array[0] && cmpy.applicant_name == applicantid);
|
||||
if(data.length>0){
|
||||
this.filtered_company_relationship_list = this.company_relationship_list.filter(freq=>freq.company_relationship_id == data[0].company_relationship );
|
||||
this.employmentForm.controls['designation_person_met'].setValue(this.filtered_company_relationship_list[0]['name'] +' '+array[1]);
|
||||
let data = this.company_related_applicants_list.filter(cmpy => cmpy.relation_to_company == array[0] && cmpy.applicant_name == applicantid);
|
||||
if (data.length > 0) {
|
||||
this.filtered_company_relationship_list = this.company_relationship_list.filter(freq => freq.company_relationship_id == data[0].company_relationship);
|
||||
this.employmentForm.controls['designation_person_met'].setValue(this.filtered_company_relationship_list[0]['name'] + ' ' + array[1]);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.employmentForm.controls['designation_person_met'].setValue('');
|
||||
}
|
||||
}
|
||||
|
||||
ConvertMonthintoYear(e){
|
||||
ConvertMonthintoYear(e) {
|
||||
|
||||
let how_long_year = this.employmentForm.controls.how_long_year.value;
|
||||
|
||||
let converted_month : number = e%12;
|
||||
let converted_year : number = e/12;
|
||||
let converted_month: number = e % 12;
|
||||
let converted_year: number = e / 12;
|
||||
|
||||
this.employmentForm.controls.how_long_year.setValue(+how_long_year + +Math.floor(converted_year));
|
||||
this.employmentForm.controls.how_long_month.setValue(Math.floor(converted_month));
|
||||
@ -259,14 +259,14 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
|
||||
// this.notifier.notify('success', 'Saved Successfully.');
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
// this.dialogRef.close();
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right"
|
||||
mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<form *ngIf="noRecordsFound" class="address" [formGroup]="familyForm">
|
||||
@ -16,12 +18,14 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<div formArrayName="family_details">
|
||||
<mat-card *ngFor="let sup of familyForm.controls.family_details['controls']; let ix=index" [formGroupName]="ix">
|
||||
<mat-card *ngFor="let sup of familyForm.controls.family_details['controls']; let ix=index"
|
||||
[formGroupName]="ix">
|
||||
<mat-card-content>
|
||||
|
||||
<div>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Select a person" formControlName="selected_person" (selectionChange)="selectedPerson($event.value,ix)" required>
|
||||
<mat-select placeholder="Select a person" formControlName="selected_person"
|
||||
(selectionChange)="selectedPerson($event.value,ix)" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{person.pd_co_applicant_id}}" *ngFor="let person of selectPerson">
|
||||
{{person.applicant_name}}
|
||||
@ -33,7 +37,8 @@
|
||||
<div>
|
||||
<h5>Residence Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value,ix)" >
|
||||
<mat-select matInput placeholder="State" formControlName="residence_state"
|
||||
required (selectionChange)="getCity($event.value,ix)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{s.state_id}}" *ngFor="let s of stateData">
|
||||
{{s.name}}
|
||||
@ -41,18 +46,21 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select matInput placeholder="City" formControlName="residence_city" required>
|
||||
<mat-select matInput placeholder="City" formControlName="residence_city"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let c of cityData[ix]" [value]="c.city_id" >
|
||||
<mat-option *ngFor="let c of cityData[ix]" [value]="c.city_id">
|
||||
{{c.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Place" formControlName="residence_place" required>
|
||||
<input matInput placeholder="Place" formControlName="residence_place"
|
||||
required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select matInput placeholder="Pin" formControlName="residence_pin" required>
|
||||
<mat-select matInput placeholder="Pin" formControlName="residence_pin"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let p of pincodeData[ix]" [value]="p.pincode_id">
|
||||
{{p.pincode}}
|
||||
@ -74,11 +82,13 @@
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" OnlyNumber type="text" required>
|
||||
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years"
|
||||
OnlyNumber type="text" required>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Ownership" formControlName="residence_ownership" required>
|
||||
<mat-select placeholder="Ownership" formControlName="residence_ownership"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{ownerShip.id}}" *ngFor="let ownerShip of ownerShipData">
|
||||
{{ownerShip.name}}
|
||||
@ -91,8 +101,10 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3" style="width:43%;">
|
||||
<input matInput placeholder="Rent Amount" formControlName="rent" OnlyNumber type="text" (keyup)="inWords($event,1,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"₹"}} {{RentAmount[i]}} Only</mat-hint>
|
||||
<input matInput placeholder="Rent Amount" formControlName="rent"
|
||||
OnlyNumber type="text" (keyup)="inWords($event,1,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"₹"}}
|
||||
{{RentAmount[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div>
|
||||
@ -104,17 +116,21 @@
|
||||
|
||||
<div>
|
||||
<div formArrayName="family_members_details">
|
||||
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last " [formGroupName]="i">
|
||||
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last "
|
||||
[formGroupName]="i">
|
||||
<mat-card>
|
||||
<h5>Family Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Name" formControlName="family_member_name" required>
|
||||
<input matInput placeholder="Name" formControlName="family_member_name"
|
||||
required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Relationship" formControlName="family_member_relationship" required>
|
||||
<mat-select placeholder="Relationship" formControlName="family_member_relationship"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{relation.relationship_id}}" *ngFor="let relation of relationData">
|
||||
<mat-option value="{{relation.relationship_id}}"
|
||||
*ngFor="let relation of relationData">
|
||||
{{relation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
@ -125,7 +141,9 @@
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Earning Status" formControlName="family_member_earning_status" required>
|
||||
<mat-select placeholder="Earning Status"
|
||||
formControlName="family_member_earning_status"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{earnings.id}}" *ngFor="let earnings of earningStatus">
|
||||
{{earnings.type}}
|
||||
@ -135,52 +153,69 @@
|
||||
</div>
|
||||
<div *ngIf="item.get('family_member_earning_status').value == 1">
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Segment" formControlName="earning_segment" required>
|
||||
<mat-select placeholder="Segment" formControlName="earning_segment"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{earn.earning_member_status_id}}" *ngFor="let earn of earningData">
|
||||
<mat-option value="{{earn.earning_member_status_id}}"
|
||||
*ngFor="let earn of earningData">
|
||||
{{earn.earning_member_status}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;" *ngIf="item.get('earning_segment').value==1">
|
||||
<input matInput placeholder="Specify Others" formControlName="earning_if_others_segment">
|
||||
<input matInput placeholder="Specify Others"
|
||||
formControlName="earning_if_others_segment">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" OnlyNumber type="text" (keyup)="inWords($event,2,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"₹"}} {{IncomePerMonth[i]}} Only</mat-hint>
|
||||
<input matInput placeholder="Income Per Month"
|
||||
formControlName="earning_gross_income_per_month"
|
||||
OnlyNumber type="text" (keyup)="inWords($event,2,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"₹"}}
|
||||
{{IncomePerMonth[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput [placeholder]="item.get('earning_segment').value != 5 ? 'Name of the Employer/Business' : 'Pension Received From'" formControlName="earning_name_of_the_employer_or_business" required>
|
||||
<input matInput [placeholder]="item.get('earning_segment').value != 5 ? 'Name of the Employer/Business' : 'Pension Received From'"
|
||||
formControlName="earning_name_of_the_employer_or_business"
|
||||
required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="No. of years in Employment/Business" formControlName="earning_number_of_years_in_employment_or_business"
|
||||
<input matInput placeholder="No. of years in Employment/Business"
|
||||
formControlName="earning_number_of_years_in_employment_or_business"
|
||||
required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="item.get('family_member_earning_status').value == 2">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Occupation" formControlName="non_earning_occupation" required>
|
||||
<mat-select placeholder="Occupation" formControlName="non_earning_occupation"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{occupation.occupation_non_earning_member_id}}" *ngFor="let occupation of occupationData">
|
||||
<mat-option value="{{occupation.occupation_non_earning_member_id}}"
|
||||
*ngFor="let occupation of occupationData">
|
||||
{{occupation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==1">
|
||||
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others">
|
||||
<input matInput placeholder="Specify Others"
|
||||
formControlName="non_earning_if_others">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==2" style="width:30%">
|
||||
<input matInput placeholder="Specify School/College Name" formControlName="non_earning_if_schoolorcollege">
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==2"
|
||||
style="width:30%">
|
||||
<input matInput placeholder="Specify School/College Name"
|
||||
formControlName="non_earning_if_schoolorcollege">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==3">
|
||||
<!-- <input matInput placeholder="Retired From" formControlName="non_earning_if_retired_from" type="date" required> -->
|
||||
<input matInput placeholder="Retired From" formControlName="non_earning_if_retired_from">
|
||||
<input matInput placeholder="Retired From"
|
||||
formControlName="non_earning_if_retired_from">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeFamilyMembers(ix,i)"
|
||||
matTooltip="Delete Family Members" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="sup.controls.family_members_details.controls.length>0">
|
||||
<button type="button" mat-raised-button mat-icon-button
|
||||
(click)="removeFamilyMembers(ix,i)" matTooltip="Delete Family Members"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon"
|
||||
*ngIf="sup.controls.family_members_details.controls.length>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -201,7 +236,8 @@
|
||||
<span *ngIf="sup.controls.family_members_details['controls'].length == 0;else another;">
|
||||
<strong>Add Family Members Of {{FamilyMemberAsLabel[ix]}}</strong>
|
||||
</span>
|
||||
<ng-template #another><strong>Add More Family Members Of {{FamilyMemberAsLabel[ix]}}</strong></ng-template>
|
||||
<ng-template #another><strong>Add More Family Members Of
|
||||
{{FamilyMemberAsLabel[ix]}}</strong></ng-template>
|
||||
<!-- <strong> </strong> -->
|
||||
</button>
|
||||
</div>
|
||||
@ -212,7 +248,8 @@
|
||||
<mat-card-actions>
|
||||
<span align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeOtherFamilyMembers(ix)"
|
||||
matTooltip="Delete Family Details of Other Applicant" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="familyForm.controls.family_details.controls.length>1">
|
||||
matTooltip="Delete Family Details of Other Applicant"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="familyForm.controls.family_details.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
@ -275,55 +312,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -348,11 +421,14 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="40" align="end">
|
||||
<button type="button" mat-flat-button (click)="addMoreApplicantFamilyDetails($event); false"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||
<button type="button" mat-flat-button (click)="addMoreApplicantFamilyDetails($event); false" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary">
|
||||
<strong>Add Family Details of Other Applicant </strong>
|
||||
</button>
|
||||
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon></button>
|
||||
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit"
|
||||
matTooltipPosition="above" (click)="submitFamily()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component,OnInit,Inject,Input, Output } from '@angular/core';
|
||||
import { Component, OnInit, Inject, Input, Output } from '@angular/core';
|
||||
|
||||
import { FormBuilder,FormGroup,Validators,FormArray, FormControl, AbstractControl } from '@angular/forms';
|
||||
import { FormBuilder, FormGroup, Validators, FormArray, FormControl, AbstractControl } from '@angular/forms';
|
||||
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
@ -32,7 +32,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
private notifier: NotifierService;
|
||||
public familyForm: FormGroup;
|
||||
public selectPerson;
|
||||
public apiFamilyMembers : any = [];
|
||||
public apiFamilyMembers: any = [];
|
||||
pdid: string;
|
||||
form_id: number;
|
||||
count: number;
|
||||
@ -47,12 +47,12 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
relationData: any = [];
|
||||
occupationData: any = [];
|
||||
ownerShipData: any = [];
|
||||
earningData:any =[];
|
||||
earningData: any = [];
|
||||
stateData: any = [];
|
||||
cityData: any =[];
|
||||
pincodeData:any=[];
|
||||
earningStatus = [{ id: 1,type: 'Earning' },
|
||||
{ id: 2,type: 'Non Earning' }]
|
||||
cityData: any = [];
|
||||
pincodeData: any = [];
|
||||
earningStatus = [{ id: 1, type: 'Earning' },
|
||||
{ id: 2, type: 'Non Earning' }]
|
||||
|
||||
/** constructor Of the class */
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
@ -80,47 +80,51 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
this.getMasterDetails('EARNINGMEMBERSSTATUS', 5);
|
||||
this.getMasterDetails('STATE', 6);
|
||||
|
||||
this._pd.getFamilyDetails(this.pdid).subscribe(data=>{
|
||||
this._pd.getFamilyDetails(this.pdid).subscribe(data => {
|
||||
console.clear();
|
||||
|
||||
if(data.dataStatus == true){
|
||||
if (data.dataStatus == true) {
|
||||
|
||||
let Temparr : any = [];
|
||||
let Temparr: any = [];
|
||||
|
||||
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) {
|
||||
return data.record.from_general_form[key];
|
||||
});
|
||||
|
||||
let datas = familyMembersGeneralForm.map(element => {
|
||||
return {id:element.pd_co_applicant_id.toString(),
|
||||
name:element.applicant_name,
|
||||
relationship:element.relationship,
|
||||
relation_to:element.relation_to,
|
||||
age:element.age,
|
||||
data_gets_from:'GeneralForm'};
|
||||
return {
|
||||
id: element.pd_co_applicant_id.toString(),
|
||||
name: element.applicant_name,
|
||||
relationship: element.relationship,
|
||||
relation_to: element.relation_to,
|
||||
age: element.age,
|
||||
data_gets_from: 'GeneralForm'
|
||||
};
|
||||
});
|
||||
|
||||
Temparr.push(datas);
|
||||
|
||||
}
|
||||
|
||||
if(data.record.from_business_form.length > 0){
|
||||
if (data.record.from_business_form.length > 0) {
|
||||
let familyMembersBusinessForm = Object.keys(data.record.from_business_form).map(function (key) {
|
||||
return data.record.from_business_form[key];
|
||||
});
|
||||
let datas = familyMembersBusinessForm.map(element => {
|
||||
return {id:element.other_family_relationship_id.toString(),
|
||||
name:element.family_member_name,
|
||||
relationship:element.other_family_relationship_id,
|
||||
relation_to:element.relation_to_id,
|
||||
age:'',
|
||||
data_gets_from:'BusinessForm'};
|
||||
return {
|
||||
id: element.other_family_relationship_id.toString(),
|
||||
name: element.family_member_name,
|
||||
relationship: element.other_family_relationship_id,
|
||||
relation_to: element.relation_to_id,
|
||||
age: '',
|
||||
data_gets_from: 'BusinessForm'
|
||||
};
|
||||
});
|
||||
|
||||
Temparr.push(datas);
|
||||
}
|
||||
this.apiFamilyMembers = [].concat.apply([],Temparr);
|
||||
this.apiFamilyMembers = [].concat.apply([], Temparr);
|
||||
|
||||
}
|
||||
})
|
||||
@ -164,7 +168,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
earning_gross_income_per_month: [val.earning_gross_income_per_month, Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: [val.earning_name_of_the_employer_or_business, Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: [val.earning_number_of_years_in_employment_or_business, Validators.compose([])],
|
||||
earning_if_others_segment:[val.earning_if_others_segment],
|
||||
earning_if_others_segment: [val.earning_if_others_segment],
|
||||
non_earning_occupation: [val.non_earning_occupation, Validators.compose([])],
|
||||
non_earning_if_others: [val.non_earning_if_others, Validators.compose([])],
|
||||
non_earning_if_retired_from: [val.non_earning_if_retired_from, Validators.compose([])],
|
||||
@ -275,7 +279,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
residence_city: ['', Validators.compose([])],
|
||||
residence_state: ['', Validators.compose([])],
|
||||
residence_pin: ['', Validators.compose([])],
|
||||
residence_other_pincode:[''],
|
||||
residence_other_pincode: [''],
|
||||
residence_No_of_years: ['', Validators.compose([])],
|
||||
residence_ownership: ['', Validators.compose([])],
|
||||
ownershipOther: [''],
|
||||
@ -286,22 +290,22 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
const control = <FormArray>this.familyForm.controls['family_details'];
|
||||
control.push(formData);
|
||||
} else {
|
||||
records.forEach((val,index) => {
|
||||
records.forEach((val, index) => {
|
||||
|
||||
if(val.rent != null){
|
||||
if (val.rent != null) {
|
||||
|
||||
this.RentAmount[index] = this._pd.convertNumberToWords(val.rent);
|
||||
}
|
||||
this.FamilyMemberAsLabel[index] = this.selectPerson.filter(item => item.pd_co_applicant_id == val.selected_person)[0].applicant_name;
|
||||
//for (let val of records)
|
||||
this.getCity(val.residence_state,index);
|
||||
this.getCity(val.residence_state, index);
|
||||
let formData: FormGroup = this.fb.group({
|
||||
selected_person: [val.selected_person, Validators.compose([Validators.required])],
|
||||
residence_place: [val.residence_place, Validators.compose([])],
|
||||
residence_city: [val.residence_city, Validators.compose([])],
|
||||
residence_state: [val.residence_state, Validators.compose([])],
|
||||
residence_pin: [val.residence_pin, Validators.compose([])],
|
||||
residence_other_pincode:[val.residence_other_pincode],
|
||||
residence_other_pincode: [val.residence_other_pincode],
|
||||
residence_No_of_years: [val.residence_No_of_years, Validators.compose([])],
|
||||
residence_ownership: [val.residence_ownership, Validators.compose([])],
|
||||
ownershipOther: [val.ownershipOther || null],
|
||||
@ -322,9 +326,9 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
|
||||
addFamilyMemberDetailsWithData(inx, val): void {
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
val.forEach((vals,index) => {
|
||||
val.forEach((vals, index) => {
|
||||
// for (let vals of val) {
|
||||
if(vals.earning_gross_income_per_month != null){
|
||||
if (vals.earning_gross_income_per_month != null) {
|
||||
this.IncomePerMonth[index] = this._pd.convertNumberToWords(vals.earning_gross_income_per_month);
|
||||
}
|
||||
let datas = this.fb.group({
|
||||
@ -336,7 +340,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
earning_gross_income_per_month: [vals.earning_gross_income_per_month || null, Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: [vals.earning_name_of_the_employer_or_business || null, Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: [vals.earning_number_of_years_in_employment_or_business || null, Validators.compose([])],
|
||||
earning_if_others_segment:[vals.earning_if_others_segment || null],
|
||||
earning_if_others_segment: [vals.earning_if_others_segment || null],
|
||||
non_earning_occupation: [vals.non_earning_occupation || null, Validators.compose([])],
|
||||
non_earning_if_others: [vals.non_earning_if_others || null, Validators.compose([])],
|
||||
non_earning_if_retired_from: [vals.non_earning_if_retired_from || null, Validators.compose([])],
|
||||
@ -363,34 +367,30 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
prevFamilyMembersCtrlLength: number = 0;
|
||||
currFamilyMembersCtrlLength: number = 0;
|
||||
|
||||
selectedPerson(e,inx){
|
||||
console.log('familyMembersControlLength',this. prevFamilyMembersCtrlLength,this.currFamilyMembersCtrlLength);
|
||||
selectedPerson(e, inx) {
|
||||
|
||||
this.FamilyMemberAsLabel[inx] = this.selectPerson.filter(item => item.pd_co_applicant_id == e)[0].applicant_name;
|
||||
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
// console.log('current control length',control.length);
|
||||
|
||||
this.currFamilyMembersCtrlLength = control.length;
|
||||
|
||||
let i : number = 0 ;
|
||||
for(i ;i < this.prevFamilyMembersCtrlLength;i++){
|
||||
console.log(i,this.prevFamilyMembersCtrlLength);
|
||||
let i: number = 0;
|
||||
for (i; i < this.prevFamilyMembersCtrlLength; i++) {
|
||||
control.removeAt(i);
|
||||
}
|
||||
// while(index < this.prevFamilyMembersCtrlLength)
|
||||
// {
|
||||
// }
|
||||
// while(index < this.prevFamilyMembersCtrlLength){}
|
||||
this.prevFamilyMembersCtrlLength = this.currFamilyMembersCtrlLength;
|
||||
console.log('familyMembersControlLength',this. prevFamilyMembersCtrlLength,this.currFamilyMembersCtrlLength);
|
||||
|
||||
if(this.apiFamilyMembers.length>0){
|
||||
|
||||
let arraydata : any;
|
||||
if (this.apiFamilyMembers.length > 0) {
|
||||
|
||||
let arraydata: any;
|
||||
let data = this.apiFamilyMembers.filter(item => item.relation_to == e);
|
||||
|
||||
if(data.length > 0){
|
||||
if (data.length > 0) {
|
||||
this.prevFamilyMembersCtrlLength = data.length;
|
||||
console.log('familyMembersControlLength',this. prevFamilyMembersCtrlLength,this.currFamilyMembersCtrlLength);
|
||||
data.forEach((val,inx) => {
|
||||
data.forEach((val, inx) => {
|
||||
|
||||
// if(val.age){
|
||||
// // this.isReadOnly[inx] = true;
|
||||
@ -398,15 +398,15 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
// // this.isReadOnly[inx] = false;
|
||||
// }
|
||||
arraydata = {
|
||||
'family_member_name' : val.name,
|
||||
'family_member_relationship' : val.relationship,
|
||||
'family_member_age' : val.age,
|
||||
'family_member_earning_status': val.data_gets_from == 'BusinessForm' ? '1' :'',
|
||||
'family_member_name': val.name,
|
||||
'family_member_relationship': val.relationship,
|
||||
'family_member_age': val.age,
|
||||
'family_member_earning_status': val.data_gets_from == 'BusinessForm' ? '1' : '',
|
||||
'earning_segment': '',
|
||||
'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_if_others_segment':'',
|
||||
'earning_if_others_segment': '',
|
||||
'non_earning_occupation': '',
|
||||
'non_earning_if_others': '',
|
||||
'non_earning_if_retired_from': '',
|
||||
@ -415,30 +415,28 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
control.push(this.initgenerateFamilyMembersDetailsGet(arraydata));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.prevFamilyMembersCtrlLength = 1;
|
||||
console.log('familyMembersControlLength',this. prevFamilyMembersCtrlLength,this.currFamilyMembersCtrlLength);
|
||||
control.push(this.generateFamilyMembersDetailsGet());
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.prevFamilyMembersCtrlLength = 1;
|
||||
console.log('familyMembersControlLength',this. prevFamilyMembersCtrlLength,this.currFamilyMembersCtrlLength);
|
||||
control.push(this.generateFamilyMembersDetailsGet());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addFamilyMembers(inx) {
|
||||
addFamilyMembers(inx) {
|
||||
let mainControl = this.familyForm.get('family_details') as FormArray;
|
||||
let control = mainControl.controls[inx].get('family_members_details') as FormArray;
|
||||
control.push(this.generateFamilyMembersDetailsGet());
|
||||
}
|
||||
}
|
||||
|
||||
removeFamilyMembers(inx,i) {
|
||||
removeFamilyMembers(inx, i) {
|
||||
let mainControl = this.familyForm.get('family_details') as FormArray;
|
||||
let control = mainControl.controls[inx].get('family_members_details') as FormArray;
|
||||
control.removeAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// getNumberOfFamilyMemberDetails(inx) {
|
||||
@ -476,7 +474,7 @@ removeFamilyMembers(inx,i) {
|
||||
earning_gross_income_per_month: ['', Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: ['', Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: ['', Validators.compose([])],
|
||||
earning_if_others_segment:[''],
|
||||
earning_if_others_segment: [''],
|
||||
non_earning_occupation: ['', Validators.compose([])],
|
||||
non_earning_if_others: ['', Validators.compose([])],
|
||||
non_earning_if_retired_from: ['', Validators.compose([])],
|
||||
@ -508,8 +506,8 @@ removeFamilyMembers(inx,i) {
|
||||
});
|
||||
}
|
||||
|
||||
getCity(e,i){
|
||||
this._pd.getStateWiseCities(e).subscribe(data=>{
|
||||
getCity(e, i) {
|
||||
this._pd.getStateWiseCities(e).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
|
||||
this.cityData[i] = data.records.cities;
|
||||
@ -533,11 +531,11 @@ removeFamilyMembers(inx,i) {
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -559,12 +557,12 @@ removeFamilyMembers(inx,i) {
|
||||
// }
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,flag:number,i){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
inWords(e, flag: number, i) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.RentAmount[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
this.IncomePerMonth[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right"
|
||||
mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
|
||||
@ -15,7 +17,8 @@
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="Customer Behaviour" formControlName="final_custormer_remark_type">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{ pm.description }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{
|
||||
pm.description }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['final_custormer_remark_type'].value == 1">
|
||||
@ -37,9 +40,11 @@
|
||||
</mat-card>
|
||||
<br>
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="PD Officers Recommendation" formControlName="pd_officers_recommendation" required><!--(selectionChange)="RecommendationChange($event.value)"-->
|
||||
<mat-select placeholder="PD Officers Recommendation" formControlName="pd_officers_recommendation"
|
||||
required (selectionChange)="RecommendationChange($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let list of m_recommendationList" [value]="list.pdofficer_recommendation_id">{{ list.pdofficer_recommendation }}</mat-option>
|
||||
<mat-option *ngFor="let list of m_recommendationList" [value]="list.pdofficer_recommendation_id">{{
|
||||
list.pdofficer_recommendation }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
|
||||
@ -50,15 +55,18 @@
|
||||
<div formArrayName="recommendation_positive">
|
||||
<div *ngFor="let details of _finalRemarkForm.get('recommendation_positive').controls; let i=index; let last=last"
|
||||
[formGroupName]="i">
|
||||
<mat-form-field style="width:40%;">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Positive" formControlName="reason_for_positive">
|
||||
<mat-form-field style="width:85%;">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Positive"
|
||||
formControlName="reason_for_positive">
|
||||
</mat-form-field>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteRecommendationPositive(i)"
|
||||
*ngIf="last">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteRecommendationPositive(i)"
|
||||
*ngIf="_finalRemarkForm.get('recommendation_positive').controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Add More Postive Reasons" matTooltipPosition="above" color="primary" (click)="addRecommendationPositive()"
|
||||
*ngIf="last">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Add More Postive Reasons" matTooltipPosition="above" color="primary"
|
||||
(click)="addRecommendationPositive()" *ngIf="last">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -68,24 +76,20 @@
|
||||
<div formArrayName="recommendation_negative">
|
||||
<div *ngFor="let details of _finalRemarkForm.get('recommendation_negative').controls; let i=index; let last=last"
|
||||
[formGroupName]="i">
|
||||
<mat-form-field style="width:40%;">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Negative" formControlName="reason_for_negative">
|
||||
<mat-form-field style="width:85%;">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Negative"
|
||||
formControlName="reason_for_negative">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-card-actions>
|
||||
<!-- <div align="right">
|
||||
<button *ngIf="currentLoanForm.controls.loan_details.controls.length > 1" type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteRecommendationNegative(i)"
|
||||
*ngIf="_finalRemarkForm.get('recommendation_negative').controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addLoanDetails()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Loan Details </strong>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Add More Negative Reasons" matTooltipPosition="above" color="primary"
|
||||
(click)="addRecommendationNegative()" *ngIf="last">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
</div> -->
|
||||
</mat-card-actions>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
@ -93,36 +97,21 @@
|
||||
<div formArrayName="recommendation_refer_to_credit">
|
||||
<div *ngFor="let details of _finalRemarkForm.get('recommendation_refer_to_credit').controls; let i=index; let last=last"
|
||||
[formGroupName]="i">
|
||||
|
||||
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Refer to Credit" formControlName="reason_for_refer_to_credit">
|
||||
<mat-form-field style="width:85%;">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Refer to Credit"
|
||||
formControlName="reason_for_refer_to_credit">
|
||||
</mat-form-field>
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)"
|
||||
*ngIf="i>0">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteaddRecommendationReferToCredit(i)"
|
||||
*ngIf="_finalRemarkForm.get('recommendation_refer_to_credit').controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" color="primary" (click)="addLoanDetails()"
|
||||
*ngIf="last">
|
||||
s <mat-icon>add</mat-icon>
|
||||
</button> -->
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<!-- <div align="right">
|
||||
<button *ngIf="currentLoanForm.controls.loan_details.controls.length > 1" type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
matTooltip="Add More Refer To Credit Reasons" matTooltipPosition="above" color="primary"
|
||||
(click)="addRecommendationReferToCredit()" *ngIf="last">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addLoanDetails()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Loan Details </strong>
|
||||
</button>
|
||||
</div> -->
|
||||
</mat-card-actions>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<!-- <mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
|
||||
@ -147,7 +136,10 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||
matTooltipPosition="above" type="submit">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
|
||||
@ -21,7 +21,7 @@ import {
|
||||
} from '@angular/material';
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
|
||||
@Component({
|
||||
@ -64,22 +64,22 @@ export class FinalRemarksComponent implements OnInit {
|
||||
this._finalRemarkForm = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['20'],
|
||||
final_custormer_remark_type : [],
|
||||
final_other_customer_behaviour:[],
|
||||
final_custormer_remark_type: [],
|
||||
final_other_customer_behaviour: [],
|
||||
is_service_provided: ['', Validators.required],
|
||||
pd_officers_recommendation:['', Validators.required],
|
||||
others_pd_officers_recommendation:[''],
|
||||
pd_officers_recommendation: ['', Validators.required],
|
||||
others_pd_officers_recommendation: [''],
|
||||
// reason_for_positive:[''],
|
||||
// reason_for_negative:[''],
|
||||
// reason_for_refer_to_credit:[''],
|
||||
recommendation_positive:this._formBuilder.array([
|
||||
this.CreateRecommendationPositive(null),
|
||||
recommendation_positive: this._formBuilder.array([
|
||||
// this.CreateRecommendationPositive(null),
|
||||
]),
|
||||
recommendation_negative:this._formBuilder.array([
|
||||
this.CreateRecommendationNegative(null),
|
||||
recommendation_negative: this._formBuilder.array([
|
||||
// this.CreateRecommendationNegative(null),
|
||||
]),
|
||||
recommendation_refer_to_credit:this._formBuilder.array([
|
||||
this.CreateRecommendationReferToCredit(null),
|
||||
recommendation_refer_to_credit: this._formBuilder.array([
|
||||
// this.CreateRecommendationReferToCredit(null),
|
||||
]),
|
||||
final_form_remarks: ['']
|
||||
});
|
||||
@ -96,11 +96,11 @@ export class FinalRemarksComponent implements OnInit {
|
||||
addRecommendationPositive() {
|
||||
const control = <FormArray>this._finalRemarkForm.controls['recommendation_positive'];
|
||||
control.push(this.CreateRecommendationPositive(null));
|
||||
}
|
||||
deleteRecommendationPositive(index) {
|
||||
}
|
||||
deleteRecommendationPositive(index) {
|
||||
const control = <FormArray>this._finalRemarkForm.controls['recommendation_positive'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
CreateRecommendationNegative(data) {
|
||||
return this._formBuilder.group({
|
||||
@ -110,11 +110,11 @@ deleteRecommendationPositive(index) {
|
||||
addRecommendationNegative() {
|
||||
const control = <FormArray>this._finalRemarkForm.controls['recommendation_negative'];
|
||||
control.push(this.CreateRecommendationNegative(null));
|
||||
}
|
||||
deleteRecommendationNegative(index) {
|
||||
}
|
||||
deleteRecommendationNegative(index) {
|
||||
const control = <FormArray>this._finalRemarkForm.controls['recommendation_negative'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
}
|
||||
CreateRecommendationReferToCredit(data) {
|
||||
return this._formBuilder.group({
|
||||
reason_for_refer_to_credit: data == null ? [''] : [data.reason_for_refer_to_credit],
|
||||
@ -123,11 +123,11 @@ deleteRecommendationNegative(index) {
|
||||
addRecommendationReferToCredit() {
|
||||
const control = <FormArray>this._finalRemarkForm.controls['recommendation_refer_to_credit'];
|
||||
control.push(this.CreateRecommendationReferToCredit(null));
|
||||
}
|
||||
deleteRecommendationReferToCredit(index) {
|
||||
}
|
||||
deleteRecommendationReferToCredit(index) {
|
||||
const control = <FormArray>this._finalRemarkForm.controls['recommendation_refer_to_credit'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
}
|
||||
public viewerOptions: any = {
|
||||
navbar: false,
|
||||
toolbar: {
|
||||
@ -150,9 +150,11 @@ deleteRecommendationReferToCredit(index) {
|
||||
|
||||
noRecordsFound: Boolean = false;
|
||||
ngOnInit() {
|
||||
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '20').subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
// this.RecommendationChange(data.records.pd_officers_recommendation);
|
||||
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '20').subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
// console.log('data',data);
|
||||
// console.log('data',data.records);
|
||||
this.RecommendationChange(data.records.pd_officers_recommendation);
|
||||
|
||||
this._finalRemarkForm.controls.final_custormer_remark_type.setValue(data.records.final_custormer_remark_type);
|
||||
this._finalRemarkForm.controls.final_other_customer_behaviour.setValue(data.records.final_other_customer_behaviour);
|
||||
@ -161,11 +163,41 @@ deleteRecommendationReferToCredit(index) {
|
||||
// this._finalRemarkForm.controls.reason_for_positive.setValue(data.records.reason_for_positive);
|
||||
// this._finalRemarkForm.controls.reason_for_negative.setValue(data.records.reason_for_negative);
|
||||
// this._finalRemarkForm.controls.reason_for_refer_to_credit.setValue(data.records.reason_for_refer_to_credit);
|
||||
|
||||
if (data.records.recommendation_positive.length > 0) {
|
||||
let recommendationPositiveCtrl: any = this._finalRemarkForm.get('recommendation_positive') as FormArray;
|
||||
data.records.recommendation_positive.forEach((val, index) => {
|
||||
let objs = { 'reason_for_positive': val.reason_for_positive }
|
||||
recommendationPositiveCtrl.push(this.CreateRecommendationPositive(objs));
|
||||
});
|
||||
}
|
||||
if (data.records.recommendation_refer_to_credit.length > 0) {
|
||||
let recommendationReferToCredit: any = this._finalRemarkForm.get('recommendation_refer_to_credit') as FormArray;
|
||||
data.records.recommendation_refer_to_credit.forEach((val, index) => {
|
||||
let objs = { 'reason_for_refer_to_credit': val.reason_for_refer_to_credit }
|
||||
recommendationReferToCredit.push(this.CreateRecommendationReferToCredit(objs));
|
||||
});
|
||||
}
|
||||
if (data.records.recommendation_negative.length > 0) {
|
||||
let recommendationNegativeCtrl: any = this._finalRemarkForm.get('recommendation_negative') as FormArray;
|
||||
data.records.recommendation_negative.forEach((val, index) => {
|
||||
let objs = { 'reason_for_negative': val.reason_for_negative }
|
||||
recommendationNegativeCtrl.push(this.CreateRecommendationNegative(objs));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
this._finalRemarkForm.controls.is_service_provided.setValue(data.records.is_service_provided);
|
||||
this._finalRemarkForm.controls.final_form_remarks.setValue(data.records.final_form_remarks);
|
||||
|
||||
this.noRecordsFound = true;
|
||||
} else {
|
||||
let recommendationPositiveCtrl: any = this._finalRemarkForm.get('recommendation_positive') as FormArray;
|
||||
recommendationPositiveCtrl.push(this.CreateRecommendationPositive(null));
|
||||
let recommendationNegativeCtrl: any = this._finalRemarkForm.get('recommendation_negative') as FormArray;
|
||||
recommendationNegativeCtrl.push(this.CreateRecommendationNegative(null));
|
||||
let recommendationReferToCredit: any = this._finalRemarkForm.get('recommendation_refer_to_credit') as FormArray;
|
||||
recommendationReferToCredit.push(this.CreateRecommendationReferToCredit(null));
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
}, err => {
|
||||
@ -223,11 +255,11 @@ deleteRecommendationReferToCredit(index) {
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
@ -255,78 +287,264 @@ deleteRecommendationReferToCredit(index) {
|
||||
}
|
||||
}
|
||||
|
||||
// RecommendationChange(e){
|
||||
// // if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 1){
|
||||
RecommendationChange(e) {
|
||||
// console.log('Event',e);
|
||||
let recommendationPositiveCtrl: any = this._finalRemarkForm.get('recommendation_positive') as FormArray;
|
||||
let recommendationNegativeCtrl: any = this._finalRemarkForm.get('recommendation_negative') as FormArray;
|
||||
let recommendationReferToCredit: any = this._finalRemarkForm.get('recommendation_refer_to_credit') as FormArray;
|
||||
|
||||
// // }
|
||||
// // if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 3){
|
||||
if (e == 1) {
|
||||
|
||||
// // }
|
||||
// // if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 4){
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
// // }
|
||||
if (recommendationNegativeCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationNegativeCtrl.controls.length; i++) {
|
||||
|
||||
// if(e==1){
|
||||
recommendationNegativeCtrl.removeAt(i + 1);
|
||||
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||
recommendationNegativeCtrl = recommendationNegativeCtrl.controls[0];
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].setValue('');
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].clearValidators();
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].updateValueAndValidity();
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
// if(e==2){
|
||||
if (recommendationPositiveCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationPositiveCtrl.controls.length; i++) {
|
||||
recommendationPositiveCtrl.removeAt(i + 1);
|
||||
recommendationPositiveCtrl = recommendationPositiveCtrl.controls[0];
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].clearValidators();
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].setValue('');
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
if (recommendationReferToCredit.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationReferToCredit.controls.length; i++) {
|
||||
recommendationReferToCredit.removeAt(i + 1);
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
recommendationReferToCredit = recommendationReferToCredit.controls[0];
|
||||
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].setValue('');
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (e == 2) {
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
if (recommendationReferToCredit.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationReferToCredit.controls.length; i++) {
|
||||
recommendationReferToCredit.removeAt(i + 1);
|
||||
|
||||
recommendationReferToCredit = recommendationReferToCredit.controls[0];
|
||||
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].setValue('');
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].setValidators([Validators.required]);
|
||||
if (recommendationPositiveCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationPositiveCtrl.controls.length; i++) {
|
||||
recommendationPositiveCtrl = recommendationPositiveCtrl.controls[i];
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].setValidators([Validators.required]);
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
if (recommendationNegativeCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationNegativeCtrl.controls.length; i++) {
|
||||
|
||||
recommendationNegativeCtrl.removeAt(i + 1);
|
||||
|
||||
recommendationNegativeCtrl = recommendationNegativeCtrl.controls[0];
|
||||
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].setValue('');
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].clearValidators();
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].updateValueAndValidity();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// }
|
||||
// if(e==3){
|
||||
}
|
||||
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
if (e == 3) {
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
if (recommendationReferToCredit.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationReferToCredit.controls.length; i++) {
|
||||
recommendationReferToCredit.removeAt(i + 1);
|
||||
|
||||
recommendationReferToCredit = recommendationReferToCredit.controls[0];
|
||||
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].setValue('');
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
if (recommendationPositiveCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationPositiveCtrl.controls.length; i++) {
|
||||
recommendationPositiveCtrl.removeAt(i + 1);
|
||||
recommendationPositiveCtrl = recommendationPositiveCtrl.controls[0];
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].clearValidators();
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].setValue('');
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
if (recommendationNegativeCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationNegativeCtrl.controls.length; i++) {
|
||||
recommendationNegativeCtrl = recommendationNegativeCtrl.controls[i];
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].setValidators([Validators.required]);
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].setValidators([Validators.required]);
|
||||
|
||||
// }
|
||||
// if(e==4){
|
||||
}
|
||||
if (e == 4) {
|
||||
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||
if (recommendationReferToCredit.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationReferToCredit.controls.length; i++) {
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
recommendationReferToCredit = recommendationReferToCredit.controls[i];
|
||||
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||
recommendationReferToCredit.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (recommendationNegativeCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationNegativeCtrl.controls.length; i++) {
|
||||
|
||||
recommendationNegativeCtrl.removeAt(i + 1);
|
||||
|
||||
recommendationNegativeCtrl = recommendationNegativeCtrl.controls[0];
|
||||
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].setValue('');
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].clearValidators();
|
||||
recommendationNegativeCtrl.controls['reason_for_negative'].updateValueAndValidity();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (recommendationPositiveCtrl.controls.length > 0) {
|
||||
let i: number = 0;
|
||||
for (i; i < recommendationPositiveCtrl.controls.length; i++) {
|
||||
recommendationPositiveCtrl.removeAt(i + 1);
|
||||
recommendationPositiveCtrl = recommendationPositiveCtrl.controls[0];
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].clearValidators();
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].setValue('');
|
||||
recommendationPositiveCtrl.controls['reason_for_positive'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RecommendationChange2(e) {
|
||||
// if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 1){
|
||||
|
||||
// }
|
||||
// this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
// this._finalRemarkForm.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
// this._finalRemarkForm.controls['reason_for_positive'].updateValueAndValidity();
|
||||
// this._finalRemarkForm.controls['reason_for_negative'].updateValueAndValidity();
|
||||
// if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 3){
|
||||
|
||||
// }
|
||||
// if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 4){
|
||||
|
||||
// }
|
||||
|
||||
if (e == 1) {
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
|
||||
}
|
||||
if (e == 2) {
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValidators([Validators.required]);
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
|
||||
|
||||
}
|
||||
if (e == 3) {
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValidators([Validators.required]);
|
||||
|
||||
}
|
||||
if (e == 4) {
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
|
||||
}
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_negative'].updateValueAndValidity();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr"> - {{subproduct_abbr}} </span> </span><br>
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">
|
||||
- {{subproduct_abbr}} </span> </span><br>
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
@ -100,8 +101,8 @@
|
||||
<mat-card *ngIf="customer_segment_abbr == 'SE-RI'">
|
||||
<mat-card-title>Number of Years for which rental income is being received</mat-card-title>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<input matInput placeholder="Year" formControlName="rental_income_rcv_in_years"
|
||||
autocomplete="off" OnlyNumber type="text" required>
|
||||
<input matInput placeholder="Year" formControlName="rental_income_rcv_in_years" autocomplete="off"
|
||||
OnlyNumber type="text" required>
|
||||
<mat-error>Please Enter Correct Year</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
@ -133,14 +134,15 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;" *ngIf="com.controls.business_entity_type_other">
|
||||
<input matInput placeholder="Please Specify Others" formControlName="business_entity_type_other" required>
|
||||
<input matInput placeholder="Please Specify Others" formControlName="business_entity_type_other"
|
||||
required>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
<p>Number of Years For Which The Business Has Been Running</p>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<input matInput placeholder="Year" formControlName="business_years"
|
||||
autocomplete="off" OnlyNumber type="text" required>
|
||||
<input matInput placeholder="Year" formControlName="business_years" autocomplete="off"
|
||||
OnlyNumber type="text" required>
|
||||
<mat-error>Please Enter Correct Year</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
@ -183,8 +185,7 @@
|
||||
<mat-card-title> Relationship Between Individuals </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="relationSource"
|
||||
formArrayName="persons_with_relationships">
|
||||
<mat-table [dataSource]="relationSource" formArrayName="persons_with_relationships">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
|
||||
@ -35,7 +35,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
errorMessage: any;
|
||||
maxDate: any;
|
||||
|
||||
disableAfterSubmit : boolean;
|
||||
disableAfterSubmit: boolean;
|
||||
|
||||
public pd_applicants_details: any;
|
||||
public _generalForm: FormGroup;
|
||||
@ -215,7 +215,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
return data.records.company_with_relationships[key];
|
||||
});
|
||||
|
||||
if(this.customer_segment_abbr != 'SE-RI'){
|
||||
if (this.customer_segment_abbr != 'SE-RI') {
|
||||
|
||||
if (exist_companyWithRelationships.length > 0) {
|
||||
exist_companyWithRelationships.forEach(element => {
|
||||
@ -223,7 +223,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element));
|
||||
});
|
||||
}
|
||||
else if(exist_companyWithRelationships.length == 0) {
|
||||
else if (exist_companyWithRelationships.length == 0) {
|
||||
companyWithRelationshipsControl.push(this.createCompaniesRelationship());
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
this._generalForm.controls['rental_income_rcv_in_years'].setValue(null);
|
||||
this._generalForm.controls['rental_income_rcv_in_month'].setValue(null);
|
||||
}
|
||||
else if(this.customer_segment_abbr == 'SE-RI'){
|
||||
else if (this.customer_segment_abbr == 'SE-RI') {
|
||||
// companyWithRelationshipsControl.push(this.createCompaniesRelationship());
|
||||
// companyControl.push(this.createCompanies(''));
|
||||
|
||||
@ -350,7 +350,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
relationship: [elementValue.relationship],
|
||||
relation_to: [elementValue.relation_to],
|
||||
individuals_order_id: [elementValue.individuals_order_id],
|
||||
is_active:[elementValue.is_active]
|
||||
is_active: [elementValue.is_active]
|
||||
});
|
||||
}
|
||||
|
||||
@ -520,7 +520,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
element.is_main_applicant = false;
|
||||
individualsControl.push(this.createIndividulas(element));
|
||||
let relationControl = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': element.applicant_name, 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id,'is_active': element.is_active };
|
||||
let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': element.applicant_name, 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id, 'is_active': element.is_active };
|
||||
relationControl.push(this.createPersonsWithRelationships(applicant_details));
|
||||
|
||||
});
|
||||
@ -530,7 +530,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
ApplicantName(event,coApplicantId){
|
||||
ApplicantName(event, coApplicantId) {
|
||||
|
||||
|
||||
let relationControl = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
@ -601,18 +601,18 @@ export class GeneralInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// submit form details
|
||||
temp : number = 0;
|
||||
temp: number = 0;
|
||||
submitGeneralForm(formData: any) {
|
||||
|
||||
if(this.customer_segment_abbr != 'SE-RI'){
|
||||
if (this.customer_segment_abbr != 'SE-RI') {
|
||||
this._generalForm.controls['rental_income_rcv_in_years'].clearValidators();
|
||||
this._generalForm.controls['rental_income_rcv_in_years'].updateValueAndValidity();
|
||||
}
|
||||
// 0th index of companies formArray only - required removed
|
||||
// greater than zero means not applicable here
|
||||
if(this.customer_segment_abbr == 'SE-RI'){
|
||||
if (this.customer_segment_abbr == 'SE-RI') {
|
||||
let otherControl: any = this._generalForm.get('companies') as FormArray;
|
||||
if(otherControl.controls.length > 0){
|
||||
if (otherControl.controls.length > 0) {
|
||||
otherControl = otherControl.controls[0];
|
||||
// otherControl.controls.business_entity_type_other.clearValidators();
|
||||
// otherControl.controls.business_entity_type_other.updateValueAndValidity();
|
||||
@ -625,12 +625,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
}
|
||||
// console.log(formData.individuals.length);
|
||||
// console.log(formData.individuals);
|
||||
|
||||
|
||||
|
||||
|
||||
if (this._generalForm.invalid) {
|
||||
this.disableAfterSubmit = false;
|
||||
this.validateAllFormFields(this._generalForm);
|
||||
@ -638,18 +632,18 @@ export class GeneralInfoComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if(formData.individuals.length > 0){
|
||||
if (formData.individuals.length > 0) {
|
||||
|
||||
formData.individuals.forEach((val,index) => {
|
||||
formData.individuals.forEach((val, index) => {
|
||||
|
||||
if(val.is_person_met == false){
|
||||
if (val.is_person_met == false) {
|
||||
|
||||
this.temp++;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(this.temp == formData.individuals.length){
|
||||
if (this.temp == formData.individuals.length) {
|
||||
this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
|
||||
|
||||
this.temp = 0;
|
||||
@ -663,14 +657,14 @@ export class GeneralInfoComponent implements OnInit {
|
||||
saveRecords.formid = formData.formid;
|
||||
saveRecords.individuals = formData.individuals;
|
||||
saveRecords.persons_with_relationships = formData.persons_with_relationships;
|
||||
if(this.customer_segment_abbr != 'SE-RI'){
|
||||
if (this.customer_segment_abbr != 'SE-RI') {
|
||||
saveRecords.companies = formData.companies;
|
||||
saveRecords.company_with_relationships = formData.company_with_relationships;
|
||||
saveRecords.rental_income_rcv_in_years = null;
|
||||
saveRecords.rental_income_rcv_in_month = null;
|
||||
//saveRecords.applicant_relation=formData.applicant_relation;
|
||||
}
|
||||
else if(this.customer_segment_abbr == 'SE-RI'){
|
||||
else if (this.customer_segment_abbr == 'SE-RI') {
|
||||
saveRecords.companies = [];
|
||||
saveRecords.company_with_relationships = [];
|
||||
saveRecords.rental_income_rcv_in_years = formData.rental_income_rcv_in_years;
|
||||
@ -680,8 +674,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
saveRecords.general_remark = formData.general_remark;
|
||||
|
||||
// console.log('saveRecords',saveRecords);
|
||||
// return;
|
||||
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
@ -706,12 +698,12 @@ export class GeneralInfoComponent implements OnInit {
|
||||
/**************************** submit form details Ends Here ***********************/
|
||||
|
||||
// convert month to year business has been running
|
||||
ConvertMonthintoYearforBusiness(e, controlIndex,flag) {
|
||||
ConvertMonthintoYearforBusiness(e, controlIndex, flag) {
|
||||
|
||||
let converted_month: number = e % 12;
|
||||
let converted_year: number = e / 12;
|
||||
|
||||
if(flag == 1){
|
||||
if (flag == 1) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
let business_year = control.controls.business_years.value;
|
||||
@ -719,7 +711,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
control.controls.business_month.setValue(Math.floor(converted_month));
|
||||
}
|
||||
|
||||
if(flag == 2){
|
||||
if (flag == 2) {
|
||||
let ri_year = this._generalForm.controls.rental_income_rcv_in_years.value;
|
||||
this._generalForm.controls['rental_income_rcv_in_years'].setValue(+ri_year + +Math.floor(converted_year));
|
||||
this._generalForm.controls['rental_income_rcv_in_month'].setValue(Math.floor(converted_month));
|
||||
|
||||
@ -6,8 +6,11 @@
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
|
||||
<!--<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Show Snack Bar" matTooltipPosition="right" (click)="open()"><mat-icon>person</mat-icon></button> -->
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<!--<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Show Snack Bar" matTooltipPosition="right" (click)="open()"><mat-icon>person</mat-icon></button> -->
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</h2>
|
||||
@ -34,10 +37,14 @@
|
||||
<div *ngFor="let details of representativeForm.get('lender_representative_details').controls; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="What is the name of lender representative who accompanies the PD officer, If any?" formControlName="lender_representative_who_accompanies" required>
|
||||
<input matInput placeholder="What is the name of lender representative who accompanies the PD officer, If any?"
|
||||
formControlName="lender_representative_who_accompanies"
|
||||
required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Did the lender representative carry the loan file during PD?" formControlName="lender_representative_carry_loan_files" required>
|
||||
<input matInput placeholder="Did the lender representative carry the loan file during PD?"
|
||||
formControlName="lender_representative_carry_loan_files"
|
||||
required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -104,43 +111,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -163,7 +218,9 @@
|
||||
|
||||
|
||||
<div fxFlex="40" align="end">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" type="button" [disabled]="disableAfterSubmit===true" (click)="submitLRForm()"><mat-icon>save</mat-icon>
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit"
|
||||
matTooltipPosition="above" type="button" [disabled]="disableAfterSubmit===true" (click)="submitLRForm()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import {Component,OnInit,Inject,Input } from '@angular/core';
|
||||
import {FormBuilder,FormGroup,Validators,FormArray, FormControl,} from '@angular/forms';
|
||||
import { Component, OnInit, Inject, Input } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormArray, FormControl, } from '@angular/forms';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import {
|
||||
MatDialog,
|
||||
@ -27,10 +27,10 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
// snackBar: any;
|
||||
public representativeForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
pageTitle: string ="Lender Representative Details";
|
||||
pageTitle: string = "Lender Representative Details";
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
disableAfterSubmit : boolean = false;
|
||||
disableAfterSubmit: boolean = false;
|
||||
//snack bar
|
||||
|
||||
|
||||
@ -75,14 +75,14 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// open() {
|
||||
// const config = new MatSnackBarConfig();
|
||||
// config.duration = this.autoHide;
|
||||
// config.panelClass = this.addExtraClass ? ['party'] : null;
|
||||
// this.snackBar.open(this.message, this.action && this.actionButtonLabel, config);
|
||||
// }
|
||||
// open() {
|
||||
// const config = new MatSnackBarConfig();
|
||||
// config.duration = this.autoHide;
|
||||
// config.panelClass = this.addExtraClass ? ['party'] : null;
|
||||
// this.snackBar.open(this.message, this.action && this.actionButtonLabel, config);
|
||||
// }
|
||||
ngOnInit() {
|
||||
// this.message.main_applicant = this.main_applicant;
|
||||
// this.message.lender_applicant_id = this.lender_applicant_id;
|
||||
@ -133,7 +133,7 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
}
|
||||
createLRDetail() {
|
||||
return this.fb.group({
|
||||
lender_representative_who_accompanies : [''],
|
||||
lender_representative_who_accompanies: [''],
|
||||
lender_representative_carry_loan_files: [''],
|
||||
});
|
||||
}
|
||||
@ -156,12 +156,12 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
records.lender_representative_details = this.representativeForm.controls['lender_representative_details'].value;
|
||||
}
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
this.disableAfterSubmit = false;
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -31,14 +31,15 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-label>Loan Tenure applied for?</mat-label>
|
||||
<input matInput placeholder="No of months" formControlName="loan_tenure" OnlyNumber type="text"
|
||||
autocomplete="off">
|
||||
<input matInput placeholder="No of months" formControlName="loan_tenure"
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:64%">
|
||||
<mat-select placeholder="Sub Product"
|
||||
formControlName="sub_product" (selectionChange)="onChangeSubProduct($event.value)">
|
||||
<mat-select placeholder="Sub Product" formControlName="sub_product"
|
||||
(selectionChange)="onChangeSubProduct($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let list of m_endUseofLoad" [value]="list.subproduct_id"> {{list.name }} ( {{list.abbr}} ) </mat-option>
|
||||
<mat-option *ngFor="let list of m_endUseofLoad" [value]="list.subproduct_id">
|
||||
{{list.name }} ( {{list.abbr}} ) </mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -105,16 +106,16 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['end_use_topup'].value == 1"
|
||||
style="width: 28%">
|
||||
<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>
|
||||
</span>
|
||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' && !isContribution">
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="Amount of Own Contribution"
|
||||
formControlName="own_contribution" OnlyNumber type="text"
|
||||
(keyup)="inWords($event,4)" autocomplete="off">
|
||||
formControlName="own_contribution" OnlyNumber type="text" (keyup)="inWords($event,4)"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}}
|
||||
{{ownContributionInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
@ -211,8 +212,8 @@
|
||||
|
||||
<mat-form-field style="width:46%">
|
||||
<input matInput placeholder="Estimate Market Value as Per Customer"
|
||||
formControlName="emv_per_customer" OnlyNumber type="text"
|
||||
(keyup)="inWords($event,7)" autocomplete="off">
|
||||
formControlName="emv_per_customer" OnlyNumber type="text" (keyup)="inWords($event,7)"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}}
|
||||
{{emvAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -31,7 +31,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
lender_applicant_id: any;
|
||||
main_applicant: any;
|
||||
pageTitle: string = "Loan Details";
|
||||
disableAfterSubmit : boolean = false;
|
||||
disableAfterSubmit: boolean = false;
|
||||
|
||||
/**Declaration of formfields Variables */
|
||||
private notifier: NotifierService;
|
||||
@ -101,7 +101,6 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr;
|
||||
this.productID = this.pd_all_details.pdmaster_details.fk_product_id;
|
||||
this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name;
|
||||
console.log('this.pd_all_details.pdmaster_details',this.pd_all_details.pdmaster_details);
|
||||
this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount : '';
|
||||
this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
|
||||
this.form_id = 10;
|
||||
@ -122,7 +121,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
this.initloanDetailsForm();
|
||||
this.getM_EndUseofLoad();
|
||||
this.getM_EndUseForLoan(this.pdid,this.pd_all_details.pdmaster_details.fk_subproduct_id);
|
||||
this.getM_EndUseForLoan(this.pdid, this.pd_all_details.pdmaster_details.fk_subproduct_id);
|
||||
this.getM_sourceofamount();
|
||||
this.getM_MortageTypeProperty();
|
||||
this.getM_StatusofCunstruction();
|
||||
@ -283,8 +282,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
|
||||
}
|
||||
else{
|
||||
if(this.pd_all_details.pdmaster_details.fk_subproduct_id){
|
||||
else {
|
||||
if (this.pd_all_details.pdmaster_details.fk_subproduct_id) {
|
||||
this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id);
|
||||
}
|
||||
}
|
||||
@ -311,8 +310,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getM_EndUseForLoan(pdid,subproductid) {
|
||||
this._pd.getEndUseForLoan(pdid,subproductid).subscribe(
|
||||
getM_EndUseForLoan(pdid, subproductid) {
|
||||
this._pd.getEndUseForLoan(pdid, subproductid).subscribe(
|
||||
data => {
|
||||
this.m_endUseForLoan = data.records.filter(data => data.isactive == 1);
|
||||
});
|
||||
@ -393,8 +392,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm = this.fb.group({
|
||||
|
||||
loan_amount: [this.exist_loan_amt],
|
||||
loan_tenure:[''],
|
||||
sub_product:[''],
|
||||
loan_tenure: [''],
|
||||
sub_product: [''],
|
||||
end_use: [''],
|
||||
end_use_other: [''],
|
||||
is_transfer: [''],
|
||||
@ -436,8 +435,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
onChangeSubProduct(e){
|
||||
this._pd.getEndUseForLoan(this.pdid,e).subscribe(
|
||||
onChangeSubProduct(e) {
|
||||
this._pd.getEndUseForLoan(this.pdid, e).subscribe(
|
||||
data => {
|
||||
this.m_endUseForLoan = data.records.filter(data => data.isactive == 1);
|
||||
});
|
||||
@ -621,8 +620,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
/** To save Loan FOrm Details */
|
||||
submitLoanDetails() {
|
||||
|
||||
if ((this.isContribution == true)){
|
||||
if(this.loanDetailsForm.controls['is_transfer'].value != 'yes') {
|
||||
if ((this.isContribution == true)) {
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value != 'yes') {
|
||||
this.loanDetailsForm.controls['own_contribution'].setValue('');
|
||||
this.loanDetailsForm.controls['own_contribution'].clearValidators();
|
||||
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
|
||||
@ -633,7 +632,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['source'].clearValidators();
|
||||
this.loanDetailsForm.controls['source'].updateValueAndValidity();
|
||||
}
|
||||
else if(this.loanDetailsForm.controls['is_transfer'].value == 'yes'){
|
||||
else if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||
|
||||
if (this.loanDetailsForm.controls['end_use_topup'].value == 1) {
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].setValidators([Validators.required]);
|
||||
|
||||
@ -2,11 +2,15 @@
|
||||
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">- {{subproduct_abbr}} </span></span><br>
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} <span *ngIf="subproduct_abbr">-
|
||||
{{subproduct_abbr}} </span></span><br>
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
@ -33,14 +37,17 @@
|
||||
</mat-card>
|
||||
|
||||
<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
||||
<mat-card-header><mat-card-title><p>Income Details</p></mat-card-title></mat-card-header>
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
<p>Income Details</p>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<div formArrayName="income_details">
|
||||
<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index; let last=last;"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<mat-select placeholder="Source" formControlName="source">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{src.id}}" *ngFor="let src of sourceData">{{src.name}}</mat-option>
|
||||
<!-- <mat-option value="rental_income">Rental Income</mat-option>
|
||||
@ -86,8 +93,10 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" placeholder="Amount" formControlName="amount" OnlyNumber type="text" (keyup)="inWords($event,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('amount').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Amount" formControlName="amount"
|
||||
OnlyNumber type="text" (keyup)="inWords($event,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('amount').value != ''">{{"₹"}}
|
||||
{{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
@ -115,13 +124,15 @@
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addIncomeDetails()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary"
|
||||
*ngIf="last">
|
||||
<strong>Add More Income Details </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" matTooltip="Delete" class="mr-1 mb-1 hover-icon" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"
|
||||
*ngIf="!last">
|
||||
<button type="button" matTooltip="Delete" class="mr-1 mb-1 hover-icon"
|
||||
matTooltipPosition="above" mat-raised-button mat-icon-button
|
||||
(click)="deleteIncomeDetails(i)" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -189,43 +200,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -247,7 +306,10 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save" matTooltipPosition="above" (click)="submitCurrentDetails()"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save"
|
||||
matTooltipPosition="above" (click)="submitCurrentDetails()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
@ -259,21 +321,21 @@
|
||||
|
||||
<!--<mat-card style="padding: 12px;">-->
|
||||
<!--<form [formGroup]="otherIncomeForm" class="address">-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Other Income"-->
|
||||
<!--formControlName="other_income">-->
|
||||
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||
<!--<mat-option value="No">No</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">-->
|
||||
<!--<mat-card-header>-->
|
||||
<!--<p>Loan Details<p>-->
|
||||
<!--</mat-card-header>-->
|
||||
<!--<div formArrayName="income_details">-->
|
||||
<!--<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index"-->
|
||||
<!--[formGroupName]="i">-->
|
||||
<!--<mat-card-content class="matcard">-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Other Income"-->
|
||||
<!--formControlName="other_income">-->
|
||||
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||
<!--<mat-option value="No">No</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">-->
|
||||
<!--<mat-card-header>-->
|
||||
<!--<p>Loan Details<p>-->
|
||||
<!--</mat-card-header>-->
|
||||
<!--<div formArrayName="income_details">-->
|
||||
<!--<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index"-->
|
||||
<!--[formGroupName]="i">-->
|
||||
<!--<mat-card-content class="matcard">-->
|
||||
|
||||
<!--<mat-card style="min-height: 550px;">
|
||||
<mat-card-content>
|
||||
@ -287,34 +349,34 @@
|
||||
</mat-select>
|
||||
</mat-form-field>-->
|
||||
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput autocomplete="off" placeholder="Amount" formControlName="amount">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Frequency" formControlName="frequency">-->
|
||||
<!--<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<button type="button" mat-raised-button mat-icon-button (click)="addIncomeDetails()"-->
|
||||
<!--*ngIf="i==0">-->
|
||||
<!--<mat-icon>add</mat-icon>-->
|
||||
<!--</button>-->
|
||||
<!--<button type="button" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"-->
|
||||
<!--*ngIf="i>0">-->
|
||||
<!--<mat-icon>close</mat-icon>-->
|
||||
<!--</button>-->
|
||||
<!--</mat-card-content>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</mat-card>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput autocomplete="off" placeholder="Remarks" formControlName="otherincome_remarks">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<button mat-raised-button type="submit" class="button" (click)="submitCurrentDetails()">Submit</button>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput autocomplete="off" placeholder="Amount" formControlName="amount">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<mat-select placeholder="Frequency" formControlName="frequency">-->
|
||||
<!--<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>-->
|
||||
<!--</mat-select>-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<button type="button" mat-raised-button mat-icon-button (click)="addIncomeDetails()"-->
|
||||
<!--*ngIf="i==0">-->
|
||||
<!--<mat-icon>add</mat-icon>-->
|
||||
<!--</button>-->
|
||||
<!--<button type="button" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"-->
|
||||
<!--*ngIf="i>0">-->
|
||||
<!--<mat-icon>close</mat-icon>-->
|
||||
<!--</button>-->
|
||||
<!--</mat-card-content>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</mat-card>-->
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput autocomplete="off" placeholder="Remarks" formControlName="otherincome_remarks">-->
|
||||
<!--</mat-form-field>-->
|
||||
<!--<button mat-raised-button type="submit" class="button" (click)="submitCurrentDetails()">Submit</button>-->
|
||||
<!--</form>-->
|
||||
<!--</mat-card>-->
|
||||
|
||||
<!--<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
||||
<!--<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
||||
<mat-card-header>
|
||||
<p>Income Details<p>
|
||||
</mat-card-header>
|
||||
@ -333,7 +395,7 @@
|
||||
<mat-option value="agricultural_income">Agricultural Income</mat-option>
|
||||
<mat-option value="dividend_income">Dividend Income</mat-option>
|
||||
<mat-option value="others">Others</mat-option> -->
|
||||
<!-- </mat-select>
|
||||
<!-- </mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('source').value == 5 ">
|
||||
<input matInput autocomplete="off" placeholder="Specify Others Source"
|
||||
@ -349,9 +411,9 @@
|
||||
</mat-select> --
|
||||
</mat-form-field>-->
|
||||
|
||||
<!-- {{otherIncomeForm.controls.frequency.value}} -->
|
||||
<!-- {{otherIncomeForm.controls.frequency.value}} -->
|
||||
|
||||
<!-- <mat-form-field *ngIf="details.get('frequency').value == 8">
|
||||
<!-- <mat-form-field *ngIf="details.get('frequency').value == 8">
|
||||
<input matInput autocomplete="off" placeholder="Specify Others Frequency"
|
||||
formControlName="others_frequency">
|
||||
</mat-form-field>
|
||||
|
||||
@ -22,7 +22,7 @@ import {
|
||||
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
import { RentalVerificationComponent } from './../rental-verification/rental-verification.component';
|
||||
|
||||
@ -38,24 +38,24 @@ export class OtherIncomeComponent implements OnInit {
|
||||
lender_applicant_id: any;
|
||||
main_applicant: any;
|
||||
pageTitle: string = "Other Income Details";
|
||||
loadDataStatus: boolean=true;
|
||||
loadDataStatus: boolean = true;
|
||||
|
||||
|
||||
// @Input() pdid: number;
|
||||
// @Input() form_id: number;
|
||||
pdid : string;
|
||||
form_id:number;
|
||||
pdid: string;
|
||||
form_id: number;
|
||||
|
||||
public otherIncomeForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
frequencyData: any = [];
|
||||
sourceData : any = [];
|
||||
amtInwords : any = [];
|
||||
applicants : any = [];
|
||||
incomeEarnedBy : any = [];
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
isIncomeEarnedBy: any=[];
|
||||
sourceData: any = [];
|
||||
amtInwords: any = [];
|
||||
applicants: any = [];
|
||||
incomeEarnedBy: any = [];
|
||||
existCompanyList: any = [];
|
||||
mergeCompanyApplicant: any = [];
|
||||
isIncomeEarnedBy: any = [];
|
||||
// stringArr = [];
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
@ -65,8 +65,7 @@ export class OtherIncomeComponent implements OnInit {
|
||||
private _pd: PdTrigerService,
|
||||
private dialog: MatDialog,
|
||||
private dialogRef: MatDialogRef<OtherIncomeComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any)
|
||||
{
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 9;
|
||||
this.notifier = notifier;
|
||||
@ -75,11 +74,11 @@ export class OtherIncomeComponent implements OnInit {
|
||||
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.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1);
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.applicants = this.applicants.filter(val => val.applicant_type == 0 || val.applicant_type == 1);
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
}
|
||||
|
||||
public viewerOptions: any = {
|
||||
public viewerOptions: any = {
|
||||
navbar: false,
|
||||
toolbar: {
|
||||
zoomIn: 4,
|
||||
@ -97,9 +96,9 @@ public viewerOptions: any = {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
ngOnInit() {
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.existCompanyList = data.records.filter(val => val.is_active === true);
|
||||
}
|
||||
@ -113,12 +112,12 @@ public viewerOptions: any = {
|
||||
this.mergeCompanyApplicant.push({ groupName: 'COMPANIES', groupValues: modifyCompanyList })
|
||||
}
|
||||
// get applicant list
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
let modifyApplicantList: any = [];
|
||||
if (this.applicants.length > 0) {
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
this.mergeCompanyApplicant.push({ groupName: 'APPLICANTS', groupValues: modifyApplicantList })
|
||||
|
||||
}
|
||||
|
||||
@ -129,7 +128,7 @@ public viewerOptions: any = {
|
||||
this._pd.getAllPersonsName(this.pdid).subscribe(data => {
|
||||
|
||||
|
||||
if(data.dataStatus == true){
|
||||
if (data.dataStatus == true) {
|
||||
this.incomeEarnedBy = data.record;
|
||||
}
|
||||
|
||||
@ -146,15 +145,15 @@ public viewerOptions: any = {
|
||||
this.otherIncomeForm.controls['otherincome_remarks'].setValue(value.records.otherincome_remarks);
|
||||
if (value.records.other_income == 'Yes') {
|
||||
|
||||
var result = Object.keys(value.records.income_details).map(function(key) {
|
||||
var result = Object.keys(value.records.income_details).map(function (key) {
|
||||
return value.records.income_details[key];
|
||||
});
|
||||
if (result.length > 0) {
|
||||
result.forEach((val,index) => {
|
||||
result.forEach((val, index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(val.amount);
|
||||
// this.getOtherIncomeEarnedBy(val.income_earned_by,index);
|
||||
control.push(this.createDetail());
|
||||
this.getOtherIncomeEarnedBy(val.income_earned_by,index);
|
||||
this.getOtherIncomeEarnedBy(val.income_earned_by, index);
|
||||
});
|
||||
this.otherIncomeForm.controls['income_details'].setValue(result);
|
||||
} else {
|
||||
@ -186,13 +185,13 @@ public viewerOptions: any = {
|
||||
createDetail() {
|
||||
return this.fb.group({
|
||||
source: [''],
|
||||
others_source : [''],
|
||||
address : [''],
|
||||
income_earned_by:[''],
|
||||
others_income_earned_by:[''],
|
||||
others_source: [''],
|
||||
address: [''],
|
||||
income_earned_by: [''],
|
||||
others_income_earned_by: [''],
|
||||
amount: [''],
|
||||
frequency: [''],
|
||||
others_frequency : ['']
|
||||
others_frequency: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@ -216,7 +215,7 @@ public viewerOptions: any = {
|
||||
this.sourceData.push(val);
|
||||
}
|
||||
})
|
||||
if(this.customer_segment_abbr == 'SE-RI'){
|
||||
if (this.customer_segment_abbr == 'SE-RI') {
|
||||
let inx = this.sourceData.map(data => data.name).indexOf("Rental Income")
|
||||
/** -X- Please NOTE THIS :
|
||||
* inx is '-1' -> this will remove the last item from array
|
||||
@ -252,11 +251,11 @@ public viewerOptions: any = {
|
||||
}
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if(data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -269,7 +268,7 @@ public viewerOptions: any = {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
if (control instanceof FormControl) {
|
||||
control.markAsTouched({onlySelf: true});
|
||||
control.markAsTouched({ onlySelf: true });
|
||||
} else if (control instanceof FormGroup) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
@ -277,11 +276,11 @@ public viewerOptions: any = {
|
||||
}
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e,i){
|
||||
inWords(e, i) {
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
}
|
||||
|
||||
Toview(){
|
||||
Toview() {
|
||||
// alert('Rental Info ');
|
||||
// const dialogRef = this.dialog.open(RentalInfoComponent, {
|
||||
// data: {}
|
||||
@ -306,40 +305,39 @@ public viewerOptions: any = {
|
||||
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
if (o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
|
||||
getOtherIncomeEarnedBy(value,i) {
|
||||
// console.log('value',value,'I',i);
|
||||
getOtherIncomeEarnedBy(value, i) {
|
||||
|
||||
let Ctrls = <FormArray>this.otherIncomeForm.controls['income_details'];
|
||||
// console.log('ParCtrls',Ctrls);
|
||||
let ChdCtrls:any = <FormArray>Ctrls.controls[i];
|
||||
// console.log('ChdCtrls',ChdCtrls);
|
||||
|
||||
let ChdCtrls: any = <FormArray>Ctrls.controls[i];
|
||||
|
||||
|
||||
let Avaliablity = 1;
|
||||
console.log('val',value);
|
||||
if(value.length>0){
|
||||
|
||||
if (value.length > 0) {
|
||||
value.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
if (option.id == 0 && option.group_id == 2) {
|
||||
Avaliablity = option.id;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Avaliablity == 0){
|
||||
// console.log('if Avaliablity',Avaliablity);
|
||||
if (Avaliablity == 0) {
|
||||
|
||||
ChdCtrls.controls.others_income_earned_by.setValidators([Validators.required]);
|
||||
this.isIncomeEarnedBy[i] = true;
|
||||
}else if(Avaliablity == 1){
|
||||
// console.log('else Avaliablity',Avaliablity);
|
||||
// console.log('esle this.isIncomeEarnedBy[ParInx]',this.isIncomeEarnedBy[i]);
|
||||
} else if (Avaliablity == 1) {
|
||||
|
||||
ChdCtrls.controls.others_income_earned_by.setValue('');
|
||||
ChdCtrls.controls.others_income_earned_by.clearValidators();
|
||||
this.isIncomeEarnedBy[i] = false;
|
||||
// console.log('else this.isIncomeEarnedBy[ParInx]',this.isIncomeEarnedBy[i]);
|
||||
|
||||
}
|
||||
|
||||
ChdCtrls.controls.others_income_earned_by.updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ export class RentalVerificationComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef<RentalVerificationComponent>) {
|
||||
console.log('data',data);
|
||||
|
||||
this.pdid = this.data.pdmaster_details.pd_id;
|
||||
this.notifier = notifier;
|
||||
this.form_id = 17;
|
||||
|
||||
@ -4,14 +4,17 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
|
||||
<form [formGroup]="stockForms" (submit)="submitDetails($event); false;">
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
<form [formGroup]="stockForms" (submit)="submitDetails($event); false;">
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Questions">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
@ -19,25 +22,31 @@
|
||||
<mat-card *ngIf="manufacturingForm">
|
||||
<h5 class="highlight" style="margin: 12px;">Manufacturing Stock Details</h5>
|
||||
<div formArrayName="manufacturing_details">
|
||||
<div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<span formArrayName="manufacturing_raw_materials">
|
||||
<div *ngFor="let mrm of md.controls.manufacturing_raw_materials['controls']; let a=index; let last=last" [formGroupName]="a">
|
||||
<div *ngFor="let mrm of md.controls.manufacturing_raw_materials['controls']; let a=index; let last=last"
|
||||
[formGroupName]="a">
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Raw Material #{{a+1}} </i> </mat-label>
|
||||
<mat-label class="highlight"> <i>Raw Material #{{a+1}} </i>
|
||||
</mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="raw_name" >
|
||||
<input matInput autocomplete="off" placeholder="Name"
|
||||
formControlName="raw_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="stock_observed" (selectionChange)="checkComments($event.value,1,a)">
|
||||
<mat-select placeholder="Stock" formControlName="stock_observed"
|
||||
(selectionChange)="checkComments($event.value,1,a)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="mrm.get('stock_observed').value == 'yes'" >
|
||||
<span *ngIf="mrm.get('stock_observed').value == 'yes'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="raw_quantity" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="raw_quantity" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
@ -46,25 +55,33 @@
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="mrm.get('raw_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="other_uom" >
|
||||
<mat-form-field *ngIf="mrm.get('raw_uom').value == 1"
|
||||
style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM"
|
||||
formControlName="other_uom">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="raw_value" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"₹"}} {{mrm.get('raw_value').value | numberToWords}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="raw_value" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"₹"}}
|
||||
{{mrm.get('raw_value').value | numberToWords}}
|
||||
Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
|
||||
matTooltip="Delete Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="md.controls.manufacturing_raw_materials.controls.length>1">
|
||||
<button type="button" mat-raised-button mat-icon-button
|
||||
(click)="deleteRawMaterials(a,1)" matTooltip="Delete Raw Materials"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon"
|
||||
*ngIf="md.controls.manufacturing_raw_materials.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addRawMaterials(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
matTooltip="Add More" matTooltipPosition="left"
|
||||
color="primary" *ngIf="last">
|
||||
<strong>Add More Raw Materials </strong>
|
||||
</button>
|
||||
</div>
|
||||
@ -75,64 +92,81 @@
|
||||
</span>
|
||||
<span *ngIf="RMCommentCard">
|
||||
<mat-form-field style="width:90%">
|
||||
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw">
|
||||
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations"
|
||||
formControlName="is_sufficiant_raw">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" style="width: 90%" *ngIf="md.get('is_sufficiant_raw').value == 'no'">
|
||||
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
|
||||
<mat-label> <i>Please comment on the stock level observed?</i>
|
||||
</mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed"
|
||||
formControlName="rawmaterial_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
|
||||
<div formArrayName="manufacturing_finished_goods">
|
||||
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index;let last=last" [formGroupName]="b">
|
||||
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index;let last=last"
|
||||
[formGroupName]="b">
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Finished Goods #{{b+1}} </i> </mat-label>
|
||||
<mat-label class="highlight"> <i>Finished Goods #{{b+1}} </i>
|
||||
</mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
<input matInput autocomplete="off" placeholder="Name"
|
||||
formControlName="goods_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed" (selectionChange)="checkComments($event.value,2,b)">
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed"
|
||||
(selectionChange)="checkComments($event.value,2,b)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="mfg.get('goods_observed').value == 'yes'" >
|
||||
<span *ngIf="mfg.get('goods_observed').value == 'yes'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="goods_quantity" OnlyNumber
|
||||
type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
formControlName="goods_uom" >
|
||||
formControlName="goods_uom">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="mfg.get('goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="goods_other_uom" >
|
||||
<mat-form-field *ngIf="mfg.get('goods_uom').value == 1"
|
||||
style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM"
|
||||
formControlName="goods_other_uom">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"₹"}} {{mfg.get('goods_value').value | numberToWords}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="goods_value" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"₹"}}
|
||||
{{mfg.get('goods_value').value |
|
||||
numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(b,1)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="md.controls.manufacturing_finished_goods.controls.length>1">
|
||||
<button type="button" mat-raised-button mat-icon-button
|
||||
(click)="deleteGoods(b,1)" matTooltip="Delete"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon"
|
||||
*ngIf="md.controls.manufacturing_finished_goods.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
matTooltip="Add More" matTooltipPosition="left"
|
||||
color="primary" *ngIf="last">
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
@ -147,52 +181,68 @@
|
||||
<mat-card *ngIf="retailForm">
|
||||
<h5 class="highlight" style="margin: 12px;">Retail Trading Details</h5>
|
||||
<div formArrayName="retail_details">
|
||||
<div *ngFor="let rd of stockForms.controls.retail_details['controls']; let j=index" [formGroupName]="j">
|
||||
<div *ngFor="let rd of stockForms.controls.retail_details['controls']; let j=index"
|
||||
[formGroupName]="j">
|
||||
<div formArrayName="retail_traded_goods">
|
||||
<div *ngFor="let item of rd.controls.retail_traded_goods['controls']; let e=index;let last =last" [formGroupName]="e">
|
||||
<div *ngFor="let item of rd.controls.retail_traded_goods['controls']; let e=index;let last =last"
|
||||
[formGroupName]="e">
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{e+1}} </i> </mat-label>
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{e+1}} </i>
|
||||
</mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
<input matInput autocomplete="off" placeholder="Name"
|
||||
formControlName="traded_goods_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="checkComments($event.value,3,e)">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed"
|
||||
(selectionChange)="checkComments($event.value,3,e)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="item.get('traded_goods_observed').value == 'yes'" >
|
||||
<span *ngIf="item.get('traded_goods_observed').value == 'yes'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="traded_goods_quantity"
|
||||
OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
formControlName="traded_goods_uom" >
|
||||
formControlName="traded_goods_uom">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('traded_goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
|
||||
<mat-form-field *ngIf="item.get('traded_goods_uom').value == 1"
|
||||
style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM"
|
||||
formControlName="traded_goods_other_uom">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"₹"}} {{item.get('estimated_traded_goods_value').value | numberToWords}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="estimated_traded_goods_value"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
||||
{{item.get('estimated_traded_goods_value').value
|
||||
| numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(e,1)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="rd.controls.retail_traded_goods.controls.length>1">
|
||||
<button type="button" mat-raised-button mat-icon-button
|
||||
(click)="deleteTradedGoods(e,1)" matTooltip="Delete Traded Goods"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon"
|
||||
*ngIf="rd.controls.retail_traded_goods.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
matTooltip="Add More" matTooltipPosition="left"
|
||||
color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
@ -208,53 +258,69 @@
|
||||
<mat-card *ngIf="tradingForm">
|
||||
<h5 class="highlight" style="margin: 12px;">Wholesale Trading Details</h5>
|
||||
<div formArrayName="trade_details">
|
||||
<div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index" [formGroupName]="k">
|
||||
<div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index"
|
||||
[formGroupName]="k">
|
||||
<div formArrayName="trading_traded_goods">
|
||||
<div *ngFor="let tradetg of td.controls.trading_traded_goods['controls']; let g=index;let last = last" [formGroupName]="g">
|
||||
<div *ngFor="let tradetg of td.controls.trading_traded_goods['controls']; let g=index;let last = last"
|
||||
[formGroupName]="g">
|
||||
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{g+1}} </i> </mat-label>
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{g+1}} </i>
|
||||
</mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
<input matInput autocomplete="off" placeholder="Name"
|
||||
formControlName="traded_goods_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="checkComments($event.value,4,g)">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed"
|
||||
(selectionChange)="checkComments($event.value,4,g)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No stock observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'" >
|
||||
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="traded_goods_quantity"
|
||||
OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Measurement"
|
||||
formControlName="traded_goods_uom" >
|
||||
formControlName="traded_goods_uom">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tradetg.get('traded_goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
|
||||
<mat-form-field *ngIf="tradetg.get('traded_goods_uom').value == 1"
|
||||
style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM"
|
||||
formControlName="traded_goods_other_uom">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"₹"}} {{tradetg.get('estimated_traded_goods_value').value | numberToWords}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="estimated_traded_goods_value"
|
||||
OnlyNumber type="text">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
||||
{{tradetg.get('estimated_traded_goods_value').value
|
||||
| numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(2)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
matTooltip="Add More" matTooltipPosition="left"
|
||||
color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(g,2)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="td.controls.trading_traded_goods.controls.length>1">
|
||||
<button type="button" mat-raised-button mat-icon-button
|
||||
(click)="deleteTradedGoods(g,2)" matTooltip="Delete Traded Goods"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon"
|
||||
*ngIf="td.controls.trading_traded_goods.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
@ -270,15 +336,17 @@
|
||||
<div *ngIf="TGCommentCard">
|
||||
<br>
|
||||
<mat-form-field style="width:90%">
|
||||
<mat-select placeholder="Is the stock of finished / traded goods observed, sufficient considering the size of operations" formControlName="is_sufficiant_finished_and_traded_goods">
|
||||
<mat-select placeholder="Is the stock of finished / traded goods observed, sufficient considering the size of operations"
|
||||
formControlName="is_sufficiant_finished_and_traded_goods">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" style="width: 90%" *ngIf="this.stockForms.controls.is_sufficiant_finished_and_traded_goods.value == 'no'">
|
||||
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="finished_and_traded_goods_remarks"></textarea>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed"
|
||||
formControlName="finished_and_traded_goods_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -287,7 +355,8 @@
|
||||
<p>Service Provider</p>
|
||||
</mat-card-header> -->
|
||||
<h5 class="highlight" style="margin: 12px;">Service Provider</h5>
|
||||
<div style="text-align: center; margin: 12px;">Service Provider Details Not applicable here !!</div>
|
||||
<div style="text-align: center; margin: 12px;">Service Provider Details Not
|
||||
applicable here !!</div>
|
||||
</mat-card>
|
||||
|
||||
|
||||
@ -305,42 +374,48 @@
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1"
|
||||
alt="Image 1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2"
|
||||
alt="Image 2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3"
|
||||
alt="Image 3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2"
|
||||
alt="Image 2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
|
||||
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3"
|
||||
alt="Image 3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20" class="m-gap p-gap">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
|
||||
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1"
|
||||
alt="Image 1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -348,43 +423,91 @@
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||
<a href="http://www.google.com">
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">version_111</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -394,10 +517,10 @@
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label class="highlight"> <i>Remarks</i> </mat-label>
|
||||
@ -405,13 +528,17 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||
matTooltipPosition="above" type="submit">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</mat-dialog-actions>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
{{ errorMessage }}
|
||||
<!-- <div *ngIf="!noRecordsFound"> <i> {{ errorMessage }} </i> </div> -->
|
||||
<div *ngIf="!noRecordsFound" align="center"> <i> Fill Business Form First! / No Company Found at this ID {{company_id}}! .... </i> </div>
|
||||
<notifier-container></notifier-container>
|
||||
<div *ngIf="!noRecordsFound" align="center"> <i> Fill Business Form First! / No Company Found at this ID
|
||||
{{company_id}}! .... </i> </div>
|
||||
<notifier-container></notifier-container>
|
||||
@ -1,10 +1,10 @@
|
||||
import { Component,OnInit,Inject,Input } from '@angular/core';
|
||||
import { Component, OnInit, Inject, Input } from '@angular/core';
|
||||
|
||||
import { FormBuilder,FormGroup,Validators,FormArray, FormControl } from '@angular/forms';
|
||||
import { FormBuilder, FormGroup, Validators, FormArray, FormControl } from '@angular/forms';
|
||||
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
@ -19,13 +19,13 @@ import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
|
||||
export class StockComponent implements OnInit {
|
||||
|
||||
pageTitle: string ="Stock Details";
|
||||
pageTitle: string = "Stock Details";
|
||||
|
||||
private notifier: NotifierService;
|
||||
|
||||
public stockForms: FormGroup;
|
||||
|
||||
public uomData : any = [];
|
||||
public uomData: any = [];
|
||||
|
||||
public submitted = false;
|
||||
|
||||
@ -45,10 +45,10 @@ export class StockComponent implements OnInit {
|
||||
TGCommentCard: boolean = false
|
||||
|
||||
serviceProviderForm: Boolean = false;
|
||||
suppliers_raw_materials : any = [];
|
||||
suppliers_retail_trade_details : any = [];
|
||||
suppliers_wholesale_trade_details : any = [];
|
||||
suppliers_finished_goods : any =[];
|
||||
suppliers_raw_materials: any = [];
|
||||
suppliers_retail_trade_details: any = [];
|
||||
suppliers_wholesale_trade_details: any = [];
|
||||
suppliers_finished_goods: any = [];
|
||||
// suppliers_service_product : any = [];
|
||||
|
||||
/** Constructor */
|
||||
@ -57,13 +57,13 @@ export class StockComponent implements OnInit {
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dialogRef: MatDialogRef<StockComponent>,
|
||||
private _pd: PdTrigerService,@Inject(MAT_DIALOG_DATA)
|
||||
private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA)
|
||||
public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 11;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' + this.pageTitle;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
@ -93,22 +93,21 @@ export class StockComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this._pd.stockFormAccess(this.pdid,this.company_id).subscribe(data => {
|
||||
this._pd.stockFormAccess(this.pdid, this.company_id).subscribe(data => {
|
||||
|
||||
if(data.dataStatus == true){
|
||||
if (data.dataStatus == true) {
|
||||
this.initstockForms(data.record);
|
||||
}
|
||||
else if(data.dataStatus == false)
|
||||
{
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID '+ this.company_id );
|
||||
else if (data.dataStatus == false) {
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID ' + this.company_id);
|
||||
this.noRecordsFound = false;
|
||||
this.errorMessage = 'Fill Business Form First! / No Company Found at this ID' + this.company_id +'! ....';
|
||||
this.errorMessage = 'Fill Business Form First! / No Company Found at this ID' + this.company_id + '! ....';
|
||||
return;
|
||||
}
|
||||
else{
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID '+ this.company_id );
|
||||
else {
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID ' + this.company_id);
|
||||
this.noRecordsFound = false;
|
||||
this.errorMessage = 'Fill Business Form First! / No Company Found at this ID' + this.company_id +'! ....';
|
||||
this.errorMessage = 'Fill Business Form First! / No Company Found at this ID' + this.company_id + '! ....';
|
||||
return;
|
||||
}
|
||||
}, err => {
|
||||
@ -121,18 +120,13 @@ export class StockComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
public initstockForms(record){
|
||||
// console.log('record.from_business',record.from_business);
|
||||
public initstockForms(record) {
|
||||
|
||||
let api = Object.keys(record.from_business).map(function (key) {
|
||||
return record.from_business[key];
|
||||
});
|
||||
// console.log(api);
|
||||
|
||||
let type2 = record.from_business.filter(data => data.type_of_activity_id == 2);
|
||||
// console.log('type2[0].hasOwnProperty("products")',type2[0].hasOwnProperty("products"));
|
||||
// console.log('type2',type2);
|
||||
// console.log('type2 0 index',type2[0]);
|
||||
// console.log('type2 product',type2[0].product);
|
||||
// console.log('type2 length',type2[0].product.length);
|
||||
|
||||
let type2length = type2[0].hasOwnProperty("products") ? type2[0].products.length : 0;
|
||||
let type3 = record.from_business.filter(data => data.type_of_activity_id == 3);
|
||||
@ -140,13 +134,6 @@ export class StockComponent implements OnInit {
|
||||
let type4 = record.from_business.filter(data => data.type_of_activity_id == 4);
|
||||
let type4length = type4[0].hasOwnProperty("products") ? type4[0].products.length : 0;
|
||||
|
||||
// console.log(type2);
|
||||
// console.log(type2length);
|
||||
// console.log(type3);
|
||||
// console.log(type3length);
|
||||
// console.log(type4);
|
||||
// console.log(type4length);
|
||||
|
||||
let rm_api = record.from_supplier;
|
||||
|
||||
let params: any = {};
|
||||
@ -156,22 +143,22 @@ export class StockComponent implements OnInit {
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
if (value.status == 200) {
|
||||
let dataForm = value.records;
|
||||
if(dataForm !== undefined) {
|
||||
if (dataForm !== undefined) {
|
||||
this.stockForms = this.fb.group({
|
||||
pdid: [this.pdid],
|
||||
formid: [this.form_id],
|
||||
company_id: [this.company_id],
|
||||
stock_remarks: [dataForm.stock_remarks],
|
||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||
retail_details : this.fb.array([this.retailFormCreation(type3length)]),
|
||||
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
||||
is_sufficiant_finished_and_traded_goods:[dataForm.is_sufficiant_finished_and_traded_goods],
|
||||
finished_and_traded_goods_remarks:[dataForm.finished_and_traded_goods_remarks]
|
||||
is_sufficiant_finished_and_traded_goods: [dataForm.is_sufficiant_finished_and_traded_goods],
|
||||
finished_and_traded_goods_remarks: [dataForm.finished_and_traded_goods_remarks]
|
||||
});
|
||||
if(api.length > 0){
|
||||
if (api.length > 0) {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
|
||||
let manufacturing_temparr = [];
|
||||
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
|
||||
@ -183,21 +170,21 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
let retail_temparr = [];
|
||||
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
|
||||
this.initRetailDetails(retail_temparr);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
let trading_temparr = [];
|
||||
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
|
||||
this.initTradingDetails(trading_temparr);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
}
|
||||
@ -205,7 +192,7 @@ export class StockComponent implements OnInit {
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
|
||||
|
||||
this.stockForms = this.fb.group({
|
||||
@ -214,16 +201,16 @@ export class StockComponent implements OnInit {
|
||||
company_id: [this.company_id],
|
||||
stock_remarks: [''],
|
||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||
retail_details : this.fb.array([this.retailFormCreation(type3length)]),
|
||||
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
||||
is_sufficiant_finished_and_traded_goods:[''],
|
||||
finished_and_traded_goods_remarks:['']
|
||||
is_sufficiant_finished_and_traded_goods: [''],
|
||||
finished_and_traded_goods_remarks: ['']
|
||||
});
|
||||
|
||||
if(api.length > 0){
|
||||
if (api.length > 0) {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
this.suppliers_raw_materials = rm_api;
|
||||
this.suppliers_finished_goods = val.products;
|
||||
this.initManufacturingDetails(null);
|
||||
@ -232,19 +219,19 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
this.suppliers_retail_trade_details = val.products;
|
||||
this.initRetailDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.suppliers_wholesale_trade_details =val.products;
|
||||
if (val.products) {
|
||||
this.suppliers_wholesale_trade_details = val.products;
|
||||
this.initTradingDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
// this.suppliers_service_product = val.products;
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
@ -263,15 +250,15 @@ export class StockComponent implements OnInit {
|
||||
company_id: [this.company_id],
|
||||
stock_remarks: [''],
|
||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||
retail_details : this.fb.array([this.retailFormCreation(type3length)]),
|
||||
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
||||
is_sufficiant_finished_and_traded_goods:[''],
|
||||
finished_and_traded_goods_remarks:['']
|
||||
is_sufficiant_finished_and_traded_goods: [''],
|
||||
finished_and_traded_goods_remarks: ['']
|
||||
});
|
||||
if(api.length > 0){
|
||||
if (api.length > 0) {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
this.suppliers_finished_goods = val.products;
|
||||
this.suppliers_raw_materials = rm_api;
|
||||
this.initManufacturingDetails(null);
|
||||
@ -280,19 +267,19 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.suppliers_retail_trade_details= val.products;
|
||||
if (val.products) {
|
||||
this.suppliers_retail_trade_details = val.products;
|
||||
this.initRetailDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
this.suppliers_wholesale_trade_details = val.products;
|
||||
this.initTradingDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
if (val.products) {
|
||||
// this.suppliers_service_product = val.products;
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
@ -311,26 +298,22 @@ export class StockComponent implements OnInit {
|
||||
let arrlength = arr[0].hasOwnProperty("products") ? arr[0].products.length : 0;
|
||||
let rm_arr = record.from_supplier;
|
||||
|
||||
// console.log('manu arr',arr);
|
||||
// console.log('rm_arr',rm_arr);
|
||||
// let rm_arr = 0;
|
||||
if(arrlength > 0){
|
||||
if (arrlength > 0) {
|
||||
this.manufacturingForm = true;
|
||||
return this.fb.group({
|
||||
manufacturing_raw_materials: this.fb.array([]),
|
||||
is_sufficiant_raw: [],
|
||||
rawmaterial_remarks:[],
|
||||
rawmaterial_remarks: [],
|
||||
manufacturing_finished_goods: this.fb.array([]),
|
||||
})
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
retailForm: Boolean = false;
|
||||
retailFormCreation(val) {
|
||||
// console.log(val);
|
||||
retailForm: Boolean = false;
|
||||
retailFormCreation(val) {
|
||||
// let arr = val.filter(data => data.type_of_activity_id == 3);
|
||||
if (val > 0) {
|
||||
this.retailForm = true;
|
||||
@ -341,10 +324,10 @@ retailFormCreation(val) {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tradingForm: Boolean = false;
|
||||
tradingFormCreation(val) {
|
||||
tradingForm: Boolean = false;
|
||||
tradingFormCreation(val) {
|
||||
// let arr = val.filter(data => data.type_of_activity_id == 4);
|
||||
if (val > 0) {
|
||||
this.tradingForm = true;
|
||||
@ -354,7 +337,7 @@ tradingFormCreation(val) {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
initManufacturingDetails(datas) {
|
||||
@ -362,28 +345,31 @@ tradingFormCreation(val) {
|
||||
const rawMaterial = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
||||
const finishedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials'];
|
||||
if(datas === null){
|
||||
if (datas === null) {
|
||||
|
||||
|
||||
if(this.suppliers_raw_materials.length > 0){
|
||||
if (this.suppliers_raw_materials.length > 0) {
|
||||
this.suppliers_raw_materials.forEach(val => {
|
||||
let Ref_RawMaterials : any = {'raw_name': val,
|
||||
'stock_observed':'',
|
||||
let Ref_RawMaterials: any = {
|
||||
'raw_name': val,
|
||||
'stock_observed': '',
|
||||
'raw_quantity': '',
|
||||
'raw_uom': '',
|
||||
'other_uom': '',
|
||||
'raw_value': ''};
|
||||
'raw_value': ''
|
||||
};
|
||||
rawMaterial.push(this.createRawmaterial(Ref_RawMaterials));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
rawMaterial.push(this.createRawmaterial(null));
|
||||
}
|
||||
|
||||
if(this.suppliers_finished_goods.length > 0){
|
||||
if (this.suppliers_finished_goods.length > 0) {
|
||||
// for (let val of this.suppliers_finished_goods) {
|
||||
this.suppliers_finished_goods.forEach(val => {
|
||||
let Ref_Finished_Goods : any = {'goods_name': val,
|
||||
let Ref_Finished_Goods: any = {
|
||||
'goods_name': val,
|
||||
'goods_observed': '',
|
||||
'goods_quantity': '',
|
||||
'goods_uom': '',
|
||||
@ -394,31 +380,31 @@ tradingFormCreation(val) {
|
||||
// finishedGoods.push(this.createGoods(null));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(datas.manufacturing_raw_materials != undefined){
|
||||
if (datas.manufacturing_raw_materials != undefined) {
|
||||
// for (let val of datas.manufacturing_raw_materials) {
|
||||
datas.manufacturing_raw_materials.forEach((val,index) => {
|
||||
this.checkComments(val.stock_observed,1,index);
|
||||
datas.manufacturing_raw_materials.forEach((val, index) => {
|
||||
this.checkComments(val.stock_observed, 1, index);
|
||||
// this.checkComments(val.is_sufficiant_raw,1,index);
|
||||
rawMaterial.push(this.createRawmaterial(val));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
rawMaterial.push(this.createRawmaterial(null));
|
||||
}
|
||||
if(datas.manufacturing_finished_goods != undefined){
|
||||
if (datas.manufacturing_finished_goods != undefined) {
|
||||
// for (let val of datas.manufacturing_finished_goods) {
|
||||
datas.manufacturing_finished_goods.forEach((val,index) => {
|
||||
this.checkComments(val.goods_observed,2,index);
|
||||
datas.manufacturing_finished_goods.forEach((val, index) => {
|
||||
this.checkComments(val.goods_observed, 2, index);
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
}
|
||||
@ -426,14 +412,14 @@ tradingFormCreation(val) {
|
||||
|
||||
createRawmaterial(records) {
|
||||
|
||||
if(records === null) {
|
||||
if (records === null) {
|
||||
|
||||
return this.fb.group({
|
||||
raw_name: [''],
|
||||
stock_observed:[''],
|
||||
stock_observed: [''],
|
||||
raw_quantity: [''],
|
||||
raw_uom: [''],
|
||||
other_uom : [''],
|
||||
other_uom: [''],
|
||||
raw_value: [''],
|
||||
// rawmaterial_value: [''],
|
||||
})
|
||||
@ -442,10 +428,10 @@ tradingFormCreation(val) {
|
||||
return this.fb.group({
|
||||
// manufacturing_raw_material_name: [records.manufacturing_raw_material_name || null],
|
||||
raw_name: [records.raw_name],
|
||||
stock_observed:[records.stock_observed],
|
||||
stock_observed: [records.stock_observed],
|
||||
raw_quantity: [records.raw_quantity],
|
||||
raw_uom: [records.raw_uom],
|
||||
other_uom : [records.other_uom],
|
||||
other_uom: [records.other_uom],
|
||||
raw_value: [records.raw_value],
|
||||
// rawmaterial_value: [records.rawmaterial_value],
|
||||
})
|
||||
@ -456,35 +442,36 @@ tradingFormCreation(val) {
|
||||
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_traded_goods'];
|
||||
|
||||
if(datas === null){
|
||||
if (datas === null) {
|
||||
|
||||
if(this.suppliers_retail_trade_details.length > 0){
|
||||
if (this.suppliers_retail_trade_details.length > 0) {
|
||||
// this.rawMaterialAccess = true;
|
||||
|
||||
this.suppliers_retail_trade_details.forEach(val => {
|
||||
let Ref_Trade_Goods : any = {
|
||||
let Ref_Trade_Goods: any = {
|
||||
'traded_goods_name': val,
|
||||
'traded_goods_observed': '',
|
||||
'traded_goods_quantity': '',
|
||||
'traded_goods_uom': '',
|
||||
'traded_goods_other_uom': '',
|
||||
'estimated_traded_goods_value': ''}
|
||||
'estimated_traded_goods_value': ''
|
||||
}
|
||||
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
|
||||
} else {
|
||||
if(datas.retail_traded_goods !== undefined){
|
||||
if (datas.retail_traded_goods !== undefined) {
|
||||
// for (let val of datas.retail_traded_goods) {
|
||||
datas.retail_traded_goods.forEach((val,index) => {
|
||||
this.checkComments(val.traded_goods_observed,3,index);
|
||||
datas.retail_traded_goods.forEach((val, index) => {
|
||||
this.checkComments(val.traded_goods_observed, 3, index);
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
}
|
||||
@ -503,7 +490,7 @@ tradingFormCreation(val) {
|
||||
// }
|
||||
|
||||
createGoods(records) {
|
||||
if(records === null) {
|
||||
if (records === null) {
|
||||
return this.fb.group({
|
||||
goods_name: [''],
|
||||
goods_observed: [''],
|
||||
@ -544,37 +531,37 @@ tradingFormCreation(val) {
|
||||
|
||||
initTradingDetails(datas) {
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['trade_details']['controls'][0].controls['trading_traded_goods'];
|
||||
if(datas === null){
|
||||
if (datas === null) {
|
||||
|
||||
|
||||
if(this.suppliers_wholesale_trade_details.length > 0){
|
||||
if (this.suppliers_wholesale_trade_details.length > 0) {
|
||||
// for (let val of this.suppliers_trade_details) {
|
||||
this.suppliers_wholesale_trade_details.forEach(val => {
|
||||
let Ref_Trade_Goods : any = {
|
||||
let Ref_Trade_Goods: any = {
|
||||
'traded_goods_name': val,
|
||||
'traded_goods_observed': '',
|
||||
'traded_goods_quantity': '',
|
||||
'traded_goods_uom': '',
|
||||
'traded_goods_other_uom': '',
|
||||
'estimated_traded_goods_value': ''}
|
||||
'estimated_traded_goods_value': ''
|
||||
}
|
||||
|
||||
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
|
||||
} else {
|
||||
if(datas.trading_traded_goods !==undefined)
|
||||
{
|
||||
if (datas.trading_traded_goods !== undefined) {
|
||||
// for (let val of datas.trading_traded_goods) {
|
||||
datas.trading_traded_goods.forEach((val,index) => {
|
||||
this.checkComments(val.traded_goods_observed,4,index);
|
||||
datas.trading_traded_goods.forEach((val, index) => {
|
||||
this.checkComments(val.traded_goods_observed, 4, index);
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
|
||||
@ -583,7 +570,7 @@ tradingFormCreation(val) {
|
||||
|
||||
|
||||
createTradedGoods(records) {
|
||||
if(records === null) {
|
||||
if (records === null) {
|
||||
return this.fb.group({
|
||||
traded_goods_name: [''],
|
||||
traded_goods_observed: [''],
|
||||
@ -610,15 +597,15 @@ tradingFormCreation(val) {
|
||||
|
||||
/** Manufacturing -> To Add More Raw Material Details */
|
||||
addRawMaterials(flag) {
|
||||
if(flag==1){
|
||||
if (flag == 1) {
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
||||
control.push(this.createRawmaterial(null));
|
||||
}
|
||||
}
|
||||
|
||||
/** Manufacturing -> To Remove Raw Material Details */
|
||||
deleteRawMaterials(index,flag) {
|
||||
if(flag==1){
|
||||
deleteRawMaterials(index, flag) {
|
||||
if (flag == 1) {
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
@ -626,15 +613,15 @@ tradingFormCreation(val) {
|
||||
|
||||
/** Manufacturing -> To Add More Finished Goods */
|
||||
addGoods(flag) {
|
||||
if(flag == 1){
|
||||
if (flag == 1) {
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
|
||||
control.push(this.createGoods(null));
|
||||
}
|
||||
}
|
||||
|
||||
/** Manufacturing -> To Remove Finished Goods */
|
||||
deleteGoods(index,flag) {
|
||||
if(flag == 1){
|
||||
deleteGoods(index, flag) {
|
||||
if (flag == 1) {
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
@ -645,7 +632,7 @@ tradingFormCreation(val) {
|
||||
* Case 2 wholesale Traded -> To Add More trade Goods
|
||||
*/
|
||||
addTradedGoods(flag) {
|
||||
switch(flag){
|
||||
switch (flag) {
|
||||
|
||||
case 1: {
|
||||
const control = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_traded_goods'];
|
||||
@ -667,8 +654,8 @@ tradingFormCreation(val) {
|
||||
* Case 1 Retail Traded -> To remove trade Goods
|
||||
* Case 2 wholesale Traded -> To remove trade Goods
|
||||
*/
|
||||
deleteTradedGoods(index,flag) {
|
||||
switch(flag){
|
||||
deleteTradedGoods(index, flag) {
|
||||
switch (flag) {
|
||||
case 1: {
|
||||
const control = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_traded_goods'];
|
||||
control.removeAt(index);
|
||||
@ -704,14 +691,14 @@ tradingFormCreation(val) {
|
||||
|
||||
this._pd.savePDFormDetailsWithID(answerFormValues).subscribe(
|
||||
dataresult => {
|
||||
if(dataresult.status == 200) {
|
||||
if (dataresult.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
// this.dialogRef.close();
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
@ -754,33 +741,33 @@ tradingFormCreation(val) {
|
||||
}
|
||||
}
|
||||
|
||||
ManufacturingCounterArray: any = [];
|
||||
FinishedCounterArray: any = [];
|
||||
RetailCounterArray: any = [];
|
||||
WholeSaleCounterArray: any = [];
|
||||
ManufacturingCounterArray: any = [];
|
||||
FinishedCounterArray: any = [];
|
||||
RetailCounterArray: any = [];
|
||||
WholeSaleCounterArray: any = [];
|
||||
|
||||
checkComments(value,flag,index){
|
||||
// console.log(value,flag,index);
|
||||
if(flag == 1){
|
||||
checkComments(value, flag, index) {
|
||||
|
||||
if (flag == 1) {
|
||||
this.ManufacturingCounterArray[index] = value == "yes" ? 1 : 0
|
||||
let RMOverallCount = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
this.RMCommentCard = RMOverallCount > 0 ? true : false ;
|
||||
this.RMCommentCard = RMOverallCount > 0 ? true : false;
|
||||
}
|
||||
if(flag == 2){
|
||||
if (flag == 2) {
|
||||
this.FinishedCounterArray[index] = value == "yes" ? 1 : 0
|
||||
}
|
||||
if(flag == 3){
|
||||
if (flag == 3) {
|
||||
this.RetailCounterArray[index] = value == "yes" ? 1 : 0
|
||||
}
|
||||
if(flag == 4){
|
||||
if (flag == 4) {
|
||||
this.WholeSaleCounterArray[index] = value == "yes" ? 1 : 0
|
||||
}
|
||||
let FGOverallCount = this.FinishedCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
let RTGOverallCount = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
let WTGOverallCount = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
let TGOverallCount = FGOverallCount + RTGOverallCount + WTGOverallCount;
|
||||
this.TGCommentCard = TGOverallCount > 0 ? true : false ;
|
||||
}
|
||||
this.TGCommentCard = TGOverallCount > 0 ? true : false;
|
||||
}
|
||||
|
||||
// checkComments(e,flag,index){
|
||||
// if(flag == 1 && e=='no'){
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
{{pageTitle}}
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right"
|
||||
mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
|
||||
@ -14,9 +16,11 @@
|
||||
<mat-card *ngIf="manufacturingForm">
|
||||
<h5 style="margin: 12px;padding:10px !important;">Manufacturing Product Details</h5>
|
||||
<div formArrayName="manufacturing_details">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.manufacturing_details['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<div formArrayName="main_raw_materials">
|
||||
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index" [formGroupName]="l">
|
||||
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index"
|
||||
[formGroupName]="l">
|
||||
<mat-card style="margin: 12px;">
|
||||
<h6 style="margin: 12px;padding:10px !important;">Raw Material #{{l+1}}</h6>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -41,7 +45,8 @@
|
||||
<input matInput placeholder="Contact Person Name" formControlName="manufacturing_contact_person_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation" (selectionChange)="selectedPersonDesignation(items,$event.value,1)">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
||||
(selectionChange)="selectedPersonDesignation(items,$event.value,1)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
@ -55,15 +60,19 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="manufacturing_contact_person_mobile_number" OnlyNumber type="text" maxlength="10">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off"
|
||||
formControlName="manufacturing_contact_person_mobile_number" OnlyNumber
|
||||
type="text" maxlength="10">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode"
|
||||
type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number"
|
||||
formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -74,9 +83,11 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
<mat-select placeholder="Payment Terms" formControlName="manufacturing_payment_type" (selectionChange)="selectedPaymentTerms(items,$event.value,1);checkCard($event.value,1,l);">
|
||||
<mat-select placeholder="Payment Terms" formControlName="manufacturing_payment_type"
|
||||
(selectionChange)="selectedPaymentTerms(items,$event.value,1);checkCard($event.value,1,l);">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -84,7 +95,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="manufacturing_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment made in Cash.">Payment made in Cash.</mat-option>
|
||||
<mat-option value="Payment made through Banking channels.">Payment made through Banking channels.</mat-option>
|
||||
<mat-option value="Payment made through Banking channels.">Payment made
|
||||
through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -92,17 +104,22 @@
|
||||
|
||||
<div fxLayout="row nowrap" style="padding-left: 2%;" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.main_raw_materials.controls.length > 1" (click)="removeRawMaterials(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"
|
||||
color="primary" matTooltip="Delete" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
@ -110,14 +127,16 @@
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="100" align="center">
|
||||
<button color="primary" mat-flat-button matTooltip="Add More" matTooltipPosition="above" type="button"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addMoreRawMaterials($event); false"><strong>Add More Supplier</strong></button>
|
||||
<button color="primary" mat-flat-button matTooltip="Add More" matTooltipPosition="above"
|
||||
type="button" class="mr-1 mb-1 hover-icon" (click)="addMoreRawMaterials($event); false"><strong>Add
|
||||
More Supplier</strong></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" *ngIf="mfgCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="What % of Total Purchase is Done on Credit?" formControlName="main_raw_materials_total_payments_percent_on_credit"
|
||||
type="number" autocomplete="off" OnlyNumber type="text" maxlength="3">
|
||||
<input matInput placeholder="What % of Total Purchase is Done on Credit?"
|
||||
formControlName="main_raw_materials_total_payments_percent_on_credit" type="number"
|
||||
autocomplete="off" OnlyNumber type="text" maxlength="3">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -127,9 +146,11 @@
|
||||
<mat-card *ngIf="tradingForm">
|
||||
<h5 style="margin: 12px;padding:10px !important;">Trading Product Details</h5>
|
||||
<div formArrayName="trade_details">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.trade_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div *ngFor="let item of _supplierQuesFrom.controls.trade_details['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<div formArrayName="trading_products">
|
||||
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index" [formGroupName]="l">
|
||||
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index"
|
||||
[formGroupName]="l">
|
||||
<mat-card style="margin: 12px;">
|
||||
<h6 style="margin: 12px;padding:10px !important;">Trading Product #{{l+1}}</h6>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -138,7 +159,8 @@
|
||||
</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-option *ngFor="let pm of m_tradingProducts" [value]="pm.name">{{
|
||||
pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%">
|
||||
@ -155,10 +177,12 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Name" formControlName="trade_product_contact_person_name" maxlength="10">
|
||||
<input matInput placeholder="Contact Person Name" formControlName="trade_product_contact_person_name"
|
||||
maxlength="10">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation" (selectionChange)="selectedPersonDesignation(items,$event.value,2)">
|
||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
||||
(selectionChange)="selectedPersonDesignation(items,$event.value,2)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
@ -172,16 +196,20 @@
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="trade_product_contact_person_mobile_number" OnlyNumber type="text" maxlength="10">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off"
|
||||
formControlName="trade_product_contact_person_mobile_number" OnlyNumber
|
||||
type="text" maxlength="10">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode"
|
||||
type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number"
|
||||
formControlName="person_landline" type="text" OnlyNumber type="text">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -190,16 +218,19 @@
|
||||
<!-- <mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="trade_product_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select> -->
|
||||
<mat-select placeholder="Payment Terms" formControlName="trade_product_payment_type" (selectionChange)="selectedPaymentTerms(items,$event.value,2);checkCard($event.value,2,l);">
|
||||
<mat-select placeholder="Payment Terms" formControlName="trade_product_payment_type"
|
||||
(selectionChange)="selectedPaymentTerms(items,$event.value,2);checkCard($event.value,2,l);">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_paymentType" [value]="pm.id">{{ pm.name
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select placeholder="Payment Mode" formControlName="trade_product_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment made in Cash.">Payment made in Cash.</mat-option>
|
||||
<mat-option value="Payment made through Banking channels.">Payment made through Banking channels.</mat-option>
|
||||
<mat-option value="Payment made through Banking channels.">Payment made
|
||||
through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -209,17 +240,22 @@
|
||||
</mat-form-field> -->
|
||||
<div fxLayout="row nowrap" style="padding-left: 2%;display: none !important;" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 25%" >
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to" type="number">
|
||||
<mat-form-field style="width: 25%">
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.trading_products.controls.length > 1" (click)="removeTradingProduct(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"
|
||||
color="primary" matTooltip="Delete" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
@ -227,14 +263,16 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<div fxFlex="100" align="center">
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above" type="button"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addMoretradeProduct($event); false"><strong>Add More Supplier</strong></button>
|
||||
<button mat-flat-button color="primary" matTooltip="Add More" matTooltipPosition="above"
|
||||
type="button" class="mr-1 mb-1 hover-icon" (click)="addMoretradeProduct($event); false"><strong>Add
|
||||
More Supplier</strong></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxlayout="row" *ngIf="trdCreditCardFlag">
|
||||
<mat-form-field style="width: 90%">
|
||||
<input matInput placeholder="What % of Total Purchase is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
type="number" autocomplete="off">
|
||||
<input matInput placeholder="What % of Total Purchase is done on Credit?"
|
||||
formControlName="trading_products_total_payments_percent_on_credit" type="number"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -254,7 +292,10 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||
matTooltipPosition="above" type="submit">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
|
||||
@ -1,25 +1,11 @@
|
||||
/** Common Imports */
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
Inject,
|
||||
Output, Input
|
||||
} from '@angular/core';
|
||||
import { Component,OnInit,Inject,Output, Input } from '@angular/core';
|
||||
|
||||
import {
|
||||
FormBuilder,
|
||||
FormGroup,
|
||||
Validators,
|
||||
FormArray,
|
||||
} from '@angular/forms';
|
||||
import { FormBuilder,FormGroup,Validators,FormArray } from '@angular/forms';
|
||||
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA
|
||||
} from '@angular/material';
|
||||
import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
@ -51,8 +37,8 @@ export class SupplierInfoComponent implements OnInit {
|
||||
|
||||
public m_paymentType = [];
|
||||
private notifier: NotifierService;
|
||||
titleList: any=[];
|
||||
companyRelationShipList: any=[];
|
||||
titleList: any = [];
|
||||
companyRelationShipList: any = [];
|
||||
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
@ -63,7 +49,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
this.form_id = 1;
|
||||
this.company_id = this.pd_all_details.company_id
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' + this.pageTitle;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
@ -95,7 +81,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid, this.company_id).subscribe(data => {
|
||||
|
||||
if(data.dataStatus){
|
||||
if (data.dataStatus) {
|
||||
// let datas = {
|
||||
// "profession_name": "Others",
|
||||
// "type_of_activity": [
|
||||
@ -115,22 +101,22 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// };
|
||||
let datas = data.records;
|
||||
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_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){
|
||||
if (api.length > 0) {
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.prodcuts){
|
||||
if (val.prodcuts) {
|
||||
this.m_tradingProducts.push(val.prodcuts);
|
||||
}
|
||||
}
|
||||
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.prodcuts){
|
||||
if (val.prodcuts) {
|
||||
this.m_tradingProducts.push(val.prodcuts);
|
||||
}
|
||||
}
|
||||
@ -138,7 +124,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
}
|
||||
this.m_tradingProducts = [].concat.apply([], this.m_tradingProducts);
|
||||
|
||||
}else {
|
||||
} else {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
this.noRecordsFound = false;
|
||||
this.errorMessage = data.msg;
|
||||
@ -152,8 +138,8 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// this.getM_FreqOfPurchase();
|
||||
this.getM_PaymentModeType();
|
||||
// this.getPdSupplierFormDetails();
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS',1);
|
||||
this.getMasterDetails('TITLES',2);
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS', 1);
|
||||
this.getMasterDetails('TITLES', 2);
|
||||
}
|
||||
|
||||
|
||||
@ -166,9 +152,9 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// alert(JSON.stringify(record));
|
||||
this.pdTrigerService.retriveForm(params).subscribe(
|
||||
data => {
|
||||
if(data.dataStatus){
|
||||
if (data.dataStatus) {
|
||||
let dataForm = data.records;
|
||||
if(dataForm !== undefined) {
|
||||
if (dataForm !== undefined) {
|
||||
this._supplierQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['1'],
|
||||
@ -179,26 +165,26 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]),
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr.length > 0) {
|
||||
if (arr.length > 0) {
|
||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||
// return dataForm.main_raw_materials[key];
|
||||
// });
|
||||
if(dataForm.manufacturing_details[0] !== null){
|
||||
if (dataForm.manufacturing_details[0] !== null) {
|
||||
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||
|
||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
}
|
||||
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id ==4);
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
||||
|
||||
if(arr1.length > 0) {
|
||||
if(dataForm.trade_details[0] !== null){
|
||||
if (arr1.length > 0) {
|
||||
if (dataForm.trade_details[0] !== null) {
|
||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
// return dataForm.trading_products[key];
|
||||
// });
|
||||
@ -206,7 +192,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
this.initTradingProductsDetails(api_trading_products);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.initTradingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
@ -223,19 +209,19 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]),
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr.length > 0) {
|
||||
if (arr.length > 0) {
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || 4);
|
||||
if(arr1.length > 0) {
|
||||
if (arr1.length > 0) {
|
||||
this.initTradingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trading_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 5);
|
||||
if(arr2.length > 0) {
|
||||
if (arr2.length > 0) {
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
} else {
|
||||
@ -249,17 +235,17 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]),
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr.length > 0) {
|
||||
if (arr.length > 0) {
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id== 4);
|
||||
if(arr1.length > 0) {
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
||||
if (arr1.length > 0) {
|
||||
this.initTradingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 5);
|
||||
if(arr2.length > 0) {
|
||||
if (arr2.length > 0) {
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
this.noRecordsFound = true;
|
||||
@ -302,51 +288,51 @@ export class SupplierInfoComponent implements OnInit {
|
||||
|
||||
initManufacturingProductsDetails(datas) {
|
||||
const control = <FormArray>this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials'];
|
||||
if(datas === null){
|
||||
if (datas === null) {
|
||||
control.push(this.initManufacturingProducts(null));
|
||||
} else {
|
||||
datas.forEach((val,inx) => {
|
||||
this.checkCard(val.manufacturing_payment_type,1,inx);
|
||||
datas.forEach((val, inx) => {
|
||||
this.checkCard(val.manufacturing_payment_type, 1, inx);
|
||||
control.push(this.initManufacturingProducts(val));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
initManufacturingProducts(records) {
|
||||
if(records === null) {
|
||||
if (records === null) {
|
||||
return this._formBuilder.group({
|
||||
manufacturing_raw_material_name: [''],
|
||||
manufacturing_supplier_name: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
other_person_designation:[''],
|
||||
person_title_name: [''],
|
||||
person_designation: [''],
|
||||
other_person_designation: [''],
|
||||
manufacturing_contact_person_name: [''],
|
||||
manufacturing_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
manufacturing_contact_person_mobile_number: ['', Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
manufacturing_payment_type: [''],
|
||||
manufacturing_payment_mode:[''],
|
||||
manufacturing_payment_mode: [''],
|
||||
manufacturing_credit_days_from: [''],
|
||||
manufacturing_credit_days_to:[''],
|
||||
manufacturing_credit_days_to: [''],
|
||||
manufacturing_frequency_of_purchase: [''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
manufacturing_raw_material_name: [records.manufacturing_raw_material_name || null],
|
||||
manufacturing_supplier_name: [records.manufacturing_supplier_name || null],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_title_name || null],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
person_title_name: [records.person_title_name || null],
|
||||
person_designation: [records.person_title_name || null],
|
||||
other_person_designation: [records.other_person_designation || null],
|
||||
manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null],
|
||||
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null, Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
manufacturing_payment_type: [records.manufacturing_payment_type || null],
|
||||
manufacturing_payment_mode:[records.manufacturing_payment_mode],
|
||||
manufacturing_payment_mode: [records.manufacturing_payment_mode],
|
||||
manufacturing_credit_days_from: [records.manufacturing_credit_days_from || null],
|
||||
manufacturing_credit_days_to:[records.manufacturing_credit_days_to || null],
|
||||
manufacturing_credit_days_to: [records.manufacturing_credit_days_to || null],
|
||||
manufacturing_frequency_of_purchase: [records.manufacturing_frequency_of_purchase || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: [records.person_landline || null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -354,28 +340,28 @@ export class SupplierInfoComponent implements OnInit {
|
||||
initTradingProductsDetails(datas) {
|
||||
const control = <FormArray>this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products'];
|
||||
|
||||
if(datas === null){
|
||||
if (datas === null) {
|
||||
control.push(this.initTradingProducts(null));
|
||||
} else {
|
||||
datas.forEach((val,inx) => {
|
||||
this.checkCard(val.trade_product_payment_type,2,inx);
|
||||
datas.forEach((val, inx) => {
|
||||
this.checkCard(val.trade_product_payment_type, 2, inx);
|
||||
control.push(this.initTradingProducts(val));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
initTradingProducts(records) {
|
||||
if(records === null) {
|
||||
if (records === null) {
|
||||
return this._formBuilder.group({
|
||||
trade_product_name: [''],
|
||||
trade_supplier_name: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
other_person_designation:[''],
|
||||
person_title_name: [''],
|
||||
person_designation: [''],
|
||||
other_person_designation: [''],
|
||||
trade_product_contact_person_name: [''],
|
||||
trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
person_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
trade_product_contact_person_mobile_number: ['', Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
person_stdcode: [null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
trade_product_payment_type: [''],
|
||||
trade_product_payment_mode: [''],
|
||||
trade_product_frequency_of_purchase: [''],
|
||||
@ -385,14 +371,14 @@ export class SupplierInfoComponent implements OnInit {
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
trade_product_name: [records.trade_product_name],
|
||||
person_title_name:[records.person_title_name],
|
||||
person_designation:[records.person_designation],
|
||||
other_person_designation:[records.other_person_designation],
|
||||
person_title_name: [records.person_title_name],
|
||||
person_designation: [records.person_designation],
|
||||
other_person_designation: [records.other_person_designation],
|
||||
trade_supplier_name: [records.trade_supplier_name],
|
||||
trade_product_contact_person_name: [records.trade_product_contact_person_name],
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
person_stdcode:[records.person_stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
person_stdcode: [records.person_stdcode, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
person_landline: [records.person_landline, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
trade_product_payment_type: [records.trade_product_payment_type],
|
||||
trade_product_payment_mode: [records.trade_product_payment_mode],
|
||||
trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase],
|
||||
@ -427,23 +413,23 @@ export class SupplierInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// get all master details
|
||||
getMasterDetails(table:string,type:number){
|
||||
getMasterDetails(table: string, type: number) {
|
||||
this.pdTrigerService.getAllMasterDatas(table).subscribe(
|
||||
data => {
|
||||
if (data.dataStatus) {
|
||||
if(type==1){
|
||||
this.companyRelationShipList=data.records;
|
||||
if (type == 1) {
|
||||
this.companyRelationShipList = data.records;
|
||||
// .filter(item => item.name != 'Others');
|
||||
|
||||
}
|
||||
if(type==2){
|
||||
this.titleList=data.records.filter(val=>val.isactive==1);
|
||||
if (type == 2) {
|
||||
this.titleList = data.records.filter(val => val.isactive == 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}, error => this.errorMessage = <any>error);
|
||||
}
|
||||
|
||||
// ==================
|
||||
@ -495,9 +481,9 @@ export class SupplierInfoComponent implements OnInit {
|
||||
this.notifier.notify('success', 'Saved Successfully.!');
|
||||
// this.dialogRef.close();
|
||||
// alert("sample alert for Saving");
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -518,50 +504,50 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// this._addQuesFrom.reset();
|
||||
}
|
||||
|
||||
selectedPersonDesignation(items,e,flag){
|
||||
if(flag == 1){
|
||||
e==1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(),items.controls['other_person_designation'].setValue('');
|
||||
selectedPersonDesignation(items, e, flag) {
|
||||
if (flag == 1) {
|
||||
e == 1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(), items.controls['other_person_designation'].setValue('');
|
||||
items.controls['other_person_designation'].updateValueAndValidity();
|
||||
}
|
||||
else if(flag == 2){
|
||||
e==1 ?items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
:items.controls['other_person_designation'].clearValidators(),items.controls['other_person_designation'].setValue('');
|
||||
else if (flag == 2) {
|
||||
e == 1 ? items.controls['other_person_designation'].setValidators([Validators.required])
|
||||
: items.controls['other_person_designation'].clearValidators(), items.controls['other_person_designation'].setValue('');
|
||||
items.controls['other_person_designation'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
mfgCreditCardFlag : boolean = false;
|
||||
trdCreditCardFlag : boolean = false;
|
||||
mfgCreditCardFlag: boolean = false;
|
||||
trdCreditCardFlag: boolean = false;
|
||||
mfgCounter: any = [];
|
||||
trdCounter: any = [];
|
||||
checkCard(e,flag,index){
|
||||
if(flag == 2 && e==3){
|
||||
checkCard(e, flag, index) {
|
||||
if (flag == 2 && e == 3) {
|
||||
this.trdCounter[index] = 1;
|
||||
}
|
||||
else if(flag == 2 && e!=3){
|
||||
else if (flag == 2 && e != 3) {
|
||||
this.trdCounter[index] = 0;
|
||||
}
|
||||
let TRD = this.trdCounter.reduce((sum, val) => sum + +val, 0);
|
||||
this.trdCreditCardFlag = TRD > 0 ? true : false ;
|
||||
this.trdCreditCardFlag = TRD > 0 ? true : false;
|
||||
|
||||
if(flag == 1 && e==3){
|
||||
if (flag == 1 && e == 3) {
|
||||
this.mfgCounter[index] = 1;
|
||||
}
|
||||
else if(flag == 1 && e!=3){
|
||||
else if (flag == 1 && e != 3) {
|
||||
this.mfgCounter[index] = 0;
|
||||
}
|
||||
let MFG = this.mfgCounter.reduce((sum, val) => sum + +val, 0);
|
||||
this.mfgCreditCardFlag = MFG > 0 ? true : false ;
|
||||
this.mfgCreditCardFlag = MFG > 0 ? true : false;
|
||||
}
|
||||
|
||||
selectedPaymentTerms(items,e,flag){
|
||||
if(flag == 2){
|
||||
if(e==3){
|
||||
selectedPaymentTerms(items, e, flag) {
|
||||
if (flag == 2) {
|
||||
if (e == 3) {
|
||||
items.controls['trade_product_credit_days_from'].setValidators([Validators.required]);
|
||||
items.controls['trade_product_credit_days_to'].setValidators([Validators.required]);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
items.controls['trade_product_credit_days_from'].clearValidators();
|
||||
items.controls['trade_product_credit_days_from'].setValue('');
|
||||
items.controls['trade_product_credit_days_to'].clearValidators();
|
||||
@ -570,11 +556,12 @@ export class SupplierInfoComponent implements OnInit {
|
||||
items.controls['trade_product_credit_days_from'].updateValueAndValidity();
|
||||
items.controls['trade_product_credit_days_to'].updateValueAndValidity();
|
||||
}
|
||||
else if(flag == 1){
|
||||
if(e==3){ items.controls['manufacturing_credit_days_from'].setValidators([Validators.required]);
|
||||
else if (flag == 1) {
|
||||
if (e == 3) {
|
||||
items.controls['manufacturing_credit_days_from'].setValidators([Validators.required]);
|
||||
items.controls['manufacturing_credit_days_to'].setValidators([Validators.required]);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
items.controls['manufacturing_credit_days_from'].clearValidators();
|
||||
items.controls['manufacturing_credit_days_from'].setValue('');
|
||||
items.controls['manufacturing_credit_days_to'].clearValidators();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user