From 76a63e31cc2a786ceac5fee7ff4e016aedb65992 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Mon, 9 Dec 2019 18:53:29 +0530 Subject: [PATCH 1/2] queries changes --- .../pd-question-final-remark.html | 6 +++-- .../pd-question-rental-dash.ts | 24 +++++++++++++------ src/pages/queries-docs/queries-docs.html | 8 ++++--- src/providers/constants/constants.ts | 2 +- .../question-category/question-category.ts | 5 ++++ 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/pages/pd-question/pd-question-final-remark/pd-question-final-remark.html b/src/pages/pd-question/pd-question-final-remark/pd-question-final-remark.html index 47420a0d..b0a975f7 100755 --- a/src/pages/pd-question/pd-question-final-remark/pd-question-final-remark.html +++ b/src/pages/pd-question/pd-question-final-remark/pd-question-final-remark.html @@ -132,8 +132,10 @@
- Reason for Marking PD Status as Positive - + Reason for Marking PD Status as Positive + + diff --git a/src/pages/pd-question/pd-question-rental-info/pd-question-rental-dash/pd-question-rental-dash.ts b/src/pages/pd-question/pd-question-rental-info/pd-question-rental-dash/pd-question-rental-dash.ts index 50510524..31165698 100755 --- a/src/pages/pd-question/pd-question-rental-info/pd-question-rental-dash/pd-question-rental-dash.ts +++ b/src/pages/pd-question/pd-question-rental-info/pd-question-rental-dash/pd-question-rental-dash.ts @@ -116,13 +116,23 @@ this.loadingProvider.dataLoader(); console.log("d",values) } addMore(){ - let passValues: any = { - manage_status: 1, - // parentData: this.parentData, - // masterData: this.masterData, - existing_rental_count_id: this.existing_rental_count_id + 1, - } - this.navCtrl.push(PdQuestionRentalInfoPage,{"values":passValues,'pdDetails':this.pdDetails,'FormId':this.form_details}); + let params: any = {}; + console.log('add params',params); + params.pd_id = this.pdDetails.pd_id; + console.log(this.pdDetails.pd_id); + this.qustCat.getPropertyCount(this.pdDetails.pd_id).subscribe(data => { + if (data.status == 200){ + let passValues: any = { + manage_status: 1, + // parentData: this.parentData, + // masterData: this.masterData, + existing_rental_count_id: data.records, + } + this.navCtrl.push(PdQuestionRentalInfoPage,{"values":passValues,'pdDetails':this.pdDetails,'FormId':this.form_details}); + + } + }) + } isactiveProperty(info){ diff --git a/src/pages/queries-docs/queries-docs.html b/src/pages/queries-docs/queries-docs.html index 93101270..ff28b11a 100755 --- a/src/pages/queries-docs/queries-docs.html +++ b/src/pages/queries-docs/queries-docs.html @@ -36,8 +36,9 @@ - + --> + +
@@ -75,7 +76,8 @@ - + + diff --git a/src/providers/constants/constants.ts b/src/providers/constants/constants.ts index cd0ae242..991fb35e 100755 --- a/src/providers/constants/constants.ts +++ b/src/providers/constants/constants.ts @@ -66,7 +66,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg"; userPoolId:'ap-south-1_qQ85yQZJO', clientId:'2o5c3cs9k3als16nqhp3irh8rs' //for mobile } - return production; + return testing; } getcurrentDate() diff --git a/src/providers/question-category/question-category.ts b/src/providers/question-category/question-category.ts index ac443574..47211b42 100755 --- a/src/providers/question-category/question-category.ts +++ b/src/providers/question-category/question-category.ts @@ -77,6 +77,11 @@ apiurl:any; return this.http.post(this.apiurl + 'deactiveFormData', { "records": params }) } + getPropertyCount(params :any): Observable { + console.log('service params',params) + return this.http.get(this.apiurl + 'getNextRentalCount?pdid=' +params) + +} /**Assessed Form Details API */ saveassessedForms(api,saveData) From 2dd5af2f36cae14e24eff7268aa6d84cce6208af Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Wed, 11 Dec 2019 16:21:59 +0530 Subject: [PATCH 2/2] loan details live issue fix --- .../pd-question-loans/pd-question-loans.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/pages/pd-question/pd-question-loans/pd-question-loans.ts b/src/pages/pd-question/pd-question-loans/pd-question-loans.ts index 8469d759..3ddd8f7c 100755 --- a/src/pages/pd-question/pd-question-loans/pd-question-loans.ts +++ b/src/pages/pd-question/pd-question-loans/pd-question-loans.ts @@ -461,7 +461,8 @@ export class PdQuestionLoansPage { mortage_type(mortage_value) { let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0]; - let property_name = mortagetypes.property_name.replace(/\s/g, "").toLowerCase(); + if(mortagetypes != undefined){ + let property_name = mortagetypes.property_name.replace(/\s/g, "").toLowerCase(); if(property_name=='others(pleasespecify)' || property_name=='others') { this.mortageAccess = true; @@ -469,6 +470,9 @@ export class PdQuestionLoansPage { { this.mortageAccess = false; } + + } + } @@ -506,6 +510,7 @@ export class PdQuestionLoansPage { data => { this.m_endUseForLoan = data['records'].filter(data => data.isactive == 1); }); + this.loanDetailsForm.controls['end_use'].setValue(''); } ChangeProperty(subproduct_id){ @@ -537,7 +542,9 @@ export class PdQuestionLoansPage { //this.endUserList = []; event.forEach(option => { let othresData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0]; + if(othresData != undefined){ othresData = othresData.enduse_of_loan.substr(0,6).toLowerCase(); + } this.endUserList.push({ end_use: option }); if (othresData == 'others') { @@ -624,9 +631,13 @@ export class PdQuestionLoansPage { // } // 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}) - }); + console.log(this.loanDetailsForm.controls['end_use'].value.length> 0); + if(this.loanDetailsForm.controls['end_use'].value.length> 0){ + 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) {