banking info changes

This commit is contained in:
gandhimathi 2019-01-24 12:43:22 +05:30
parent d377a86f14
commit a9a4a0a693
11 changed files with 764 additions and 68 deletions

View File

@ -77,6 +77,7 @@ export class AssetsInfoComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) { @Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.applicants = this.pd_all_details.pdapplicants_detials; this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.notifier = notifier; this.notifier = notifier;
} }
@ -106,27 +107,29 @@ export class AssetsInfoComponent 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); // this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true);
} // }
let modifyCompanyList : any=[]; // let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){ // if(this.existCompanyList.length>0){
modifyCompanyList = this.existCompanyList.map(element => { // modifyCompanyList = this.existCompanyList.map(element => {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; // return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
}); // });
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) // this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
} // }
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
} // })
}) // get applicant list
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
}
this.getPdSupplierFormDetails(); this.getPdSupplierFormDetails();
this.getM_Assets_Type(); this.getM_Assets_Type();

View File

@ -160,9 +160,9 @@
</div> </div>
</div> </div>
<mat-action-row> <mat-action-row>
<div align="center"> <div fxFlex="100" align="center">
<button type="button" mat-button (click)="addBankdetails(i, $event)" color="accent" <button type="button" mat-flat-button color="primary" (click)="addBankdetails(i, $event)"
matTooltip="Add More" matTooltipPosition="left" *ngIf="last"> matTooltip="Add More" matTooltipPosition="above" *ngIf="last">
<strong>Add More Banking Details</strong> <strong>Add More Banking Details</strong>
</button> </button>
</div> </div>

View File

@ -55,6 +55,8 @@ export class BankingDetailsComponent implements OnInit {
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase(); this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
this.pd_cus_segment = this.pd_cus_segment.substring(0,3); this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
this.applicants = this.pd_all_details.pdapplicants_detials; this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.notifier = notifier; this.notifier = notifier;
@ -83,29 +85,14 @@ export class BankingDetailsComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.step = 0; this.step = 0;
this.initBankingForm(); this.initBankingForm();
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ let modifyApplicantList: any=[];
if(data.dataStatus){ if(this.applicants.length > 0){
this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); modifyApplicantList = this.applicants.map(element => {
} return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
let modifyCompanyList : any=[]; }
if(this.existCompanyList.length>0){
modifyCompanyList = this.existCompanyList.map(element => {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
}
})
this.getM_AccountType(); this.getM_AccountType();
this.getM_BTLenderList(); this.getM_BTLenderList();

View File

@ -205,7 +205,7 @@
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"&#8377;"}} {{appxMarketAmtInwords[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"&#8377;"}} {{appxMarketAmtInwords[i]}} Only</mat-hint>
</mat-form-field> </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 || sup.get('business_assets_mode').value == 5" style="width:45%"> <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-select placeholder="Asset Owned by" <mat-select placeholder="Asset Owned by"
formControlName="business_name_of_the_owner" [compareWith]="compareObjects" required> formControlName="business_name_of_the_owner" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName"> <mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
@ -218,22 +218,20 @@
<mat-form-field *ngIf="checkOthers(sup.get('business_name_of_the_owner').value)===true" style="width:45%"> <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"> <input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner" autocomplete="off">
</mat-form-field> --> </mat-form-field>
<!-- {{applicants | json}} --> <!-- <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 *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4 || sup.get('business_assets_mode').value == 5 || sup.get('business_assets_mode').value == 6" style="width:45%"> -->
<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-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" required> <mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" required>
<mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option> <mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option>
</mat-select> </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%"> <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"> <input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner" autocomplete="off">
</mat-form-field> </mat-form-field> -->
</div> </div>
<span *ngIf="sup.get('business_assets_mode').value != ''"> <span *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Vintage</mat-label> <mat-label>Vintage</mat-label>
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,1)"> <input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,1)">

View File

