changes : ps
This commit is contained in:
parent
b78fe9c7ca
commit
91767ec68d
@ -116,7 +116,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Name of the Owner"
|
||||
<mat-select multiple placeholder="Name of the Owner"
|
||||
formControlName="owner_name" [compareWith]="compareObjects" required>
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
@ -145,9 +145,9 @@
|
||||
</mat-select> -->
|
||||
<!-- </mat-form-field> -->
|
||||
|
||||
<mat-form-field *ngIf="checkOthers(sup.get('owner_name').value)===true">
|
||||
<!-- <mat-form-field *ngIf="checkOthers(loanDetailsForm.controls['owner_name'].value)===true">
|
||||
<input matInput placeholder="Specify Other Owner Name" formControlName="other_owners_name" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Status of Construction" formControlName="construction_status" >
|
||||
|
||||
@ -86,32 +86,9 @@ export class LoanDetailsComponent implements OnInit {
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
// this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
|
||||
this.companies = this.pd_all_details.pdapplicants_detials.filter(appt=>appt.applicant_type == 2 )
|
||||
|
||||
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._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active===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})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// this.companies = this.pd_all_details.pdapplicants_detials.filter(appt=>appt.applicant_type == 2 )
|
||||
this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr;
|
||||
this.productID = this.pd_all_details.pdmaster_details.fk_product_id;
|
||||
this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name;
|
||||
@ -151,29 +128,26 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.getM_StatusofCunstruction();
|
||||
this.getM_BTLenderList();
|
||||
|
||||
// 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})
|
||||
// this.mergeCompanyApplicant.splice(this.mergeCompanyApplicant.indexOf(languague), 1);
|
||||
// // this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||
|
||||
// }
|
||||
// })
|
||||
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})
|
||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
let params: any = {};
|
||||
@ -358,42 +332,35 @@ getM_sourceofamount() {
|
||||
}
|
||||
|
||||
getM_MortageTypeProperty() {
|
||||
// this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
|
||||
this._pd.getAllMasterDatas('MORTAGEPROPERTIES').subscribe(
|
||||
data => {
|
||||
|
||||
// this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
|
||||
// this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr);
|
||||
if(data.dataStatus==true){
|
||||
let that = this;
|
||||
this.m_mortageTypeProperty = data.records.filter(
|
||||
function(data){
|
||||
console.log(data);
|
||||
if(that.productAbbr != "LAP"){
|
||||
console.log(that.productAbbr);
|
||||
if(data.group_name == that.productAbbr && data.isactive==1){
|
||||
return data;
|
||||
}
|
||||
}
|
||||
else if(that.productAbbr == "LAP"){
|
||||
if(data.sub_group_name == that.subProductName && data.isactive==1){
|
||||
console.log(that.productAbbr);
|
||||
console.log(that.subProductName);
|
||||
console.log(data.sub_group_name);
|
||||
if(data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive==1){
|
||||
console.log('lap with subproduct',data);
|
||||
return data;
|
||||
}
|
||||
else if(data.group_name == that.productAbbr && data.sub_group_name != null && data.isactive==1) {
|
||||
console.log('lap with subproduct null',data);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
// if(data.isactive==1 && data.group_name != "LAP"){
|
||||
// if(data.group_name == that.productAbbr){
|
||||
// return data;}
|
||||
// }else if(data.group_name == "LAP" && data.sub_group_name == that.subProductName){
|
||||
// return data;
|
||||
// }else{
|
||||
// return ;
|
||||
// }
|
||||
});
|
||||
|
||||
// console.log(this.m_mortageTypeProperty);
|
||||
// console.log(this.propertyType);
|
||||
// this.mortage_type(this.propertyType);
|
||||
// if(this.propertyType != ''){
|
||||
// this.mortage_type(this.propertyType);
|
||||
// }
|
||||
console.log(this.m_mortageTypeProperty);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
@ -561,6 +528,7 @@ getM_sourceofamount() {
|
||||
|
||||
// get end user final group data
|
||||
let dataEnd_user_data = [];
|
||||
|
||||
this.loanDetailsForm.controls['end_use'].value.forEach(element => {
|
||||
dataEnd_user_data.push({end_use: element})
|
||||
});
|
||||
@ -618,9 +586,9 @@ getM_sourceofamount() {
|
||||
dataOwner_name.push({owner_name: element})
|
||||
});
|
||||
records.owner_name_group = dataOwner_name;
|
||||
// if(this.OtherOwnerFlag){
|
||||
// if(this.loanDetailsForm.controls['other_owners_name'].value != null){
|
||||
// records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value;
|
||||
// }else{ records.other_owners_name = ''; }
|
||||
// }else{ records.other_owners_name = null; }
|
||||
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
|
||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||
}else{
|
||||
|
||||
@ -72,14 +72,18 @@
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addRawMaterials(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Raw Materials </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
|
||||
matTooltip="Delete Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -144,18 +148,22 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <button type="button" mat-flat-button (click)="deleteGoods(b,1)"
|
||||
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last" align="center">
|
||||
<strong>Delete Finished Goods </strong>
|
||||
</button> -->
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(b,1)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -220,14 +228,18 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(c,1)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -304,14 +316,18 @@
|
||||
</button> -->
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(2)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(d,2)"
|
||||
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -376,14 +392,18 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(2)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(e,2)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
@ -462,14 +482,18 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(3)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(f,3)"
|
||||
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -534,14 +558,18 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(3)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(g,3)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user