diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index 439542d43..2791a7b2d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -116,7 +116,7 @@ - @@ -145,9 +145,9 @@ --> - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 4064169bb..375560841 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -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 => { @@ -560,10 +527,11 @@ getM_sourceofamount() { records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value; // get end user final group data - let dataEnd_user_data = []; - this.loanDetailsForm.controls['end_use'].value.forEach(element => { + let dataEnd_user_data = []; + + this.loanDetailsForm.controls['end_use'].value.forEach(element => { dataEnd_user_data.push({end_use: element}) - }); + }); records.end_use_group = dataEnd_user_data; if (this.isOtherPurpose) { @@ -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{ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index c253d9559..3aaff1eaa 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -72,14 +72,18 @@ +
+
+
+
@@ -144,18 +148,22 @@ +
+
+
+
@@ -220,14 +228,18 @@ +
+
+
+
@@ -304,14 +316,18 @@ --> +
+
+
+
@@ -376,14 +392,18 @@ +
+
+
+
@@ -462,14 +482,18 @@ +
+
+
+
@@ -534,14 +558,18 @@ +
+
+
+