From 9db05f7dcc0845abae3cd10b26d900fceaeb3ce5 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 17 Nov 2018 10:32:42 +0530 Subject: [PATCH 1/3] fimamce changes --- .../start-pd/forms/financial-info/financial-info.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index 41e4e8014..6d12f4675 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -46,7 +46,6 @@ export class FinancialInfoComponent implements OnInit { params.pd_id = this.pdid; params.pd_form_id = this.form_id; this._pd.retriveForm(params).subscribe(value => { - console.log('value', value); const financial_date = this.financialForm.controls['date_per_financial']; const estimated_val = this.financialForm.controls['estimated_value']; if (value.status == 200) { From f290e27b2210845f25dc17526c398fc6c8536025 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 17 Nov 2018 10:33:23 +0530 Subject: [PATCH 2/3] merge : kms --- .../list-pd/add-pd/add-pd.component.html | 545 +++++++++--------- .../user-profile/user-profile-component.html | 27 +- 2 files changed, 286 insertions(+), 286 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index 6e2e4dda6..58a8e09a6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -1,293 +1,290 @@ - -
+ + + + +
+ +
+
+
+ +
PD Details
+ +
+ + + + + {{LL.full_name}} + + + + + - -
- -
-
-
- -
PD Details
- -
- - - - - {{LL.full_name}} + + + Applicant ID Required + + + + + {{billL.billing_name}} - - - - - - - Applicant ID Required + + + + + Contact Person Required - - - {{billL.billing_name}} - - - - - - - Contact Person Required + + Contact Number Required + Enter Valid Mobile Number. + - - Contact Number Required - Enter Valid Mobile Number. - - - - - - {{PL.product_name}} - - - - - - - - - - {{SPL.subproduct_name}} - - - - - - - - - - {{CSL.customer_segment}} + + + {{PL.product_name}} - - - - - - {{PDL.type_name}} - - - - - + + - - - Enter valid amount. - - - - - - - - - - - - - - - - - - {{SL.state_name}} - - - - - - - - -` - {{CL.city_name}} + + + + {{SPL.subproduct_name}} - - - - - - - - - - Enter Valid Pincode. - - - - - - - -
-
-
-
-
-
- -
Main Applicant
- - + + + + + - - Name is Required. - - - - - - Enter Valid Mobile Number. - - - - - - - - - - -
-
-
-
- -
- - -
{{coDetails.controls.label.value}} {{i+1}}
- -
- - - - - - Enter Valid Mobile Number. - - - - - - - - - {{rel.name}} - + + + {{CSL.customer_segment}} + + + + + + + + {{PDL.type_name}} + + + + + + + + + + Enter valid amount. + + + + + + + + + + + + + + + + + + {{SL.state_name}} + + + + + + + + ` + {{CL.city_name}} + + + + + + + + + + + Enter Valid Pincode. + + + + - -
- - - -
-
-
-
-
-
- -
- -
Co-Applicant
- - - - - -
-
-
-
+ + +
+ +
+
+
+
+ +
Main Applicant
+ + + + + Name is Required. + + + + + + Enter Valid Mobile Number. + + + + + + + + + + +
+
+
+
+ +
+ + +
{{coDetails.controls.label.value}} {{i+1}}
+ +
+ + + + + + Enter Valid Mobile Number. + + + + + + + + + {{rel.name}} + + + + +
+ + + +
+
+
+
+
+
+ +
+ +
Co-Applicant
+ + + + + +
+
+
+
+ +
-
- - -
Document
- - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
-
+ +
Document
+ + + + + +
+
+ + + + + + + + +
+ - - - - - + + + +
+
+
+
+
+
+ +
+ + + + + + + + + + + +
+
- - - - - - - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html index 4b0fc9fb6..d65d984fd 100755 --- a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html +++ b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html @@ -12,29 +12,32 @@ -
-
+
+
-
+

{{userDetails.user_first_name}} {{userDetails.user_last_name}}

-

{{userDetails.role_name}}

-

{{userDetails.email}}

-

{{userDetails.mobile_no}}

+

{{userDetails.role_name}}

{{userDetails.city_name}} ,{{userDetails.state_name}}

-
- - +
- +
From ec5044bb9f8b812296d118882afd05a89eaac5bb Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Sat, 17 Nov 2018 10:33:52 +0530 Subject: [PATCH 3/3] assets , current loan details changes : kdk --- .../assets-info/assets-info.component.html | 402 ++++++++---------- .../assets-info/assets-info.component.ts | 47 +- .../client-info/client-info.component.ts | 131 +++--- .../current-loan/current-loan.component.html | 2 +- .../current-loan/current-loan.component.ts | 47 +- 5 files changed, 335 insertions(+), 294 deletions(-) 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 de33ba465..bd79a2d1b 100644 --- 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 @@ -1,70 +1,70 @@ - - - -

Assets Details

-
-
-
-
- - -
-
- - - {{ asset.name }} - - -
- -
- -
-
-
-
-
- - - {{ prop.name }} - - -
+ + + +

Assets Details

+ +
+
+
+ + +
+
+ + + {{ asset.name }} + + +
+ +
+ +
+
+
+
+
+ + + {{ prop.name }} + +
- -
-
-
-
-
- - - -
+
+ +
+
+
+
+
+ + +
- -
-
-
-
-
- - - -
+
+ +
+
+
+
+
+ + +
- + - -
-
-
-
-
+ +
+
+
+
+
+ + + +
+
+
+
+
+ +
+
+
+
+
+
+ + + {{ ins_type.name }} + + +
+
- + + +
+
+ + + {{ freqn.name }} +
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - {{ freqn.name }} - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
+
+
- + + +
+
+ +
@@ -176,100 +133,119 @@
- -
-
-
- - + +
+
+
+
+
+
+ + + {{ ins_type.name }} +
+
+ + + +
+
+ + + +
+
-
- +
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+ + + +
+
+
+
-
-
-
+
+
-
- - - - - - -
+
+ + + + + +
-
- +
+
- - - Yes - No + + + Yes + No - - -
+ +
-
+
-
+
-
-
-
- - +
+
+
+ -
- - - - -
-
- +
+ +
- -
- - - - -
- +
+ + + + +
+ - - - + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index a45cf8f6c..f111a2091 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -297,10 +297,10 @@ public m_investmentType = []; return this._formBuilder.group({ assets_mode: ['', Validators.compose([Validators.required])], details: this._formBuilder.array([]), - approximate_market_value: ['', Validators.compose([Validators.required])], - name_of_the_owner: ['', Validators.compose([Validators.required])], - purchase_year: ['', Validators.compose([Validators.required])], - purchase_month: ['', Validators.compose([Validators.required])], + approximate_market_value: ['', Validators.compose([])], + name_of_the_owner: ['', Validators.compose([])], + purchase_year: ['', Validators.compose([])], + purchase_month: ['', Validators.compose([])], emi: [''], emi_paid: [''], elapsed_tenure: [''], @@ -323,12 +323,12 @@ public m_investmentType = []; } case '2': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_Weeler()); + control.push(this.load_Four_Weeler()); break; } case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_Weeler()); + control.push(this.load_Two_Weeler()); break; } case '4': { @@ -371,7 +371,7 @@ public m_investmentType = []; loadJwellDescription() { return this._formBuilder.group({ - jwell_description: ['', Validators.compose([Validators.required])] + jwell_description: ['', Validators.compose([])] }); } @@ -405,9 +405,15 @@ public m_investmentType = []; }); } - load_Two_Four_Weeler() { + load_Four_Weeler() { return this._formBuilder.group({ - manufacturer_model: ['', Validators.compose([Validators.required])] + manufacturer_model_four_weeler: ['', Validators.compose([Validators.required])] + }); + } + + load_Two_Weeler() { + return this._formBuilder.group({ + manufacturer_model_two_weeler: ['', Validators.compose([Validators.required])] }); } @@ -455,21 +461,28 @@ public m_investmentType = []; }); } - load_Two_Four_WeelerWithData(data) { + load_Four_WeelerWithData(data) { return this._formBuilder.group({ - manufacturer_model: [data.manufacturer_model, Validators.compose([Validators.required])] + manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler, Validators.compose([Validators.required])] }); } + load_Two_WeelerWithData(data) { + return this._formBuilder.group({ + manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler, Validators.compose([Validators.required])] + }); + } + + initDetailsWithdata(data) { return this._formBuilder.group({ assets_mode: [data.assets_mode, Validators.compose([Validators.required])], details: this._formBuilder.array([]), - approximate_market_value: [data.approximate_market_value, Validators.compose([Validators.required])], - name_of_the_owner: [data.name_of_the_owner, Validators.compose([Validators.required])], - purchase_year: [data.purchase_year, Validators.compose([Validators.required])], - purchase_month: [data.purchase_month, Validators.compose([Validators.required])], + approximate_market_value: [data.approximate_market_value, Validators.compose([])], + name_of_the_owner: [data.name_of_the_owner, Validators.compose([])], + purchase_year: [data.purchase_year, Validators.compose([])], + purchase_month: [data.purchase_month, Validators.compose([])], emi: [data.emi || 0], emi_paid: [data.emi_paid || ''], elapsed_tenure: [data.elapsed_tenure || ''], @@ -519,12 +532,12 @@ public m_investmentType = []; } case '2': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_WeelerWithData(data)); + control.push(this.load_Four_WeelerWithData(data)); break; } case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_WeelerWithData(data)); + control.push(this.load_Two_WeelerWithData(data)); break; } case '4': { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts index 209045b4b..7d03785e4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -33,63 +33,98 @@ export class ClientInfoComponent implements OnInit { public _clientQuesFrom: FormGroup; public submitted = false; - public m_paymentModeType= [ - { - 'id': "1", - 'name': 'Immediate Or Advanced Payment' - }, - { - 'id': "2", - 'name': 'Credit' - }, - { - 'id': "3", - 'name': 'Combination of Both' - }, - ]; - public m_freqOfPurchase= [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] + public m_paymentModeType= []; + // public m_paymentModeType= [ + // { + // 'id': "1", + // 'name': 'Immediate Or Advanced Payment' + // }, + // { + // 'id': "2", + // 'name': 'Credit' + // }, + // { + // 'id': "3", + // 'name': 'Combination of Both' + // }, + // ]; + public m_freqOfPurchase= []; + // public m_freqOfPurchase= [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] constructor( private _formBuilder: FormBuilder, private pdTrigerService: PdTrigerService) { } ngOnInit() { + this.getM_FreqOfPurchase(); + this.getM_PaymentModeType(); this.getClientFormDetails(); } + + +// ================== + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PaymentModeType() { + this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe( + data => { + this.m_paymentModeType = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + +// ================== + apiLoadFinish: boolean = false; getClientFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '2').subscribe( 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 38d3c5061..ec2f92b62 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 @@ -3,7 +3,7 @@

Current Loan Details

- Yes No 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 a1a4b369b..0ba8ef7fe 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 @@ -21,7 +21,7 @@ import { } from '@angular/material'; /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; -import {ActivatedRoute, Router} from "@angular/router"; +import { ActivatedRoute, Router } from "@angular/router"; @Component({ selector: 'app-current-loan', @@ -35,8 +35,8 @@ export class CurrentLoanComponent implements OnInit { @Input() form_id: number; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, - private router: Router, - private _pd: PdTrigerService) { + private router: Router, + private _pd: PdTrigerService) { this.notifier = notifier; } @@ -49,18 +49,22 @@ export class CurrentLoanComponent implements OnInit { console.log('value', value); const control = this.currentLoanForm.controls['loan_details']; if (value.status == 200) { - var result = Object.keys(value.records.loan_details).map(function(key) { - return value.records.loan_details[key]; - }); + this.currentLoanForm.controls['existing_loan'].setValue(value.records.existing_loan); this.currentLoanForm.controls['currentloan_remarks'].setValue(value.records.currentloan_remarks); - if (result.length > 0) { - result.forEach(val => { - control.push(this.createLoanDetail()); + + if (value.records.existing_loan == 'Yes') { + var result = Object.keys(value.records.loan_details).map(function (key) { + return value.records.loan_details[key]; }); - this.currentLoanForm.controls['loan_details'].setValue(result); - } else { - control.push(this.createLoanDetail()); + if (result.length > 0) { + result.forEach(val => { + control.push(this.createLoanDetail()); + }); + this.currentLoanForm.controls['loan_details'].setValue(result); + } else { + control.push(this.createLoanDetail()); + } } } else { control.push(this.createLoanDetail()); @@ -74,6 +78,16 @@ export class CurrentLoanComponent implements OnInit { loan_details: this.fb.array([]), }); } + + selectedLoanChanges(e): void { + if (e.value == 'Yes') { + const control = this.currentLoanForm.controls['loan_details']; + control.push(this.createLoanDetail()); + } else if (e.value == 'No') { + const arr = this.currentLoanForm.controls.loan_details; + arr.removeAt(0); + } + } createLoanDetail() { return this.fb.group({ loan_amount: ['', Validators.compose([Validators.required])], @@ -94,7 +108,8 @@ export class CurrentLoanComponent implements OnInit { } submitCurrentloan() { if (!this.currentLoanForm.valid) { - return; + console.log("data invalid") + return; } let records: any = {}; records.pdid = this.pdid; @@ -102,7 +117,9 @@ export class CurrentLoanComponent implements OnInit { records.fk_createdby = this.pdid; records.existing_loan = this.currentLoanForm.controls['existing_loan'].value; records.currentloan_remarks = this.currentLoanForm.controls['currentloan_remarks'].value; - records.loan_details = this.currentLoanForm.controls['loan_details'].value; + if (records.existing_loan == 'Yes') { + records.loan_details = this.currentLoanForm.controls['loan_details'].value; + } console.log('data', records); this._pd.saveForm(records).subscribe(data => { console.log('data', data); @@ -115,7 +132,7 @@ export class CurrentLoanComponent implements OnInit { Object.keys(formGroup.controls).forEach(field => { const control = formGroup.get(field); if (control instanceof FormControl) { - control.markAsTouched({onlySelf: true}); + control.markAsTouched({ onlySelf: true }); } else if (control instanceof FormGroup) { this.validateAllFormFields(control); }