From df7c7da4a454bb82e64f9ff8a6016dcc4808567f Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 29 Nov 2018 19:56:09 +0530 Subject: [PATCH] Review Doc Changes : ps --- .../forms/address/address.component.html | 18 +-- .../forms/address/address.component.ts | 76 ++++++------ .../banking-details.component.html | 35 +++++- .../banking-details.component.ts | 42 ++++++- .../business-info.component.html | 116 ++++++++++++++---- .../business-info/business-info.component.ts | 93 +++++++------- .../current-loan/current-loan.component.html | 38 +++++- .../current-loan/current-loan.component.ts | 46 +++++++ .../family-details.component.html | 66 ++++++---- .../family-details.component.ts | 91 ++++++++++---- .../loan-details/loan-details.component.html | 49 +++++--- .../loan-details/loan-details.component.ts | 74 ++++++++++- .../other-income/other-income.component.html | 15 ++- .../other-income/other-income.component.ts | 3 + .../list-pd/start-pd/start-pd.component.html | 4 +- .../list-pd/start-pd/start-pd.component.ts | 1 + .../pd-service/pd-triger.service.ts | 78 ++++++++++++ 17 files changed, 657 insertions(+), 188 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index 0782fddcf..0853db580 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -15,19 +15,18 @@ - - - + {{m_locality.locality_name}} - + + @@ -46,14 +45,15 @@ - + - + + ->-