@ -85,7 +85,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
// }); // });
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){ if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true && val.company_order_id==this.company_id);
} }
let modifyCompanyList : any=[]; let modifyCompanyList : any=[];
@ -95,14 +95,14 @@ export class BusinessAssetsInfoComponent implements OnInit {
}); });
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
} }
let modifyApplicantList: any=[]; // let modifyApplicantList: any=[];
if(this.applicants.length > 0){ // if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => { // modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; // return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
}); // });
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) // this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
} // }
}) })
this.getPdSupplierFormDetails(); this.getPdSupplierFormDetails();
@ -589,11 +589,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.freqPurchaseTextBox = e.value; this.freqPurchaseTextBox = e.value;
} }
// // compare objects for merge two master table details // // compare objects for merge two master table details
// compareObjects(o1: any, o2: any) { compareObjects(o1: any, o2: any) {
// if(o1.id == o2.id && o1.group_id == o2.group_id) if(o1.id == o2.id && o1.group_id == o2.group_id)
// return true; return true;
// else return false else return false
// } }
// // check others // // check others
checkOthers(values){ checkOthers(values){

View File

@ -0,0 +1,240 @@
<form [formGroup]="bankingForm" class="bankForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
</div>
</h2>
<mat-dialog-content>
<mat-tab-group>
<mat-tab label="Questions">
<mat-card>
<mat-card-content>
<div formArrayName="itemRows" autocomplete="off">
<mat-accordion
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
[formGroupName]="i">
<mat-expansion-panel class="banlFields" [expanded]="step == i">
<mat-expansion-panel-header>
<mat-panel-title>
<p>Banking Details #{{i+1}}
</p>
</mat-panel-title>
</mat-expansion-panel-header>
<mat-form-field>
<mat-select placeholder="Account Name" formControlName="applicant_name" [compareWith]="compareObjects">
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true" style="width:45%">
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Bank Name" formControlName="bank_name" >
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="itemrow.get('bank_name').value == 3">
<input matInput placeholder="Specify Bank Name"
formControlName="other_bank" autocomplete="off">
</mat-form-field>
<mat-form-field>
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)" placeholder="Account Type" formControlName="account_type" >
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="pd_cus_segment!='SAL'">
<mat-select placeholder="Is this the main business account"
formControlName="is_main" >
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<div fxLayout="row" fxLayoutAlign="start none">
<mat-form-field style="width: 35%;" *ngIf="salaryField">
<mat-select placeholder="Salary Credited in this account"
formControlName="salary" >
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
<mat-option value="NA">NA</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 45%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> -->
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
formControlName="limit" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)">
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint>
</mat-form-field>
</div>
<div>
<label>Number of Years / Months since account was started</label>
<br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field>
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
</mat-form-field>
</div>
</div>
<mat-action-row>
<div fxFlex="100" align="center">
<button type="button" mat-flat-button color="primary" (click)="addBankdetails(i, $event)"
matTooltip="Add More" matTooltipPosition="above" *ngIf="last">
<strong>Add More Banking Details</strong>
</button>
</div>
<!-- <button type="button" mat-button (click)="deleteBankdetails(i)" color="warn"
matTooltip="Delete"matTooltipPosition="left" *ngIf="!last">
<strong>Delete Banking Details</strong>
</button> -->
<!-- <button mat-button color="warn" (click)="prevStep()">Previous</button>
<button mat-button color="primary" (click)="nextStep()">End</button> -->
<!-- ngIf="i > 0" -->
<div align="right">
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details" matTooltipPosition="above" (click)="deleteBankdetails(i)" *ngIf="!last">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-action-row>
</mat-expansion-panel>
<!-- <div style="text-align: right;" class="pt-1" *ngIf="bankingForm.controls.itemRows['controls'].length == (i+1)">
<button class="mr-1 mb-1 hover-icon" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Banking Details" matTooltipPosition="above" >
<mat-icon >add</mat-icon>
</button></div> -->
</mat-accordion>
</div>
</mat-card-content>
</mat-card>
</mat-tab>
<mat-tab label="Docs">
<ng-template matTabContent>
<div ngxViewer>
<div fxLayout="row wrap" style="padding:20px;">
<div fxFlex="100">
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
</div>
</div>
</div>
</div>
<div fxFlex="row">
<div fxFlex="100" class="m-gap p-gap">
<div fxLayout="row" fxLayoutWrap="wrap">
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
</div>
<div fxLayout="row" fxLayoutWrap="wrap">
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com"><mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
</mat-dialog-content>
<mat-dialog-actions>
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="banking_form_remark" ></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button class="mr-1 mb-1 hover-icon" type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()"><mat-icon>save</mat-icon>
</button>
</div>
</mat-dialog-actions>
</form>
<notifier-container></notifier-container>

