From a9a4a0a693fa36ca951fd54c24ea89718d0187b5 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 24 Jan 2019 12:43:22 +0530 Subject: [PATCH] banking info changes --- .../assets-info/assets-info.component.ts | 41 ++- .../banking-details.component.html | 6 +- .../banking-details.component.ts | 33 +- .../business-assets-info.component.html | 12 +- .../business-assets-info.component.ts | 26 +- .../business-banking-details.component.html | 240 +++++++++++++ .../business-banking-details.component.scss | 102 ++++++ ...business-banking-details.component.spec.ts | 25 ++ .../business-banking-details.component.ts | 327 ++++++++++++++++++ .../business-info-group.component.ts | 15 +- .../manage-pd/manage-pd.module.ts | 5 +- 11 files changed, 764 insertions(+), 68 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 72cd2e4cc..ac7fc409e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -77,6 +77,7 @@ export class AssetsInfoComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.applicants = this.pd_all_details.pdapplicants_detials; + this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1) this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.notifier = notifier; } @@ -106,27 +107,29 @@ export class AssetsInfoComponent implements OnInit { // this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => { // this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; // }); - this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ - if(data.dataStatus){ - this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); - } + // this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ + // if(data.dataStatus){ + // this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); + // } - let modifyCompanyList : any=[]; - if(this.existCompanyList.length>0){ - 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}) + // 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}) + // } + + // }) + // 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.getM_Assets_Type(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index 2f63c207e..1d0e0f11c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -160,9 +160,9 @@ -
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index e4e0a4d80..e8721a0d7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -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_cus_segment.substring(0,3); this.applicants = this.pd_all_details.pdapplicants_detials; + this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1) + this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.notifier = notifier; @@ -83,29 +85,14 @@ export class BankingDetailsComponent implements OnInit { 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); - } - - 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}) - - } - }) + 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_BTLenderList(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html index fb70d966a..240abb48c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html @@ -205,7 +205,7 @@ {{"₹"}} {{appxMarketAmtInwords[i]}} Only - - - - + + - + Vintage diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts index 12c0f2cb9..d3ea00b07 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts @@ -85,7 +85,7 @@ export class BusinessAssetsInfoComponent implements OnInit { // }); this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ 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=[]; @@ -95,14 +95,14 @@ export class BusinessAssetsInfoComponent implements OnInit { }); 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}) + // 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(); @@ -589,11 +589,11 @@ export class BusinessAssetsInfoComponent implements OnInit { this.freqPurchaseTextBox = e.value; } // // 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 - // } + 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){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html new file mode 100644 index 000000000..d6a1ecfd0 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html @@ -0,0 +1,240 @@ +
+

+
+ {{pageTitle}} +
+
+ +
+

+ + + + + + +
+ + + + +

Banking Details #{{i+1}} +

+
+
+ + + + + {{val.name}} + + + + + + + + + + + {{ btLen.lender_name }} + + + + + + + + + + {{ prop.name }} + + + + + + Yes + No + + + +
+ + + Yes + No + NA + + + + + + {{"₹"}} {{amtInwords[i]}} Only + +
+
+ +
+
+ + + + + + +
+
+ +
+ +
+ + + + + +
+ +
+ +
+
+ +
+
+ +
+
+
+ + + + + + +
+
+ +
+ + Remarks + + +
+
+ +
+
+ +
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss new file mode 100644 index 000000000..edb0c1f7a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss @@ -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); + } + + + } + } + } + + } + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts new file mode 100644 index 000000000..28dbbb892 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts @@ -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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BusinessBankingDetailsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BusinessBankingDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts new file mode 100644 index 000000000..d69fbe2de --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts @@ -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, + @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 = 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 = 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 = 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 = 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(); + } + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts index b75abc822..8fe05e19e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts @@ -10,7 +10,7 @@ import {StockComponent} from './../../forms/stock/stock.component'; import {FinancialInfoComponent} from './../../forms/financial-info/financial-info.component'; import {BusinessInfoComponent} from './../../forms/business-info/business-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({ selector: 'app-business-info-group', templateUrl: './business-info-group.component.html', @@ -129,6 +129,19 @@ export class BusinessInfoGroupComponent implements OnInit { 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(); + }); + + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 01bd42905..b84c413de 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -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 { SearchRelationPipe } from './../pd-pipes/search-relation.pipe'; 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 @@ -269,7 +270,7 @@ const pdCustomNotifierOptions: NotifierOptions = { // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule, // 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], // providers: [PdTrigerService, GetGeometricLocationService], @@ -313,7 +314,7 @@ const pdCustomNotifierOptions: NotifierOptions = { {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}], 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 {