From 3ae9236b435623e40425ce7569bf828882a66837 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 20 Mar 2019 18:41:53 +0530 Subject: [PATCH] issues fixed : ps --- .../pd-status-change-dialogue.component.ts | 4 +- .../assets-info/assets-info.component.html | 2 +- .../business-assets-info.component.ts | 109 ++++++++++++------ .../business-banking-details.component.html | 3 +- .../business-banking-details.component.ts | 28 +++++ .../current-loan/current-loan.component.html | 9 +- .../final-remarks.component.html | 3 +- .../financial-info.component.html | 12 +- .../loan-details/loan-details.component.html | 2 +- .../neighbour-hood.component.ts | 2 +- 10 files changed, 118 insertions(+), 56 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index cd43e6391..9112c9c6b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -18,8 +18,8 @@ export class PdStatusChangeDialogueComponent implements OnInit { constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; - this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussions' : this.data.pd_status=='COMPLETED' ? 'Complete Discussions' : 'Change Discussions'; - this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions'; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion'; + this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion'; } ngOnInit() { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index 982eb07bd..ca44c17d1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -302,7 +302,7 @@
- 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 e805a57f3..7f22843d1 100755 --- 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 @@ -53,7 +53,11 @@ export class BusinessAssetsInfoComponent implements OnInit { public m_propertyType = []; public m_address_type = []; public m_vehicle_type = []; - + public m_state_for_address = []; + public m_city_for_address = []; + public m_pincode_for_address = []; + public cityArr: any = []; + public pinArr: any = []; PropertyOwnedType: any = []; existCompanyList: any = []; mergeCompanyApplicant: any = []; @@ -89,7 +93,7 @@ export class BusinessAssetsInfoComponent implements OnInit { /** init Function */ ngOnInit() { - +console.clear(); // this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => { // this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; // }); @@ -115,12 +119,22 @@ export class BusinessAssetsInfoComponent implements OnInit { } }) - + this.getM_State_For_Address(); this.getPdSupplierFormDetails(); this.getM_Assets_Type(); this.getM_PropertyType(); this.getM_Address_Type(); this.getM_Vehicle_Type(); + this.getM_Address_Type(); + + + } + + getM_State_For_Address(){ + this.pdTrigerService.getAllMasterDatas('STATE').subscribe( + data => { + this.m_state_for_address = data.records.filter(data => data.isactive == 1); + }) } /** Assets Type For Dropdown List */ @@ -164,7 +178,7 @@ export class BusinessAssetsInfoComponent implements OnInit { this.m_vehicle_type = data.records.filter(data => data.is_active == 1); }) } - + //Get Data Based on PDID and FORMID apiLoadFinish: boolean = false; getPdSupplierFormDetails() { @@ -197,39 +211,54 @@ export class BusinessAssetsInfoComponent implements OnInit { let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1); // // const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; - + if (data.records.addresses.length > 0) { - data.records.addresses.forEach((data, inx) => { - + data.records.addresses.forEach((dataValue, inx) => { this.addressLabel[inx] = ''; - - let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == data.address_type)[0]; - let address = data.address; - let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others; - - this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?'; - let addressLabel = address + ' / ' + addressType; - - let vals = { - address_label: addressLabel, - business_years: '', - business_month: '', - business_address_availability: '', - business_is_pd_visited: '', - business_pd_visited_remark: '', - business_approximate_market_value: '', - business_ownership_type: '', - business_monthly_rented_amt: '', - business_name_of_the_owner: '', - business_name_of_the_other_owner: '', - business_vintage: '', - business_purchase_year: '', - business_emi: '' - } - - const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; - control.push(this.initBusinessAddressDetailsWithdata(vals)); + this.pdTrigerService.getStateWiseCities(dataValue.state).subscribe(data => { + if (data.status == 200) { + // console.log(data.records); + this.cityArr = data.records.cities; + this.pinArr = data.records.pincode; + // console.log('cityArr',this.cityArr); + // console.log('pinArr',this.pinArr); + // console.log('flag',flag); + console.log('this.m_state_for_address',this.m_state_for_address); + let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == dataValue.address_type)[0]; + let selectedState = this.m_state_for_address.filter(element => element.state_id == dataValue.state)[0]; + let selectedCity = this.cityArr.filter(element => element.city_id == dataValue.city)[0]; + let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0]; + // console.log(selectedCity); + // console.log(selectedPincode); + // console.log(selectedCity[0].city_name); + // console.log(selectedPincode[0].pincode); + console.log('selectedState',selectedState); + let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others; + let address = dataValue.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (dataValue.pincode == 1 ? dataValue.pincode_others : selectedPincode.pincode); + + this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?'; + let addressLabel = address + ' / ' + addressType; + let vals = { + address_label: addressLabel, + business_years: '', + business_month: '', + business_address_availability: '', + business_is_pd_visited: '', + business_pd_visited_remark: '', + business_approximate_market_value: '', + business_ownership_type: '', + business_monthly_rented_amt: '', + business_name_of_the_owner: '', + business_name_of_the_other_owner: '', + business_vintage: '', + business_purchase_year: '', + business_emi: '' + } + const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; + control.push(this.initBusinessAddressDetailsWithdata(vals)); + } + }); }); } else { @@ -568,7 +597,13 @@ export class BusinessAssetsInfoComponent implements OnInit { }); - for (let val of result) { + // for (let val of result) { + result.forEach((val, index) => { + + var splitted_label = val.address_label.split("/", 2); + // console.log(splitted_label) + // console.log(splitted_label[0],splitted_label[1]); + this.placeholderName[index] = 'Was any business activity seen at the ' + splitted_label[1] != '' ? splitted_label[1] : 'Address Type' + ' during PD visit?'; let vals = { address_label: val.address_label, business_years: val.business_years, @@ -584,11 +619,11 @@ export class BusinessAssetsInfoComponent implements OnInit { business_vintage: val.business_vintage, business_purchase_year: val.business_purchase_year, business_emi: val.business_emi - }; + } const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; control.push(this.initBusinessAddressDetailsWithdata(vals)); // this.initBusinessDetailsWithdata(vals) - } + }); } else { const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; control.push(this.initBusinessAddressDetails()); 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 index 186f95c51..df33a08dc 100755 --- 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 @@ -96,7 +96,8 @@
- + +
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 index 55b7d005b..bc6dc9f84 100755 --- 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 @@ -121,6 +121,34 @@ export class BusinessBankingDetailsComponent implements OnInit { this.getM_BTLenderList(); this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true; + + this._pd.retriveForm({'pd_id':this.pdid,'pd_form_id':13,'company_id':this.company_id}).subscribe(data => { + // let businessVal = data.records; + // console.log('businessVal',businessVal,data.records.partners); + if (data.status == 200) { + let PartnrArray = Object.keys(data.records.partners).map(function (key) { + return data.records.partners[key]; + }); + console.log(PartnrArray); + console.log(data.records.partners); + PartnrArray.forEach((datas,index) => { + let sum1 = PartnrArray.map(officer => officer.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0); + // console.log('SumOfYear',SumOfYear); + // console.log('SumOfMonth',SumOfMonth); + }); + + // let SumOfYear = PartnrArray[index].Current_business_experiance_month.reduce((sum, val) => sum + +val, 0); + // let SumOfMonth = PartnrArray[index].Current_business_experiance_year.reduce((sum, val) => sum + +val, 0); + + // let SumOfYear = month.reduce((sum, val) => sum + +val, 0); + // let SumOfMonth = year.reduce((sum, val) => sum + +val, 0); + + let sum1 = PartnrArray.map(arr => arr.map(data => data.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0)) + console.log('sum1',sum1); + + } + }); + let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '21'; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index 17b672ebe..979d64022 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -126,18 +126,17 @@ -->
- - - Invalid Balance Tenure. + Invalid Balance Tenture. - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html index 4e869be70..1007ed80f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html @@ -17,8 +17,7 @@ Select - {{ - pm.description }} + {{pm.customer_behaviour_id == 1 ? 'Other Negative Behaviour': pm.description }} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 0841a8fe4..d0b6eb93e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -177,17 +177,17 @@ OnlyNumber type="text" readonly> - No difference in Profit sales % in FY + No difference in Profit/Loss to sales % in FY {{details.get('financial_year').value}} over - Profit sales % in FY + Profit/Loss to sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} - Increase in Profit sales % in FY + Increase in Profit/Loss to sales % in FY {{details.get('financial_year').value}} over - Profit sales % in FY + Profit/Loss to sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} {{details.get('financial_profit_to_sale_variation').value}} @@ -195,9 +195,9 @@ - Decrease in Profit sales % in FY + Decrease in Profit/Loss to sales % in FY {{details.get('financial_year').value}} over - Profit sales % in FY + Profit/Loss to sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} {{(details.get('financial_profit_to_sale_variation').value).replace('-', 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 8f6ac1460..a26b8f0b3 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 @@ -30,7 +30,7 @@ {{loanAmtInWords}} Only - Loan Tenure applied for? + Loan Tenture applied for? diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts index 83eac5a31..e95cf5cf5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts @@ -387,7 +387,7 @@ export class NeighbourHoodComponent implements OnInit { // saveRecords.check_type=formData.check_type; saveRecords.pdid=formData.pdid; saveRecords.formid=formData.formid; - saveRecords.neighbourhood_status = formData.check_type == 0 ? formData.neighbourhood_status : ''; + saveRecords.neighbourhood_status = formData.neighbourhood_status!='' ? formData.neighbourhood_status : ''; saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark; this._pd.savePDFormDetailsWithID(saveRecords).subscribe( dataresult => {