View File

@ -0,0 +1,102 @@
.banlFields mat-form-field {
width: 27%;
margin: 0 2%;
}
.bankForm .button {
float: right;
width: 10px;
background: #62B013;
color: white;
}
.mat-form-field-appearance-legacy .mat-hint{
color:rgba(0, 0, 0, 0.8) !important;
}
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;
}
.mat-card-actions {
background-color: white;
}
mat-form-field {
margin: 0 2%;
}
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
.p-list-main {
background: white;
margin: auto;
position: relative;
overflow: hidden !important;
border-radius: 10px 10px 10px 10px;
box-shadow: $base-card-box-shadow;
transform: scale(0.95);
transition: box-shadow 0.5s, transform 0.5s;
&:hover {
transform: scale(1);
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
}
.p-list {
position: relative;
.top {
height: 100%;
width: 100%;
// background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
}
.bottom {
width: 200%;
height: 15%;
transition: transform 0.5s;
h1 {
margin: 0;
padding: 0;
}
p {
margin: 0;
padding: 0;
}
.left {
height: 100%;
width: 50%;
background: #f4f4f4;
position: relative;
float: left;
.details {
padding: 5px;
float: left;
// width: calc(70% - 40px);
}
}
.right {
width: 50%;
background: #A6CDDE;
color: white;
float: right;
height: 200%;
overflow: hidden;
.details {
padding: 20px;
float: right;
width: calc(70% - 40px);
}
}
}
}
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BusinessBankingDetailsComponent } from './business-banking-details.component';
describe('BusinessBankingDetailsComponent', () => {
let component: BusinessBankingDetailsComponent;
let fixture: ComponentFixture<BusinessBankingDetailsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BusinessBankingDetailsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BusinessBankingDetailsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,327 @@
import {
Component,
OnInit,
Inject,
Input
} from '@angular/core';
import {
FormBuilder,
FormGroup,
Validators,
FormArray, FormControl, AbstractControl,
} from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA
} from '@angular/material';
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import {ActivatedRoute, Router} from "@angular/router";
@Component({
selector: 'app-business-banking-details',
templateUrl: './business-banking-details.component.html',
styleUrls: ['./business-banking-details.component.scss']
})
export class BusinessBankingDetailsComponent implements OnInit {
pdid: number;
pageTitle: string ="Banking Information";
public bankingForm: FormGroup;
step: number;
private notifier: NotifierService;
public pd_cus_segment:string;
public applicants: any;
m_accountType= [];
m_btLenderList = [];
salaryField : boolean;
OtherFlag : any = [];
limitCaseFlag : any = [];
amtInwords : any = [];
emiAmtInwords : any = [];
existCompanyList: any =[];
mergeCompanyApplicant: any=[];
company_id: String;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef<BusinessBankingDetailsComponent>,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.notifier = notifier;
this.company_id = this.pd_all_details.company_id;
}
public viewerOptions: any = {
navbar: false,
toolbar: {
zoomIn: 4,
zoomOut: 4,
oneToOne: 4,
reset: 4,
prev: 4,
play: {
show: 4,
size: 'large',
},
next: 4,
rotateLeft: 4,
rotateRight: 4,
flipHorizontal: 4,
flipVertical: 4,
}
};
ngOnInit() {
this.step = 0;
this.initBankingForm();
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true && val.company_order_id==this.company_id);
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
modifyCompanyList = this.existCompanyList.map(element => {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
})
this.getM_AccountType();
this.getM_BTLenderList();
this.salaryField = this.pd_cus_segment.substring(0,2) == 'SE' ? false : true ;
let params: any = {};
params.pd_id = this.pdid;
params.pd_form_id = '21';
params.company_id = this.company_id;
this._pd.retriveForm(params).subscribe(data => {
// console.log('data', data);
const control = <FormArray>this.bankingForm.controls['itemRows'];
if (data.status == 200) {
this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark);
var result = Object.keys(data.records.banking_details).map(function (key) {
return data.records.banking_details[key];
});
if (result.length == 0) {
control.push(this.createBankarray());
} else {
result.forEach((datas,index) => {
this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit);
// this.selectedBorrower(datas.applicant_name,index);
this.selectedAccTypeChanges(+datas.account_type,index)
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
control.push(this.createBankarray());
});
this.bankingForm.controls.itemRows.setValue(result);
}
} else {
control.push(this.createBankarray());
}
});
}
// ======================
getM_AccountType() {
this._pd.getAllMasterDatas('ACCOUNTTYPE').subscribe(
data => {
this.m_accountType = data.records.filter(data => data.isactive == 1);
},
error => {
this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
getM_BTLenderList(){
this._pd.getAllMasterDatas('BTLENDERLIST').subscribe(
data => {
this.m_btLenderList = data.records.filter(data => data.isactive == 1 && data.lender_type == 1);
})
}
public initBankingForm(): void {
this.bankingForm = this.fb.group({
banking_form_remark: [''],
itemRows: this.fb.array([])
});
}
createBankarray() {
return this.fb.group({
applicant_name: [''],
other_applicant : [''],
bank_name: [''],
other_bank: [''],
account_type: [''],
//salary: [''],
salary: this.pd_cus_segment.substring(0,2) == 'SE' ? [''] : [''],
limit: [''],
//is_main: [''],
//is_main: [this.pd_cus_segment == 'SAL' ? '' : ''],
//is_main:[''],
is_main: this.pd_cus_segment == 'SAL' ? [''] : [''],
vintage_year: [''],
vintage_month: [''],
});
}
addBankdetails(index, event) {
event.stopPropagation();
const control = <FormArray>this.bankingForm.controls['itemRows'];
let length = control.length;
this.step = length;
control.push(this.createBankarray());
// if(this.pd_cus_segment != 'SAL') {
// this.bankingForm.controls.is_main.setValidators([Validators.required]);
// this.bankingForm.controls.is_main.updateValueAndValidity();
// }
}
deleteBankdetails(index: number) {
// console.log('index value -', index);
const control = <FormArray>this.bankingForm.controls['itemRows'];
control.removeAt(index);
}
setStep(index: number) {
this.step = index;
}
bankSubmit() {
let records: any = {};
records.pdid = this.pdid;
records.formid = '21';
records.company_id = this.company_id; records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value;
// records.fk_createdby = '252';
records.banking_details = this.bankingForm.controls['itemRows'].value;
// console.log('data', records);
this._pd.saveForm(records).subscribe(data => {
if(data.status == 200) {
this.notifier.notify('success', 'Saved Successfully.');
// this.dialogRef.close();
setTimeout(() =>{
this.dialogRef.close();
},3000);
}
else{
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
}, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
});
}
validateAllFormFields(formGroup: FormGroup) {
Object.keys(formGroup.controls).forEach(field => {
const control = formGroup.get(field);
if (control instanceof FormControl) {
control.markAsTouched({onlySelf: true});
} else if (control instanceof FormGroup) {
this.validateAllFormFields(control);
}
});
}
// selectedBorrower(e,i){
// if(e == 0){
// this.OtherFlag[i] = true;
// }
// else{
// this.OtherFlag[i] = false;
// }
// }
// compare objects for merge two master table details
compareObjects(o1: any, o2: any) {
if(o1.id == o2.id && o1.group_id == o2.group_id)
return true;
else return false
}
// check others
checkOthers(values){
if(values!=null) {
return values.id==0 ? true : false;
}
else {
return false;
}
}
selectedAccTypeChanges(event: any,i){
if(event == 2 || event == 1) {
this.limitCaseFlag[i] = false;
// const control = <FormArray>this.bankingForm.controls['itemRows'];
// control.controls[0].get('limit').clearValidators();
// control.controls[0].get('limit').updateValueAndValidity();
}
else{
this.limitCaseFlag[i] = true;
}
}
/** To Convert Month into Year */
ConvertMonthintoYear(itemrow,e){
//console.log(itemrow);
let year = itemrow.controls.vintage_year.value;
let converted_month : number = e%12;
let converted_year : number = e/12;
itemrow.controls.vintage_year.setValue(+year + +Math.floor(converted_year));
itemrow.controls.vintage_month.setValue(Math.floor(converted_month));
}
/** Amount InWords */
inWords(e,i,flag){
switch(flag){
case 1 :
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 2 :
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
break;
default:
break;
}
}
/** On Key Press Event For Numbers */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
}

View File

@ -10,7 +10,7 @@ import {StockComponent} from './../../forms/stock/stock.component';
import {FinancialInfoComponent} from './../../forms/financial-info/financial-info.component'; import {FinancialInfoComponent} from './../../forms/financial-info/financial-info.component';
import {BusinessInfoComponent} from './../../forms/business-info/business-info.component'; import {BusinessInfoComponent} from './../../forms/business-info/business-info.component';
import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component'; import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component';
import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component';
@Component({ @Component({
selector: 'app-business-info-group', selector: 'app-business-info-group',
templateUrl: './business-info-group.component.html', templateUrl: './business-info-group.component.html',
@ -129,6 +129,19 @@ export class BusinessInfoGroupComponent implements OnInit {
this.getCompanyListForBusiness(); this.getCompanyListForBusiness();
}); });
} }
else if(details.form_id==21) {
const dialogRef = this.dialog.open(BusinessBankingDetailsComponent, {
data: this.pd_all_details,
position: { right: '0'},
width:'80%',
disableClose: true
});
dialogRef.afterClosed()
.subscribe(dataresult => {
this.getCompanyListForBusiness();
});
}
} }

