From 963c8eee6460ea4ba6b79e40b63573cb7bde519e Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Thu, 31 Oct 2019 12:59:50 +0530 Subject: [PATCH] KYC field added --- .../pd-question-general-info.html | 18 ++++++++++++++++-- .../pd-question-general-info.ts | 15 ++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/pages/pd-question/pd-question-general-info/pd-question-general-info.html b/src/pages/pd-question/pd-question-general-info/pd-question-general-info.html index cb572cb5..9bf2690a 100755 --- a/src/pages/pd-question/pd-question-general-info/pd-question-general-info.html +++ b/src/pages/pd-question/pd-question-general-info/pd-question-general-info.html @@ -99,7 +99,7 @@ - @@ -267,7 +267,21 @@ - + + + + Select + + {{val.isdisplayvalue}} + + KYC Required + + + + + diff --git a/src/pages/pd-question/pd-question-general-info/pd-question-general-info.ts b/src/pages/pd-question/pd-question-general-info/pd-question-general-info.ts index aeba87f1..32199fd8 100755 --- a/src/pages/pd-question/pd-question-general-info/pd-question-general-info.ts +++ b/src/pages/pd-question/pd-question-general-info/pd-question-general-info.ts @@ -3,7 +3,7 @@ import { IonicPage, NavController, NavParams, ModalController, CardTitle, Conten import { AwsServiceProvider } from '../../../providers/aws-service/aws-service'; import { QuestionCategoryProvider } from '../../../providers/question-category/question-category'; import { ToastProvider } from '../../../providers/common-provider/toast'; -import { FormGroup, FormBuilder,FormArray,Validator, Validators } from '@angular/forms'; +import { FormGroup, FormBuilder,FormArray,Validator, Validators, FormControl } from '@angular/forms'; import { PdQuestionGeneralOtherApplicantPage } from './pd-question-general-other-applicant/pd-question-general-other-applicant'; import { DatePipe} from '@angular/common'; import { SearchRelationPipe } from '../../../pipes/search-relation/search-relation'; @@ -86,6 +86,8 @@ export class PdQuestionGeneralInfoPage { imageBucket: any=[]; tab: any='0'; + public KYC: any = [{value:"yes",isdisplayvalue:"Yes"},{value:"no",isdisplayvalue:"No"}]; + constructor(public navCtrl: NavController, public navParams: NavParams, public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider, public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController, @@ -120,6 +122,8 @@ export class PdQuestionGeneralInfoPage { company_with_relationships:this.fb.array([]), rental_income_rcv_in_years:[''], rental_income_rcv_in_month:[''], + is_kyc: '', + kyc_and_captur_the_name: '', general_remark:'' }); @@ -1188,6 +1192,8 @@ console.log('1)',this.temp); saveRecords.persons_with_relationships=answerData.persons_with_relationships; // saveRecords.company_with_relationships=answerData.company_with_relationships saveRecords.general_remark=answerData.general_remark; + saveRecords.is_kyc=answerData.is_kyc; + saveRecords.kyc_and_captur_the_name=answerData.kyc_and_captur_the_name; this.spinner_access=true; this.cons.getGeoTag().then(res=>{ // console.log("Geo Coords",res) @@ -1275,6 +1281,8 @@ console.log('1)',this.temp); this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark); + this.generalForm.controls['is_kyc'].setValue(this.data_all.is_kyc); + this.generalForm.controls['kyc_and_captur_the_name'].setValue(this.data_all.kyc_and_captur_the_name); // var arrlist_indi:any=[] @@ -1592,4 +1600,9 @@ console.log('1)',this.temp); }) } } + + kycchange(event){ + // console.log(event); + if(event === 'yes') {event.value =='yes' ? this.generalForm.addControl('kyc_and_captur_the_name', new FormControl('')) : this.generalForm.removeControl('kyc_and_captur_the_name');} + } }