Consolidate sheet : ps
This commit is contained in:
parent
d6557b316a
commit
5003877721
@ -75,7 +75,7 @@
|
||||
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="pdMain.fk_product_id.value != '4'" style="width: 28%">
|
||||
<mat-form-field *ngIf="isSubproductShown" style="width: 28%">
|
||||
|
||||
<mat-select placeholder="Sub Product Name" formControlName="fk_subproduct_id">
|
||||
<mat-option>Select</mat-option>
|
||||
|
||||
@ -50,6 +50,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
dynamicCoApplicant = [];
|
||||
disableAfterSubmit: boolean;
|
||||
pincodeflag : any = [];
|
||||
isSubproductShown: boolean = true;
|
||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
||||
private titleCase : TitleCasePipe) {
|
||||
@ -117,7 +118,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this.lenderShortName = lender['short_name'];
|
||||
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
|
||||
|
||||
if(this.lenderShortName = 'CLIX'){
|
||||
if(this.lenderShortName == 'CLIX'){
|
||||
|
||||
let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
|
||||
let ClixProductAbbr = ['BL','LAEP'];
|
||||
@ -127,7 +128,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
return this.productAllList[findIndex];
|
||||
});
|
||||
this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList;
|
||||
|
||||
}
|
||||
else{
|
||||
this.productList = this.productAllList;
|
||||
@ -201,29 +201,51 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
//get sub product list based on prokduct id
|
||||
getSubproductList(productID: string) {
|
||||
// console.log('productID',productID);
|
||||
let productabbr : any;
|
||||
if(productID !== undefined && productID !== null && productID !== '') {
|
||||
this.subProductList = this.productList.filter(item => item.product_id == productID);
|
||||
this.subProductList = this.subProductList[0].subproducts;
|
||||
this.subProductList = this.subProductList.filter(item => item.is_others == 0);
|
||||
let productabbr : any = this.productAllList.filter(item => item.product_id == productID)[0].abbr;
|
||||
console.log('productabbr',productabbr);
|
||||
if(this.lenderShortName == 'CLIX'){
|
||||
let tempdata = this.subProductList.filter(item => item.subproduct_name == 'Not Applicable');
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(tempdata[0].subproduct_id);
|
||||
productabbr = this.productAllList.filter(item => item.product_id == productID)[0].abbr;
|
||||
|
||||
}
|
||||
else{
|
||||
productabbr = ''
|
||||
this.subProductList = [];
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
|
||||
this._PDtriggerForm.controls['fk_pd_type'].setValue('');
|
||||
this._PDtriggerForm.controls['fk_customer_segment'].setValue('');
|
||||
this._PDtriggerForm.controls['loan_amount'].setValue('');
|
||||
}
|
||||
|
||||
/**customer segment */
|
||||
switch(productabbr){
|
||||
case 'BL' :
|
||||
console.log(1);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
case 'LAEP':
|
||||
console.log(2);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
default:
|
||||
console.log(3);
|
||||
this.customerSegmentList = this.customerSegmentAllList;
|
||||
this.isSubproductShown = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(this.lenderShortName == 'CLIX' && productabbr != ''){
|
||||
this._PDtriggerForm.controls['fk_pd_type'].setValue('1');
|
||||
// this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'))
|
||||
// console.log('this.customerSegmentAllList',this.customerSegmentAllList);
|
||||
this._PDtriggerForm.controls['fk_customer_segment'].setValue('5');
|
||||
this._PDtriggerForm.controls['loan_amount'].setValue(0);
|
||||
}
|
||||
else{
|
||||
|
||||
if(productabbr != 'BL'){this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null)}
|
||||
}
|
||||
|
||||
this.customerSegmentList = (productabbr != 'BL' && productabbr != 'LAEP' )?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
//get city list details based on state id
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 29%">
|
||||
<mat-select placeholder="Product Name" formControlName="fk_product_id"
|
||||
(selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
|
||||
(selectionChange)="getSubproductList(pdMain.fk_product_id.value,2)">
|
||||
<mat-option>
|
||||
Select
|
||||
</mat-option>
|
||||
@ -87,7 +87,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field style="width: 29%"> -->
|
||||
<mat-form-field *ngIf="pdMain.fk_product_id.value != '4'" style="width: 29%">
|
||||
<mat-form-field *ngIf="isSubproductShown" style="width: 29%">
|
||||
|
||||
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
|
||||
<mat-option>Select</mat-option>
|
||||
|
||||
@ -54,6 +54,8 @@ export class EditPdMasterComponent implements OnInit {
|
||||
"QC_COMPLETED" :'QC_COMPLETED',
|
||||
};
|
||||
lenderShortName: any;
|
||||
isSubproductShown: boolean = true;
|
||||
productShortName : any;
|
||||
constructor(private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
|
||||
@ -149,7 +151,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
// this.productList=data.records
|
||||
this.productAllList = data.records
|
||||
if(this.data.records.fk_product_id){
|
||||
this.getSubproductList(this.data.records.fk_product_id);
|
||||
this.getSubproductList(this.data.records.fk_product_id,1);
|
||||
}
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
@ -267,27 +269,44 @@ export class EditPdMasterComponent implements OnInit {
|
||||
get pdMain() { return this._EditPDtriggerForm.controls; }
|
||||
|
||||
//get sub product list based on prokduct id
|
||||
getSubproductList(productID:string){
|
||||
getSubproductList(productID:string,flag:number){
|
||||
console.log('productID',productID);
|
||||
this.customerSegmentList=this.customerSegmentAllList;
|
||||
let productabbr : any = this.productAllList.filter(item => item.product_id == productID)[0].abbr;
|
||||
if(this.lenderShortName == 'CLIX'){
|
||||
this.customerSegmentList = (productabbr != 'BL' && productabbr != 'LAEP' )?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
let tempdata = this.subProductList.filter(item => item.subproduct_name == 'Not Applicable');
|
||||
// this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(tempdata[0].subproduct_id);
|
||||
// this._EditPDtriggerForm.controls['fk_pd_type'].setValue('1');
|
||||
// this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5');
|
||||
// this._EditPDtriggerForm.controls['loan_amount'].setValue(0);
|
||||
}else{
|
||||
// if(productID != '4'){
|
||||
if(productabbr == 'BL'){
|
||||
this.subProductList= this.productList.filter(item => item.product_id == productID);
|
||||
|
||||
|
||||
if (productID !== undefined && productID !== null && productID !== '') {
|
||||
this.productShortName = this.productAllList.filter(item => item.product_id == productID)[0].product_abbr;
|
||||
this.subProductList=this.productAllList.filter(item => item.product_id == productID);
|
||||
this.subProductList=this.subProductList[0].subproducts;
|
||||
}
|
||||
// if(productID == '4'){
|
||||
if(productabbr == 'BL'){
|
||||
let filtered = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this.customerSegmentList = filtered;
|
||||
else {
|
||||
this.productShortName = '';
|
||||
this.subProductList=[];
|
||||
}
|
||||
// console.log('this.productAbbr',this.productShortName);
|
||||
switch (this.productShortName) {
|
||||
case 'BL':
|
||||
console.log(1);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
||||
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
this.subProductList=[];
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
case 'LAEP':
|
||||
console.log(2);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
||||
this.subProductList=[];
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
default:
|
||||
console.log(3);
|
||||
this.customerSegmentList = this.customerSegmentAllList;
|
||||
console.log('productID', productID);
|
||||
this.isSubproductShown = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// //get city list details based on state id
|
||||
@ -420,7 +439,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
|
||||
// this is for clear custom validator required fields
|
||||
clearCustomValidatorFields(){
|
||||
console.log('functionclicked 2');
|
||||
|
||||
this._EditPDtriggerForm.controls['fk_lender_id'].clearValidators();
|
||||
this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
|
||||
|
||||
@ -455,7 +474,6 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
|
||||
submitPdDetails(formValue: any, status:any) {
|
||||
console.log('functionclicked 3');
|
||||
// let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus;
|
||||
let updateStatus = this.currentPDStatus;
|
||||
|
||||
@ -467,7 +485,32 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(this.lenderShortName == 'CLIX'){
|
||||
const control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
||||
let CtrlLength = control.controls.length;
|
||||
if (CtrlLength > 0) {
|
||||
let cnt = 0;
|
||||
while (cnt < CtrlLength) {
|
||||
|
||||
let ChildCtrl: any = control.controls[cnt]
|
||||
ChildCtrl.controls['addressline1'].setValidators([Validators.required]);
|
||||
ChildCtrl.controls['addressline1'].updateValueAndValidity();
|
||||
cnt++;
|
||||
}
|
||||
|
||||
this._EditPDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]);
|
||||
this._EditPDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
|
||||
|
||||
|
||||
this._EditPDtriggerForm.controls['pd_branch_id'].setValidators([Validators.required]);
|
||||
this._EditPDtriggerForm.controls['pd_branch_id'].updateValueAndValidity();
|
||||
|
||||
this._EditPDtriggerForm.controls['pd_contact_person'].setValidators([Validators.required]);
|
||||
this._EditPDtriggerForm.controls['pd_contact_person'].updateValueAndValidity();
|
||||
|
||||
this._EditPDtriggerForm.controls['pd_contact_mobileno'].setValidators([Validators.required]);
|
||||
this._EditPDtriggerForm.controls['pd_contact_mobileno'].updateValueAndValidity();
|
||||
|
||||
this._EditPDtriggerForm.controls['fk_pd_type'].clearValidators();
|
||||
this._EditPDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
|
||||
@ -478,7 +521,14 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this._EditPDtriggerForm.controls['loan_amount'].clearValidators();
|
||||
this._EditPDtriggerForm.controls['loan_amount'].updateValueAndValidity();
|
||||
|
||||
if(this._EditPDtriggerForm.invalid) {
|
||||
this.validateAllFormFields(this._EditPDtriggerForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
let my_array = this._EditPDtriggerForm.value;
|
||||
let concat_landline
|
||||
if(my_array.lender_stdcode != null && my_array.lender_landline != null){
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name"
|
||||
<mat-select placeholder="Account Holder’s 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">
|
||||
@ -109,7 +109,7 @@
|
||||
</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"
|
||||
<input matInput placeholder="Specify Account Holder’s Name" formControlName="other_applicant"
|
||||
autocomplete="off" [value]="itemrow.get('other_applicant').value | titlecase">
|
||||
<mat-error *ngIf="itemrow.controls['other_applicant'].hasError('required')">Applicant Name Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
</mat-panel-description> -->
|
||||
</mat-expansion-panel-header>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name"
|
||||
<mat-select placeholder="Account Holder’s 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">
|
||||
@ -42,7 +42,7 @@
|
||||
</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"
|
||||
<input matInput placeholder="Specify Account Holder’s Name" formControlName="other_applicant"
|
||||
autocomplete="off" [value]="itemrow.get('other_applicant').value | titlecase">
|
||||
<mat-error *ngIf="itemrow.controls['other_applicant'].hasError('required')">Applicant Name Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -13,6 +13,7 @@ import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/
|
||||
import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component';
|
||||
import { GetAnswerableFormsPipe } from './../../../../../pd-pipes/get-answerable-forms.pipe';
|
||||
import {AssessedIncomeComponent} from './../assessed-income/assessed-income.component';
|
||||
import { FuturePlansAndBusinessEnvironmentComponent } from './../../forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-business-info-group',
|
||||
@ -30,6 +31,9 @@ export class BusinessInfoGroupComponent implements OnInit {
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
waitLoading:boolean;
|
||||
lender_short_name :any;
|
||||
product_abbr :any;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -42,6 +46,9 @@ export class BusinessInfoGroupComponent implements OnInit {
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name;
|
||||
this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr;
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@ -189,6 +196,20 @@ export class BusinessInfoGroupComponent implements OnInit {
|
||||
.subscribe(dataresult => {
|
||||
this.getCompanyListForBusiness();
|
||||
});
|
||||
}else
|
||||
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && details.form_id==23){
|
||||
const dialogRef = this.dialog.open(FuturePlansAndBusinessEnvironmentComponent, {
|
||||
data: this.pd_all_details,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
this.getCompanyListForBusiness();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
|
||||
parent_pdid: string;
|
||||
pdid: string;
|
||||
form_id: number;
|
||||
|
||||
company_id: any;
|
||||
public _futurePlansForm: FormGroup;
|
||||
public submitted = false;
|
||||
|
||||
@ -63,6 +63,7 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 23;
|
||||
this.company_id =this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
@ -118,6 +119,7 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
|
||||
params.parent_pdid=this.parent_pdid;
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '23';
|
||||
params.company_id = this.company_id;
|
||||
this.pdTrigerService.getPDFormDetailsWithID(params).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this._futurePlansForm.controls.usp_of_the_business.setValue(data.records.usp_of_the_business);
|
||||
@ -137,8 +139,8 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
|
||||
|
||||
})
|
||||
|
||||
this.pdTrigerService.retriveFile(this.pdid,params.pd_form_id,null).subscribe(data => {
|
||||
if (data.status == 230) {
|
||||
this.pdTrigerService.retriveFile(this.pdid,params.pd_form_id,this.company_id).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
if(data.records.length>0){
|
||||
data.records.forEach((val, index) => {
|
||||
let splitted = val.pd_document_name.split(".");
|
||||
|
||||
@ -228,9 +228,9 @@ export class GeneralInfoComponent implements OnInit {
|
||||
return data.records.persons_with_relationships[key];
|
||||
});
|
||||
if (exist_personsWithRelationships.length > 0) {
|
||||
exist_personsWithRelationships.forEach(element => {
|
||||
exist_personsWithRelationships.forEach((element, index) => {
|
||||
//individualsControl.push(this.createIndividulas(element))
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element,index));
|
||||
});
|
||||
}
|
||||
if (this.customer_segment_abbr != 'SE-RI') {
|
||||
@ -315,7 +315,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
element.qualification = '',
|
||||
element.course_name = '',
|
||||
individualsControl.push(this.createIndividulas(element));
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element,key));
|
||||
|
||||
//let relationControl = <FormArray>this._generalForm.controls['applicant_relation'];
|
||||
// let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name, 'individula_order_id':relationControl.controls.length+1};
|
||||
@ -365,11 +365,11 @@ export class GeneralInfoComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
createPersonsWithRelationships(elementValue: any) {
|
||||
createPersonsWithRelationships(elementValue: any,indexVal:number) {
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
|
||||
relationship: [elementValue.relationship],
|
||||
relationship: [indexVal === 0 ? '0' : elementValue.relationship],
|
||||
relation_to: [elementValue.relation_to],
|
||||
individuals_order_id: [elementValue.individuals_order_id],
|
||||
is_active: [elementValue.is_active]
|
||||
@ -543,8 +543,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
individualsControl.push(this.createIndividulas(element));
|
||||
let relationControl = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': this.titleCase.transform(element.applicant_name), 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id, 'is_active': element.is_active };
|
||||
relationControl.push(this.createPersonsWithRelationships(applicant_details));
|
||||
|
||||
relationControl.push(this.createPersonsWithRelationships(applicant_details,individualsControl.controls.length-1));
|
||||
});
|
||||
|
||||
}
|
||||
@ -613,7 +612,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
updatePersonalRelation(indexVal) {
|
||||
let control: any = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
control.controls[indexVal].value.relationship == 0 ? control.controls[indexVal].controls['relation_to'].setValue('') : control.controls[indexVal].controls['relation_to'].setValue(control.controls[indexVal].value.relation_to);
|
||||
|
||||
}
|
||||
// update company relation
|
||||
updateCompanyRelation(indexVal) {
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
formControlName="is_there_total_fund">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes disclose">Yes, Disclosed</mat-option>
|
||||
<mat-option value="no not disclosed">No,not Disclosed</mat-option>
|
||||
<mat-option value="no not disclosed">No, Not Disclosed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="loanDetailsForm.controls['is_there_total_fund'].value == 'yes disclose'">
|
||||
|
||||
@ -29,7 +29,6 @@ import {BusinessInfoGroupComponent } from './forms/business-info-group/business-
|
||||
import {BusinessAssetsInfoComponent } from './forms/business-assets-info/business-assets-info.component';
|
||||
import {PdStatusChangeDialogueComponent } from './../pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||
import {RentalVerificationComponent} from './forms/rental-verification/rental-verification.component';
|
||||
import {FuturePlansAndBusinessEnvironmentComponent} from './forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-pd',
|
||||
@ -45,8 +44,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
categoryList: any = [];
|
||||
pdMasterList: any = [];
|
||||
pdFullDetails:any=[];
|
||||
lender_short_name :any;
|
||||
product_abbr :any;
|
||||
|
||||
// category static form buttons
|
||||
categoryFormButtons: any;
|
||||
formsCategoryEnable: boolean = false;
|
||||
@ -108,8 +106,6 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.pdMasterList=data.records.pdmaster_details;
|
||||
this.lender_short_name = data.records.pdmaster_details.lender_short_name;
|
||||
this.product_abbr = data.records.pdmaster_details.product_abbr;
|
||||
// this.categoryList=data.records.question_answers;
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName.length > 0 ? filterApplicantName[0].applicant_name : '';
|
||||
@ -483,23 +479,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||
this.loadTemplates(this.startPD,2);
|
||||
});
|
||||
}else
|
||||
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && this.selectedFormsCategory.form_id==23){
|
||||
const dialogRef = this.dialog.open(FuturePlansAndBusinessEnvironmentComponent, {
|
||||
data: this.pdFullDetails,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
this.loadTemplates(this.startPD,2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user