sheet issues fixes :ps
This commit is contained in:
parent
5600fa463e
commit
2f655a8b3b
@ -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>
|
||||
|
||||
@ -19,7 +22,9 @@
|
||||
<div fxFlex="100">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title><p>Address Details {{addressLabel | titlecase}}</p></mat-card-title>
|
||||
<mat-card-title>
|
||||
<p>Address Details {{addressLabel | titlecase}}</p>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
|
||||
@ -37,31 +42,36 @@
|
||||
<div style="width:95%">
|
||||
<label>How long has business been operated from this premise?</label>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years" (change)="checkWithExistBusinessYear($event.target.value)" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years"
|
||||
(change)="checkWithExistBusinessYear($event.target.value)" (keypress)="keyPress($event)">
|
||||
<mat-hint style="color: red;">{{yearErrorMessage}}</mat-hint>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_years'].value.valid">Year's Required</mat-error>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_years'].value.valid">Year's
|
||||
Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear($event.target.value)">
|
||||
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month"
|
||||
(keypress)="keyPress($event)" (change)="ConvertMonthintoYear($event.target.value)">
|
||||
<mat-hint style="color: red;">{{monthErrorMessage}}</mat-hint>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_month'].value.valid">Month's Required</mat-error>
|
||||
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_month'].value.valid">Month's
|
||||
Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
<mat-form-field style="width: 95%;">
|
||||
<mat-select [placeholder]="placeholderName"
|
||||
formControlName="business_is_pd_visited">
|
||||
<mat-select [placeholder]="placeholderName" formControlName="business_is_pd_visited">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_is_pd_visited'].value.valid">Field Required</mat-error>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_is_pd_visited'].value.valid">Field
|
||||
Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field *ngIf=" _businessAssetsQuesFrom.controls['business_is_pd_visited'].value != ''" style="width: 95%;">
|
||||
<input matInput autocomplete="off" placeholder="Remarks" formControlName="business_pd_visited_remark">
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_pd_visited_remark'].value.valid">Remarks Required</mat-error>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_pd_visited_remark'].value.valid">Remarks
|
||||
Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
@ -71,7 +81,8 @@
|
||||
<div *ngFor="let itemrow of _businessAssetsQuesFrom.controls.business_assets_for_address['controls']; let i=index; let last=last;">
|
||||
<div [formGroupName]="i">
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,itemrow,7)">
|
||||
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type"
|
||||
(selectionChange)="setRequiredValidation($event.value,itemrow,7)">
|
||||
<!-- (selectionChange)="selectedPropertyOwnedType($event.value,s,i)" -->
|
||||
<mat-option value="owned">Owned</mat-option>
|
||||
<mat-option value="rented">Rented</mat-option>
|
||||
@ -79,8 +90,10 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%" *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
|
||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" (keypress)="keyPress($event)" (keyup)="inWords($event,i,9)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{RentAmtInwords2[i]}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt"
|
||||
(keypress)="keyPress($event)" (keyup)="inWords($event,i,9)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}}
|
||||
{{RentAmtInwordsForAddress[i]}} Only</mat-hint>
|
||||
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -90,12 +103,15 @@
|
||||
|
||||
<!-- <mat-form-field *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 5" style="width:45%"> -->
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_approximate_market_value').value != ''">{{"₹"}} {{appxMarketAmtInwords2[i]}} Only</mat-hint>
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value"
|
||||
(keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,10)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_approximate_market_value').value != ''">{{"₹"}}
|
||||
{{appxMarketAmtInwordsForAddress[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,8)">
|
||||
<mat-select multiple placeholder="Asset Owned by" formControlName="business_name_of_the_owner"
|
||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,itemrow,8)">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
@ -109,8 +125,9 @@
|
||||
<input matInput placeholder="business_name_of_the_owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
||||
</mat-form-field> -->
|
||||
<!-- -->
|
||||
<mat-form-field style="width:45%" *ngIf="checkOthers2(itemrow.get('business_name_of_the_owner').value)===true">
|
||||
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner" autocomplete="off">
|
||||
<mat-form-field style="width:45%" *ngIf="isOtherOwnerForAddress">
|
||||
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -118,13 +135,15 @@
|
||||
<!-- <span *ngIf="(sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3) && sup.get('business_ownership_type').value == 'owned'"> -->
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage"
|
||||
minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Purchase Year</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year" minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year"
|
||||
minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
|
||||
<!-- <mat-error> Invalid year format</mat-error> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -216,7 +235,9 @@
|
||||
<div fxFlex="100">
|
||||
<mat-card style="min-height: 550px;">
|
||||
<mat-card-header>
|
||||
<mat-card-title><p>Other Assets Used in Business</p></mat-card-title>
|
||||
<mat-card-title>
|
||||
<p>Other Assets Used in Business</p>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
@ -227,8 +248,10 @@
|
||||
<div [formGroupName]="i">
|
||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select (selectionChange)="selectedAssetsType($event,i)" placeholder="Asset Type" formControlName="business_assets_mode" requried>
|
||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id" [disabled]="asset.flag!=1">{{ asset.name | titlecase }}</mat-option>
|
||||
<mat-select (selectionChange)="selectedAssetsType($event,i)" placeholder="Asset Type"
|
||||
formControlName="business_assets_mode" requried>
|
||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id" [disabled]="asset.flag!=1">{{
|
||||
asset.name | titlecase }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -242,16 +265,20 @@
|
||||
<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,detail,6)">
|
||||
<mat-option *ngFor="let m_address_type of m_address_type" [value]="m_address_type.address_type_id"> {{m_address_type.address_type}} </mat-option>
|
||||
<mat-select placeholder="Property Type" formControlName="property_type"
|
||||
(selectionChange)="setRequiredValidation($event.value,detail,6)">
|
||||
<mat-option *ngFor="let m_address_type of m_address_type" [value]="m_address_type.address_type_id">
|
||||
{{m_address_type.address_type}} </mat-option>
|
||||
<!-- <mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name | titlecase }}</mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value == 1">
|
||||
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Address of the Property" formControlName="address_of_the_property" autocomplete="off" requried>
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value != ''">
|
||||
<input matInput placeholder="Address of the Property" formControlName="address_of_the_property"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -265,17 +292,21 @@
|
||||
<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-option *ngFor="let vehicle of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{ vehicle.vehicle_type_name }}</mat-option>
|
||||
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type"
|
||||
(selectionChange)="setRequiredValidation($event.value,detail,5)">
|
||||
<mat-option *ngFor="let vehicle of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{
|
||||
vehicle.vehicle_type_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('vehicle_type').value == 1">
|
||||
<input matInput placeholder=" Specify Vehicle" formControlName="other_vehicle_type" autocomplete="off">
|
||||
<input matInput placeholder=" Specify Vehicle" formControlName="other_vehicle_type"
|
||||
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>
|
||||
</div>
|
||||
@ -289,7 +320,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>
|
||||
@ -379,20 +410,24 @@
|
||||
<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">
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,6)" (keypress)="keyPress($event)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('any_other_asset_value').value != ''">{{"₹"}} {{AssetValueInwords[s]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value"
|
||||
autocomplete="off" (keyup)="inWords($event,s,6)" (keypress)="keyPress($event)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="detail.get('any_other_asset_value').value != ''">{{"₹"}}
|
||||
{{AssetValueInwords[s]}} Only</mat-hint>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan">
|
||||
<mat-option value="{{data.value}}" *ngFor="let data of m_any_asset_loan_type">{{data.viewValue | titlecase}}</mat-option>
|
||||
<mat-option value="{{data.value}}" *ngFor="let data of m_any_asset_loan_type">{{data.viewValue
|
||||
| titlecase}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -413,7 +448,8 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%" *ngIf="sup.get('business_assets_mode').value != ''">
|
||||
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,sup,7)">
|
||||
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type"
|
||||
(selectionChange)="setRequiredValidation($event.value,sup,7)">
|
||||
<!-- (selectionChange)="selectedPropertyOwnedType($event.value,s,i)" -->
|
||||
<mat-option value="owned">Owned</mat-option>
|
||||
<mat-option value="rented">Rented</mat-option>
|
||||
@ -422,8 +458,10 @@
|
||||
|
||||
|
||||
<mat-form-field style="width:45%" *ngIf="(sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'rented')">
|
||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" (keypress)="keyPress($event)" (keyup)="inWords($event,i,8)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{RentAmtInwords[i]}} Only</mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt"
|
||||
(keypress)="keyPress($event)" (keyup)="inWords($event,i,8)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_monthly_rented_amt').value != ''">{{"₹"}}
|
||||
{{RentAmtInwords[i]}} Only</mat-hint>
|
||||
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -432,12 +470,15 @@
|
||||
|
||||
<!-- <mat-form-field *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 5" style="width:45%"> -->
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"₹"}} {{appxMarketAmtInwords[i]}} Only</mat-hint>
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value"
|
||||
(keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"₹"}}
|
||||
{{appxMarketAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,sup,4)">
|
||||
<mat-select multiple placeholder="Asset Owned by" formControlName="business_name_of_the_owner"
|
||||
[compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,sup,4)">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
@ -447,8 +488,9 @@
|
||||
<mat-error>Asset Owned by Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="checkOthers(sup.get('business_name_of_the_owner').value)===true" style="width:45%">
|
||||
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner" autocomplete="off">
|
||||
<mat-form-field *ngIf="isOtherOwner" style="width:45%">
|
||||
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -456,13 +498,15 @@
|
||||
<!-- <span *ngIf="(sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3) && sup.get('business_ownership_type').value == 'owned'"> -->
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,1)">
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage"
|
||||
minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,1)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Purchase Year</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year" minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,2)">
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="business_purchase_year"
|
||||
minlength="4" maxlength="4" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,2)">
|
||||
<!-- <mat-error> Invalid year format</mat-error> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -470,7 +514,8 @@
|
||||
<span *ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned'">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:95%">
|
||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?" formControlName="business_emi">
|
||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?"
|
||||
formControlName="business_emi">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
@ -481,14 +526,15 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button *ngIf="_businessAssetsQuesFrom.controls.business_assets_details.controls.length > 1" (click)="removeAssetsDetails(i)"
|
||||
matTooltip="Delete Business Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon">
|
||||
<button type="button" mat-raised-button mat-icon-button *ngIf="_businessAssetsQuesFrom.controls.business_assets_details.controls.length > 1"
|
||||
(click)="removeAssetsDetails(i)" matTooltip="Delete Business Assets"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addAssetDetails($event); false"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<button type="button" mat-flat-button (click)="addAssetDetails($event); false" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Business Asset </strong>
|
||||
</button>
|
||||
</div>
|
||||
@ -559,43 +605,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>
|
||||
@ -605,8 +699,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%">
|
||||
@ -614,11 +708,14 @@
|
||||
<textarea matInput placeholder="Remarks" formControlName="business_assets_form_remark" autocomplete="off"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<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"><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">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
<!-- <div class="loading" *ngIf="!apiLoadFinish && !loadDetails">Loading</div> -->
|
||||
<div *ngIf="!apiLoadFinish && !loadDetails"> <i> Loading.... </i> </div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -97,7 +97,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
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.existCompanyList = data.records.filter(val =>val.is_active===true);/* && val.is_company_applicant===true && val.company_order_id==this.company_id */
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
|
||||
@ -647,17 +647,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// businees activity type change event
|
||||
changeBusinessActivity(event: any){
|
||||
|
||||
// console.log('changeBusinessActivity');
|
||||
|
||||
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==2){
|
||||
// console.log('changeBusinessActivity 1');
|
||||
|
||||
this.ManufacturingChecked = event.value.exist_status;
|
||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
manufacturingControl.controls = [];
|
||||
manufacturingControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){
|
||||
// console.log('changeBusinessActivity 2');
|
||||
|
||||
this.ManufacturingChecked = event.value.exist_status;
|
||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
manufacturingControl.push(this.createActivity());
|
||||
@ -665,40 +665,40 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==3){
|
||||
// console.log('changeBusinessActivity 3');
|
||||
|
||||
this.RetailedChecked = event.value.exist_status;
|
||||
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
retailControl.controls = [];
|
||||
retailControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==3){
|
||||
// console.log('changeBusinessActivity 4');
|
||||
|
||||
this.RetailedChecked = event.value.exist_status;
|
||||
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
retailControl.push(this.createActivity());
|
||||
}
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==4){
|
||||
// console.log('changeBusinessActivity 5');
|
||||
|
||||
this.WholeSalesChecked = event.value.exist_status;
|
||||
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
wholesaleControl.controls = [];
|
||||
wholesaleControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==4){
|
||||
// console.log('changeBusinessActivity 6');
|
||||
|
||||
this.WholeSalesChecked = event.value.exist_status;
|
||||
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
wholesaleControl.push(this.createActivity());
|
||||
}
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==5){
|
||||
// console.log('changeBusinessActivity 7');
|
||||
|
||||
this.ServiceChecked = event.value.exist_status;
|
||||
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
serviceControl.controls = [];
|
||||
serviceControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==5){
|
||||
// console.log('changeBusinessActivity 8');
|
||||
|
||||
this.ServiceChecked = event.value.exist_status;
|
||||
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
serviceControl.push(this.createServiceActivity());
|
||||
@ -1157,9 +1157,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.businessEntityTypeList.business_entity_type_name = filterList[0].business_entity_type_id!=1 ? filterList[0].business_entity_type_name : this.generalExistEntityType_other;
|
||||
this.businessEntityTypeList.section_label = filterList[0].business_entity_type_id!=1 ? filterList[0].section_label : this.generalExistEntityType_other;
|
||||
|
||||
// console.log(this.businessEntityTypeList.business_entity_type_id+' , '+this.businessEntityTypeList.business_entity_type_name+' , '+this.businessEntityTypeList.section_label);
|
||||
// console.log(this.businessForm.controls.partners['controls']);
|
||||
// console.log(this.businessForm.controls.partners['controls'].length);
|
||||
|
||||
// if(this.businessForm.controls.partners['controls'].length > 1)
|
||||
// {
|
||||
// console.log('asd');
|
||||
@ -1317,9 +1315,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// Out of Total Export Sales what % of Sales is done in Albania?
|
||||
getPlaceHolderName(id){
|
||||
let name = this.countryDataList.filter(value=>value.country_id == id);
|
||||
// console.log(name);
|
||||
// console.log(name[0].country_name);
|
||||
// console.log(id);
|
||||
|
||||
return 'Out of Total Export Sales what % of Sales is done in '+ name[0].country_name +' ?';
|
||||
// return name[0].country_name +'?';
|
||||
}
|
||||
@ -1386,20 +1382,11 @@ export class BusinessInfoComponent implements OnInit {
|
||||
/**
|
||||
* This Function For validate For Appx. sale based on Type OF Activities
|
||||
*/
|
||||
// validateAppxSales(records){
|
||||
|
||||
// //console.log(records.manufacturing_activity_details.length);
|
||||
|
||||
// //this Variable For Validation
|
||||
|
||||
|
||||
// }
|
||||
// validateAppxSales(records){}
|
||||
|
||||
submitDetails() {
|
||||
|
||||
// let family: any = [];
|
||||
// console.log(this.businessForm.value);
|
||||
|
||||
|
||||
if(this.EntityTypeFlag == true){
|
||||
let control: any = <FormArray>this.businessForm.controls['partners'];
|
||||
@ -1441,7 +1428,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
// let design: any;
|
||||
let records = this.businessForm.value;
|
||||
// console.log(records);
|
||||
|
||||
|
||||
//to check the Appx. sale validation.
|
||||
// this.validateAppxSales(records);
|
||||
@ -1459,8 +1446,8 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
let validationFlag : number = 0;
|
||||
// let shareHoldValidationFlag : number = 0;
|
||||
// console.log(records.partners.length);
|
||||
// console.log(records.partners);
|
||||
|
||||
|
||||
|
||||
if(records.partners.length > 0){
|
||||
let total = records.partners.map(shares => shares.shareholding).reduce((a, b) => a + +b, 0);
|
||||
@ -1624,7 +1611,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
});
|
||||
|
||||
let merged = [].concat.apply([], setCityFilter);
|
||||
// console.log(merged)
|
||||
|
||||
if(merged.length>0){
|
||||
let check: any = merged.filter(function(fVal){
|
||||
return existCities.some(function(sVal){
|
||||
@ -1698,9 +1685,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
// flag: number = 0;
|
||||
// CheckExport(e,val){
|
||||
// console.log(e);
|
||||
// console.log(val);
|
||||
// console.log(this.)
|
||||
|
||||
// if(val == 1){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
@ -1746,13 +1731,13 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// // this.counterForExportCart--;
|
||||
// }
|
||||
// // this.ExportFlag = this.counterForExportCart == 1 ? true : false ;
|
||||
// console.log('this.domesticCounter : ',this.domesticCounter,', this.foreignCounter : ',this.foreignCounter);
|
||||
|
||||
// if(this.domesticCounter == 0 && this.foreignCounter == 0){
|
||||
// this.ExportFlag = false;
|
||||
// }else if(this.foreignCounter >= 0) {
|
||||
// this.ExportFlag = true;
|
||||
// }
|
||||
// console.log('Cuurent Flag Status : ',this.ExportFlag );
|
||||
|
||||
// }
|
||||
|
||||
ManufacturingCounterArray: any = [];
|
||||
@ -1763,23 +1748,20 @@ ServiceCounterArray: any = [];
|
||||
CheckExport(value,stringFlag,index){
|
||||
const parentControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
|
||||
const childControl = <FormArray>parentControl.controls[0];
|
||||
// console.log('parentControl',parentControl);
|
||||
// console.log('parentControl.controls',parentControl.controls);
|
||||
// console.log('childControl',childControl.value);
|
||||
// console.log('childControl',childControl.value.exist_status);
|
||||
|
||||
|
||||
// childControl.forEach((datas,index) => {
|
||||
|
||||
// console.log(datas);
|
||||
|
||||
// // exist_status==true && event.value.type_of_activity_id
|
||||
// console.log(datas[index].);
|
||||
// console.log(datas[index].controls.exist_status.value);
|
||||
|
||||
|
||||
// });
|
||||
|
||||
// console.log('CheckExport');
|
||||
// console.log(value,stringFlag,index);
|
||||
|
||||
// console.log(this.ManufacturingChecked , this.RetailedChecked , this.WholeSalesChecked , this.ServiceChecked);
|
||||
|
||||
|
||||
|
||||
|
||||
if(!this.ManufacturingChecked){
|
||||
if(stringFlag == 'MActivity' && value != "Within India"){
|
||||
@ -1831,20 +1813,19 @@ CheckExport(value,stringFlag,index){
|
||||
}
|
||||
|
||||
let SumOfManufacturingCounter = this.ManufacturingCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
// console.log(SumOfManufacturingCounter,this.ManufacturingCounterArray);
|
||||
|
||||
let SumOfRetailCounter = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
// console.log(SumOfRetailCounter , this.RetailCounterArray);
|
||||
|
||||
let SumOfWholeSaleCounter = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
// console.log(SumOfWholeSaleCounter,this.WholeSaleCounterArray);
|
||||
|
||||
let SumOfServiceCounter = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||
// console.log(SumOfServiceCounter,this.ServiceCounterArray);
|
||||
|
||||
|
||||
let overallCounter = SumOfManufacturingCounter + SumOfRetailCounter + SumOfWholeSaleCounter + SumOfServiceCounter ;
|
||||
|
||||
|
||||
this.ExportFlag = overallCounter > 0 ? true : false ;
|
||||
// console.log('overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter ' , overallCounter , SumOfManufacturingCounter , SumOfRetailCounter , SumOfWholeSaleCounter , SumOfServiceCounter);
|
||||
// console.log('Current Flag Status : ',this.ExportFlag );
|
||||
|
||||
}
|
||||
|
||||
inWords(e,flag){
|
||||
|
||||
@ -5,11 +5,15 @@
|
||||
{{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" (click)="closeDialogue()"><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" (click)="closeDialogue()">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<mat-dialog-content formArrayName="applicant_list">
|
||||
<mat-card *ngFor="let applicant of _OtherForm.controls.applicant_list['controls']; let r = index;" [formGroupName]="r">
|
||||
<mat-card *ngFor="let applicant of _OtherForm.controls.applicant_list['controls']; let r = index;"
|
||||
[formGroupName]="r">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 30%">
|
||||
<mat-select placeholder="Title" formControlName="applicant_title_name" required>
|
||||
@ -22,30 +26,33 @@
|
||||
<input matInput placeholder="Name" formControlName="applicant_name" type="text" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" autocomplete="off">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%">
|
||||
<mat-select placeholder="Qualification" formControlName="qualification" style="width: 75%;">
|
||||
<mat-option *ngFor="let qual of qualificationList" [value]="qual.qualification_id">{{qual.qualification_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%" [style.visibility]="applicant.get('qualification').value == '' ? 'hidden':'visible'">
|
||||
<mat-form-field style="width: 60%" [style.visibility]="applicant.get('qualification').value == '' || applicant.get('qualification').value == '4' || applicant.get('qualification').value == '6' ? 'hidden':'visible'">
|
||||
<input matInput placeholder="Qualification Details" formControlName="course_name" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100%" fxFlex.sm="100%" fxFlex="45%">
|
||||
<mat-checkbox class="example-margin" color="primary" formControlName="is_person_met">Is Person Met</mat-checkbox>
|
||||
<mat-checkbox class="example-margin" color="primary" formControlName="is_person_met">Is Person
|
||||
Met</mat-checkbox>
|
||||
</div>
|
||||
<div fxFlex.xs="100%" fxFlex.sm="100%" fxFlex="45%">
|
||||
<mat-checkbox class="example-margin" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
|
||||
<mat-checkbox class="example-margin" color="primary" formControlName="is_applicant">Is
|
||||
Applicant</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeApplicant(r)" *ngIf="r>0"
|
||||
matTooltip="Remove Individuals" matTooltipPosition="right">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeApplicant(r)"
|
||||
*ngIf="r>0" matTooltip="Remove Individuals" matTooltipPosition="right">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
@ -53,7 +60,12 @@
|
||||
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()"><mat-icon>add</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More"
|
||||
matTooltipPosition="above" (click)="addMoreApplicant()">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save"
|
||||
matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, Input, Output, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, DialogPosition } from '@angular/material';
|
||||
import { PdTrigerService } from './../../../../../../pd-service/pd-triger.service';
|
||||
import { bool } from 'aws-sdk/clients/signer';
|
||||
|
||||
@ -10,17 +10,17 @@ import { bool } from 'aws-sdk/clients/signer';
|
||||
styleUrls: ['./other-applicant-details.component.scss']
|
||||
})
|
||||
export class OtherApplicantDetailsComponent implements OnInit {
|
||||
pageTitle: string ="Add Name of Person(s) Met and Individual Loan Applicant(s) ";
|
||||
pageTitle: string = "Add Name of Person(s) Met and Individual Loan Applicant(s) ";
|
||||
public _OtherForm: FormGroup;
|
||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:'',course_name:''};
|
||||
titleList: any=[];
|
||||
qualificationList: any=[];
|
||||
applicantInfo: any = { 'pd_co_applicant_id': "0", 'applicant_name': '', 'is_applicant': false, 'is_person_met': false, applicant_title_name: '', age: '', qualification: '', course_name: '' };
|
||||
titleList: any = [];
|
||||
qualificationList: any = [];
|
||||
//EditGeneralFormData: any=[];
|
||||
//EditFlag: boolean = false;
|
||||
|
||||
constructor(private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService,
|
||||
@Inject(MAT_DIALOG_DATA) public generalFormData : any,
|
||||
@Inject(MAT_DIALOG_DATA) public generalFormData: any,
|
||||
private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) {
|
||||
// if(generalFormData != ''){
|
||||
// this.EditGeneralFormData = generalFormData.value;
|
||||
@ -31,19 +31,19 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.initFormDetails(null);
|
||||
this.getMasterDetails('TITLES',1);
|
||||
this.getMasterDetails('EDUQUALIFICATION',2);
|
||||
this.getMasterDetails('TITLES', 1);
|
||||
this.getMasterDetails('EDUQUALIFICATION', 2);
|
||||
}
|
||||
|
||||
// get all master details
|
||||
getMasterDetails(table:string,type:number){
|
||||
getMasterDetails(table: string, type: number) {
|
||||
this._pd.getAllMasterDatas(table).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
if(type==1){
|
||||
this.titleList=data.records.filter(val=>val.isactive==1);
|
||||
if (type == 1) {
|
||||
this.titleList = data.records.filter(val => val.isactive == 1);
|
||||
}
|
||||
if(type==2){
|
||||
if (type == 2) {
|
||||
this.qualificationList = data.records;
|
||||
}
|
||||
}
|
||||
@ -51,64 +51,64 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
// init form
|
||||
initFormDetails(data : any) {
|
||||
if(data == null){
|
||||
initFormDetails(data: any) {
|
||||
if (data == null) {
|
||||
this._OtherForm = this._fb.group({
|
||||
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// create applicant form array
|
||||
createApplicant(elementValue:any){
|
||||
// create applicant form array
|
||||
createApplicant(elementValue: any) {
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
||||
applicant_name:['',Validators.required],
|
||||
is_applicant:[false],
|
||||
is_person_met:[false],
|
||||
age:[''],
|
||||
applicant_name: ['', Validators.required],
|
||||
is_applicant: [false],
|
||||
is_person_met: [false],
|
||||
age: [''],
|
||||
qualification: [''],
|
||||
course_name:['']
|
||||
});
|
||||
}
|
||||
course_name: ['']
|
||||
});
|
||||
}
|
||||
|
||||
// add more
|
||||
addMoreApplicant(){
|
||||
// add more
|
||||
addMoreApplicant() {
|
||||
if (this._OtherForm.invalid) {
|
||||
this.validateAllFormFields(this._OtherForm);
|
||||
return;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
let relationControl = <FormArray>this._OtherForm.controls['applicant_list'];
|
||||
relationControl.push(this.createApplicant(this.applicantInfo));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// remove
|
||||
removeApplicant(intex:number){
|
||||
// remove
|
||||
removeApplicant(intex: number) {
|
||||
let control = <FormArray>this._OtherForm.controls['applicant_list'];
|
||||
control.removeAt(intex);
|
||||
}
|
||||
}
|
||||
|
||||
// save applicant
|
||||
saveApplicant(formData:any){
|
||||
// save applicant
|
||||
saveApplicant(formData: any) {
|
||||
if (this._OtherForm.invalid) {
|
||||
this.validateAllFormFields(this._OtherForm);
|
||||
return;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.dialogRef.close({
|
||||
data:formData.applicant_list
|
||||
data: formData.applicant_list
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// close dialogue
|
||||
closeDialogue(){
|
||||
closeDialogue() {
|
||||
this.dialogRef.close({
|
||||
data:[]
|
||||
data: []
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
this.employmentForm = this.fb.group({
|
||||
employer_name: ['', Validators.compose([Validators.required])],
|
||||
how_long_year: ['', Validators.compose([Validators.required])],
|
||||
how_long_month: ['', Validators.compose([Validators.required])],
|
||||
how_long_month: [''],
|
||||
was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
name_person_met: [''],
|
||||
designation_person_met: [''],
|
||||
|
||||
@ -369,13 +369,13 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
|
||||
this._pd.getFamilyDetails(this.pdid).subscribe(data=>{
|
||||
console.clear();
|
||||
console.log('getFamilyDetails data',data);
|
||||
// console.log('getFamilyDetails data',data);
|
||||
if(data.dataStatus == true){
|
||||
|
||||
let Temparr : any = [];
|
||||
|
||||
console.log('from_business_form',data.record.from_business_form);
|
||||
console.log('from_general_form',data.record.from_general_form);
|
||||
// console.log('from_business_form',data.record.from_business_form);
|
||||
// console.log('from_general_form',data.record.from_general_form);
|
||||
|
||||
if(data.record.from_general_form.length > 0){
|
||||
let familyMembersGeneralForm = Object.keys(data.record.from_general_form).map(function (key) {
|
||||
@ -840,7 +840,7 @@ removeFamilyMembers(inx,i) {
|
||||
records.pdid = this.pdid;
|
||||
records.formid = '6';
|
||||
// records.fk_createdby = '251';
|
||||
console.log(JSON.stringify(records));
|
||||
// console.log(JSON.stringify(records));
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
// this.notifier.notify('success', 'Saved Successfully.');
|
||||
if(data.status == 200) {
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:31%">
|
||||
|
||||
<mat-select placeholder="Financial Statements Available ?" formControlName="is_financial_statements" (selectionChange)="selectedStatement($event)">
|
||||
<mat-select placeholder="Financial Statements Available ?" formControlName="is_financial_statements" (selectionChange)="selectedStatement($event.value)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
@ -175,9 +175,9 @@
|
||||
<mat-card-header>
|
||||
<mat-card-title><p> Financial as per Customer</p></mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-form-field *ngIf="isDisplay" style="width:35%">
|
||||
<mat-select placeholder="Same as Financial Statements ?" formControlName="is_financial_customer" (selectionChange)="selectedFinancialCustomer($event)">
|
||||
<!-- *ngIf="isDisplay" -->
|
||||
<mat-form-field style="width:35%">
|
||||
<mat-select placeholder="Same as Financial Statements ?" formControlName="is_financial_customer" (selectionChange)="selectedFinancialCustomer($event.value)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
@ -248,7 +248,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % To" formControlName="estimate_profit_range_to" type="number" min='0' max='100' (change)="calculateMarginProfit( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" formControlName="estimate_profit_margin_percent" type="number" readonly>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % Considered" formControlName="estimate_profit_margin_percent" type="number" readonly>
|
||||
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
@ -286,7 +286,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Net Loss % To" formControlName="estimate_loss_range_to" min='0' max='100' type="number" (change)="calculateMarginLoss( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" formControlName="estimate_loss_margin_percent" type="number" readonly>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % Considered" formControlName="estimate_loss_margin_percent" type="number" readonly>
|
||||
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_loss_margin').value}} ) </mat-hint> -->
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -58,6 +58,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
//isreadonly for edit(no of year Fields and Starting Years )
|
||||
isReadOnly : boolean = false;
|
||||
EditAble: boolean = true;
|
||||
isDisplay : boolean ;
|
||||
AV_netProfitAmtFrmInwords: any = [];
|
||||
AV_netProfitAmtToInwords: any = [];
|
||||
@ -309,7 +310,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
selectedProfitOrLossType(e,detail){
|
||||
// console.log(e);
|
||||
|
||||
if(e.value == 1){
|
||||
detail.controls.financial_net_loss.setValue('');
|
||||
detail.controls.financial_margin_of_loss.setValue('');
|
||||
@ -349,26 +350,17 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
selectedStatement(e :any):void{
|
||||
|
||||
if(e.value == 'yes'){
|
||||
if(e == 'yes'){
|
||||
|
||||
this.isDisplay = true;
|
||||
this.financialForm.controls['is_financial_customer'].setValue('');
|
||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (e.value == 'no'){
|
||||
else if(e == 'no'){
|
||||
|
||||
this.isDisplay = false;
|
||||
|
||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
this.financialForm.controls['is_financial_customer'].setValue('no');
|
||||
this.selectedFinancialCustomer('no');
|
||||
|
||||
const statementControl = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
@ -379,40 +371,26 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.financialForm.controls['financial_starting_year'].setValue('');
|
||||
this.financialForm.controls['financial_no_of_year'].setValue('');
|
||||
|
||||
|
||||
// alert((new Date()).getFullYear());
|
||||
let year1 = (new Date()).getFullYear();
|
||||
let year2 = ((new Date()).getFullYear() + 1);
|
||||
|
||||
let Year = year1 +'-'+ year2;
|
||||
control.push(this.createValue(''));
|
||||
// let year1 = (new Date()).getFullYear();
|
||||
// let year2 = ((new Date()).getFullYear() + 1);
|
||||
// let Year = year1 +'-'+ year2;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/** fin customer data from Fin statement*/
|
||||
selectedFinancialCustomer(e: any): void {
|
||||
if(e.value == 'yes'){
|
||||
if(e == 'yes'){
|
||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
}
|
||||
else if (e.value == 'no'){
|
||||
|
||||
else if (e == 'no'){
|
||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
|
||||
let year1 = (new Date()).getFullYear();
|
||||
let year2 = ((new Date()).getFullYear() - 1);
|
||||
|
||||
let Year = year2 +'-'+ year1;
|
||||
|
||||
control.push(this.createValue(Year));
|
||||
|
||||
control.push(this.createValue(''));
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,16 +419,12 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// parentArray.value.forEach((val,index) => {
|
||||
|
||||
// let annual_sale = val.financial_annual_sale;
|
||||
// // console.log('Current Anual Sales',array.value[index].financial_annual_sale);
|
||||
// // console.log('Current Index',index);
|
||||
// // console.log('prev_annual_sale',prev_annual_sale);
|
||||
|
||||
// if (index != 0) {
|
||||
// let childArray : any = <FormArray>parentArray.controls[index];
|
||||
// // console.log('INX',index);
|
||||
// // console.log('SALE',annual_sale);
|
||||
|
||||
// let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
||||
// // console.log('annual_sale_variation',annual_sale_variation);
|
||||
|
||||
// childArray.controls.financial_annualsales_variation.setValue(
|
||||
// annual_sale_variation!= Infinity ? !(Number.isNaN(annual_sale_variation)) ? annual_sale_variation.toFixed(2)
|
||||
// : 0
|
||||
@ -481,8 +455,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// let profit = detail.value.financial_net_profit;
|
||||
// let loss = detail.value.financial_net_loss;
|
||||
// let salary = detail.value.financial_annual_sale;
|
||||
// // console.log('current profit',profit);
|
||||
// // console.log('current loss',loss);
|
||||
|
||||
// if ( (profit != '' || loss != '') && index != 0) {
|
||||
// if(+profit > +salary){
|
||||
|
||||
@ -495,13 +468,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// let prev_profit = array.value[index - 1].financial_net_profit != '' ? array.value[index - 1].financial_net_profit : 0;
|
||||
// let prev_loss = array.value[index - 1].financial_net_loss !='' ? array.value[index - 1].financial_net_loss : 0 ;
|
||||
|
||||
// // console.log('prev_profit',prev_profit);
|
||||
// // console.log('prev_loss',prev_loss);
|
||||
|
||||
// loss = loss != 0 ? loss * (-1) : loss;
|
||||
// // console.log('-1',loss);
|
||||
|
||||
// prev_loss = prev_loss != 0 ? prev_loss * (-1) : prev_loss ;
|
||||
// // console.log('prev_loss',prev_loss);
|
||||
|
||||
// let variation = (((profit != '' ? profit : loss ) - (prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
||||
|
||||
@ -552,8 +522,8 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
|
||||
/** old code - calculating Sale PERCENTAGE for financial statement */
|
||||
// calMargin(index, detail) {
|
||||
// console.log('detail', detail);
|
||||
|
||||
|
||||
// let salary = detail.value.financial_annual_sale;
|
||||
// let profit = detail.value.financial_net_profit;
|
||||
// if (salary != '' && profit != '') {
|
||||
@ -634,10 +604,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
// variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100;
|
||||
|
||||
// // console.log((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ));
|
||||
// // console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))));
|
||||
// // console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100);
|
||||
|
||||
// detail.controls.financial_profit_to_sale_variation.setValue(variation_percent != Infinity ? variation_percent.toFixed(2) : 0);
|
||||
|
||||
// }
|
||||
@ -919,15 +885,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
childArray.controls.financial_variation.setValue('');
|
||||
}
|
||||
else{
|
||||
// console.log('loss_amt = val.financial_net_loss;',val.financial_net_loss);
|
||||
// console.log('loss_amt',loss_amt);
|
||||
// console.log('loss_amt/annual_sale',loss_amt/annual_sale);
|
||||
// console.log('(loss_amt/annual_sale) * 100',(loss_amt/annual_sale) * 100);
|
||||
// console.log('(loss_amt/annual_sale) * 100 * (-1)',(loss_amt/annual_sale) * 100 * (-1));
|
||||
|
||||
|
||||
loss_margin = (val.financial_net_loss/val.financial_annual_sale) * 100 * (-1);
|
||||
|
||||
// console.log('loss_margin',loss_margin);
|
||||
|
||||
childArray.controls.financial_margin_of_loss.setValue(loss_margin != Infinity ? !(Number.isNaN(loss_margin)) ? loss_margin.toFixed(2) : 0 : 0);
|
||||
|
||||
@ -965,10 +926,12 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if(annual_sale != ''){
|
||||
|
||||
let variation_percent : any ;
|
||||
|
||||
variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (temp_prev_profit_margin != 0 ? temp_prev_profit_margin : temp_prev_loss_margin) / (temp_prev_profit_margin != 0 ? Math.abs(temp_prev_profit_margin) : Math.abs(temp_prev_loss_margin))) * 100);
|
||||
let final_percent = variation_percent != Infinity ? !(Number.isNaN(variation_percent)) ? variation_percent != -Infinity ? variation_percent.toFixed(2) : 0 : 0 : 0 ;
|
||||
let a = (profit_margin != '' ? profit_margin : loss_margin ) - (temp_prev_profit_margin != 0 ? temp_prev_profit_margin : temp_prev_loss_margin);
|
||||
let b = a / (temp_prev_profit_margin != 0 ? Math.abs(temp_prev_profit_margin) : Math.abs(temp_prev_loss_margin));
|
||||
let c = b * 100;
|
||||
|
||||
let final_percent = c != Infinity ? !(Number.isNaN(c)) ? c != -Infinity ? c.toFixed(2) : 0 : 0 : 0 ;
|
||||
|
||||
childArray.controls.financial_profit_to_sale_variation.setValue(final_percent);
|
||||
}
|
||||
|
||||
@ -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>
|
||||
<mat-dialog-content>
|
||||
@ -16,11 +19,13 @@
|
||||
<mat-card-title>Name of Person(s) Met and Individual Loan Applicant(s) </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="individualsSource" *ngIf="_generalForm.controls.individuals['controls'].length>0" formArrayName="individuals">
|
||||
<mat-table [dataSource]="individualsSource" *ngIf="_generalForm.controls.individuals['controls'].length>0"
|
||||
formArrayName="individuals">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<input class="capitalize" matInput placeholder="ApplicantName" formControlName="applicant_name" autocomplete="off">
|
||||
<input class="capitalize" matInput placeholder="ApplicantName" formControlName="applicant_name"
|
||||
autocomplete="off" (change)="ApplicantName($event,details.value.pd_co_applicant_id)">
|
||||
<!-- {{details.value.applicant_name | titlecase}} -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -43,7 +48,8 @@
|
||||
<ng-container matColumnDef="age">
|
||||
<mat-header-cell *matHeaderCellDef> Age </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" autocomplete="off">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3"
|
||||
(keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="qualification">
|
||||
@ -56,19 +62,21 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="course_name">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' ? 'hidden':'visible'">
|
||||
<input matInput placeholder="Qualification Details" formControlName="course_name" autocomplete="off">
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' || _generalForm.controls.individuals.value[i].qualification == '4' || _generalForm.controls.individuals.value[i].qualification == '6' ? 'hidden':'visible'">
|
||||
<input matInput placeholder="Qualification Details" formControlName="course_name"
|
||||
autocomplete="off">
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i =index;">
|
||||
<mat-cell *matCellDef="let details;let i =index;" [style.visibility]="_generalForm.controls.individuals.value[i].is_main_applicant == true ? 'hidden':'visible'">
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
||||
matTooltip="Edit " matTooltipPosition="below">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button> -->
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i,details)"
|
||||
matTooltip="Remove Individuals" matTooltipPosition="below">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
(click)="removeIndividuals(i,details)" matTooltip="Remove Individuals"
|
||||
matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
@ -80,8 +88,8 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button"mat-flat-button (click)="addMoreIndividuals()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||
<button type="button" mat-flat-button (click)="addMoreIndividuals()" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Person(s) </strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
@ -100,36 +108,42 @@
|
||||
<mat-form-field style="width: 50%">
|
||||
<input matInput placeholder="Company/Firm" formControlName="company_name" type="text">
|
||||
</mat-form-field>
|
||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant"> Is Applicant</mat-checkbox>
|
||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant">
|
||||
Is Applicant</mat-checkbox>
|
||||
|
||||
<mat-form-field style="width: 45%;">
|
||||
<mat-select placeholder="Business Entity Type"
|
||||
formControlName="business_entity_type" (selectionChange)="checkEntityType(com.value.business_entity_type,c)" required>
|
||||
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type"
|
||||
(selectionChange)="checkEntityType(com.value.business_entity_type,c)" required>
|
||||
<mat-option [value]="entity.business_entity_type_id" *ngFor="let entity of businessEntityTypeList">{{entity.business_entity_type_name}}</mat-option>
|
||||
</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" required autocomplete="off" (keypress)="keyPress($event)">
|
||||
<input matInput placeholder="Year" formControlName="business_years" required
|
||||
autocomplete="off" (keypress)="keyPress($event)">
|
||||
<mat-error>Please Enter Correct Year</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<input matInput type="text" placeholder="Month" formControlName="business_month" autocomplete="off" (keypress)="keyPress($event)" (change)="ConvertMonthintoYearforBusiness($event.target.value,c)">
|
||||
<input matInput type="text" placeholder="Month" formControlName="business_month"
|
||||
autocomplete="off" (keypress)="keyPress($event)" (change)="ConvertMonthintoYearforBusiness($event.target.value,c)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 40%;">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object" (dateChange)="getDateObjects($event.target.value,c)" placeholder="Enter Date of Formation, If Available">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object"
|
||||
(dateChange)="getDateObjects($event.target.value,c)" placeholder="Enter Date of Formation, If Available">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayout="row nowrap" [style.display]="'block'">
|
||||
<div align="right">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeCompanies(c)" *ngIf="com.value.is_active==true"
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button
|
||||
mat-icon-button (click)="removeCompanies(c)" *ngIf="com.value.is_active==true"
|
||||
matTooltip="Remove Company/Firm" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
@ -141,7 +155,8 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button mat-flat-button type="button" matTooltip="Add More" matTooltipPosition="above" color="primary" (click)="addMoreCompanies()"><strong>Add More Company/Firm</strong></button>
|
||||
<button mat-flat-button type="button" matTooltip="Add More" matTooltipPosition="above" color="primary"
|
||||
(click)="addMoreCompanies()"><strong>Add More Company/Firm</strong></button>
|
||||
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@ -154,7 +169,8 @@
|
||||
<mat-card-title> Relationship Between Individuals </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="relationSource" *ngIf="_generalForm.controls.persons_with_relationships['controls'].length>0" formArrayName="persons_with_relationships">
|
||||
<mat-table [dataSource]="relationSource" *ngIf="_generalForm.controls.persons_with_relationships['controls'].length>0"
|
||||
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">
|
||||
@ -166,10 +182,12 @@
|
||||
<ng-container matColumnDef="relation">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Relation" formControlName="relationship" style="width: 75%;" (selectionChange)="updatePersonalRelation(i)">
|
||||
<mat-select placeholder="Relation" formControlName="relationship" style="width: 75%;"
|
||||
(selectionChange)="updatePersonalRelation(i)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name + ' of' | titlecase}}</mat-option>
|
||||
<mat-option value="0" > Not Applicable </mat-option>
|
||||
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name
|
||||
+ ' of' | titlecase}}</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-cell>
|
||||
@ -177,11 +195,13 @@
|
||||
<ng-container matColumnDef="relation_to">
|
||||
<mat-header-cell *matHeaderCellDef> Relationship To </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.persons_with_relationships.value[i].relationship==0 ? 'hidden':'visible'">
|
||||
<mat-select placeholder="Applicant" formControlName="relation_to" style="width: 75%;" [disabled]="_generalForm.controls.persons_with_relationships.value[i].relationship==0">
|
||||
<mat-select placeholder="Applicant" formControlName="relation_to" style="width: 75%;"
|
||||
[disabled]="_generalForm.controls.persons_with_relationships.value[i].relationship==0">
|
||||
<mat-option>Select</mat-option>
|
||||
<!-- getRelationRestrict(_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id,_generalForm.controls.persons_with_relationships.value,individualsList)" -->
|
||||
<mat-option *ngFor="let appc of individualsList | searchRelation : { currentApplicantID:_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id, existRelationList:_generalForm.controls.persons_with_relationships.value}" [value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
||||
<mat-option value="0" > Not Applicable </mat-option>
|
||||
<mat-option *ngFor="let appc of individualsList | searchRelation : { currentApplicantID:_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id, existRelationList:_generalForm.controls.persons_with_relationships.value}"
|
||||
[value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-cell>
|
||||
@ -205,14 +225,16 @@
|
||||
<mat-card-content>
|
||||
|
||||
|
||||
<mat-table [dataSource]="CompanySource" *ngIf="_generalForm.controls.company_with_relationships['controls'].length>0" formArrayName="company_with_relationships">
|
||||
<mat-table [dataSource]="CompanySource" *ngIf="_generalForm.controls.company_with_relationships['controls'].length>0"
|
||||
formArrayName="company_with_relationships">
|
||||
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Applicant </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
|
||||
<mat-select placeholder="Applicant" formControlName="applicant_name" style="width: 75%;">
|
||||
<mat-option *ngFor="let bothC of individualsListBothCase" [value]="bothC.pd_co_applicant_id">{{bothC.applicant_name | titlecase}}</mat-option>
|
||||
<mat-option *ngFor="let bothC of individualsListBothCase" [value]="bothC.pd_co_applicant_id">{{bothC.applicant_name
|
||||
| titlecase}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-cell>
|
||||
@ -220,12 +242,13 @@
|
||||
<ng-container matColumnDef="company_relationship">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;" (selectionChange)="updateCompanyRelation(i)">
|
||||
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;"
|
||||
(selectionChange)="updateCompanyRelation(i)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name | titlecase}}
|
||||
</mat-option>
|
||||
<mat-option value="0" > Not Applicable </mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -234,16 +257,18 @@
|
||||
<mat-header-cell *matHeaderCellDef> Company </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
|
||||
<mat-select placeholder="Company / Firm" formControlName="relation_to_company" style="width: 75%;" [style.visibility]="_generalForm.controls.company_with_relationships.value[i].company_relationship==0 ? 'hidden':'visible'">
|
||||
<mat-select placeholder="Company / Firm" formControlName="relation_to_company" style="width: 75%;"
|
||||
[style.visibility]="_generalForm.controls.company_with_relationships.value[i].company_relationship==0 ? 'hidden':'visible'">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">
|
||||
{{comp.company_name}}
|
||||
</mat-option>
|
||||
<mat-option value="0" > Not Applicable </mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeCompanyRelationship(i)"
|
||||
matTooltip="Remove Company Relationship" matTooltipPosition="below">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
(click)="removeCompanyRelationship(i)" matTooltip="Remove Company Relationship"
|
||||
matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
@ -257,8 +282,8 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary">
|
||||
<span *ngIf="_generalForm.controls.company_with_relationships['controls'].length == 0;else another;">
|
||||
<strong>Add Company Relationship</strong>
|
||||
</span>
|
||||
@ -351,9 +376,11 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="submitGeneralForm(_generalForm.value)"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save"
|
||||
matTooltipPosition="above" (click)="submitGeneralForm(_generalForm.value)">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
@ -1,9 +1,9 @@
|
||||
import { Component, OnInit, Input, Output, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , MatTableDataSource} from '@angular/material';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatTableDataSource } from '@angular/material';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
|
||||
import {OtherApplicantDetailsComponent} from './../dialogue/other-applicant-details/other-applicant-details.component';
|
||||
import { OtherApplicantDetailsComponent } from './../dialogue/other-applicant-details/other-applicant-details.component';
|
||||
import { element } from '@angular/core/src/render3/instructions';
|
||||
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
|
||||
import { DatePipe } from '@angular/common';
|
||||
@ -17,35 +17,51 @@ import { Options } from 'selenium-webdriver/edge';
|
||||
providers: [SearchRelationPipe],
|
||||
})
|
||||
export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
/* Declaration for Header Variables */
|
||||
pageTitle: string = "General Information";
|
||||
|
||||
subproduct_abbr: any;
|
||||
customer_segment_abbr: any;
|
||||
lender_applicant_id: any;
|
||||
main_applicant: any;
|
||||
|
||||
/* Declaration for Common Variables */
|
||||
pipe = new DatePipe('en-US');
|
||||
pageTitle: string ="General Information";
|
||||
pdid : string;
|
||||
form_id:number;
|
||||
is_new : boolean;
|
||||
count : number = 1;
|
||||
private notifier: NotifierService;
|
||||
public _generalForm: FormGroup;
|
||||
displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','course_name','actions'];
|
||||
public individualsSource= new MatTableDataSource();
|
||||
public relationSource= new MatTableDataSource();
|
||||
public CompanySource = new MatTableDataSource();
|
||||
secondDisplayedColumns = ['applicant_name','relation','relation_to'];
|
||||
thridDisplayedColumns = ['applicant_name','company_relationship','relation_to_company'];
|
||||
public pd_applicants_details: any;
|
||||
relationShipList:any=[];
|
||||
companyRelationShipList:any=[];
|
||||
errorMessage:any;
|
||||
individualsList: any=[];
|
||||
individualsListBothCase: any=[];
|
||||
companyList: any=[];
|
||||
qualificationList: any=[];
|
||||
businessEntityTypeList: any=[];
|
||||
|
||||
pdid: string;
|
||||
form_id: number;
|
||||
count: number = 1;
|
||||
errorMessage: any;
|
||||
maxDate: any;
|
||||
constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any,private dialogRef: MatDialogRef<GeneralInfoComponent>) {
|
||||
|
||||
public pd_applicants_details: any;
|
||||
public _generalForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
|
||||
|
||||
/* Declaration for DataTables */
|
||||
displayedColumns = ['applicant_name', 'is_person_met', 'is_applicant', 'age', 'qualification', 'course_name', 'actions'];
|
||||
secondDisplayedColumns = ['applicant_name', 'relation', 'relation_to'];
|
||||
thridDisplayedColumns = ['applicant_name', 'company_relationship', 'relation_to_company'];
|
||||
|
||||
public individualsSource = new MatTableDataSource();
|
||||
public relationSource = new MatTableDataSource();
|
||||
public CompanySource = new MatTableDataSource();
|
||||
|
||||
/* Declaration for Dropdowns */
|
||||
relationShipList: any = [];
|
||||
companyRelationShipList: any = [];
|
||||
individualsList: any = [];
|
||||
individualsListBothCase: any = [];
|
||||
companyList: any = [];
|
||||
qualificationList: any = [];
|
||||
businessEntityTypeList: any = [];
|
||||
|
||||
/********************** Declaration Section Ends Here *****************/
|
||||
|
||||
/** Constructor Section */
|
||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef<GeneralInfoComponent>) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.notifier = notifier;
|
||||
this.form_id = 18;
|
||||
@ -54,84 +70,94 @@ export class GeneralInfoComponent implements OnInit {
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
|
||||
}
|
||||
/********************** Constructor Section Ends Here ****************/
|
||||
|
||||
/** ng Oninit Section */
|
||||
ngOnInit() {
|
||||
let get_max_date = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
|
||||
this.maxDate = new Date(get_max_date);
|
||||
this.initFormDetails();
|
||||
this.getMasterDetails('RELATIONSHIPS',1);
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS',2);
|
||||
this.getMasterDetails('EDUQUALIFICATION',3);
|
||||
this.getMasterDetails('BUSINESSENTITYTYPE',4);
|
||||
this.getMasterDetails('RELATIONSHIPS', 1);
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS', 2);
|
||||
this.getMasterDetails('EDUQUALIFICATION', 3);
|
||||
this.getMasterDetails('BUSINESSENTITYTYPE', 4);
|
||||
|
||||
// update data source table when change the individuals details
|
||||
this._generalForm.controls['individuals'].valueChanges.subscribe(val=>{
|
||||
this._generalForm.controls['individuals'].valueChanges.subscribe(val => {
|
||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||
this.individualsSource.data =control.controls;
|
||||
this.individualsList = control.value.filter(element =>element.is_applicant===true);
|
||||
this.individualsListBothCase = control.value.filter(element =>element.is_applicant===true || element.is_person_met===true);
|
||||
});
|
||||
// update company details
|
||||
this._generalForm.controls['companies'].valueChanges.subscribe(val=>{
|
||||
let control = <FormArray>this._generalForm.controls['companies'];
|
||||
this.companyList = control.value.filter(element =>element.company_name && element.is_active);
|
||||
this.individualsSource.data = control.controls;
|
||||
this.individualsList = control.value.filter(element => element.is_applicant === true);
|
||||
this.individualsListBothCase = control.value.filter(element => element.is_applicant === true || element.is_person_met === true);
|
||||
});
|
||||
|
||||
this._generalForm.controls['persons_with_relationships'].valueChanges.subscribe(val=>{
|
||||
// update company details
|
||||
this._generalForm.controls['companies'].valueChanges.subscribe(val => {
|
||||
let control = <FormArray>this._generalForm.controls['companies'];
|
||||
this.companyList = control.value.filter(element => element.company_name && element.is_active);
|
||||
});
|
||||
|
||||
this._generalForm.controls['persons_with_relationships'].valueChanges.subscribe(val => {
|
||||
let control = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
this.relationSource.data =control.controls;
|
||||
this.relationSource.data = control.controls;
|
||||
//this.individualsList = control.value.filter(element =>element.is_applicant===true);
|
||||
});
|
||||
|
||||
// change relation with businees update dat sorce table
|
||||
this._generalForm.controls['company_with_relationships'].valueChanges.subscribe(val=>{
|
||||
this._generalForm.controls['company_with_relationships'].valueChanges.subscribe(val => {
|
||||
let ComapnyControl = <FormArray>this._generalForm.controls['company_with_relationships'];
|
||||
this.CompanySource .data =ComapnyControl.controls;
|
||||
this.CompanySource.data = ComapnyControl.controls;
|
||||
});
|
||||
|
||||
}
|
||||
/***************************** ng Oninit Section Ends Here **********************************/
|
||||
|
||||
// init form
|
||||
/** init form */
|
||||
initFormDetails() {
|
||||
this._generalForm = this._fb.group({
|
||||
pdid:this.pdid,
|
||||
formid:this.form_id,
|
||||
pdid: this.pdid,
|
||||
formid: this.form_id,
|
||||
//applicant_relation: this._fb.array([]),
|
||||
individuals: this._fb.array([]),
|
||||
companies: this._fb.array([]),
|
||||
persons_with_relationships: this._fb.array([]),
|
||||
company_with_relationships: this._fb.array([]),
|
||||
general_remark:''
|
||||
general_remark: ''
|
||||
})
|
||||
this.loadFormData();
|
||||
}
|
||||
// get all master details
|
||||
getMasterDetails(table:string,type:number){
|
||||
}
|
||||
/**************************** init form Ends Here **************/
|
||||
|
||||
|
||||
/*** get all master details **/
|
||||
getMasterDetails(table: string, type: number) {
|
||||
this._pd.getAllMasterDatas(table).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
if(type==1){
|
||||
this.relationShipList=data.records.filter(item => item.isactive == 1);
|
||||
|
||||
if (type == 1) {
|
||||
this.relationShipList = data.records.filter(item => item.isactive == 1);
|
||||
//this.relationShipList.push({'relationship_id':"0",'name':'Not Applicable'});
|
||||
}
|
||||
if(type==2){
|
||||
this.companyRelationShipList=data.records.filter(item => item.isactive == 1);
|
||||
this.companyRelationShipList=data.records.filter(item => item.name != 'Others');
|
||||
if (type == 2) {
|
||||
this.companyRelationShipList = data.records.filter(item => item.isactive == 1);
|
||||
this.companyRelationShipList = data.records.filter(item => item.name != 'Others');
|
||||
}
|
||||
if(type==3){
|
||||
if (type == 3) {
|
||||
this.qualificationList = data.records;
|
||||
}
|
||||
if(type==4) {
|
||||
if (type == 4) {
|
||||
this.businessEntityTypeList = data.records;
|
||||
}
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}, error => this.errorMessage = <any>error);
|
||||
}
|
||||
/********************** get all master details Ends Here **************************/
|
||||
|
||||
// load form data
|
||||
/** load form data
|
||||
* IF part => Fetch The DB Datas;
|
||||
* Else Part => initial stage;
|
||||
*/
|
||||
loadFormData() {
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
@ -145,61 +171,67 @@ export class GeneralInfoComponent implements OnInit {
|
||||
//relationControl.controls = [];
|
||||
companyControl.controls = [];
|
||||
personsWithRelationshipsControl.controls = [];
|
||||
let exist_individuals:any;
|
||||
let exist_companies:any;
|
||||
let exist_relation:any;
|
||||
let exist_personsWithRelationships:any;
|
||||
let exist_companyWithRelationships:any;
|
||||
let exist_individuals: any;
|
||||
let exist_companies: any;
|
||||
let exist_relation: any;
|
||||
let exist_personsWithRelationships: any;
|
||||
let exist_companyWithRelationships: any;
|
||||
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data',data);
|
||||
if(data.dataStatus) {
|
||||
|
||||
if (data.dataStatus) {
|
||||
|
||||
this._generalForm.controls['general_remark'].setValue(data.records.general_remark ? data.records.general_remark : '');
|
||||
|
||||
// create individuals
|
||||
exist_individuals=Object.keys(data.records.individuals).map(function(key) {
|
||||
exist_individuals = Object.keys(data.records.individuals).map(function (key) {
|
||||
return data.records.individuals[key];
|
||||
});
|
||||
console.log('exist_individuals',exist_individuals);
|
||||
if(exist_individuals.length>0){
|
||||
|
||||
if (exist_individuals.length > 0) {
|
||||
exist_individuals.forEach(element => {
|
||||
individualsControl.push(this.createIndividulas(element))
|
||||
});
|
||||
}
|
||||
|
||||
// create persons with relationships
|
||||
exist_personsWithRelationships=Object.keys(data.records.persons_with_relationships).map(function(key) {
|
||||
exist_personsWithRelationships = Object.keys(data.records.persons_with_relationships).map(function (key) {
|
||||
return data.records.persons_with_relationships[key];
|
||||
});
|
||||
|
||||
if(exist_personsWithRelationships.length>0){
|
||||
if (exist_personsWithRelationships.length > 0) {
|
||||
exist_personsWithRelationships.forEach(element => {
|
||||
//individualsControl.push(this.createIndividulas(element))
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
|
||||
});
|
||||
}
|
||||
|
||||
exist_companyWithRelationships=Object.keys(data.records.company_with_relationships).map(function(key) {
|
||||
exist_companyWithRelationships = Object.keys(data.records.company_with_relationships).map(function (key) {
|
||||
return data.records.company_with_relationships[key];
|
||||
});
|
||||
|
||||
if(exist_companyWithRelationships.length>0){
|
||||
|
||||
if (exist_companyWithRelationships.length > 0) {
|
||||
exist_companyWithRelationships.forEach(element => {
|
||||
//individualsControl.push(this.createIndividulas(element))
|
||||
companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element));
|
||||
});
|
||||
}
|
||||
else if(exist_companyWithRelationships.length == 0) {
|
||||
companyWithRelationshipsControl.push(this.createCompaniesRelationship());
|
||||
}
|
||||
|
||||
// create companies
|
||||
exist_companies = Object.keys(data.records.companies).map(function(key) {
|
||||
exist_companies = Object.keys(data.records.companies).map(function (key) {
|
||||
return data.records.companies[key];
|
||||
});
|
||||
if(exist_companies.length>0){
|
||||
exist_companies.forEach((element,cindex) => {
|
||||
if (exist_companies.length > 0) {
|
||||
exist_companies.forEach((element, cindex) => {
|
||||
companyControl.push(this.createCompanies(element));
|
||||
let otherControl: any = this._generalForm.get('companies') as FormArray;
|
||||
otherControl = otherControl.controls[cindex];
|
||||
element.business_entity_type=='1' ? otherControl.addControl('business_entity_type_other', new FormControl(element.business_entity_type_other, Validators.required)) : otherControl.removeControl('business_entity_type_other');
|
||||
if(element.is_active==false){
|
||||
element.business_entity_type == '1' ? otherControl.addControl('business_entity_type_other', new FormControl(element.business_entity_type_other, Validators.required)) : otherControl.removeControl('business_entity_type_other');
|
||||
if (element.is_active == false) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control.controls[cindex].controls.company_name.clearValidators();
|
||||
control.controls[cindex].controls.company_name.updateValueAndValidity();
|
||||
@ -207,8 +239,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
control.controls[cindex].controls.business_years.updateValueAndValidity();
|
||||
control.controls[cindex].controls.business_entity_type.clearValidators();
|
||||
control.controls[cindex].controls.business_entity_type.updateValueAndValidity();
|
||||
element.business_entity_type=='1' ? control.controls[cindex].controls.business_entity_type_other.clearValidators() : '';
|
||||
element.business_entity_type=='1' ? control.controls[cindex].controls.business_entity_type_other.updateValueAndValidity() : '';
|
||||
element.business_entity_type == '1' ? control.controls[cindex].controls.business_entity_type_other.clearValidators() : '';
|
||||
element.business_entity_type == '1' ? control.controls[cindex].controls.business_entity_type_other.updateValueAndValidity() : '';
|
||||
}
|
||||
|
||||
});
|
||||
@ -234,17 +266,21 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
else {
|
||||
this.pd_applicants_details.forEach((element,key) => {
|
||||
console.log('element element',element);
|
||||
element.is_applicant=true;
|
||||
element.is_person_met=false;
|
||||
element.is_new=false;
|
||||
element.individuals_order_id = key+1;
|
||||
|
||||
this.pd_applicants_details.forEach((element, key) => {
|
||||
|
||||
element.is_applicant = true;
|
||||
element.is_person_met = false;
|
||||
element.is_new = false;
|
||||
element.is_main_applicant = element.applicant_type == '1' ? true : false;
|
||||
element.is_active = true;
|
||||
element.individuals_order_id = key + 1;
|
||||
element.age = '',
|
||||
element.qualification = '',
|
||||
element.course_name = '',
|
||||
individualsControl.push(this.createIndividulas(element));
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
|
||||
|
||||
//let relationControl = <FormArray>this._generalForm.controls['applicant_relation'];
|
||||
// let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name, 'individula_order_id':relationControl.controls.length+1};
|
||||
// relationControl.push(this.createApplicantRelation(applicant_details));
|
||||
@ -254,58 +290,67 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// mulCmyRelationControl.push(this.createMultipleCompanyRelation(applicant_details))
|
||||
|
||||
// create companies
|
||||
if(element.company_name!='' && element.company_name!=null){
|
||||
let setCompanyValues: any = {company_order_id :companyControl.controls.length+1,company_name:element.company_name,is_company_applicant:element.is_company_applicant,business_entity_type:element.business_entity_type,business_entity_type_other:element.business_entity_type_other,business_years:element.business_years,business_month:element.business_month,business_date_object:element.business_date_object,is_new:element.is_new,is_active:true}
|
||||
if (element.company_name != '' && element.company_name != null) {
|
||||
let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: element.company_name, is_company_applicant: element.is_company_applicant, business_entity_type: element.business_entity_type, business_entity_type_other: element.business_entity_type_other, business_years: element.business_years, business_month: element.business_month, business_date_object: element.business_date_object, is_new: element.is_new, is_active: true }
|
||||
companyControl.push(this.createCompanies(setCompanyValues))
|
||||
}
|
||||
});
|
||||
companyWithRelationshipsControl.push(this.createCompaniesRelationship());
|
||||
// check company if null update one row
|
||||
if(companyControl.controls.length ==0){
|
||||
let setCompanyValues: any = {company_order_id :companyControl.controls.length+1,company_name:'',is_company_applicant:false,business_entity_type:'',business_entity_type_other:'',business_years:'',business_month:'',business_date_object:'',is_active:true,is_new:false}
|
||||
if (companyControl.controls.length == 0) {
|
||||
let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: '', is_company_applicant: false, business_entity_type: '', business_entity_type_other: '', business_years: '', business_month: '', business_date_object: '', is_active: true, is_new: false }
|
||||
companyControl.push(this.createCompanies(setCompanyValues))
|
||||
|
||||
}
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}, error => this.errorMessage = <any>error);
|
||||
|
||||
}
|
||||
/******************************* load form data Ends Here *************************/
|
||||
|
||||
// create individuals
|
||||
createIndividulas(elementValue:any) {
|
||||
createIndividulas(elementValue: any) {
|
||||
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_title_name: [elementValue.applicant_title_name],
|
||||
applicant_name: [elementValue.applicant_name],
|
||||
is_applicant:[elementValue.is_applicant],
|
||||
is_person_met:[elementValue.is_person_met],
|
||||
is_new:[elementValue.is_new],
|
||||
is_applicant: [elementValue.is_applicant],
|
||||
is_person_met: [elementValue.is_person_met],
|
||||
is_new: [elementValue.is_new],
|
||||
is_main_applicant: [elementValue.is_main_applicant],
|
||||
is_active: [elementValue.is_active],
|
||||
individuals_order_id: [elementValue.individuals_order_id],
|
||||
age: [elementValue.age],
|
||||
qualification: [elementValue.qualification],
|
||||
course_name:[elementValue.course_name]
|
||||
course_name: [elementValue.course_name]
|
||||
});
|
||||
}
|
||||
createPersonsWithRelationships(elementValue:any){
|
||||
|
||||
createPersonsWithRelationships(elementValue: any) {
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_name: [elementValue.applicant_name],
|
||||
relationship:[elementValue.relationship],
|
||||
relation_to:[elementValue.relation_to],
|
||||
relationship: [elementValue.relationship],
|
||||
relation_to: [elementValue.relation_to],
|
||||
individuals_order_id: [elementValue.individuals_order_id],
|
||||
is_active:[elementValue.is_active]
|
||||
});
|
||||
}
|
||||
|
||||
// create companies
|
||||
createCompanies(elementValue:any) {
|
||||
createCompanies(elementValue: any) {
|
||||
return this._fb.group({
|
||||
company_order_id: [elementValue.company_order_id],
|
||||
company_name: [elementValue.company_name,],
|
||||
company_messrs_name: ['M/s'],
|
||||
is_company_applicant:[elementValue.is_company_applicant],
|
||||
business_entity_type :[elementValue.business_entity_type,Validators.required],
|
||||
is_company_applicant: [elementValue.is_company_applicant],
|
||||
business_entity_type: [elementValue.business_entity_type, Validators.required],
|
||||
business_years: [elementValue.business_years, Validators.required],
|
||||
business_month: [elementValue.business_month],
|
||||
business_date_object: [elementValue.business_date_object],
|
||||
is_active: [elementValue.is_active],
|
||||
is_new:[elementValue.is_new],
|
||||
is_new: [elementValue.is_new],
|
||||
|
||||
});
|
||||
}
|
||||
@ -320,17 +365,17 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
createCompaniesRelationship() {
|
||||
return this._fb.group({
|
||||
applicant_name:[''],
|
||||
company_relationship:[''],
|
||||
relation_to_company:['']
|
||||
applicant_name: [''],
|
||||
company_relationship: [''],
|
||||
relation_to_company: ['']
|
||||
});
|
||||
}
|
||||
|
||||
createCompaniesRelationshipWithData(elementValue:any) {
|
||||
createCompaniesRelationshipWithData(elementValue: any) {
|
||||
return this._fb.group({
|
||||
applicant_name:[elementValue.applicant_name],
|
||||
company_relationship:[elementValue.company_relationship],
|
||||
relation_to_company:[elementValue.relation_to_company]
|
||||
applicant_name: [elementValue.applicant_name],
|
||||
company_relationship: [elementValue.company_relationship],
|
||||
relation_to_company: [elementValue.relation_to_company]
|
||||
});
|
||||
}
|
||||
|
||||
@ -342,7 +387,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// remove other famil membre
|
||||
removeCompanyRelationship(indexValues){
|
||||
removeCompanyRelationship(indexValues) {
|
||||
let control: any = this._generalForm.get('company_with_relationships') as FormArray;
|
||||
control.removeAt(indexValues);
|
||||
// control.controls[indexValues].controls.company_name.clearValidators();
|
||||
@ -353,13 +398,13 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// add more companies
|
||||
addMoreCompanies() {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
let setValues: any = {company_order_id :control.controls.length+1,company_name:'',is_company_applicant:false,business_entity_type:'',business_entity_type_other:'',business_years:'',business_month:'',business_date_object:'',is_active:true,is_new: true}
|
||||
let setValues: any = { company_order_id: control.controls.length + 1, company_name: '', is_company_applicant: false, business_entity_type: '', business_entity_type_other: '', business_years: '', business_month: '', business_date_object: '', is_active: true, is_new: true }
|
||||
control.push(this.createCompanies(setValues))
|
||||
}
|
||||
|
||||
// remove companies
|
||||
removeCompanies(indexValues) {
|
||||
this.count = this.count-1;
|
||||
this.count = this.count - 1;
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control.controls[indexValues].controls.is_active.setValue(false);
|
||||
control.controls[indexValues].controls.company_name.clearValidators();
|
||||
@ -372,12 +417,12 @@ export class GeneralInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// create applicant form array
|
||||
createApplicant(elementValue:any){
|
||||
createApplicant(elementValue: any) {
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_name: [elementValue.applicant_name],
|
||||
company_name: [elementValue.company_name,],
|
||||
exist_status:[elementValue.exist_status==1 && elementValue.pd_co_applicant_id > 0 ? true : false]
|
||||
exist_status: [elementValue.exist_status == 1 && elementValue.pd_co_applicant_id > 0 ? true : false]
|
||||
});
|
||||
}
|
||||
|
||||
@ -387,8 +432,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_name: [elementValue.applicant_name],
|
||||
multiple_relation: this._fb.array([]),
|
||||
multiple_company_relation : this._fb.array([]),
|
||||
individuals_order_id:[elementValue.individuals_order_id]
|
||||
multiple_company_relation: this._fb.array([]),
|
||||
individuals_order_id: [elementValue.individuals_order_id]
|
||||
});
|
||||
}
|
||||
// create multiple relation details
|
||||
@ -396,20 +441,20 @@ export class GeneralInfoComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
applicant_relation_to: [elementValue.applicant_relation_to],
|
||||
relationship: [elementValue.relationship],
|
||||
other_relationship:[elementValue.other_relationship]
|
||||
other_relationship: [elementValue.other_relationship]
|
||||
});
|
||||
}
|
||||
|
||||
// add more relation
|
||||
addMoreRelation(rindex,mindex) {
|
||||
addMoreRelation(rindex, mindex) {
|
||||
let control: any = this._generalForm.get('applicant_relation') as FormArray;
|
||||
control = control.controls[rindex].get('multiple_relation') as FormArray;
|
||||
let setValues: any = {applicant_relation_to :'',relationship:'',other_relationship:''}
|
||||
let setValues: any = { applicant_relation_to: '', relationship: '', other_relationship: '' }
|
||||
control.push(this.createMultipleRelation(setValues))
|
||||
}
|
||||
|
||||
// remove relation
|
||||
removeRelation(rindex,mindex) {
|
||||
removeRelation(rindex, mindex) {
|
||||
let control: any = this._generalForm.get('applicant_relation') as FormArray;
|
||||
control = control.controls[rindex].get('multiple_relation') as FormArray;
|
||||
control.removeAt(mindex);
|
||||
@ -420,19 +465,19 @@ export class GeneralInfoComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
company_name: [elementValue.company_name],
|
||||
company_relationship: [elementValue.company_relationship],
|
||||
company_other_relationship:[elementValue.company_other_relationship]
|
||||
company_other_relationship: [elementValue.company_other_relationship]
|
||||
});
|
||||
}
|
||||
// add more company relation
|
||||
addMoreCompanyRelation(rindex,cindex) {
|
||||
addMoreCompanyRelation(rindex, cindex) {
|
||||
let control: any = this._generalForm.get('applicant_relation') as FormArray;
|
||||
control = control.controls[rindex].get('multiple_company_relation') as FormArray;
|
||||
let setValues: any = {company_name :'',company_relationship:'',company_other_relationship:''}
|
||||
let setValues: any = { company_name: '', company_relationship: '', company_other_relationship: '' }
|
||||
control.push(this.createMultipleCompanyRelation(setValues))
|
||||
}
|
||||
|
||||
// remove company relation
|
||||
removeCompanyRelation(rindex,cindex) {
|
||||
removeCompanyRelation(rindex, cindex) {
|
||||
let control: any = this._generalForm.get('applicant_relation') as FormArray;
|
||||
control = control.controls[rindex].get('multiple_company_relation') as FormArray;
|
||||
control.removeAt(cindex);
|
||||
@ -442,22 +487,24 @@ export class GeneralInfoComponent implements OnInit {
|
||||
addMoreIndividuals() {
|
||||
const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
|
||||
data: '',
|
||||
width:'40%',
|
||||
width: '40%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.data.length>0){
|
||||
dataresult.data.forEach((element,index) => {
|
||||
console.log('element',element);
|
||||
if (dataresult.data.length > 0) {
|
||||
dataresult.data.forEach((element, index) => {
|
||||
|
||||
let individualsControl = <FormArray>this._generalForm.controls['individuals'];
|
||||
element.pd_co_applicant_id = this.count;
|
||||
this.count = this.count+1;
|
||||
element.individuals_order_id = individualsControl.controls.length+1;
|
||||
element.is_new=true;
|
||||
this.count = this.count + 1;
|
||||
element.individuals_order_id = individualsControl.controls.length + 1;
|
||||
element.is_new = true;
|
||||
element.is_active = true;
|
||||
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};
|
||||
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));
|
||||
|
||||
});
|
||||
@ -467,6 +514,27 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
ApplicantName(event,coApplicantId){
|
||||
|
||||
|
||||
let relationControl = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
let index1 = relationControl.value.map(data => data.pd_co_applicant_id).indexOf(coApplicantId);
|
||||
|
||||
// details.value.applicant_name
|
||||
let control = relationControl.controls[index1] as FormArray;
|
||||
|
||||
control.controls['applicant_name'].setValue(event.target.value);
|
||||
|
||||
// event.target.value
|
||||
// controls.controls[index1].disable();
|
||||
// let personsWithRelationshipsControl : any = <FormArray>control.controls[index1];
|
||||
// personsWithRelationshipsControl.controls.is_applicant.setValue(false);
|
||||
// control.markAsDirty({onlySelf:true});
|
||||
|
||||
// controls.removeAt(index1);
|
||||
// let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
||||
}
|
||||
|
||||
// remove individuals
|
||||
// removeIndividuals(findex){
|
||||
// let control = <FormArray>this._generalForm.controls['individuals'];
|
||||
@ -475,29 +543,30 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
|
||||
// remove individuals
|
||||
removeIndividuals(findex,details){
|
||||
removeIndividuals(findex, details) {
|
||||
|
||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||
let individualsControl : any = <FormArray>control.controls[findex];
|
||||
let individualsControl: any = <FormGroup>control.controls[findex];
|
||||
individualsControl.controls.is_active.setValue(false);
|
||||
// individualsControl.disable();
|
||||
// individualsControl.controls.is_applicant.setValue(false);
|
||||
|
||||
// console.log(control.controls[findex].value.is_active);
|
||||
// .controls.is_active.setValue(false);
|
||||
// console.log('control',control.dirty);
|
||||
// console.log('control',control.dirty);
|
||||
|
||||
// control.markAsDirty({onlySelf:true});
|
||||
// console.log(control);
|
||||
|
||||
control.removeAt(findex);
|
||||
|
||||
let controls = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
|
||||
// console.log('control',control);
|
||||
|
||||
let name = details.value.applicant_name;
|
||||
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
||||
// controls.controls[index1].disable();
|
||||
// let personsWithRelationshipsControl : any = <FormArray>control.controls[index1];
|
||||
// personsWithRelationshipsControl.controls.is_applicant.setValue(false);
|
||||
// control.markAsDirty({onlySelf:true});
|
||||
// console.log('control',);
|
||||
|
||||
controls.removeAt(index1);
|
||||
|
||||
}
|
||||
@ -505,97 +574,46 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// update personal relation
|
||||
updatePersonalRelation(indexVal) {
|
||||
let control: any = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
control.controls[indexVal].value.relationship==0 ? control.controls[indexVal].controls['relation_to'].setValue('') : control.controls[indexVal].controls['relation_to'].setValue(control.controls[indexVal].value.relation_to);
|
||||
control.controls[indexVal].value.relationship == 0 ? control.controls[indexVal].controls['relation_to'].setValue('') : control.controls[indexVal].controls['relation_to'].setValue(control.controls[indexVal].value.relation_to);
|
||||
|
||||
}
|
||||
// update company relation
|
||||
updateCompanyRelation(indexVal) {
|
||||
let control:any = <FormArray>this._generalForm.controls['company_with_relationships'];
|
||||
control.controls[indexVal].value.company_relationship==0 ? control.controls[indexVal].controls['relation_to_company'].setValue('') : control.controls[indexVal].controls['relation_to_company'].setValue(control.controls[indexVal].value.relation_to_company);
|
||||
|
||||
}
|
||||
|
||||
/** On Key Press Event For Amount */
|
||||
keyPress(event: any) {
|
||||
const pattern = /[0-9]/;
|
||||
|
||||
let inputChar = String.fromCharCode(event.charCode);
|
||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// convert mkonth to year business has been running
|
||||
ConvertMonthintoYearforBusiness(e,controlIndex){
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
let business_year = control.controls.business_years.value;
|
||||
|
||||
let converted_month : number = e%12;
|
||||
let converted_year : number = e/12;
|
||||
|
||||
control.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||
control.controls.business_month.setValue(Math.floor(converted_month));
|
||||
|
||||
}
|
||||
|
||||
getDateObjects(values: any, controlIndex) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
let pd_initiation_date:string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
|
||||
let selected_date = this.pipe.transform(values, 'yyyy/MM/dd'); ;
|
||||
let diffInMs: number = Date.parse(pd_initiation_date) - Date.parse(selected_date);
|
||||
let diff: number = Math.floor(diffInMs / 1000);
|
||||
diff /= (60 * 60 * 24 * 30);
|
||||
diff=Math.abs(Math.round(diff));
|
||||
control.controls['business_years'].setValue(0);
|
||||
control.controls['business_month'].setValue(0);
|
||||
|
||||
if(diff){
|
||||
control.controls['business_years'].setValue(Math.floor(diff / 12));
|
||||
control.controls['business_month'].setValue(Math.floor(diff % 12));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// check entity type and create other form control
|
||||
checkEntityType(value,controlIndex) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
value=='1' ? control.addControl('business_entity_type_other', new FormControl('', Validators.required)) : control.removeControl('business_entity_type_other');
|
||||
let control: any = <FormArray>this._generalForm.controls['company_with_relationships'];
|
||||
control.controls[indexVal].value.company_relationship == 0 ? control.controls[indexVal].controls['relation_to_company'].setValue('') : control.controls[indexVal].controls['relation_to_company'].setValue(control.controls[indexVal].value.relation_to_company);
|
||||
|
||||
}
|
||||
|
||||
// submit form details
|
||||
submitGeneralForm(formData:any) {
|
||||
submitGeneralForm(formData: any) {
|
||||
if (this._generalForm.invalid) {
|
||||
// console.log('if',this._generalForm.value);
|
||||
|
||||
this.validateAllFormFields(this._generalForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
}
|
||||
// else if(formData.applicant_relation.length==0){
|
||||
// console.log('else if',this._generalForm.value);
|
||||
|
||||
// this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
|
||||
// }
|
||||
else{
|
||||
let saveRecords:any = {}
|
||||
saveRecords.pdid=formData.pdid;
|
||||
saveRecords.formid=formData.formid;
|
||||
saveRecords.individuals=formData.individuals;
|
||||
saveRecords.companies=formData.companies;
|
||||
saveRecords.persons_with_relationships=formData.persons_with_relationships;
|
||||
saveRecords.company_with_relationships=formData.company_with_relationships;
|
||||
else {
|
||||
let saveRecords: any = {}
|
||||
saveRecords.pdid = formData.pdid;
|
||||
saveRecords.formid = formData.formid;
|
||||
saveRecords.individuals = formData.individuals;
|
||||
saveRecords.companies = formData.companies;
|
||||
saveRecords.persons_with_relationships = formData.persons_with_relationships;
|
||||
saveRecords.company_with_relationships = formData.company_with_relationships;
|
||||
//saveRecords.applicant_relation=formData.applicant_relation;
|
||||
saveRecords.general_remark=formData.general_remark;
|
||||
// console.log(saveRecords);
|
||||
saveRecords.general_remark = formData.general_remark;
|
||||
|
||||
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
},3000);
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
else {
|
||||
@ -608,22 +626,62 @@ export class GeneralInfoComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
}
|
||||
/**************************** submit form details Ends Here ***********************/
|
||||
|
||||
/** On Key Press Event For Amount and Number Fields */
|
||||
keyPress(event: any) {
|
||||
const pattern = /[0-9]/;
|
||||
|
||||
let inputChar = String.fromCharCode(event.charCode);
|
||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// convert month to year business has been running
|
||||
ConvertMonthintoYearforBusiness(e, controlIndex) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
let business_year = control.controls.business_years.value;
|
||||
|
||||
let converted_month: number = e % 12;
|
||||
let converted_year: number = e / 12;
|
||||
|
||||
control.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||
control.controls.business_month.setValue(Math.floor(converted_month));
|
||||
|
||||
}
|
||||
|
||||
getDateObjects(values: any, controlIndex) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
let pd_initiation_date: string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
|
||||
let selected_date = this.pipe.transform(values, 'yyyy/MM/dd');;
|
||||
let diffInMs: number = Date.parse(pd_initiation_date) - Date.parse(selected_date);
|
||||
let diff: number = Math.floor(diffInMs / 1000);
|
||||
diff /= (60 * 60 * 24 * 30);
|
||||
diff = Math.abs(Math.round(diff));
|
||||
control.controls['business_years'].setValue(0);
|
||||
control.controls['business_month'].setValue(0);
|
||||
|
||||
if (diff) {
|
||||
control.controls['business_years'].setValue(Math.floor(diff / 12));
|
||||
control.controls['business_month'].setValue(Math.floor(diff % 12));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// check entity type and create other form control
|
||||
checkEntityType(value, controlIndex) {
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control = control.controls[controlIndex];
|
||||
value == '1' ? control.addControl('business_entity_type_other', new FormControl('', Validators.required)) : control.removeControl('business_entity_type_other');
|
||||
|
||||
}
|
||||
|
||||
// selectedfrequency(e,i){
|
||||
// switch(+e){
|
||||
// case 1: this.placeholderName[i] = 'Weekly Instalment Amount'; break;
|
||||
// case 2: this.placeholderName[i] = 'Daily Instalment Amount'; break;
|
||||
// case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
|
||||
// case 4: this.placeholderName[i] = 'Hourly Instalment Amount'; break;
|
||||
// case 5: this.placeholderName[i] = 'EMI Amount'; break;
|
||||
// case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
|
||||
// case 7: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
|
||||
// default : this.placeholderName[i] = ''; break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// validate all form group and form array fields
|
||||
validateAllFormFields(formGroup: any) {
|
||||
validateAllFormFields(formGroup: any) {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
|
||||
@ -635,8 +693,7 @@ validateAllFormFields(formGroup: any) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
});
|
||||
}
|
||||
/******************* validate all form group and form array fields ENd Here ********/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
// console.log(this.main_applicant+','+this.lender_applicant_id+','+this.subproduct_abbr+','+this.customer_segment_abbr);
|
||||
|
||||
this.form_id = 15;
|
||||
this.notifier = notifier;
|
||||
}
|
||||
@ -78,8 +78,6 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
};
|
||||
|
||||
// open() {
|
||||
// // console.log('hai');
|
||||
|
||||
// const config = new MatSnackBarConfig();
|
||||
// config.duration = this.autoHide;
|
||||
// config.panelClass = this.addExtraClass ? ['party'] : null;
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -20,30 +23,40 @@
|
||||
<mat-card>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount"
|
||||
(keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}}
|
||||
{{loanAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-select multiple (selectionChange)="endUserChange($event.value)" placeholder="What is the end use" formControlName="end_use" >
|
||||
<mat-option *ngFor="let enduse of m_endUseForLoan" [value]="enduse.enduse_of_loan_id">{{ enduse.enduse_of_loan}}</mat-option>
|
||||
<mat-select multiple (selectionChange)="endUserChange($event.value)"
|
||||
placeholder="What is the end use" formControlName="end_use">
|
||||
<mat-option *ngFor="let enduse of m_endUseForLoan" [value]="enduse.enduse_of_loan_id">{{
|
||||
enduse.enduse_of_loan}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="isOtherPurpose" style="width: 28%">
|
||||
<input matInput placeholder="Specify End Use" formControlName="end_use_other"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)"
|
||||
formControlName="is_transfer" >
|
||||
formControlName="is_transfer">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="isOtherPurpose" style="width: 28%">
|
||||
<input matInput placeholder="Specify End Use" formControlName="end_use_other" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''">
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="What is the amount for Balance Transfer ? " (keypress)="keyPress($event)" formControlName="balance_transfer_amount" (keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{balTxrfAmtInWords}} Only</mat-hint>
|
||||
<input matInput placeholder="What is the amount for Balance Transfer ? "
|
||||
(keypress)="keyPress($event)" formControlName="balance_transfer_amount"
|
||||
(keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}}
|
||||
{{balTxrfAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field style="width:28%">
|
||||
<mat-select placeholder="Is there a Top Up"
|
||||
@ -55,24 +68,30 @@
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-select placeholder="Lender from where balance transfer done"
|
||||
formControlName="lender">
|
||||
<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="loanDetailsForm.controls['lender'].value == 1" style="width: 28%">
|
||||
<input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender" autocomplete="off">
|
||||
<input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
||||
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)"
|
||||
formControlName="topup_amount" (keyup)="inWords($event,5)"
|
||||
autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}}
|
||||
{{topUpAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field style="width:64%" *ngIf="loanDetailsForm.controls['topup_amount'].value > 0 " >
|
||||
<mat-form-field style="width:64%" *ngIf="loanDetailsForm.controls['topup_amount'].value > 0 ">
|
||||
<mat-select placeholder="What is the End Use of the Top Up?"
|
||||
formControlName="end_use_topup" >
|
||||
<mat-option *ngFor="let list of m_endUseOFTopUpList" [value]="list.end_use_of_topup_id">{{ list.end_use_of_topup }}</mat-option>
|
||||
formControlName="end_use_topup">
|
||||
<mat-option *ngFor="let list of m_endUseOFTopUpList" [value]="list.end_use_of_topup_id">{{
|
||||
list.end_use_of_topup }}</mat-option>
|
||||
<!-- <mat-option value=2>Business Use.</mat-option>
|
||||
<mat-option value=3>Child’s Marriage.</mat-option>
|
||||
<mat-option value=4>Furniture & Finishing of House Property.</mat-option>
|
||||
@ -82,20 +101,27 @@
|
||||
|
||||
</mat-select>
|
||||
</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">
|
||||
<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">
|
||||
</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" (keypress)="keyPress($event)" (keyup)="inWords($event,4)" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ownContributionInWords}} Only</mat-hint>
|
||||
<input matInput placeholder="Amount of Own Contribution"
|
||||
formControlName="own_contribution" (keypress)="keyPress($event)"
|
||||
(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>
|
||||
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-select (selectionChange)="sourceChange($event.value)" placeholder="Source of Own Contribution" formControlName="source" multiple>
|
||||
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
|
||||
<mat-select (selectionChange)="sourceChange($event.value)" placeholder="Source of Own Contribution"
|
||||
formControlName="source" multiple>
|
||||
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{
|
||||
sour.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -104,35 +130,43 @@
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field *ngIf="isOtherSource" style="width: 28%">
|
||||
<input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off">
|
||||
<input matInput placeholder="Specify Other Sources" formControlName="other_source"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"₹"}} {{emiAmtInWords}} Only</mat-hint>
|
||||
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level"
|
||||
(keypress)="keyPress($event)" (keyup)="inWords($event,6)" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"₹"}}
|
||||
{{emiAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||
<mat-card *ngIf="mortageCardAccess">
|
||||
<mat-card-header><p>Details of Property being Mortgaged</p></mat-card-header>
|
||||
<mat-card-header>
|
||||
<p>Details of Property being Mortgaged</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="Type of Property" formControlName="property_type" (selectionChange)="mortage_type($event.value)" >
|
||||
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option>
|
||||
<mat-select placeholder="Type of Property" formControlName="property_type"
|
||||
(selectionChange)="mortage_type($event.value)">
|
||||
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{
|
||||
typeprop.property_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="mortageAccess" style="width:50%;">
|
||||
<input matInput placeholder="Specify Type of Property" formControlName="property_type_others" autocomplete="off">
|
||||
<input matInput placeholder="Specify Type of Property" formControlName="property_type_others"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select multiple placeholder="Name of the Owner"
|
||||
formControlName="owner_name" [compareWith]="compareObjects" >
|
||||
<mat-select multiple placeholder="Name of the Owner" formControlName="owner_name"
|
||||
[compareWith]="compareObjects">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
@ -165,15 +199,18 @@
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="Status of Construction" formControlName="construction_status" >
|
||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
|
||||
<mat-select placeholder="Status of Construction" formControlName="construction_status">
|
||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{
|
||||
status.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:50%">
|
||||
<input matInput placeholder="Estimate Market Value as Per Customer"
|
||||
formControlName="emv_per_customer" (keypress)="keyPress($event)" (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>
|
||||
formControlName="emv_per_customer" (keypress)="keyPress($event)"
|
||||
(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>
|
||||
|
||||
</mat-card-content>
|
||||
@ -234,43 +271,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>
|
||||
@ -288,16 +373,18 @@
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
|
||||
<textarea matInput placeholder="Remarks" formControlName="loandetails_remarks" ></textarea>
|
||||
<textarea matInput placeholder="Remarks" formControlName="loandetails_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)="submitLoanDetails()"><mat-icon>save</mat-icon>
|
||||
<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)="submitLoanDetails()">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</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-loan-details',
|
||||
@ -48,12 +48,12 @@ export class LoanDetailsComponent implements OnInit {
|
||||
isOtherPurpose: boolean = false;
|
||||
isOtherSource: boolean = false;
|
||||
isPLSource: boolean = false;
|
||||
mortageCheck : boolean = true;
|
||||
mortageCheck: boolean = true;
|
||||
isContribution: boolean = false;
|
||||
OtherOwnerFlag : boolean;
|
||||
OtherOwnerFlag: boolean;
|
||||
|
||||
endUserList: any = [];
|
||||
sourceList : any = [];
|
||||
sourceList: any = [];
|
||||
ownerNames: any = [];
|
||||
m_endUseForLoan = [];
|
||||
m_endUseofLoad = [];
|
||||
@ -63,24 +63,24 @@ export class LoanDetailsComponent implements OnInit {
|
||||
m_btLenderList = [];
|
||||
m_endUseOFTopUpList = [];
|
||||
// existCompanyList: any =[];
|
||||
CompanyApplicantGroupList: any=[];
|
||||
CompanyApplicantGroupList2: any=[];
|
||||
CompanyApplicantGroupList: any = [];
|
||||
CompanyApplicantGroupList2: any = [];
|
||||
|
||||
mergeCompanyApplicant:any=[];
|
||||
existCompanyList:any=[];
|
||||
companies:any=[];
|
||||
loanAmtInWords : any;
|
||||
balTxrfAmtInWords : any;
|
||||
valAsPerAgmtInWords : any;
|
||||
ownContributionInWords : any;
|
||||
mergeCompanyApplicant: any = [];
|
||||
existCompanyList: any = [];
|
||||
companies: any = [];
|
||||
loanAmtInWords: any;
|
||||
balTxrfAmtInWords: any;
|
||||
valAsPerAgmtInWords: any;
|
||||
ownContributionInWords: any;
|
||||
topUpAmtInWords: any;
|
||||
emiAmtInWords : any;
|
||||
emvAmtInWords : any;
|
||||
pageTitle: string ="Loan Details";
|
||||
emiAmtInWords: any;
|
||||
emvAmtInWords: any;
|
||||
pageTitle: string = "Loan Details";
|
||||
|
||||
mortageCardAccess: boolean;
|
||||
mortageAccess: boolean = false;
|
||||
propertyType : any;
|
||||
propertyType: any;
|
||||
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
@ -93,22 +93,22 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
// this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
|
||||
this.applicants = this.applicants.filter(appt => appt.applicant_type != 2)
|
||||
// this.companies = this.pd_all_details.pdapplicants_detials.filter(appt=>appt.applicant_type == 2 )
|
||||
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;
|
||||
this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount :'';
|
||||
this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount : '';
|
||||
this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
|
||||
this.form_id = 10;
|
||||
this.pdid= this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
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;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
|
||||
if(this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP'){
|
||||
if (this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP') {
|
||||
this.isContribution = true;
|
||||
}
|
||||
}
|
||||
@ -130,7 +130,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
flipHorizontal: 4,
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
};
|
||||
ngOnInit() {
|
||||
this.initloanDetailsForm();
|
||||
this.getM_EndUseofLoad();
|
||||
@ -141,29 +141,29 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.getM_BTLenderList();
|
||||
this.getM_EndUseofTopUpList();
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
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.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||
}
|
||||
if(this.productAbbr != 'LAP'){
|
||||
this.mergeCompanyApplicant.push({groupName:'OTHERS',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
||||
if (this.productAbbr != 'LAP') {
|
||||
this.mergeCompanyApplicant.push({ groupName: 'OTHERS', groupValues: [{ id: 0, name: 'Not Yet Finalised', group_id: 2 }] })
|
||||
}
|
||||
})
|
||||
|
||||
@ -174,22 +174,22 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
// *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "
|
||||
if (value.status == 200) {
|
||||
let result = Object.keys(value.records.end_use_group).map(function(key) {
|
||||
let result = Object.keys(value.records.end_use_group).map(function (key) {
|
||||
return value.records.end_use_group[key];
|
||||
});
|
||||
let ownername: any = [];
|
||||
if(value.records.owner_name_group != null){
|
||||
let owner = Object.keys(value.records.owner_name_group).map(function(key) {
|
||||
if (value.records.owner_name_group != null) {
|
||||
let owner = Object.keys(value.records.owner_name_group).map(function (key) {
|
||||
return value.records.owner_name_group[key];
|
||||
});
|
||||
|
||||
|
||||
owner.forEach(val => {
|
||||
ownername.push(val.owner_name);
|
||||
if(val.owner_name == 'Others'){
|
||||
if (val.owner_name == 'Others') {
|
||||
this.OtherOwnerFlag = true;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.OtherOwnerFlag = false;
|
||||
}
|
||||
});
|
||||
@ -206,7 +206,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
|
||||
this.loanDetailsForm.controls['loan_amount'].setValue(value.records.loan_amount);
|
||||
if(value.records.loan_amount){ this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
|
||||
if (value.records.loan_amount) { this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
|
||||
|
||||
|
||||
if (value.records.end_use_other != null) {
|
||||
@ -221,7 +221,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
if (value.records.topup_amount) {
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||
if(value.records.topup_amount > 0){
|
||||
if (value.records.topup_amount > 0) {
|
||||
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
if (value.records.end_use_topup == 1) {
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].setValue(value.records.other_end_use_topup);
|
||||
@ -236,31 +236,31 @@ export class LoanDetailsComponent implements OnInit {
|
||||
if (value.records.other_bt_lender) {
|
||||
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
|
||||
}
|
||||
if((this.isContribution == true) && (value.records.is_transfer != 'yes')){
|
||||
if ((this.isContribution == true) && (value.records.is_transfer != 'yes')) {
|
||||
this.loanDetailsForm.controls['own_contribution'].setValue('');
|
||||
this.loanDetailsForm.controls['other_source'].setValue('');
|
||||
this.loanDetailsForm.controls['source'].setValue('');
|
||||
}
|
||||
else{
|
||||
if(this.isContribution == false && value.records.is_transfer != 'yes'){
|
||||
else {
|
||||
if (this.isContribution == false && value.records.is_transfer != 'yes') {
|
||||
|
||||
let source = Object.keys(value.records.source_group).map(function(key) {
|
||||
let source = Object.keys(value.records.source_group).map(function (key) {
|
||||
return value.records.source_group[key];
|
||||
});
|
||||
|
||||
|
||||
let dbsourcelist : any = [];
|
||||
let dbsourcelist: any = [];
|
||||
source.forEach(val => {
|
||||
dbsourcelist.push(val.sources);
|
||||
});
|
||||
|
||||
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
|
||||
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||
if (value.records.own_contribution) { this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||
|
||||
this.loanDetailsForm.controls['source'].setValue(dbsourcelist);
|
||||
this.sourceChange(dbsourcelist);
|
||||
|
||||
if(value.records.other_source) {
|
||||
if (value.records.other_source) {
|
||||
// this.isOtherSource = true;
|
||||
this.loanDetailsForm.controls['other_source'].setValue(value.records.other_source);
|
||||
}
|
||||
@ -277,7 +277,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
// this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
||||
// }
|
||||
|
||||
if(value.records.emi_level){
|
||||
if (value.records.emi_level) {
|
||||
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(value.records.emi_level);
|
||||
}
|
||||
@ -285,11 +285,11 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type);
|
||||
this.propertyType = value.records.property_type;
|
||||
|
||||
if(this.propertyType != null){
|
||||
if (this.propertyType != null) {
|
||||
this.mortage_type(this.propertyType);
|
||||
}
|
||||
|
||||
if(this.mortageCardAccess == true){
|
||||
if (this.mortageCardAccess == true) {
|
||||
this.loanDetailsForm.controls['property_type_others'].setValue(value.records.property_type_others);
|
||||
this.loanDetailsForm.controls['owner_name'].setValue(ownername);
|
||||
// this.loanDetailsForm.controls['other_owners_name'].setValue(value.records.other_owners_name);
|
||||
@ -301,7 +301,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
// else{
|
||||
// this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
||||
// }
|
||||
if(value.records.emv_per_customer != ''){
|
||||
if (value.records.emv_per_customer != '') {
|
||||
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||
}
|
||||
@ -316,13 +316,13 @@ export class LoanDetailsComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL'){
|
||||
if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL') {
|
||||
this.mortageCardAccess = false;
|
||||
this.loanDetailsForm.controls['owner_name'].setValue('');
|
||||
this.loanDetailsForm.controls['owner_name'].clearValidators();
|
||||
this.loanDetailsForm.controls['owner_name'].updateValueAndValidity();
|
||||
|
||||
}else{
|
||||
} else {
|
||||
this.mortageCardAccess = true;
|
||||
this.loanDetailsForm.controls['owner_name'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['owner_name'].updateValueAndValidity();
|
||||
@ -330,7 +330,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
// =============
|
||||
// =============
|
||||
|
||||
getM_EndUseofLoad() {
|
||||
//this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe(
|
||||
@ -356,7 +356,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
)
|
||||
}
|
||||
|
||||
getM_sourceofamount() {
|
||||
getM_sourceofamount() {
|
||||
this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe(
|
||||
data => {
|
||||
this.m_sourceofamount = data.records.filter(data => data.isactive == 1);
|
||||
@ -371,24 +371,24 @@ getM_sourceofamount() {
|
||||
getM_MortageTypeProperty() {
|
||||
this._pd.getAllMasterDatas('MORTAGEPROPERTIES').subscribe(
|
||||
data => {
|
||||
if(data.dataStatus==true){
|
||||
if (data.dataStatus == true) {
|
||||
let that = this;
|
||||
this.m_mortageTypeProperty = data.records.filter(
|
||||
function(data){
|
||||
function (data) {
|
||||
|
||||
if(that.productAbbr != "LAP"){
|
||||
if (that.productAbbr != "LAP") {
|
||||
|
||||
if(data.group_name == that.productAbbr && data.isactive==1){
|
||||
if (data.group_name == that.productAbbr && data.isactive == 1) {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
else if(that.productAbbr == "LAP"){
|
||||
else if (that.productAbbr == "LAP") {
|
||||
|
||||
if(data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive==1){
|
||||
if (data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive == 1) {
|
||||
|
||||
return data;
|
||||
}
|
||||
else if(data.group_name == that.productAbbr && data.sub_group_name != null && data.isactive==1) {
|
||||
else if (data.group_name == that.productAbbr && data.sub_group_name != null && data.isactive == 1) {
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -418,7 +418,7 @@ getM_sourceofamount() {
|
||||
)
|
||||
}
|
||||
|
||||
getM_BTLenderList(){
|
||||
getM_BTLenderList() {
|
||||
this._pd.getAllMasterDatas('BTLENDERLIST').subscribe(
|
||||
data => {
|
||||
this.m_btLenderList = data.records.filter(data => data.isactive == 1);
|
||||
@ -435,7 +435,7 @@ getM_sourceofamount() {
|
||||
}
|
||||
|
||||
|
||||
getM_EndUseofTopUpList(){
|
||||
getM_EndUseofTopUpList() {
|
||||
this._pd.getAllMasterDatas('ENDUSEOFTOPUP').subscribe(
|
||||
data => {
|
||||
this.m_endUseOFTopUpList = data.records.filter(data => data.is_active == 1);
|
||||
@ -445,17 +445,17 @@ getM_sourceofamount() {
|
||||
|
||||
|
||||
|
||||
// compare objects for merge two master table details
|
||||
// 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;
|
||||
// check others
|
||||
checkOthers(values) {
|
||||
if (values != null) {
|
||||
return values.id == 0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@ -465,7 +465,7 @@ getM_sourceofamount() {
|
||||
|
||||
|
||||
|
||||
// ==================
|
||||
// ==================
|
||||
public initloanDetailsForm(): void {
|
||||
this.loanDetailsForm = this.fb.group({
|
||||
|
||||
@ -476,18 +476,18 @@ getM_sourceofamount() {
|
||||
//is_topup: [''],
|
||||
balance_transfer_amount: [''],
|
||||
topup_amount: [''],
|
||||
end_use_topup:[''],
|
||||
other_end_use_topup:[''],
|
||||
end_use_topup: [''],
|
||||
other_end_use_topup: [''],
|
||||
lender: [''],
|
||||
other_bt_lender : [''],
|
||||
other_bt_lender: [''],
|
||||
own_contribution: [''],
|
||||
source: [''],
|
||||
other_source:[''],
|
||||
other_source: [''],
|
||||
// personal_loan_source:[''],
|
||||
//lender_name_type: [''],
|
||||
emi_level: [''],
|
||||
property_type: [''],
|
||||
property_type_others:[''],
|
||||
property_type_others: [''],
|
||||
owner_name: [''],
|
||||
// other_owners_name :[''],
|
||||
construction_status: [''],
|
||||
@ -512,19 +512,18 @@ getM_sourceofamount() {
|
||||
let OthersAvaliable;
|
||||
event.forEach(option => {
|
||||
// let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
|
||||
let othersData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0];
|
||||
let othersData = this.m_endUseForLoan.filter(sub => sub.enduse_of_loan_id == option)[0];
|
||||
|
||||
OthersAvaliable = othersData.enduse_of_loan.substr(0,6).toLowerCase();
|
||||
OthersAvaliable = othersData.enduse_of_loan.substr(0, 6).toLowerCase();
|
||||
|
||||
this.endUserList.push({ end_use: option });
|
||||
});
|
||||
|
||||
if(OthersAvaliable == 'others') {
|
||||
if (OthersAvaliable == 'others') {
|
||||
this.isOtherPurpose = true;
|
||||
this.loanDetailsForm.controls['end_use_other'].setValidators([Validators.required]);
|
||||
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
this.loanDetailsForm.controls['end_use_other'].clearValidators();
|
||||
this.isOtherPurpose = false;
|
||||
}
|
||||
@ -541,17 +540,17 @@ getM_sourceofamount() {
|
||||
|
||||
this.isOtherSource = evt.some(e => e == 1) // this return true or false Only;
|
||||
// this.isPLSource = evt.some(e => e == 3) // this return true or false Only;
|
||||
if(this.isOtherSource){
|
||||
if (this.isOtherSource) {
|
||||
this.loanDetailsForm.controls['other_source'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
|
||||
}else{
|
||||
} else {
|
||||
this.loanDetailsForm.controls['other_source'].clearValidators();
|
||||
this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
|
||||
}
|
||||
this.sourceList = [];
|
||||
|
||||
evt.forEach(option => {
|
||||
this.sourceList.push({source: option});
|
||||
this.sourceList.push({ source: option });
|
||||
});
|
||||
}
|
||||
|
||||
@ -559,10 +558,10 @@ getM_sourceofamount() {
|
||||
let EventValue;
|
||||
event.value.forEach(option => {
|
||||
EventValue = option;
|
||||
if(EventValue == 'Others'){
|
||||
if (EventValue == 'Others') {
|
||||
this.OtherOwnerFlag = true;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.OtherOwnerFlag = false;
|
||||
}
|
||||
});
|
||||
@ -574,20 +573,32 @@ getM_sourceofamount() {
|
||||
}
|
||||
submitLoanDetails() {
|
||||
|
||||
if(this.loanDetailsForm.controls['lender'].value == 1){
|
||||
if ((this.isContribution == true) && (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();
|
||||
this.loanDetailsForm.controls['other_source'].setValue('');
|
||||
this.loanDetailsForm.controls['other_source'].clearValidators();
|
||||
this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
|
||||
this.loanDetailsForm.controls['source'].setValue('');
|
||||
this.loanDetailsForm.controls['source'].clearValidators();
|
||||
this.loanDetailsForm.controls['source'].updateValueAndValidity();
|
||||
}
|
||||
|
||||
if (this.loanDetailsForm.controls['lender'].value == 1) {
|
||||
this.loanDetailsForm.controls['other_bt_lender'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['other_bt_lender'].updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.loanDetailsForm.controls['other_bt_lender'].clearValidators();
|
||||
this.loanDetailsForm.controls['other_bt_lender'].updateValueAndValidity();
|
||||
}
|
||||
|
||||
if(this.loanDetailsForm.controls['end_use_topup'].value == 1){
|
||||
if (this.loanDetailsForm.controls['end_use_topup'].value == 1) {
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].clearValidators();
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].updateValueAndValidity();
|
||||
}
|
||||
@ -607,14 +618,14 @@ getM_sourceofamount() {
|
||||
let dataEnd_user_data = [];
|
||||
|
||||
this.loanDetailsForm.controls['end_use'].value.forEach(element => {
|
||||
dataEnd_user_data.push({end_use: element})
|
||||
dataEnd_user_data.push({ end_use: element })
|
||||
});
|
||||
|
||||
records.end_use_group = dataEnd_user_data;
|
||||
|
||||
if (this.isOtherPurpose) {
|
||||
records.end_use_other = this.loanDetailsForm.controls['end_use_other'].value;
|
||||
}else{ records.end_use_other = null ;}
|
||||
} else { records.end_use_other = null; }
|
||||
|
||||
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
|
||||
// records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
|
||||
@ -622,13 +633,13 @@ getM_sourceofamount() {
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
|
||||
}
|
||||
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no'){
|
||||
if(this.isContribution){
|
||||
else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') {
|
||||
if (this.isContribution) {
|
||||
records.own_contribution = '';
|
||||
records.source_group = '' ;
|
||||
records.source_group = '';
|
||||
records.other_source = '';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
|
||||
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
||||
// records.source = this.loanDetailsForm.controls['source'].value;
|
||||
@ -641,7 +652,7 @@ getM_sourceofamount() {
|
||||
|
||||
let dataSource_list = [];
|
||||
this.loanDetailsForm.controls['source'].value.forEach(element => {
|
||||
dataSource_list.push({sources: element})
|
||||
dataSource_list.push({ sources: element })
|
||||
});
|
||||
records.source_group = dataSource_list;
|
||||
|
||||
@ -652,9 +663,9 @@ getM_sourceofamount() {
|
||||
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
||||
// }
|
||||
|
||||
if(records.topup_amount > 0){
|
||||
if (records.topup_amount > 0) {
|
||||
records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
|
||||
if(records.end_use_topup == 1){
|
||||
if (records.end_use_topup == 1) {
|
||||
records.other_end_use_topup = this.loanDetailsForm.controls['other_end_use_topup'].value;
|
||||
}
|
||||
}
|
||||
@ -663,24 +674,24 @@ getM_sourceofamount() {
|
||||
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { //this.loanDetailsForm.controls['is_topup'].value == 'yes' ||
|
||||
records.lender = this.loanDetailsForm.controls['lender'].value;
|
||||
if(this.loanDetailsForm.controls['lender'].value == 1){
|
||||
if (this.loanDetailsForm.controls['lender'].value == 1) {
|
||||
records.other_bt_lender = this.loanDetailsForm.controls['other_bt_lender'].value;
|
||||
}
|
||||
}
|
||||
|
||||
records.emi_level = this.loanDetailsForm.controls['emi_level'].value;
|
||||
if(this.mortageCardAccess == true){
|
||||
if (this.mortageCardAccess == true) {
|
||||
|
||||
records.property_type = this.loanDetailsForm.controls['property_type'].value;
|
||||
records.property_type_others = this.loanDetailsForm.controls['property_type_others'].value;
|
||||
let dataOwner_name = [];
|
||||
this.loanDetailsForm.controls['owner_name'].value.forEach(element => {
|
||||
dataOwner_name.push({owner_name: element})
|
||||
dataOwner_name.push({ owner_name: element })
|
||||
});
|
||||
records.owner_name_group = dataOwner_name;
|
||||
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
|
||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||
}else{
|
||||
} else {
|
||||
records.property_type = null;
|
||||
records.property_type_others = null;
|
||||
records.owner_name_group = null;
|
||||
@ -688,22 +699,22 @@ getM_sourceofamount() {
|
||||
records.emv_per_customer = null;
|
||||
}
|
||||
|
||||
if(this.isOtherSource){
|
||||
if (this.isOtherSource) {
|
||||
records.other_source = this.loanDetailsForm.controls['other_source'].value;
|
||||
}else{ records.other_source = ''; }
|
||||
} else { records.other_source = ''; }
|
||||
|
||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||
|
||||
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].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 => {
|
||||
@ -715,16 +726,16 @@ getM_sourceofamount() {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
selectedBalancesTransferChanges(event: any){
|
||||
selectedBalancesTransferChanges(event: any) {
|
||||
|
||||
if(event.value == 'no') {
|
||||
if (event.value == 'no') {
|
||||
// this.loanDetailsForm.controls['is_topup'].clearValidators();
|
||||
// this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
|
||||
|
||||
@ -734,7 +745,7 @@ getM_sourceofamount() {
|
||||
this.loanDetailsForm.controls['own_contribution'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
|
||||
}
|
||||
else if(event.value == 'yes'){
|
||||
else if (event.value == 'yes') {
|
||||
// this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
|
||||
// this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
|
||||
|
||||
@ -759,24 +770,24 @@ getM_sourceofamount() {
|
||||
}
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,flag:number){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
inWords(e, flag: number) {
|
||||
switch (flag) {
|
||||
case 1:
|
||||
this.loanAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
this.balTxrfAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 3 :
|
||||
case 3:
|
||||
this.valAsPerAgmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 4 :
|
||||
case 4:
|
||||
this.ownContributionInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 5 :
|
||||
case 5:
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6 :
|
||||
case 6:
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7:
|
||||
@ -790,17 +801,16 @@ getM_sourceofamount() {
|
||||
/**
|
||||
* mortage_type
|
||||
*/
|
||||
mortage_type(mortage_value)
|
||||
{
|
||||
mortage_type(mortage_value) {
|
||||
|
||||
//let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0];
|
||||
let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id == mortage_value)[0];
|
||||
let mortagetypes = this.m_mortageTypeProperty.filter(mor => mor.mortage_property_id == mortage_value)[0];
|
||||
|
||||
if(mortagetypes.property_name=='Others (Please Specify)'){
|
||||
if (mortagetypes.property_name == 'Others (Please Specify)') {
|
||||
this.mortageAccess = true;
|
||||
this.loanDetailsForm.controls['property_type_others'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['property_type_others'].updateValueAndValidity();
|
||||
}else{
|
||||
} else {
|
||||
this.mortageAccess = false;
|
||||
this.loanDetailsForm.controls['property_type_others'].clearValidators();
|
||||
this.loanDetailsForm.controls['property_type_others'].updateValueAndValidity();
|
||||
@ -810,19 +820,17 @@ getM_sourceofamount() {
|
||||
/**
|
||||
* LoanCalculation
|
||||
*/
|
||||
loanCalc()
|
||||
{
|
||||
let BtAmount : number = +this.loanDetailsForm.value.balance_transfer_amount;
|
||||
let loanAmount : number = +this.loanDetailsForm.value.loan_amount;
|
||||
let topupAmt ;
|
||||
if(BtAmount !=null && loanAmount !=null)
|
||||
{
|
||||
if(loanAmount >= BtAmount){
|
||||
loanCalc() {
|
||||
let BtAmount: number = +this.loanDetailsForm.value.balance_transfer_amount;
|
||||
let loanAmount: number = +this.loanDetailsForm.value.loan_amount;
|
||||
let topupAmt;
|
||||
if (BtAmount != null && loanAmount != null) {
|
||||
if (loanAmount >= BtAmount) {
|
||||
topupAmt = loanAmount - BtAmount;
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(topupAmt);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.notifier.notify('warning', 'Balances Transfer Amount is greater than Loan Amount Please check.!');
|
||||
this.loanDetailsForm.controls['balance_transfer_amount'].setValue('');
|
||||
this.balTxrfAmtInWords = '';
|
||||
|
||||
@ -101,7 +101,7 @@ public viewerOptions: any = {
|
||||
this.getMasterDetails('EDUQUALIFICATION',3);
|
||||
this.getMasterDetails('NONINDIVIDUALENTITIES',4);
|
||||
this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
// console.log(this.mainApplicantDetails)
|
||||
|
||||
this.coApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 0);
|
||||
}
|
||||
|
||||
@ -414,13 +414,10 @@ validateAllFormFields(formGroup: any) {
|
||||
|
||||
|
||||
// selectedAccTypeChanges(event: any){
|
||||
// console.log('First Time',event);
|
||||
// console.log('First Time Value',event.value);
|
||||
|
||||
// if(event.value == 2) {
|
||||
// const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
// console.log('Inside If Condition');
|
||||
// console.log(control);
|
||||
// console.log(control.controls);
|
||||
|
||||
|
||||
// control.controls[0].get('limit').clearValidators();
|
||||
// control.controls[0].get('limit').updateValueAndValidity();
|
||||
@ -430,7 +427,7 @@ validateAllFormFields(formGroup: any) {
|
||||
// // this.bankingForm.controls.get('limit').clearValidators();
|
||||
// // this.bankingForm.controls.itemRows['controls'].get('limit').updateValueAndValidity();
|
||||
// // const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
// // console.log(control.controls['limit'].value);
|
||||
|
||||
|
||||
// }
|
||||
// else{
|
||||
|
||||
@ -87,13 +87,13 @@ export class RentalInfoComponent implements OnInit {
|
||||
control.push(this.createpropertyArray());
|
||||
const parentControl = <FormGroup>this.rentalForm.controls['rental_home']['controls'][index];
|
||||
const sub = <FormArray>parentControl.controls['details_tenants'];
|
||||
console.log('control', parentControl);
|
||||
// console.log('control', parentControl);
|
||||
subArray = Object.keys(datas.details_tenants).map(function (key) {
|
||||
return datas.details_tenants[key];
|
||||
});
|
||||
if (subArray.length > 0) {
|
||||
subArray.forEach((val) => {
|
||||
console.log('val', val);
|
||||
// console.log('val', val);
|
||||
sub.push(this.createTenatsArray());
|
||||
})
|
||||
sub.removeAt(0);
|
||||
@ -176,8 +176,8 @@ export class RentalInfoComponent implements OnInit {
|
||||
addTenant(parentIndex:number) {
|
||||
const parentControl = <FormGroup>this.rentalForm.controls['rental_home']['controls'][parentIndex];
|
||||
const control = <FormArray>parentControl.controls['details_tenants'];
|
||||
console.log(parentControl);
|
||||
console.log(control);
|
||||
// console.log(parentControl);
|
||||
// console.log(control);
|
||||
control.push(this.createTenatsArray());
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user