changes:ps
This commit is contained in:
parent
2bd5d78f5e
commit
746ad4d9ea
@ -98,7 +98,7 @@
|
|||||||
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span>
|
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span>
|
||||||
<br>
|
<br>
|
||||||
<span class="fontsize" *ngIf="details.city_name">
|
<span class="fontsize" *ngIf="details.city_name">
|
||||||
<i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
<i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }} </span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Status">
|
<ng-container matColumnDef="Status">
|
||||||
|
|||||||
@ -87,7 +87,7 @@
|
|||||||
<ng-container matColumnDef="Address">
|
<ng-container matColumnDef="Address">
|
||||||
<mat-cell class="cell" *matCellDef="let details;">
|
<mat-cell class="cell" *matCellDef="let details;">
|
||||||
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span><br>
|
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span><br>
|
||||||
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }} </span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Status">
|
<ng-container matColumnDef="Status">
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
<ng-container matColumnDef="Address">
|
<ng-container matColumnDef="Address">
|
||||||
<mat-cell class="cell" *matCellDef="let details;">
|
<mat-cell class="cell" *matCellDef="let details;">
|
||||||
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span><br>
|
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span><br>
|
||||||
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }} </span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Status">
|
<ng-container matColumnDef="Status">
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
<ng-container matColumnDef="Address">
|
<ng-container matColumnDef="Address">
|
||||||
<mat-cell class="cell" *matCellDef="let details;">
|
<mat-cell class="cell" *matCellDef="let details;">
|
||||||
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span><br>
|
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span><br>
|
||||||
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }} </span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Status">
|
<ng-container matColumnDef="Status">
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
<ng-container matColumnDef="Address">
|
<ng-container matColumnDef="Address">
|
||||||
<mat-cell class="cell" *matCellDef="let details;">
|
<mat-cell class="cell" *matCellDef="let details;">
|
||||||
<span>{{details.pd_date_of_initiation}}</span><br>
|
<span>{{details.pd_date_of_initiation}}</span><br>
|
||||||
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }} </span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Status">
|
<ng-container matColumnDef="Status">
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-card>
|
<mat-card style="min-height: 550px;">
|
||||||
<!-- <mat-card-title>Address Details</mat-card-title> -->
|
<!-- <mat-card-title>Address Details</mat-card-title> -->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
@ -43,7 +43,8 @@
|
|||||||
|
|
||||||
<div *ngIf="addressForm.controls['address_type'].value == 1" fxFlex="33">
|
<div *ngIf="addressForm.controls['address_type'].value == 1" fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<input matInput placeholder="Specify Address Type" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
<input matInput placeholder="Specify Address Type *" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
||||||
|
<mat-error *ngIf="!addressForm.controls['address_type_others'].valid">Address Type Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -59,15 +60,16 @@
|
|||||||
|
|
||||||
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="33">
|
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<input matInput placeholder="Specify Locality" formControlName="locality_others" autocomplete="off">
|
<input matInput placeholder="Specify Locality *" formControlName="locality_others" autocomplete="off">
|
||||||
|
<mat-error *ngIf="!addressForm.controls['locality_others'].valid">Locality Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="addressForm.controls.locality.value == 5" fxFlex="33">
|
<div *ngIf="addressForm.controls.locality.value == 5" fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<input matInput placeholder="Specify the MixUse"
|
<input matInput placeholder="Specify the MixUse *"
|
||||||
formControlName="locality_mixuse" autocomplete="off">
|
formControlName="locality_mixuse" autocomplete="off">
|
||||||
<mat-error>requried</mat-error>
|
<mat-error *ngIf="!addressForm.controls['locality_mixuse'].valid">MixUse Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -91,11 +93,12 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="addressForm.controls['comment_locality'].value == 1 " fxFlex="33">
|
<!-- <div *ngIf="addressForm.controls['comment_locality'].value == 1 " fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<input matInput placeholder="Specify Comment on Locality" formControlName="other_comment_locality" autocomplete="off">
|
<input matInput placeholder="Specify Comment on Locality *" formControlName="other_comment_locality" autocomplete="off">
|
||||||
|
<mat-error *ngIf="!addressForm.controls['other_comment_locality'].valid">Comment on Locality Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- <div fxFlex="33">
|
<!-- <div fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
@ -123,7 +126,7 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxLayout="row wrap">
|
<!--<div fxLayout="row wrap">
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<label>How long has business been operated from this premise?</label>
|
<label>How long has business been operated from this premise?</label>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -155,14 +158,14 @@
|
|||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-form-field style="width: 95%;">
|
<mat-form-field style="width: 95%;">
|
||||||
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"-->
|
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"--
|
||||||
<mat-select placeholder="Are there any other premises from which business activity is being run?" formControlName="bussiness_activity" required>
|
<mat-select placeholder="Are there any other premises from which business activity is being run?" formControlName="bussiness_activity" required>
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -178,7 +181,7 @@
|
|||||||
</mat-form-field>--(Customer Behaviour)-->
|
</mat-form-field>--(Customer Behaviour)-->
|
||||||
|
|
||||||
|
|
||||||
<mat-card *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'">
|
<!-- <mat-card *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'">
|
||||||
|
|
||||||
<div formArrayName="additional_address_units">
|
<div formArrayName="additional_address_units">
|
||||||
<div *ngFor="let item of addressForm.controls.additional_address_units['controls']; let i=index let last=last" >
|
<div *ngFor="let item of addressForm.controls.additional_address_units['controls']; let i=index let last=last" >
|
||||||
@ -186,12 +189,13 @@
|
|||||||
<mat-card-content class="matcard" [formGroup]="item">
|
<mat-card-content class="matcard" [formGroup]="item">
|
||||||
|
|
||||||
<mat-form-field style="width: 42%">
|
<mat-form-field style="width: 42%">
|
||||||
<mat-select placeholder="Type of Premises" formControlName="premises_type">
|
<mat-select placeholder="Type of Premises" formControlName="premises_type" (selectionChange)="setRequiredValidation($event.value,item)">
|
||||||
<mat-option *ngFor="let m_addressType of addressData" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
<mat-option *ngFor="let m_addressType of addressData" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="item.get('premises_type').value == 1" style="width: 42%">
|
<mat-form-field *ngIf="item.get('premises_type').value == 1" style="width: 42%">
|
||||||
<input matInput placeholder="Specify Premises Type" formControlName="premises_type_others" autocomplete="off">
|
<input matInput placeholder="Specify Premises Type *" formControlName="premises_type_others" autocomplete="off">
|
||||||
|
<mat-error>Premises Type Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 42%;">
|
<mat-form-field style="width: 42%;">
|
||||||
<input matInput placeholder="Number Of Additional Units"
|
<input matInput placeholder="Number Of Additional Units"
|
||||||
@ -220,7 +224,7 @@
|
|||||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off" (keypress)="keyPress($event)" (keyup)="inWords($event,i)">
|
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off" (keypress)="keyPress($event)" (keyup)="inWords($event,i)">
|
||||||
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('premises_rent_amt').value != ''">{{"₹"}} {{premisesRentAmtInwords[i]}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('premises_rent_amt').value != ''">{{"₹"}} {{premisesRentAmtInwords[i]}} Only</mat-hint>
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<mat-form-field style="width: 88%">
|
<!----<mat-form-field style="width: 88%">
|
||||||
<input matInput placeholder="Remarks"
|
<input matInput placeholder="Remarks"
|
||||||
formControlName="premises_remarks" autocomplete="off">
|
formControlName="premises_remarks" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -236,7 +240,7 @@
|
|||||||
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
|
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
|
||||||
<strong>Delete Additional Unit </strong>
|
<strong>Delete Additional Unit </strong>
|
||||||
</button> -->
|
</button> -->
|
||||||
<div align="right">
|
<!---- <div align="right">
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="removeUnits(i)"
|
<button type="button" mat-raised-button mat-icon-button (click)="removeUnits(i)"
|
||||||
matTooltip="Delete Additional Unit" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
matTooltip="Delete Additional Unit" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
@ -247,7 +251,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>-->
|
||||||
|
|
||||||
<!--- Don't Remove To replace atlast of the PD Completion and creating new form (Neighbourhood check) --
|
<!--- Don't Remove To replace atlast of the PD Completion and creating new form (Neighbourhood check) --
|
||||||
<mat-card>
|
<mat-card>
|
||||||
|
|||||||
@ -44,48 +44,49 @@ export class AddressComponent implements OnInit {
|
|||||||
CustSegAbbr: any;
|
CustSegAbbr: any;
|
||||||
loadDataStatus: boolean=true;
|
loadDataStatus: boolean=true;
|
||||||
|
|
||||||
PremisesOtherFlag:boolean;
|
// PremisesOtherFlag:boolean;
|
||||||
PremisesLabel : any = [];
|
// PremisesLabel : any = [];
|
||||||
|
|
||||||
locationdata: any = [];
|
locationdata: any = [];
|
||||||
commentData: any = [];
|
commentData: any = [];
|
||||||
//customerData: any = []; 221118 review doc s.no 3.e
|
//customerData: any = []; 221118 review doc s.no 3.e
|
||||||
addressData:any = [];
|
addressData:any = [];
|
||||||
localityData:any = [];
|
localityData:any = [];
|
||||||
ownerShipData:any = [];
|
// ownerShipData:any = [];
|
||||||
cityData:any = [];
|
// cityData:any = [];
|
||||||
|
|
||||||
z = 0;
|
// z = 0;
|
||||||
|
|
||||||
formPremisesArray: any = [];
|
// formPremisesArray: any = [];
|
||||||
formPremisesCityArray: any = [];
|
// formPremisesCityArray: any = [];
|
||||||
additional_premises: any=[];
|
// additional_premises: any=[];
|
||||||
bussiness_address_type: any=[];
|
// bussiness_address_type: any=[];
|
||||||
// premisesRentAmtInwords:any=[];
|
// premisesRentAmtInwords:any=[];
|
||||||
// rentAmtInwords:any;
|
// rentAmtInwords:any;
|
||||||
tempArr: any[];
|
// tempArr: any[];
|
||||||
placeholderName : any = 'Was any business activity seen at the Address Type during PD visit?';
|
placeholderName : any = 'Was any business activity seen at the Address Type during PD visit?';
|
||||||
//neighbourStatusData:any=["Yes","No"];
|
//neighbourStatusData:any=["Yes","No"];
|
||||||
//applicantOwnerData:any=["Yes","No","Dont Know"];
|
//applicantOwnerData:any=["Yes","No","Dont Know"];
|
||||||
|
|
||||||
public currentLoanForm: FormGroup;
|
// public currentLoanForm: FormGroup;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
public addressForm: FormGroup;
|
public addressForm: FormGroup;
|
||||||
|
|
||||||
public address: AbstractControl;
|
public address: AbstractControl;
|
||||||
public addressType: AbstractControl;
|
public addressType: AbstractControl;
|
||||||
public locality: AbstractControl;
|
public locality: AbstractControl;
|
||||||
public pdLocation: AbstractControl;
|
public pdLocation: AbstractControl;
|
||||||
public commentlocality: AbstractControl;
|
public commentLocality: AbstractControl;
|
||||||
public other_comment_locality: AbstractControl;
|
// public otherCommentLocality: AbstractControl;
|
||||||
// public customerBehaviour: AbstractControl;
|
// public customerBehaviour: AbstractControl;
|
||||||
// public ownership: AbstractControl;
|
// public ownership: AbstractControl;
|
||||||
// public other_ownership: AbstractControl;
|
// public other_ownership: AbstractControl;
|
||||||
// public rent_amt : AbstractControl;
|
// public rent_amt : AbstractControl;
|
||||||
public other_premises_bussiness_activity : AbstractControl;
|
// public other_premises_bussiness_activity : AbstractControl;
|
||||||
public bussiness_activity_remark: AbstractControl;
|
// public bussiness_activity_remark: AbstractControl;
|
||||||
public bussinessActivity: AbstractControl;
|
// public bussinessActivity: AbstractControl;
|
||||||
public business_years: AbstractControl;
|
// public business_years: AbstractControl;
|
||||||
public business_month: AbstractControl;
|
// public business_month: AbstractControl;
|
||||||
//constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , ) {
|
//constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , ) {
|
||||||
constructor(private el: ElementRef, notifier: NotifierService,
|
constructor(private el: ElementRef, notifier: NotifierService,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
@ -134,7 +135,7 @@ export class AddressComponent implements OnInit {
|
|||||||
this._pd.retriveForm(params).subscribe(data => {
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
// console.log('data', data);
|
// console.log('data', data);
|
||||||
//const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
//const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
||||||
const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
// const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
||||||
//const additionalPremisesControl = <FormArray>this.addressForm.controls['additional_premises'];
|
//const additionalPremisesControl = <FormArray>this.addressForm.controls['additional_premises'];
|
||||||
if(data.status == 200) {
|
if(data.status == 200) {
|
||||||
|
|
||||||
@ -144,66 +145,78 @@ export class AddressComponent implements OnInit {
|
|||||||
this.addressForm.controls.address_type.setValue(data.records.address_type);
|
this.addressForm.controls.address_type.setValue(data.records.address_type);
|
||||||
let selectedAddressType = this.addressData.filter(element =>element.address_type_id == data.records.address_type)[0];
|
let selectedAddressType = this.addressData.filter(element =>element.address_type_id == data.records.address_type)[0];
|
||||||
this.selectedAddressType(selectedAddressType.address_type);
|
this.selectedAddressType(selectedAddressType.address_type);
|
||||||
|
|
||||||
if(data.records.address_type == 1) {
|
if(data.records.address_type == 1) {
|
||||||
this.addressForm.controls.address_type_others.setValue(data.records.address_type_others);
|
this.addressForm.controls.address_type_others.setValue(data.records.address_type_others);
|
||||||
|
this.addressForm.controls.address_type_others.setValidators([Validators.required]);
|
||||||
|
this.addressForm.controls.address_type_others.updateValueAndValidity();
|
||||||
this.selectedAddressType(data.records.address_type_others);
|
this.selectedAddressType(data.records.address_type_others);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
||||||
|
|
||||||
if(data.records.comment_locality == 1){
|
// if(data.records.comment_locality == 1){
|
||||||
this.addressForm.controls.other_comment_locality.setValue(data.records.other_comment_locality);
|
// this.addressForm.controls.other_comment_locality.setValue(data.records.other_comment_locality);
|
||||||
}
|
// // this.addressForm.controls.other_comment_locality.setValidators([Validators.required]);
|
||||||
|
// // this.addressForm.controls.other_comment_locality.updateValueAndValidity();
|
||||||
|
// }
|
||||||
// this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
// this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
||||||
this.addressForm.controls.locality.setValue(data.records.locality);
|
this.addressForm.controls.locality.setValue(data.records.locality);
|
||||||
|
|
||||||
if(data.records.locality == 1 ){
|
if(data.records.locality == 1 ){
|
||||||
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
||||||
|
this.addressForm.controls.locality_others.setValidators([Validators.required]);
|
||||||
|
this.addressForm.controls.locality_others.updateValueAndValidity();
|
||||||
}
|
}
|
||||||
|
if(data.records.locality == 5){
|
||||||
|
this.addressForm.controls.locality_mixuse.setValue(data.records.locality_mixuse);
|
||||||
|
this.addressForm.controls.locality_mixuse.setValidators([Validators.required])
|
||||||
|
this.addressForm.controls.locality_mixuse.updateValueAndValidity();
|
||||||
|
}
|
||||||
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
||||||
// this.addressForm.controls.address_ownership.setValue(data.records.address_ownership);
|
|
||||||
// this.addressForm.controls.other_ownership.setValue(data.records.other_ownership);
|
// this.addressForm.controls.other_premises_bussiness_activity.setValue(data.records.other_premises_bussiness_activity);
|
||||||
// this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
|
// if(data.records.other_premises_bussiness_activity != '' && data.records.other_premises_bussiness_activity !=null) {
|
||||||
// if(data.records.address_ownership == 3){
|
// this.addressForm.controls.bussiness_activity_remark.setValue(data.records.bussiness_activity_remark);
|
||||||
// this.rentAmtInwords = this._pd.convertNumberToWords(data.records.rent_amt);
|
// }
|
||||||
|
// else{
|
||||||
|
// this.addressForm.controls.bussiness_activity_remark.setValue('');
|
||||||
// }
|
// }
|
||||||
this.addressForm.controls.other_premises_bussiness_activity.setValue(data.records.other_premises_bussiness_activity);
|
// this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
||||||
if(data.records.other_premises_bussiness_activity != '' && data.records.other_premises_bussiness_activity !=null) {
|
|
||||||
this.addressForm.controls.bussiness_activity_remark.setValue(data.records.bussiness_activity_remark);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.addressForm.controls.bussiness_activity_remark.setValue('');
|
|
||||||
}
|
|
||||||
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
|
||||||
|
|
||||||
this.addressForm.controls.business_years.setValue(data.records.business_years);
|
// this.addressForm.controls.business_years.setValue(data.records.business_years);
|
||||||
this.addressForm.controls.business_month.setValue(data.records.business_month);
|
// this.addressForm.controls.business_month.setValue(data.records.business_month);
|
||||||
|
|
||||||
if(data.records.bussiness_activity == 'yes') {
|
// if(data.records.bussiness_activity == 'yes') {
|
||||||
// const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
// // const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
||||||
|
|
||||||
var resultOfUnits = Object.keys(data.records.additional_address_units).map(function (key) {
|
// var resultOfUnits = Object.keys(data.records.additional_address_units).map(function (key) {
|
||||||
return data.records.additional_address_units[key];
|
// return data.records.additional_address_units[key];
|
||||||
});
|
// });
|
||||||
//console.log(resultOfUnits);
|
// //console.log(resultOfUnits);
|
||||||
|
|
||||||
if (resultOfUnits.length == 0) {
|
// if (resultOfUnits.length == 0) {
|
||||||
control.push(this.createUnits());
|
// control.push(this.createUnits());
|
||||||
} else {
|
// } else {
|
||||||
resultOfUnits.forEach((datas,index) => {
|
// resultOfUnits.forEach((datas,index) => {
|
||||||
// this.premisesRentAmtInwords[index] = this._pd.convertNumberToWords(datas.premises_rent_amt);
|
// // this.premisesRentAmtInwords[index] = this._pd.convertNumberToWords(datas.premises_rent_amt);
|
||||||
control.push(this.createUnits());
|
// if(datas.premises_type == 1){
|
||||||
});
|
// // control.controls[index].premises_type_others.clearValidators();
|
||||||
this.addressForm.controls.additional_address_units.setValue(resultOfUnits);
|
// // control.controls[index].premises_type_others.updateValueAndValidity();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// control.push(this.createUnits());
|
||||||
|
// });
|
||||||
|
// this.addressForm.controls.additional_address_units.setValue(resultOfUnits);
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (data.records.locality_others) {
|
|
||||||
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//control.push(this.createNeighbour());
|
//control.push(this.createNeighbour());
|
||||||
control.push(this.createUnits());
|
// control.push(this.createUnits());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -213,16 +226,16 @@ export class AddressComponent implements OnInit {
|
|||||||
data => {
|
data => {
|
||||||
this.addressData = data.records.filter(data => data.isactive == 1);
|
this.addressData = data.records.filter(data => data.isactive == 1);
|
||||||
// console.log(this.addressData);
|
// console.log(this.addressData);
|
||||||
if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
// if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
||||||
|
|
||||||
// console.log('whole',FilteredAddressType);
|
// // console.log('whole',FilteredAddressType);
|
||||||
let index1 = this.addressData.map(data => data.address_type).indexOf("Residence");
|
// let index1 = this.addressData.map(data => data.address_type).indexOf("Residence");
|
||||||
this.addressData.splice(index1, 1);
|
// this.addressData.splice(index1, 1);
|
||||||
// console.log('FirstOne',FilteredAddressType);
|
// // console.log('FirstOne',FilteredAddressType);
|
||||||
let index2 = this.addressData.map(data => data.address_type).indexOf("Residence cum Office");
|
// let index2 = this.addressData.map(data => data.address_type).indexOf("Residence cum Office");
|
||||||
this.addressData.splice(index2, 1);
|
// this.addressData.splice(index2, 1);
|
||||||
// console.log('SecondOne',FilteredAddressType);
|
// // console.log('SecondOne',FilteredAddressType);
|
||||||
}
|
// }
|
||||||
// console.log(this.addressData);
|
// console.log(this.addressData);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -236,38 +249,38 @@ export class AddressComponent implements OnInit {
|
|||||||
locality_mixuse:[''],
|
locality_mixuse:[''],
|
||||||
pd_location: ['', Validators.compose([Validators.required])],
|
pd_location: ['', Validators.compose([Validators.required])],
|
||||||
comment_locality: ['', Validators.compose([Validators.required])],
|
comment_locality: ['', Validators.compose([Validators.required])],
|
||||||
other_comment_locality : [''],
|
// other_comment_locality : [''],
|
||||||
//customer_behaviour: ['', Validators.compose([Validators.required])],
|
//customer_behaviour: ['', Validators.compose([Validators.required])],
|
||||||
//neighbourhood: this.fb.array([]),
|
//neighbourhood: this.fb.array([]),
|
||||||
additional_address_units: this.fb.array([]),
|
// additional_address_units: this.fb.array([]),
|
||||||
address_form_remark:[''],
|
address_form_remark:[''],
|
||||||
// address_ownership:[''],
|
// address_ownership:[''],
|
||||||
// other_ownership:[''],
|
// other_ownership:[''],
|
||||||
// rent_amt:[''],
|
// rent_amt:[''],
|
||||||
other_premises_bussiness_activity : [''],
|
// other_premises_bussiness_activity : [''],
|
||||||
bussiness_activity_remark:[''],
|
// bussiness_activity_remark:[''],
|
||||||
bussiness_activity:[''],
|
// bussiness_activity:[''],
|
||||||
business_years:[''],
|
// business_years:[''],
|
||||||
business_month:[''],
|
// business_month:[''],
|
||||||
bussiness_address_type:[''],
|
// bussiness_address_type:[''],
|
||||||
bussiness_address_type_others: [''],
|
// bussiness_address_type_others: [''],
|
||||||
//additional_premises: this.fb.array([])
|
//additional_premises: this.fb.array([])
|
||||||
});
|
});
|
||||||
this.address = this.addressForm.controls['address'];
|
this.address = this.addressForm.controls['address'];
|
||||||
this.addressType = this.addressForm.controls['address_type'];
|
this.addressType = this.addressForm.controls['address_type'];
|
||||||
this.locality = this.addressForm.controls['locality'];
|
this.locality = this.addressForm.controls['locality'];
|
||||||
this.pdLocation = this.addressForm.controls['pd_location'];
|
this.pdLocation = this.addressForm.controls['pd_location'];
|
||||||
this.commentlocality = this.addressForm.controls['comment_locality'];
|
this.commentLocality = this.addressForm.controls['comment_locality'];
|
||||||
this.other_comment_locality = this.addressForm.controls['other_comment_locality'];
|
// this.otherCommentLocality = this.addressForm.controls['other_comment_locality'];
|
||||||
//this.customerBehaviour = this.addressForm.controls['customer_behaviour'];
|
//this.customerBehaviour = this.addressForm.controls['customer_behaviour'];
|
||||||
// this.ownership = this.addressForm.controls['address_ownership'];
|
// this.ownership = this.addressForm.controls['address_ownership'];
|
||||||
// this.other_ownership = this.addressForm.controls['other_ownership'];
|
// this.other_ownership = this.addressForm.controls['other_ownership'];
|
||||||
// this.rent_amt = this.addressForm.controls['rent_amt'];
|
// this.rent_amt = this.addressForm.controls['rent_amt'];
|
||||||
this.other_premises_bussiness_activity = this.addressForm.controls['other_premises_bussiness_activity'],
|
// this.other_premises_bussiness_activity = this.addressForm.controls['other_premises_bussiness_activity'],
|
||||||
this.bussiness_activity_remark = this.addressForm.controls['bussiness_activity_remark'],
|
// this.bussiness_activity_remark = this.addressForm.controls['bussiness_activity_remark'],
|
||||||
this.bussinessActivity = this.addressForm.controls['bussiness_activity'];
|
// this.bussinessActivity = this.addressForm.controls['bussiness_activity'];
|
||||||
this.business_years = this.addressForm.controls['business_years'];
|
// this.business_years = this.addressForm.controls['business_years'];
|
||||||
this.business_month = this.addressForm.controls['business_month'];
|
// this.business_month = this.addressForm.controls['business_month'];
|
||||||
// this.bussiessAddressType = this.addressForm.controls['bussiness_address_type'];
|
// this.bussiessAddressType = this.addressForm.controls['bussiness_address_type'];
|
||||||
}
|
}
|
||||||
// createNeighbour(): FormGroup {
|
// createNeighbour(): FormGroup {
|
||||||
@ -279,18 +292,18 @@ export class AddressComponent implements OnInit {
|
|||||||
// is_owner: ['', Validators.compose([Validators.required])],
|
// is_owner: ['', Validators.compose([Validators.required])],
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
createUnits(): FormGroup {
|
// createUnits(): FormGroup {
|
||||||
return this.fb.group({
|
// return this.fb.group({
|
||||||
no_of_additional_units: [''],
|
// no_of_additional_units: [''],
|
||||||
premises_type: [''],
|
// premises_type: [''],
|
||||||
premises_type_others: [''],
|
// premises_type_others: [''],
|
||||||
premises_city: [''],
|
// premises_city: [''],
|
||||||
// premises_ownership: [''],
|
// // premises_ownership: [''],
|
||||||
// premises_ownership_others: [''],
|
// // premises_ownership_others: [''],
|
||||||
// premises_rent_amt:[''],
|
// // premises_rent_amt:[''],
|
||||||
premises_remarks: [''],
|
// premises_remarks: [''],
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
// createPremises(): FormGroup {
|
// createPremises(): FormGroup {
|
||||||
// return this.fb.group({
|
// return this.fb.group({
|
||||||
// no_of_additional_units: [''],
|
// no_of_additional_units: [''],
|
||||||
@ -326,12 +339,12 @@ export class AddressComponent implements OnInit {
|
|||||||
// // console.log('inside if 2',this.addressData);
|
// // console.log('inside if 2',this.addressData);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if(type==6 && val.isactive == 1){
|
// else if(type==6 && val.isactive == 1){
|
||||||
this.ownerShipData.push(val);
|
// this.ownerShipData.push(val);
|
||||||
}
|
// }
|
||||||
else if(type==7 && val.isactive == 1){
|
// else if(type==7 && val.isactive == 1){
|
||||||
this.cityData.push(val);
|
// this.cityData.push(val);
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -366,30 +379,43 @@ export class AddressComponent implements OnInit {
|
|||||||
control.removeAt(index);
|
control.removeAt(index);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
addUnits() {
|
// setRequiredValidation(value,item) {
|
||||||
const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
// console.log(item);
|
||||||
control.push(this.createUnits());
|
// console.log(value);
|
||||||
}
|
// value==1
|
||||||
|
// ? item.controls.premises_type_others.setValidators([Validators.required])
|
||||||
|
// : item.controls.premises_type_others.clearValidators();
|
||||||
|
// item.controls.premises_type_others.updateValueAndValidity();
|
||||||
|
// }
|
||||||
|
|
||||||
removeUnits(index) {
|
// addUnits() {
|
||||||
const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
// const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
||||||
control.removeAt(index);
|
// control.push(this.createUnits());
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// removeUnits(index) {
|
||||||
|
// const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
||||||
|
// control.removeAt(index);
|
||||||
|
// }
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
// Partnr.controls[key].addControl('partner_other_name', new FormControl('', Validators.required))
|
||||||
|
|
||||||
|
this.addressForm.controls.address_type.value == 1
|
||||||
|
? this.addressForm.controls['address_type_others'].setValidators([Validators.required])
|
||||||
|
: this.addressForm.controls['address_type_others'].clearValidators();
|
||||||
|
this.addressForm.controls['address_type_others'].updateValueAndValidity();
|
||||||
|
|
||||||
|
this.addressForm.controls.locality.value == 1
|
||||||
|
? this.addressForm.controls['locality_others'].setValidators([Validators.required])
|
||||||
|
: this.addressForm.controls['locality_others'].clearValidators();
|
||||||
|
this.addressForm.controls['locality_others'].updateValueAndValidity();
|
||||||
|
|
||||||
|
this.addressForm.controls.locality.value == 5
|
||||||
|
? this.addressForm.controls['locality_mixuse'].setValidators([Validators.required])
|
||||||
|
: this.addressForm.controls['locality_mixuse'].clearValidators();
|
||||||
|
this.addressForm.controls['locality_mixuse'].updateValueAndValidity();
|
||||||
|
|
||||||
if (this.addressForm.controls.address_type.value == 1) {
|
|
||||||
this.addressForm.controls['address_type_others'].setValidators([Validators.required]);
|
|
||||||
this.addressForm.controls['address_type_others'].updateValueAndValidity();
|
|
||||||
}
|
|
||||||
if (this.addressForm.controls.locality.value == 1) {
|
|
||||||
this.addressForm.controls['locality_others'].setValidators([Validators.required]);
|
|
||||||
this.addressForm.controls['locality_others'].updateValueAndValidity();
|
|
||||||
}
|
|
||||||
if (this.addressForm.controls.locality.value == 5) {
|
|
||||||
this.addressForm.controls['locality_mixuse'].setValidators([Validators.required]);
|
|
||||||
this.addressForm.controls['locality_mixuse'].updateValueAndValidity();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.addressForm.valid) {
|
if (!this.addressForm.valid) {
|
||||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||||
@ -397,10 +423,10 @@ export class AddressComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// console.log(this.addressForm.controls.bussiness_activity_remark.value);
|
// console.log(this.addressForm.controls.bussiness_activity_remark.value);
|
||||||
// console.log(this.address.value.bussiness_activity_remark);
|
// console.log(this.address.value.bussiness_activity_remark);
|
||||||
if(this.address.value.bussiness_activity_remark == ''){
|
// if(this.address.value.bussiness_activity_remark == ''){
|
||||||
this.notifier.notify('warning', 'Fill Remark!');
|
// this.notifier.notify('warning', 'Fill Remark!');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
records.address = this.address.value;
|
records.address = this.address.value;
|
||||||
@ -416,8 +442,8 @@ export class AddressComponent implements OnInit {
|
|||||||
records.locality_mixuse = this.addressForm.controls.locality_mixuse.value;
|
records.locality_mixuse = this.addressForm.controls.locality_mixuse.value;
|
||||||
}
|
}
|
||||||
records.pd_location = this.pdLocation.value;
|
records.pd_location = this.pdLocation.value;
|
||||||
records.comment_locality = this.commentlocality.value;
|
records.comment_locality = this.commentLocality.value;
|
||||||
records.other_comment_locality = this.other_comment_locality.value;
|
// records.other_comment_locality = this.otherCommentLocality.value;
|
||||||
//records.customer_behaviour = this.commentlocality.value;
|
//records.customer_behaviour = this.commentlocality.value;
|
||||||
//records.neighbourhood = this.addressForm.controls.neighbourhood.value;
|
//records.neighbourhood = this.addressForm.controls.neighbourhood.value;
|
||||||
|
|
||||||
@ -425,15 +451,15 @@ export class AddressComponent implements OnInit {
|
|||||||
// records.address_ownership = this.ownership.value;
|
// records.address_ownership = this.ownership.value;
|
||||||
// records.other_ownership = this.other_ownership.value;
|
// records.other_ownership = this.other_ownership.value;
|
||||||
// records.rent_amt = this.rent_amt.value;
|
// records.rent_amt = this.rent_amt.value;
|
||||||
records.other_premises_bussiness_activity = this.other_premises_bussiness_activity.value;
|
// records.other_premises_bussiness_activity = this.other_premises_bussiness_activity.value;
|
||||||
records.bussiness_activity_remark = this.bussiness_activity_remark.value;
|
// records.bussiness_activity_remark = this.bussiness_activity_remark.value;
|
||||||
records.bussiness_activity = this.bussinessActivity.value;
|
// records.bussiness_activity = this.bussinessActivity.value;
|
||||||
records.business_years = this.business_years.value;
|
// records.business_years = this.business_years.value;
|
||||||
records.business_month = this.business_month.value;
|
// records.business_month = this.business_month.value;
|
||||||
|
|
||||||
if (this.bussinessActivity.value == 'yes') {
|
// if (this.bussinessActivity.value == 'yes') {
|
||||||
records.additional_address_units = this.addressForm.controls.additional_address_units.value;
|
// records.additional_address_units = this.addressForm.controls.additional_address_units.value;
|
||||||
}
|
// }
|
||||||
|
|
||||||
records.pdid = this.pdid;
|
records.pdid = this.pdid;
|
||||||
records.formid = '5';
|
records.formid = '5';
|
||||||
@ -474,26 +500,26 @@ export class AddressComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ConvertMonthintoYear(e){
|
// ConvertMonthintoYear(e){
|
||||||
|
|
||||||
let business_year = this.addressForm.controls.business_years.value;
|
// let business_year = this.addressForm.controls.business_years.value;
|
||||||
|
|
||||||
let converted_month : number = e%12;
|
// let converted_month : number = e%12;
|
||||||
let converted_year : number = e/12;
|
// let converted_year : number = e/12;
|
||||||
|
|
||||||
this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
// this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
// this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
}
|
// }
|
||||||
/** On Key Press Event For Numbers */
|
/** On Key Press Event For Numbers */
|
||||||
keyPress(event: any) {
|
// keyPress(event: any) {
|
||||||
const pattern = /[0-9]/;
|
// const pattern = /[0-9]/;
|
||||||
|
|
||||||
let inputChar = String.fromCharCode(event.charCode);
|
// let inputChar = String.fromCharCode(event.charCode);
|
||||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
// if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// inWords(e,i){
|
// inWords(e,i){
|
||||||
// this.premisesRentAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
// this.premisesRentAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||||
|
|||||||
@ -16,8 +16,129 @@
|
|||||||
<mat-tab label={{pageTitle}}>
|
<mat-tab label={{pageTitle}}>
|
||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title><p>Address Details {{addressLabel | titlecase}}</p></mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||||
|
<mat-form-field style="width: 95%;">
|
||||||
|
<mat-select placeholder="is this the business address ? " (selectionChange)="setRequiredValidation($event.value,'',1);"
|
||||||
|
formControlName="business_address_availability" required>
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
||||||
|
<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)">
|
||||||
|
<mat-hint style="color: red;">{{yearErrorMessage}}</mat-hint>
|
||||||
|
<!-- <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)">
|
||||||
|
<mat-hint style="color: red;">{{monthErrorMessage}}</mat-hint>
|
||||||
|
<!-- <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-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-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">Field Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
||||||
|
<mat-form-field style="width: 95%;">
|
||||||
|
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"-->
|
||||||
|
<mat-select placeholder="Are there any other premises from which business activity is being run?" formControlName="business_activity" >
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_activity'].value.valid">Field Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-card *ngIf=" _businessAssetsQuesFrom.controls['business_activity'].value == 'yes'">
|
||||||
|
|
||||||
|
<div formArrayName="business_premises_additional_units">
|
||||||
|
<div *ngFor="let item of _businessAssetsQuesFrom.controls.business_premises_additional_units['controls']; let i=index let last=last" >
|
||||||
|
<mat-card-header><p>Additional Unit #{{i+1}}</p></mat-card-header>
|
||||||
|
<mat-card-content class="matcard" [formGroup]="item">
|
||||||
|
|
||||||
|
<mat-form-field style="width: 42%">
|
||||||
|
<mat-select placeholder="Type of Premises" formControlName="premises_type" (selectionChange)="setRequiredValidation($event.value,item,2)">
|
||||||
|
<mat-option *ngFor="let m_addressType of m_addressType" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="item.get('premises_type').value == 1" style="width: 42%">
|
||||||
|
<input matInput placeholder="Specify Premises Type *" formControlName="premises_type_others" autocomplete="off">
|
||||||
|
<!-- <mat-error>Premises Type Required</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 42%;">
|
||||||
|
<input matInput placeholder="Number Of Additional Units"
|
||||||
|
formControlName="no_of_additional_units" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 42%;">
|
||||||
|
|
||||||
|
<input matInput placeholder="Location/City"
|
||||||
|
formControlName="premises_city" autocomplete="off">
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 88%">
|
||||||
|
<input matInput placeholder="Remarks"
|
||||||
|
formControlName="premises_remarks" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
</mat-card-content>
|
||||||
|
|
||||||
|
<mat-card-actions>
|
||||||
|
<div align="center">
|
||||||
|
<button type="button" mat-flat-button (click)="addUnits($event)"
|
||||||
|
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||||
|
<strong>Add More Additional Unit </strong>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="right">
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="removeUnits(i)"
|
||||||
|
matTooltip="Delete Additional Unit" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||||
|
<mat-icon>delete</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-card-actions>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-card style="min-height: 550px;">
|
<mat-card style="min-height: 550px;">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title><p>Business Premises And Other Assets</p></mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div formArrayName="business_assets_details" fxFill>
|
<div formArrayName="business_assets_details" fxFill>
|
||||||
@ -27,7 +148,7 @@
|
|||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select (selectionChange)="selectedAssetsType($event,i)" placeholder="Assets Type" formControlName="business_assets_mode" requried>
|
<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-option *ngFor="let asset of m_assets_type" [value]="asset.id" [disabled]="asset.flag!=1">{{ asset.name | titlecase }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -41,23 +162,15 @@
|
|||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Property Type" formControlName="property_type" >
|
<mat-select placeholder="Property Type" formControlName="property_type" >
|
||||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name | titlecase }}</mat-option>
|
<mat-option *ngFor="let m_addressType of m_addressType" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
||||||
|
<!-- <mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name | titlecase }}</mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:40%" *ngIf="detail.get('property_type').value == 1">
|
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value == 1">
|
||||||
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
|
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:40%" *ngIf="detail.get('property_type').value != ''">
|
|
||||||
<mat-select placeholder="Ownership Type" formControlName="properties_ownership_type" (selectionChange)="selectedPropertyOwnedType($event.value,s,i)">
|
|
||||||
<mat-option value="owned">Owned</mat-option>
|
|
||||||
<mat-option value="rented">Rented</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width:40%" *ngIf="detail.get('properties_ownership_type').value == 'rented'">
|
|
||||||
<input matInput autocomplete="off" placeholder="Monthly Rented Amount" formControlName="properties_monthly_rented_amt" (keypress)="keyPress($event)">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -68,12 +181,23 @@
|
|||||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
<mat-form-field style="width:45%">
|
||||||
<mat-form-field style="width:40%">
|
<input matInput placeholder="Description of the Vehicle" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
||||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
<mat-form-field style="width:45%">
|
||||||
|
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type" >
|
||||||
|
<mat-option value="2">Car / Jeep</mat-option>
|
||||||
|
<mat-option value="3">Rickshaw / Tempo</mat-option>
|
||||||
|
<mat-option value="4">Truck / Bus</mat-option>
|
||||||
|
<mat-option value="5">Tractor</mat-option>
|
||||||
|
<mat-option value="6">Two Wheeler</mat-option>
|
||||||
|
<mat-option value="1">Others (Please Specify)</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:45%" *ngIf="detail.get('vehicle_type').value == 1">
|
||||||
|
<input matInput placeholder=" Specify Vehicle" formControlName="other_vehicle_type" autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -181,12 +305,12 @@
|
|||||||
|
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,6)" (keypress)="keyPress($event)">
|
<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-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>
|
||||||
|
|
||||||
<mat-form-field style="width:40%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan">
|
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan">
|
||||||
<mat-option value="{{data.value}}" *ngFor="let data of m_any_asset_loan_type">{{data.viewValue | 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-select>
|
||||||
@ -208,62 +332,70 @@
|
|||||||
<!--Desction Dynamic details : END -->
|
<!--Desction Dynamic details : END -->
|
||||||
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<!-- <mat-form-field *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 5" style="width:45%"> -->
|
<mat-form-field style="width:45%" *ngIf="sup.get('business_assets_mode').value != ''">
|
||||||
<mat-form-field *ngIf="(sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i])" style="width:45%">
|
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,'',3)">
|
||||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,1)">
|
<!-- (selectionChange)="selectedPropertyOwnedType($event.value,s,i)" -->
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"₹"}} {{appxMarketAmtInwords[i]}} Only</mat-hint>
|
<mat-option value="owned">Owned</mat-option>
|
||||||
</mat-form-field>
|
<mat-option value="rented">Rented</mat-option>
|
||||||
|
</mat-select>
|
||||||
<mat-form-field *ngIf="sup.get('business_assets_mode').value == 1 || (sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i])|| sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4" style="width:45%">
|
</mat-form-field>
|
||||||
<mat-select placeholder="Asset Owned by"
|
|
||||||
formControlName="business_name_of_the_owner" [compareWith]="compareObjects" required>
|
|
||||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
|
||||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
|
||||||
{{val.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-optgroup>
|
|
||||||
</mat-select>
|
|
||||||
</mat-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>
|
|
||||||
<!-- <mat-form-field *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_assets_mode').value == 4" style="width:45%">
|
<mat-form-field style="width:45%" *ngIf="(sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'rented')">
|
||||||
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" required>
|
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" (keypress)="keyPress($event)">
|
||||||
<mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option>
|
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_monthly_rented_amt'].valid">Monthly Rent Amount Required</mat-error> -->
|
||||||
</mat-select>
|
</mat-form-field>
|
||||||
</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> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span *ngIf="sup.get('business_assets_mode').value == 1 || (sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i]) || sup.get('business_assets_mode').value == 3">
|
|
||||||
<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)">
|
|
||||||
<!-- <mat-error> Invalid format</mat-error> -->
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width:45%">
|
|
||||||
|
|
||||||
<mat-label>Purchase Year</mat-label>
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="sup.get('business_assets_mode').value != '' && sup.get('business_ownership_type').value == 'owned'">
|
||||||
<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>
|
<!-- <mat-form-field *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 5" style="width:45%"> -->
|
||||||
</span>
|
<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>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<span *ngIf="(sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i]) || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4">
|
<mat-form-field style="width:45%">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" [compareWith]="compareObjects">
|
||||||
|
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||||
<mat-form-field style="width:95%">
|
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?" formControlName="business_emi">
|
{{val.name}}
|
||||||
<mat-option value="yes">Yes</mat-option>
|
</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
</mat-optgroup>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_name_of_the_owner'].valid">Asset Owned by Required</mat-error> -->
|
||||||
</div>
|
</mat-form-field>
|
||||||
</span>
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <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)">
|
||||||
|
<!-- <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)">
|
||||||
|
<!-- <mat-error> Invalid year format</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
|
|||||||
@ -22,6 +22,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
pageTitle: string ="Assets used for Business";
|
pageTitle: string ="Assets used for Business";
|
||||||
pdid:string;
|
pdid:string;
|
||||||
|
placeholderName : any = 'Was any business activity seen at the Address Type during PD visit?';
|
||||||
|
|
||||||
public _businessAssetsQuesFrom: FormGroup;
|
public _businessAssetsQuesFrom: FormGroup;
|
||||||
public submitted = false;
|
public submitted = false;
|
||||||
@ -47,6 +48,13 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
existCompanyList: any =[];
|
existCompanyList: any =[];
|
||||||
mergeCompanyApplicant: any=[];
|
mergeCompanyApplicant: any=[];
|
||||||
currentYear:any=new Date().getFullYear();
|
currentYear:any=new Date().getFullYear();
|
||||||
|
addressLabel : any;
|
||||||
|
public m_addressType = [];
|
||||||
|
CustSegAbbr: any;
|
||||||
|
generalExistBusinessYear:Number;
|
||||||
|
generalExistBusinessMonth:Number;
|
||||||
|
yearErrorMessage: any;
|
||||||
|
monthErrorMessage: any;
|
||||||
|
|
||||||
public viewerOptions: any = {
|
public viewerOptions: any = {
|
||||||
navbar: false,
|
navbar: false,
|
||||||
@ -82,10 +90,12 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
this.company_id =this.pd_all_details.company_id;
|
this.company_id =this.pd_all_details.company_id;
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||||
|
this.generalExistBusinessYear = this.pd_all_details.business_years;
|
||||||
|
this.generalExistBusinessMonth = this.pd_all_details.business_month;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +104,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
|
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
|
||||||
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
|
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
|
||||||
// });
|
// });
|
||||||
|
|
||||||
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||||
if(data.dataStatus){
|
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);
|
||||||
@ -121,6 +132,27 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
this.getM_PropertyType();
|
this.getM_PropertyType();
|
||||||
// this.getM_InvestmentType();
|
// this.getM_InvestmentType();
|
||||||
// this.getM_FreqOfPurchase();
|
// this.getM_FreqOfPurchase();
|
||||||
|
this.getM_Address_Type();
|
||||||
|
|
||||||
|
let params: any = {};
|
||||||
|
params.pd_id = this.pdid;
|
||||||
|
params.pd_form_id = '5';
|
||||||
|
|
||||||
|
this.pdTrigerService.retriveForm(params).subscribe(data => {
|
||||||
|
if(data.status == 200) {
|
||||||
|
console.log(data.records);
|
||||||
|
|
||||||
|
this.addressLabel = '';
|
||||||
|
|
||||||
|
let selectedAddressType = this.m_addressType.filter(element =>element.address_type_id == data.records.address_type)[0];
|
||||||
|
let address = data.records.address;
|
||||||
|
let addressType = data.records.address_type != 1 ? selectedAddressType.address_type : data.records.address_type_others;
|
||||||
|
|
||||||
|
this.placeholderName = 'Was any business activity seen at the '+addressType+' during PD visit?';
|
||||||
|
this.addressLabel = " : "+address+' / '+addressType ;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Assets Type For Dropdown List */
|
/** Assets Type For Dropdown List */
|
||||||
@ -173,6 +205,25 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
getM_Address_Type() {
|
||||||
|
this.pdTrigerService.getAllMasterDatas('ADDRESSTYPE').subscribe(
|
||||||
|
data => {
|
||||||
|
this.m_addressType = data.records.filter(data => data.isactive == 1);
|
||||||
|
// console.log(this.m_addressType);
|
||||||
|
// if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
|
||||||
|
|
||||||
|
// // console.log('whole',FilteredAddressType);
|
||||||
|
// let index1 = this.m_addressType.map(data => data.address_type).indexOf("Residence");
|
||||||
|
// this.m_addressType.splice(index1, 1);
|
||||||
|
// // console.log('FirstOne',FilteredAddressType);
|
||||||
|
// let index2 = this.m_addressType.map(data => data.address_type).indexOf("Residence cum Office");
|
||||||
|
// this.m_addressType.splice(index2, 1);
|
||||||
|
// // console.log('SecondOne',FilteredAddressType);
|
||||||
|
// }
|
||||||
|
// console.log(this.m_addressType);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//Get Data Based on PDID and FORMID
|
//Get Data Based on PDID and FORMID
|
||||||
apiLoadFinish: boolean = false;
|
apiLoadFinish: boolean = false;
|
||||||
getPdSupplierFormDetails() {
|
getPdSupplierFormDetails() {
|
||||||
@ -200,9 +251,23 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
pdid: [this.pdid],
|
pdid: [this.pdid],
|
||||||
formid: ['22'],
|
formid: ['22'],
|
||||||
company_id : [this.company_id],
|
company_id : [this.company_id],
|
||||||
|
business_years:[value.business_years],
|
||||||
|
business_month:[value.business_month],
|
||||||
|
business_address_availability:[value.business_address_availability],
|
||||||
|
business_is_pd_visited:[value.business_is_pd_visited],
|
||||||
|
business_pd_visited_remark:[value.business_pd_visited_remark],
|
||||||
|
business_activity:[value.business_activity],
|
||||||
|
business_premises_additional_units: this._formBuilder.array([]),
|
||||||
business_assets_details : this._formBuilder.array([]),
|
business_assets_details : this._formBuilder.array([]),
|
||||||
business_assets_form_remark:[value.business_assets_form_remark || 'check']
|
business_assets_form_remark:[value.business_assets_form_remark || null]
|
||||||
});
|
});
|
||||||
|
if(value.business_activity == 'yes'){
|
||||||
|
this.addBusinessUnitsWithData(value.business_premises_additional_units);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||||
|
control.push(this.createUnits());
|
||||||
|
}
|
||||||
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||||
} else {
|
} else {
|
||||||
this._businessAssetsQuesFrom = this._formBuilder.group({
|
this._businessAssetsQuesFrom = this._formBuilder.group({
|
||||||
@ -212,6 +277,15 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
business_assets_details : this._formBuilder.array([
|
business_assets_details : this._formBuilder.array([
|
||||||
this.initBusinessDetails(),
|
this.initBusinessDetails(),
|
||||||
]),
|
]),
|
||||||
|
business_years:[''],
|
||||||
|
business_month:[''],
|
||||||
|
business_address_availability:[''],
|
||||||
|
business_activity:[''],
|
||||||
|
business_is_pd_visited:[''],
|
||||||
|
business_pd_visited_remark:[''],
|
||||||
|
business_premises_additional_units: this._formBuilder.array([
|
||||||
|
this.createUnits()
|
||||||
|
]),
|
||||||
business_assets_form_remark:['']
|
business_assets_form_remark:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -231,13 +305,25 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
business_assets_mode: [''],
|
business_assets_mode: [''],
|
||||||
business_details: this._formBuilder.array([]),
|
business_details: this._formBuilder.array([]),
|
||||||
business_approximate_market_value: [''],
|
business_approximate_market_value: [''],
|
||||||
business_name_of_the_owner: [],
|
business_ownership_type:[''],
|
||||||
business_name_of_the_other_owner: [],
|
business_monthly_rented_amt:[''],
|
||||||
|
business_name_of_the_owner: [''],
|
||||||
|
business_name_of_the_other_owner: [''],
|
||||||
business_vintage: [''],
|
business_vintage: [''],
|
||||||
business_purchase_year: ['',Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
business_purchase_year: ['',Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
|
||||||
business_emi: [''],
|
business_emi: [''],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
createUnits(): FormGroup {
|
||||||
|
return this._formBuilder.group({
|
||||||
|
no_of_additional_units: [''],
|
||||||
|
premises_type: [''],
|
||||||
|
premises_type_others: [''],
|
||||||
|
premises_city: [''],
|
||||||
|
premises_remarks: [''],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
selectedPropertyOwnedType(e,s,i){
|
selectedPropertyOwnedType(e,s,i){
|
||||||
|
|
||||||
// const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(i).get('business_details') as FormArray ;
|
// const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(i).get('business_details') as FormArray ;
|
||||||
@ -313,8 +399,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
property_type: [''],
|
property_type: [''],
|
||||||
other_property_type: [''],
|
other_property_type: [''],
|
||||||
properties_ownership_type : [''],
|
|
||||||
properties_monthly_rented_amt:['']
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +450,10 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
load_Four_Weeler() {
|
load_Four_Weeler() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
manufacturer_model_vehicle: ['']
|
manufacturer_model_vehicle: [''],
|
||||||
|
vehicle_type:[''],
|
||||||
|
other_vehicle_type:['']
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,8 +467,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
property_type: [data.property_type],
|
property_type: [data.property_type],
|
||||||
other_property_type: [data.other_property_type],
|
other_property_type: [data.other_property_type],
|
||||||
properties_ownership_type : [data.properties_ownership_type],
|
|
||||||
properties_monthly_rented_amt:[data.properties_monthly_rented_amt]
|
|
||||||
//property_type:['']
|
//property_type:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -435,7 +520,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
load_Four_WeelerWithData(data) {
|
load_Four_WeelerWithData(data) {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
manufacturer_model_vehicle: [data.manufacturer_model_vehicle]
|
manufacturer_model_vehicle: [data.manufacturer_model_vehicle],
|
||||||
|
vehicle_type:[data.vehicle_type],
|
||||||
|
other_vehicle_type:[data.other_vehicle_type]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,12 +532,25 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
createUnitswithData(data){
|
||||||
|
let formGroup= this._formBuilder.group({
|
||||||
|
no_of_additional_units: [data.no_of_additional_units],
|
||||||
|
premises_type: [data.premises_type],
|
||||||
|
premises_type_others: [data.premises_type_others],
|
||||||
|
premises_city: [data.premises_city],
|
||||||
|
premises_remarks: [data.premises_remarks],
|
||||||
|
});
|
||||||
|
return formGroup;
|
||||||
|
}
|
||||||
|
|
||||||
initBusinessDetailsWithdata(data) {
|
initBusinessDetailsWithdata(data) {
|
||||||
|
|
||||||
let formGroup= this._formBuilder.group({
|
let formGroup= this._formBuilder.group({
|
||||||
business_assets_mode: [data.business_assets_mode],
|
business_assets_mode: [data.business_assets_mode],
|
||||||
business_details: this._formBuilder.array([]),
|
business_details: this._formBuilder.array([]),
|
||||||
business_approximate_market_value: [data.business_approximate_market_value],
|
business_approximate_market_value: [data.business_approximate_market_value],
|
||||||
|
business_ownership_type : [data.business_ownership_type],
|
||||||
|
business_monthly_rented_amt:[data.business_monthly_rented_amt],
|
||||||
business_name_of_the_owner: [data.business_name_of_the_owner],
|
business_name_of_the_owner: [data.business_name_of_the_owner],
|
||||||
business_name_of_the_other_owner:[data.business_name_of_the_other_owner || ''],
|
business_name_of_the_other_owner:[data.business_name_of_the_other_owner || ''],
|
||||||
// relation: [data.relation || ''],
|
// relation: [data.relation || ''],
|
||||||
@ -463,6 +563,30 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadDetails: boolean;
|
loadDetails: boolean;
|
||||||
|
addBusinessUnitsWithData(data){
|
||||||
|
|
||||||
|
var result = Object.keys(data).map(function (key) {
|
||||||
|
return data[key];
|
||||||
|
});
|
||||||
|
|
||||||
|
if (result.length > 0) {
|
||||||
|
for (let val of result) {
|
||||||
|
let vals = {
|
||||||
|
no_of_additional_units: val.no_of_additional_units,
|
||||||
|
premises_type: val.premises_type,
|
||||||
|
premises_type_others: val.premises_type_others,
|
||||||
|
premises_city: val.premises_city,
|
||||||
|
premises_remarks: val.premises_remarks,
|
||||||
|
};
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||||
|
control.push(this.createUnitswithData(vals));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||||
|
control.push(this.createUnits());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
addBusinessAssetsDetailsWithData(supp_data) {
|
addBusinessAssetsDetailsWithData(supp_data) {
|
||||||
|
|
||||||
@ -479,6 +603,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
let vals = {
|
let vals = {
|
||||||
business_assets_mode: val.business_assets_mode,
|
business_assets_mode: val.business_assets_mode,
|
||||||
business_approximate_market_value: val.business_approximate_market_value,
|
business_approximate_market_value: val.business_approximate_market_value,
|
||||||
|
business_ownership_type:val.business_ownership_type,
|
||||||
|
business_monthly_rented_amt:val.business_monthly_rented_amt,
|
||||||
business_name_of_the_owner: val.business_name_of_the_owner,
|
business_name_of_the_owner: val.business_name_of_the_owner,
|
||||||
business_name_of_the_other_owner: val.business_name_of_the_other_owner,
|
business_name_of_the_other_owner: val.business_name_of_the_other_owner,
|
||||||
business_purchase_year: val. business_purchase_year,
|
business_purchase_year: val. business_purchase_year,
|
||||||
@ -506,8 +632,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
case '2': {
|
case '2': {
|
||||||
let business_property_datas : any;
|
let business_property_datas : any;
|
||||||
data.forEach((datas,i) => {
|
data.forEach((datas,i) => {
|
||||||
business_property_datas = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type,'properties_ownership_type':datas.properties_ownership_type,'properties_monthly_rented_amt':datas.properties_monthly_rented_amt };
|
business_property_datas = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type };
|
||||||
this.selectedPropertyOwnedType(datas.properties_ownership_type,i,val);
|
// this.selectedPropertyOwnedType(datas.properties_ownership_type,i,val);
|
||||||
});
|
});
|
||||||
const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
|
const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
|
||||||
control.push(this.loadPropertyWithData(business_property_datas));
|
control.push(this.loadPropertyWithData(business_property_datas));
|
||||||
@ -697,6 +823,130 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ConvertMonthintoYear(e){
|
||||||
|
|
||||||
|
// let business_year = this._businessAssetsQuesFrom.controls.business_years.value;
|
||||||
|
|
||||||
|
// let converted_month : number = e%12;
|
||||||
|
// let converted_year : number = e/12;
|
||||||
|
|
||||||
|
// this._businessAssetsQuesFrom.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
|
// this._businessAssetsQuesFrom.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** To Convert Month into Year */
|
||||||
|
ConvertMonthintoYear(e){
|
||||||
|
|
||||||
|
let business_year = this._businessAssetsQuesFrom.controls.business_years.value;
|
||||||
|
|
||||||
|
let converted_month : number = e%12;
|
||||||
|
let converted_year : number = e/12;
|
||||||
|
|
||||||
|
let Year = +business_year + +Math.floor(converted_year);
|
||||||
|
|
||||||
|
if(Year > this.generalExistBusinessYear){
|
||||||
|
this.yearErrorMessage = "Higher than Business Vintage";
|
||||||
|
this._businessAssetsQuesFrom.controls.business_years.setValue('');
|
||||||
|
this._businessAssetsQuesFrom.controls.business_month.setValue('');
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(Year == this.generalExistBusinessYear && +converted_month > this.generalExistBusinessMonth)
|
||||||
|
{
|
||||||
|
this.monthErrorMessage = "Higher than Business Vintage";
|
||||||
|
this._businessAssetsQuesFrom.controls.business_years.setValue('');
|
||||||
|
this._businessAssetsQuesFrom.controls.business_month.setValue('');
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.monthErrorMessage = '';
|
||||||
|
this.yearErrorMessage = '';
|
||||||
|
this._businessAssetsQuesFrom.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
|
this._businessAssetsQuesFrom.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkWithExistBusinessYear(e){
|
||||||
|
|
||||||
|
if(+e > this.generalExistBusinessYear){
|
||||||
|
this.yearErrorMessage = "Higher than Business Vintage";
|
||||||
|
this._businessAssetsQuesFrom.controls.business_years.setValue('');
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.yearErrorMessage = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setRequiredValidation(value,item,flag) {
|
||||||
|
console.log(item);
|
||||||
|
console.log(value);
|
||||||
|
console.log(flag);
|
||||||
|
if(flag == 1){
|
||||||
|
if(value == 'yes')
|
||||||
|
{ this._businessAssetsQuesFrom.controls.business_years.setValidators([Validators.required]) ;
|
||||||
|
this._businessAssetsQuesFrom.controls.business_month.setValidators([Validators.required]) ;
|
||||||
|
this._businessAssetsQuesFrom.controls.business_address_availability.setValidators([Validators.required]) ;
|
||||||
|
this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||||
|
this._businessAssetsQuesFrom.controls.business_is_pd_visited.setValidators([Validators.required]) ;
|
||||||
|
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.setValidators([Validators.required]) ;
|
||||||
|
this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this._businessAssetsQuesFrom.controls.business_years.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_month.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_address_availability.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_is_pd_visited.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||||
|
}
|
||||||
|
this._businessAssetsQuesFrom.controls.business_years.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_month.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_address_availability.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_is_pd_visited.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(flag == 2){
|
||||||
|
value==1
|
||||||
|
? item.controls.premises_type_others.setValidators([Validators.required])
|
||||||
|
: item.controls.premises_type_others.clearValidators();
|
||||||
|
item.controls.premises_type_others.updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if(flag == 3){
|
||||||
|
if(value == 'owned'){
|
||||||
|
this._businessAssetsQuesFrom.controls.business_monthly_rented_amt.clearValidators();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_name_of_the_owner.setValidators([Validators.required]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this._businessAssetsQuesFrom.controls.business_monthly_rented_amt.setValidators([Validators.required]);
|
||||||
|
this._businessAssetsQuesFrom.controls.business_name_of_the_owner.clearValidators();
|
||||||
|
}
|
||||||
|
this._businessAssetsQuesFrom.controls.business_monthly_rented_amt.updateValueAndValidity();
|
||||||
|
this._businessAssetsQuesFrom.controls.business_name_of_the_owner.updateValueAndValidity();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
addUnits() {
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||||
|
control.push(this.createUnits());
|
||||||
|
}
|
||||||
|
|
||||||
|
removeUnits(index) {
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||||
|
control.removeAt(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedAddressType(e: any){
|
||||||
|
this.placeholderName = 'Was any business activity seen at the '+e+' during PD visit?';
|
||||||
|
}
|
||||||
|
|
||||||
/** Amount InWords */
|
/** Amount InWords */
|
||||||
inWords(e,i,flag){
|
inWords(e,i,flag){
|
||||||
switch(flag){
|
switch(flag){
|
||||||
|
|||||||
@ -220,7 +220,7 @@
|
|||||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 30%;">
|
<mat-form-field style="width: 30%;">
|
||||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m);CheckExport($event.value,1);" required>
|
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m);CheckExport($event.value,MActivity,m);" required>
|
||||||
<mat-option value="Within India">Within India</mat-option>
|
<mat-option value="Within India">Within India</mat-option>
|
||||||
<mat-option value="Export">Export</mat-option>
|
<mat-option value="Export">Export</mat-option>
|
||||||
<mat-option value="Both">Both</mat-option>
|
<mat-option value="Both">Both</mat-option>
|
||||||
@ -457,7 +457,7 @@
|
|||||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 30%;">
|
<mat-form-field style="width: 30%;">
|
||||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r);CheckExport($event.value,2);" required>
|
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r);CheckExport($event.value,RActivity,r);" required>
|
||||||
<mat-option value="Within India">Within India</mat-option>
|
<mat-option value="Within India">Within India</mat-option>
|
||||||
<mat-option value="Export">Export</mat-option>
|
<mat-option value="Export">Export</mat-option>
|
||||||
<mat-option value="Both">Both</mat-option>
|
<mat-option value="Both">Both</mat-option>
|
||||||
@ -696,7 +696,7 @@
|
|||||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 30%;">
|
<mat-form-field style="width: 30%;">
|
||||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w);CheckExport($event.value,3);" required>
|
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w);CheckExport($event.value,WActivity,w);" required>
|
||||||
<mat-option value="Within India">Within India</mat-option>
|
<mat-option value="Within India">Within India</mat-option>
|
||||||
<mat-option value="Export">Export</mat-option>
|
<mat-option value="Export">Export</mat-option>
|
||||||
<mat-option value="Both">Both</mat-option>
|
<mat-option value="Both">Both</mat-option>
|
||||||
@ -933,7 +933,7 @@
|
|||||||
<input matInput type="text" placeholder="Services Provided" formControlName="main_products" required>
|
<input matInput type="text" placeholder="Services Provided" formControlName="main_products" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 30%;">
|
<mat-form-field style="width: 30%;">
|
||||||
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp);CheckExport($event.value,4);" required>
|
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp);CheckExport($event.value,SPActivity,sp);" required>
|
||||||
<mat-option value="Within India">Within India</mat-option>
|
<mat-option value="Within India">Within India</mat-option>
|
||||||
<mat-option value="Export">Export</mat-option>
|
<mat-option value="Export">Export</mat-option>
|
||||||
<mat-option value="Both">Both</mat-option>
|
<mat-option value="Both">Both</mat-option>
|
||||||
@ -1270,11 +1270,11 @@
|
|||||||
formControlName="employees_total" required>
|
formControlName="employees_total" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Permanent" (change)="checkTotalEmployee(businessForm)"
|
<input matInput placeholder="Permanent" (change)="checkTotalEmployee(businessForm)" type="number"
|
||||||
formControlName="employees_permanent" required>
|
formControlName="employees_permanent" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Temporary" (change)="checkTotalEmployee(businessForm)"
|
<input matInput placeholder="Temporary" (change)="checkTotalEmployee(businessForm)" type="number"
|
||||||
formControlName="employees_temporary" required>
|
formControlName="employees_temporary" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -286,6 +286,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
selectedManufacturing.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
selectedManufacturing.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
||||||
selectedManufacturing.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('factory_cert');
|
selectedManufacturing.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('factory_cert');
|
||||||
selectedManufacturing.forEach((element,index)=>{
|
selectedManufacturing.forEach((element,index)=>{
|
||||||
|
this.CheckExport(element.area_of_sale,'MActivity',index);
|
||||||
manufacturingControl.push(this.createActivity());
|
manufacturingControl.push(this.createActivity());
|
||||||
if(element.area_of_sale=='Within India'){
|
if(element.area_of_sale=='Within India'){
|
||||||
manufacturingControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
manufacturingControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
@ -350,6 +351,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||||
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||||
selectedRetail.forEach((element,index)=>{
|
selectedRetail.forEach((element,index)=>{
|
||||||
|
this.CheckExport(element.area_of_sale,'RActivity',index);
|
||||||
retailControl.push(this.createActivity());
|
retailControl.push(this.createActivity());
|
||||||
if(element.area_of_sale=='Within India'){
|
if(element.area_of_sale=='Within India'){
|
||||||
retailControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
retailControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
@ -411,6 +413,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||||
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||||
selectedWholesale.forEach((element,index)=>{
|
selectedWholesale.forEach((element,index)=>{
|
||||||
|
this.CheckExport(element.area_of_sale,'WActivity',index);
|
||||||
wholesaleControl.push(this.createActivity());
|
wholesaleControl.push(this.createActivity());
|
||||||
if(element.area_of_sale=='Within India'){
|
if(element.area_of_sale=='Within India'){
|
||||||
wholesaleControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
wholesaleControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
@ -474,6 +477,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||||
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||||
selectedService.forEach((element,index)=>{
|
selectedService.forEach((element,index)=>{
|
||||||
|
this.CheckExport(element.area_of_sale,'SPActivity',index);
|
||||||
serviceProviderControl.push(this.createServiceActivity());
|
serviceProviderControl.push(this.createServiceActivity());
|
||||||
if(element.area_of_sale=='Within India'){
|
if(element.area_of_sale=='Within India'){
|
||||||
serviceProviderControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
serviceProviderControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||||
@ -1075,7 +1079,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
getAllPersons() {
|
getAllPersons() {
|
||||||
this._pd.getAllPersonsName(this.pdid).subscribe(data => {
|
this._pd.getAllPersonsName(this.pdid).subscribe(data => {
|
||||||
if(data.dataStatus){
|
if(data.dataStatus){
|
||||||
this.personsList = data.record;
|
this.personsList = data.record.filter(val=>val.applicant_type==1);
|
||||||
// if(data.record.applicant_type == 1){
|
// if(data.record.applicant_type == 1){
|
||||||
// this.personsList.push({groupName:'APPLICANTS',groupValues:{name:data.record.applicant_name,group_id:data.record.applicant_type}});
|
// this.personsList.push({groupName:'APPLICANTS',groupValues:{name:data.record.applicant_name,group_id:data.record.applicant_type}});
|
||||||
// }
|
// }
|
||||||
@ -1455,7 +1459,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
let total = ManufacturingArray.reduce((sum, item) => sum + +item.approx_sale, 0);
|
let total = ManufacturingArray.reduce((sum, item) => sum + +item.approx_sale, 0);
|
||||||
if(total > 100 || total < 100){
|
if(total > 100 || total < 100){
|
||||||
this.notifier.notify('warning',"Approximate sales doesn't add upto 100%");
|
validationFlag++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1695,31 +1699,89 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
CheckExport(e,val){
|
// counterForExportCart : number = 0;
|
||||||
// console.log(e);
|
// domesticCounter : number = 0;
|
||||||
// console.log(val);
|
// foreignCounter : number = 0;
|
||||||
let flag: number = 0;
|
|
||||||
if(val == 1){
|
|
||||||
e != "Within India" ?
|
// CheckExport(value,flag,index){
|
||||||
flag++ :flag--;
|
|
||||||
}
|
// if((flag == 1 || flag == 2 || flag == 3 || flag == 4 ) && value != "Within India"){
|
||||||
if(val == 2){
|
// this.foreignCounter++;
|
||||||
e != "Within India" ?
|
// // index = index+1;
|
||||||
flag++ :flag--;
|
// // this.counterForExportCart++;
|
||||||
}
|
// // this.counter = this.counter+index;
|
||||||
if(val == 3){
|
// }
|
||||||
e != "Within India" ?
|
// else{
|
||||||
flag++ :flag--;
|
// this.domesticCounter++;
|
||||||
}
|
// if(this.foreignCounter > 0){
|
||||||
if(val == 4){
|
// this.foreignCounter--;
|
||||||
e != "Within India" ?
|
// }
|
||||||
flag++ :flag--;
|
// // index = index+1;
|
||||||
}
|
// // this.counter = this.counter-index;
|
||||||
if(flag > 0){
|
// // this.counterForExportCart--;
|
||||||
this.ExportFlag = true;
|
// }
|
||||||
}
|
// // 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 = [];
|
||||||
|
RetailCounterArray: any = [];
|
||||||
|
WholeSaleCounterArray: any = [];
|
||||||
|
ServiceCounterArray: any = [];
|
||||||
|
|
||||||
|
CheckExport(value,stringFlag,index){
|
||||||
|
|
||||||
|
if(stringFlag == 'MActivity' && value != "Within India"){
|
||||||
|
this.ManufacturingCounterArray[index] = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.ManufacturingCounterArray[index] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(stringFlag == 'RActivity' && value != "Within India"){
|
||||||
|
this.RetailCounterArray[index] = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.RetailCounterArray[index] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(stringFlag == 'WActivity' && value != "Within India"){
|
||||||
|
this.WholeSaleCounterArray[index] = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.WholeSaleCounterArray[index] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(stringFlag == 'SPActivity' && value != "Within India")
|
||||||
|
{
|
||||||
|
this.ServiceCounterArray[index] = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.ServiceCounterArray[index] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
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){
|
inWords(e,flag){
|
||||||
switch(flag){
|
switch(flag){
|
||||||
|
|||||||
@ -133,6 +133,22 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
/** To Save/Edited Popup Data */
|
/** To Save/Edited Popup Data */
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.submitted = true;
|
this.submitted = true;
|
||||||
|
if (this._finalRemarkForm.controls.final_custormer_remark_type.value == 1) {
|
||||||
|
this._finalRemarkForm.controls['final_other_customer_behaviour'].setValidators([Validators.required]);
|
||||||
|
this._finalRemarkForm.controls['final_other_customer_behaviour'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 1){
|
||||||
|
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||||
|
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 3){
|
||||||
|
this._finalRemarkForm.controls['enter_reason_for_negative'].setValidators([Validators.required]);
|
||||||
|
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 4){
|
||||||
|
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||||
|
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
|
||||||
|
}
|
||||||
// stop here if form is invalid
|
// stop here if form is invalid
|
||||||
if (this._finalRemarkForm.invalid) {
|
if (this._finalRemarkForm.invalid) {
|
||||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||||
|
|||||||
@ -657,7 +657,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let D = (C / estimate_sales_from) * 100;
|
let D = (C / estimate_sales_from) * 100;
|
||||||
|
|
||||||
if(estimate_sales_from <= 5000000){
|
if(estimate_sales_from <= 5000000){
|
||||||
if(D >= 20){
|
if(D > 20){
|
||||||
var r = confirm("Given Sales Range is greater than 20%");
|
var r = confirm("Given Sales Range is greater than 20%");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
@ -671,7 +671,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(estimate_sales_from > 5000000 && estimate_sales_from <= 10000000){
|
else if(estimate_sales_from > 5000000 && estimate_sales_from <= 10000000){
|
||||||
if(D >= 15){
|
if(D > 15){
|
||||||
var r = confirm("Given Sales Range is greater than 15%");
|
var r = confirm("Given Sales Range is greater than 15%");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
@ -685,7 +685,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(estimate_sales_from > 10000000){
|
else if(estimate_sales_from > 10000000){
|
||||||
if(D >= 10){
|
if(D > 10){
|
||||||
var r = confirm("Given Sales Range is greater than 10%");
|
var r = confirm("Given Sales Range is greater than 10%");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
|
|||||||
@ -16,7 +16,23 @@
|
|||||||
mat-header-cell mat-cell {
|
mat-header-cell mat-cell {
|
||||||
display:flex;
|
display:flex;
|
||||||
justify-content:flex-end;
|
justify-content:flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mat-cell:nth-child(5),
|
||||||
|
mat-header-cell:nth-child(5) {
|
||||||
|
flex: 0 0 17%;
|
||||||
|
}
|
||||||
|
|
||||||
|
mat-cell:nth-child(6),
|
||||||
|
mat-header-cell:nth-child(6) {
|
||||||
|
flex: 0 0 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
mat-cell:nth-child(7),
|
||||||
|
mat-header-cell:nth-child(7) {
|
||||||
|
justify-content: end;
|
||||||
|
}
|
||||||
|
|
||||||
.table-checkbox {
|
.table-checkbox {
|
||||||
margin-left: 15% !important;
|
margin-left: 15% !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { element } from '@angular/core/src/render3/instructions';
|
|||||||
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
|
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { SearchRelationPipe } from './../../../../../pd-pipes/search-relation.pipe';
|
import { SearchRelationPipe } from './../../../../../pd-pipes/search-relation.pipe';
|
||||||
|
import { Options } from 'selenium-webdriver/edge';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-general-info',
|
selector: 'app-general-info',
|
||||||
@ -474,12 +475,19 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
removeIndividuals(findex,details){
|
removeIndividuals(findex,details){
|
||||||
|
|
||||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||||
control.removeAt(findex);
|
// 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'];
|
let controls = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||||
|
console.log('control',control);
|
||||||
let name = details.value.applicant_name;
|
let name = details.value.applicant_name;
|
||||||
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
||||||
controls.removeAt(index1);
|
control.markAsDirty({onlySelf:true});
|
||||||
|
console.log('control',);
|
||||||
|
// controls.removeAt(index1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
<p>
|
|
||||||
snack-bar works!
|
|
||||||
</p>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { SnackBarComponent } from './snack-bar.component';
|
|
||||||
|
|
||||||
describe('SnackBarComponent', () => {
|
|
||||||
let component: SnackBarComponent;
|
|
||||||
let fixture: ComponentFixture<SnackBarComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ SnackBarComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(SnackBarComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-snack-bar',
|
|
||||||
templateUrl: './snack-bar.component.html',
|
|
||||||
styleUrls: ['./snack-bar.component.scss']
|
|
||||||
})
|
|
||||||
export class SnackBarComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user