@@ -148,6 +149,7 @@
+ End of Neighbourhood Check-->
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts index 6e5dfb0f7..d5bb9f5fb 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts @@ -33,13 +33,13 @@ export class AddressComponent implements OnInit { locationdata: any = []; commentData: any = []; - customerData: any = []; + //customerData: any = []; 221118 review doc s.no 3.e addressData:any = []; localityData:any = []; ownerShipData:any = []; - neighbourStatusData:any=["Yes","No"]; - applicantOwnerData:any=["Yes","No","Dont Know"]; + //neighbourStatusData:any=["Yes","No"]; + //applicantOwnerData:any=["Yes","No","Dont Know"]; public currentLoanForm: FormGroup; private notifier: NotifierService; @@ -65,7 +65,7 @@ export class AddressComponent implements OnInit { console.clear(); this.getMasterDetails('PDLOCATIONAPPROACH',1); this.getMasterDetails('COMMENTSONLOCALITY',2); - this.getMasterDetails('CUSTOMERBEHAVIOUR',3); + //this.getMasterDetails('CUSTOMERBEHAVIOUR',3);review doc s.no 3.e this.getMasterDetails('LOCALITY',4); this.getMasterDetails('ADDRESSTYPE',5); this.getMasterDetails('RESIDENCEOWNERSHIP',6); @@ -75,11 +75,11 @@ export class AddressComponent implements OnInit { params.pd_form_id = '5'; this._pd.retriveForm(params).subscribe(data => { console.log('data', data); - const control = this.addressForm.controls['neighbourhood']; + //const control = this.addressForm.controls['neighbourhood']; if(data.status == 200) { - var result = Object.keys(data.records.neighbourhood).map(function (key) { - return data.records.neighbourhood[key]; - }); + // var result = Object.keys(data.records.neighbourhood).map(function (key) { + // return data.records.neighbourhood[key]; + // }); this.addressForm.controls.address.setValue(data.records.address); this.addressForm.controls.pd_location.setValue(data.records.pd_location); this.addressForm.controls.address_type.setValue(data.records.address_type); @@ -87,7 +87,7 @@ export class AddressComponent implements OnInit { this.addressForm.controls.address_type_others.setValue(data.records.address_type_others); } this.addressForm.controls.comment_locality.setValue(data.records.comment_locality); - this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour); + // this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour); this.addressForm.controls.locality.setValue(data.records.locality); this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark); this.addressForm.controls.address_ownership.setValue(data.records.address_ownership); @@ -101,16 +101,16 @@ export class AddressComponent implements OnInit { if (data.records.locality_others) { this.addressForm.controls.locality_others.setValue(data.records.locality_others); } - if (result.length == 0) { - control.push(this.createNeighbour()); - } else { - result.forEach(datas => { - control.push(this.createNeighbour()); - }); - this.addressForm.controls.neighbourhood.setValue(result); - } + // if (result.length == 0) { + // control.push(this.createNeighbour()); + // } else { + // result.forEach(datas => { + // control.push(this.createNeighbour()); + // }); + // this.addressForm.controls.neighbourhood.setValue(result); + // } } else { - control.push(this.createNeighbour()); + //control.push(this.createNeighbour()); } }); } @@ -123,8 +123,8 @@ export class AddressComponent implements OnInit { locality_others: [''], pd_location: ['', Validators.compose([Validators.required])], comment_locality: ['', Validators.compose([Validators.required])], - customer_behaviour: ['', Validators.compose([Validators.required])], - neighbourhood: this.fb.array([]), + //customer_behaviour: ['', Validators.compose([Validators.required])], + //neighbourhood: this.fb.array([]), address_form_remark:[''], address_ownership:[''], bussiness_activity:[''], @@ -136,20 +136,20 @@ export class AddressComponent implements OnInit { this.locality = this.addressForm.controls['locality']; this.pdLocation = this.addressForm.controls['pd_location']; this.commentlocality = this.addressForm.controls['comment_locality']; - this.customerBehaviour = this.addressForm.controls['customer_behaviour']; + //this.customerBehaviour = this.addressForm.controls['customer_behaviour']; this.ownership = this.addressForm.controls['address_ownership']; this.bussinessActivity = this.addressForm.controls['bussiness_activity']; // this.bussiessAddressType = this.addressForm.controls['bussiness_address_type']; } - createNeighbour(): FormGroup { - return this.fb.group({ - name: ['', Validators.compose([Validators.required])], - do_you_know: ['', Validators.compose([Validators.required])], - how_long_year: ['', Validators.compose([Validators.required])], - how_long_month: ['', Validators.compose([Validators.required])], - is_owner: ['', Validators.compose([Validators.required])], - }); - } + // createNeighbour(): FormGroup { + // return this.fb.group({ + // name: ['', Validators.compose([Validators.required])], + // do_you_know: ['', Validators.compose([Validators.required])], + // how_long_year: ['', Validators.compose([Validators.required])], + // how_long_month: ['', Validators.compose([Validators.required])], + // is_owner: ['', Validators.compose([Validators.required])], + // }); + // } getMasterDetails(table:string,type:number){ this._pd.getAllMasterDatas(table).subscribe(data => { data.records.forEach(val => { @@ -159,9 +159,9 @@ export class AddressComponent implements OnInit { else if(type==2 && val.isactive == 1){ this.commentData.push(val); } - else if(type==3 && val.isactive == 1){ - this.customerData.push(val); - } + /* else if(type==3 && val.isactive == 1){ + this.customerData.push(val); + } //221118 review doc s.no 3.e */ else if(type==4 && val.isactive == 1){ this.localityData.push(val); } @@ -174,6 +174,7 @@ export class AddressComponent implements OnInit { }) }); } + /*221118 review doc s.no 3.f addNeighbour() { const control = this.addressForm.controls['neighbourhood']; if (control.length <= 1) { @@ -183,12 +184,13 @@ export class AddressComponent implements OnInit { removeNeighbour(index) { const control = this.addressForm.controls['neighbourhood']; control.removeAt(index); - } + }*/ onSubmit() { + console.log('form data', this.addressForm.value); if (!this.addressForm.valid) { return; } - console.log('form', this.addressForm.value); + let records: any = {}; records.address = this.address.value; records.address_type = this.addressType.value; @@ -201,8 +203,8 @@ export class AddressComponent implements OnInit { } records.pd_location = this.pdLocation.value; records.comment_locality = this.commentlocality.value; - records.customer_behaviour = this.commentlocality.value; - records.neighbourhood = this.addressForm.controls.neighbourhood.value; + //records.customer_behaviour = this.commentlocality.value; + //records.neighbourhood = this.addressForm.controls.neighbourhood.value; records.address_form_remark = this.addressForm.controls.address_form_remark.value; records.address_ownership = this.ownership.value; records.bussiness_activity = this.bussinessActivity.value; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index f6a5614f5..953ef338c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -71,7 +71,7 @@

Banking Information

-
+
@@ -84,15 +84,39 @@ + + + {{owner.applicant_name}} + Others + + + + + + + + + + + + {{ btLen.lender_name }} + + + + + - + {{ prop.name }} + + Yes + No + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + + + - Started by Applicant + Started by Applicants Family Business + Others + + + - One of the applicants + + {{owner.applicant_name}} Relative of an applicant Others @@ -75,9 +121,18 @@ - --> + + Yes + No + + + + @@ -96,13 +151,21 @@ formControlName="partner_name" required> - - - - +
+ +
+
+ + + + + + +
+
@@ -141,7 +204,7 @@ -

As per PD Officer +

No of Employees sighted by PD officer during his visit

@@ -149,19 +212,19 @@
- + + -

Investments +

Investment in business by Applicants

@@ -169,10 +232,10 @@
- + @@ -192,7 +255,7 @@ - + -

Is the below documents seen and photo captured ? +

Documents Sighted

@@ -277,6 +340,7 @@ formControlName="other_documents" required> Yes No + Not Applicable
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index b24341aea..e5ae10d50 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -31,10 +31,12 @@ import {ActivatedRoute, Router} from "@angular/router"; export class BusinessInfoComponent implements OnInit { @Input() pdid: number; @Input() form_id: number; + @Input() applicant_details: any; relationData: any = []; industryData: any = []; activityData: any = []; relativeNames: any; + applicants: any; public businessForm: FormGroup; private notifier: NotifierService; @@ -44,6 +46,7 @@ export class BusinessInfoComponent implements OnInit { this.notifier = notifier; } ngOnInit() { + this.applicants = this.applicant_details.pdapplicants_detials; this.getRelation(); this.getIndustry(); this.getActivity(); @@ -58,15 +61,14 @@ export class BusinessInfoComponent implements OnInit { let businessVal = data.records; console.log('data', businessVal); let constVal: any; - const Desgn = this.businessForm.controls['designation']; + //const Desgn = this.businessForm.controls['designation']; const Partnr = this.businessForm.controls['partners']; const otherDoc = this.businessForm.controls['documents']; - if (data.status == 200) { let DocArray: any; - let DesgnArray = Object.keys(data.records.designation).map(function (key) { - return data.records.designation[key]; - }); + // let DesgnArray = Object.keys(data.records.designation).map(function (key) { + // return data.records.designation[key]; + // }); let PartnrArray = Object.keys(data.records.partners).map(function (key) { return data.records.partners[key]; }); @@ -81,14 +83,14 @@ export class BusinessInfoComponent implements OnInit { existRelative.push(val); }); this.relativeNames = existRelative; - if (DesgnArray.length == 0) { - Desgn.push(this.createDesignation()); - } else { - DesgnArray.forEach(datas => { - Desgn.push(this.createDesignation()); - }); + // if (DesgnArray.length == 0) { + // Desgn.push(this.createDesignation()); + // } else { + // DesgnArray.forEach(datas => { + // Desgn.push(this.createDesignation()); + // }); - } + // } if (PartnrArray.length == 0) { Partnr.push(this.createPartners()); } else { @@ -107,23 +109,23 @@ export class BusinessInfoComponent implements OnInit { DocArray = [{document: ''}]; otherDoc.push(this.createDocument()); } - if (data.records.ownership_setup != 'others') { - businessVal.ownership_others = ''; - } - if (data.records.ownership_setup != 'rented') { - businessVal.rent_paid = ''; - } + // if (data.records.ownership_setup != 'others') { + // businessVal.ownership_others = ''; + // } + // if (data.records.ownership_setup != 'rented') { + // businessVal.rent_paid = ''; + // } businessVal.family_members_involved = enduse; businessVal.pdid = this.pdid; businessVal.formid = this.form_id; businessVal.fk_createdby = this.pdid; - businessVal.designation = DesgnArray; + //businessVal.designation = DesgnArray; businessVal.partners = PartnrArray; businessVal.documents = DocArray; this.businessForm.setValue(businessVal); } else { - Desgn.push(this.createDesignation()); + //Desgn.push(this.createDesignation()); Partnr.push(this.createPartners()); otherDoc.push(this.createDocument()); } @@ -140,23 +142,27 @@ export class BusinessInfoComponent implements OnInit { fk_createdby: this.pdid, profession_name: ['', Validators.compose([Validators.required])], business_years: ['', Validators.compose([Validators.required])], + business_month: ['', Validators.compose([Validators.required])], industry: ['', Validators.compose([Validators.required])], type_of_activity: ['', Validators.compose([Validators.required])], + other_activity_type : [''], seasonality: ['', Validators.compose([Validators.required])], - designation: this.fb.array([]), + month_of_business_run : [''], + peak_period_of_business : [''], + //designation: this.fb.array([]), partners: this.fb.array([]), employees_total: ['', Validators.compose([Validators.required])], employees_permanent: ['', Validators.compose([Validators.required])], employees_temporary: ['', Validators.compose([Validators.required])], officer_total: ['', Validators.compose([Validators.required])], - officer_permanent: ['', Validators.compose([Validators.required])], - officer_temporary: ['', Validators.compose([Validators.required])], + // officer_permanent: ['', Validators.compose([Validators.required])], + // officer_temporary: ['', Validators.compose([Validators.required])], invested_amount: ['', Validators.compose([Validators.required])], - working_capital: ['', Validators.compose([Validators.required])], + //working_capital: ['', Validators.compose([Validators.required])], is_service_provided: ['', Validators.compose([Validators.required])], - ownership_setup: ['', Validators.compose([Validators.required])], - ownership_others: [''], - rent_paid: [''], + // ownership_setup: ['', Validators.compose([Validators.required])], + // ownership_others: [''], + // rent_paid: [''], shop_eat_act_cert: ['', Validators.compose([Validators.required])], gst_Regn_cert: ['', Validators.compose([Validators.required])], export_import_cert: ['', Validators.compose([Validators.required])], @@ -168,24 +174,27 @@ export class BusinessInfoComponent implements OnInit { documents: this.fb.array([]), business_remarks: ['', Validators.compose([Validators.required])], who_started: ['', Validators.compose([Validators.required])], + other_bussiness_who_started : [''], main_person: ['', Validators.compose([Validators.required])], other_main_person: [''], family_members_involved: ['', Validators.compose([Validators.required])], before_business: ['', Validators.compose([Validators.required])], + before_business_description: [''], any_delays: ['', Validators.compose([Validators.required])], }); } - createDesignation(): FormGroup { - return this.fb.group({ - sec_name: ['', Validators.compose([Validators.required])], - sec_designation: ['', Validators.compose([Validators.required])], - }); - } + // createDesignation(): FormGroup { + // return this.fb.group({ + // sec_name: ['', Validators.compose([Validators.required])], + // sec_designation: ['', Validators.compose([Validators.required])], + // }); + // } createPartners(): FormGroup { return this.fb.group({ partner_name: ['', Validators.compose([Validators.required])], shareholding: ['', Validators.compose([Validators.required])], - current_business_experiance: ['', Validators.compose([Validators.required])], + current_business_experiance_year: ['', Validators.compose([Validators.required])], + current_business_experiance_month: ['', Validators.compose([Validators.required])], total_business_experiance: ['', Validators.compose([Validators.required])], }); } @@ -194,14 +203,14 @@ export class BusinessInfoComponent implements OnInit { document: [''] }); } - addDesignation() { - const control = this.businessForm.controls['designation']; - control.push(this.createDesignation()); - } - deleteDesignation(index) { - const control = this.businessForm.controls['designation']; - control.removeAt(index); - } + // addDesignation() { + // const control = this.businessForm.controls['designation']; + // control.push(this.createDesignation()); + // } + // deleteDesignation(index) { + // const control = this.businessForm.controls['designation']; + // control.removeAt(index); + // } addPartnerDetails() { const control = this.businessForm.controls['partners']; control.push(this.createPartners()); 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 d3ce744d2..20416eb11 100644 --- 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 @@ -1,14 +1,20 @@ -

Current Loan Details

+

Existing Loan Obligations

- + + Yes No + + +

Loan Details

@@ -16,19 +22,43 @@

+ - + + {{freq.name}} + + + + - + + {{owner.applicant_name}} + Others + + + + + + + {{ btLen.lender_name }} + + + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts index 78dd06331..e493001ef 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts @@ -33,6 +33,13 @@ export class CurrentLoanComponent implements OnInit { private notifier: NotifierService; @Input() pdid: number; @Input() form_id: number; + @Input() applicant_details: any; + lenderData: any = []; + frequencyData: any = []; + applicants: any; + placeholderName : any; + holder: any = 'amount'; + IDXval : any; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -41,10 +48,13 @@ export class CurrentLoanComponent implements OnInit { } ngOnInit() { + this.getMasterDetails('BTLENDERLIST',1); + this.getMasterDetails('FREQUENCY',2); this.initCurrentloanForm(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; + this.applicants = this.applicant_details.pdapplicants_detials; this._pd.retriveForm(params).subscribe(value => { console.log('value', value); const control = this.currentLoanForm.controls['loan_details']; @@ -88,12 +98,36 @@ export class CurrentLoanComponent implements OnInit { arr.removeAt(0); } } + + selectedfrequency(e,i){ + // console.log(+e.value); + // console.log(i); + + + this.IDXval = i; + + switch(+e.value){ + case 1: this.placeholderName = 'Weekly Installment Amount'; break; + case 2: this.placeholderName = 'Daily Installment Amount'; break; + case 3: this.placeholderName = 'Annual Installment Amount'; break; + case 4: this.placeholderName = 'Hourly Installment Amount'; break; + case 5: this.placeholderName = 'EMI Amount'; break; + case 6: this.placeholderName = 'Quarterly Installment Amount'; break; + case 7: this.placeholderName = 'HalfYearly Installment Amount'; break; + default : this.placeholderName = ''; break; + } + } + createLoanDetail() { return this.fb.group({ loan_amount: ['', Validators.compose([Validators.required])], + frequency:['', Validators.compose([Validators.required])], emi: ['', Validators.compose([Validators.required])], loan_type: ['', Validators.compose([Validators.required])], + loan_taken_by:[''], + others_loan_taken:[''], lender: ['', Validators.compose([Validators.required])], + others_lender:[''], original_tenure: ['', Validators.compose([Validators.required])], current_balance_tenure: ['', Validators.compose([Validators.required])], }); @@ -138,6 +172,18 @@ export class CurrentLoanComponent implements OnInit { } }); } + getMasterDetails(table:string,type:number){ + this._pd.getAllMasterDatas(table).subscribe(data => { + data.records.forEach(val => { + if (type==1 && val.isactive == 1) { + this.lenderData.push(val); + } + else if(type==2 && val.isactive == 1){ + this.frequencyData.push(val); + } + }) + }); + } /** On Key Press Event For Amount */ keyPress(event: any) { const pattern = /[0-9]/; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index 5053fbe6c..2142bd66d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -3,7 +3,7 @@

Family Details

- + - + @@ -25,8 +25,16 @@
+ + + + + + - + {{relations.name}} @@ -34,7 +42,7 @@ - + {{cusSeg.name}} @@ -44,11 +52,11 @@ + formControlName="income" required> + formControlName="employer_name" required>