View File

@ -92,6 +92,7 @@ import { SharedModule } from "app/shared/shared.module";
import { BusinessInfoGroupComponent } from './list-pd/start-pd/forms/business-info-group/business-info-group.component'; import { BusinessInfoGroupComponent } from './list-pd/start-pd/forms/business-info-group/business-info-group.component';
import { SearchRelationPipe } from './../pd-pipes/search-relation.pipe'; import { SearchRelationPipe } from './../pd-pipes/search-relation.pipe';
import { BusinessAssetsInfoComponent } from './list-pd/start-pd/forms/business-assets-info/business-assets-info.component'; import { BusinessAssetsInfoComponent } from './list-pd/start-pd/forms/business-assets-info/business-assets-info.component';
import { BusinessBankingDetailsComponent } from './list-pd/start-pd/forms/business-banking-details/business-banking-details.component';
/** /**
* Custom angular notifier options * Custom angular notifier options
@ -269,7 +270,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule, // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
// OwlNativeDateTimeModule, // OwlNativeDateTimeModule,
// ], // ],
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, BusinessAssetsInfoComponent], declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent],
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
// providers: [PdTrigerService, GetGeometricLocationService], // providers: [PdTrigerService, GetGeometricLocationService],
@ -313,7 +314,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}], {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent], ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent],
}) })
export class ManagePdModule { export class ManagePdModule {