From deb9a48b865f4b03c1c15cd729e8aea6ee77c170 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 21 Dec 2018 15:04:25 +0530 Subject: [PATCH 01/21] general form changes --- .../forms/general-info/general-info.component.html | 13 ++++++++++++- .../forms/general-info/general-info.component.ts | 14 +++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html index 495143ec5..e9660370b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html @@ -35,8 +35,9 @@ {{relation.controls.applicant_name.value | titlecase}} + - + @@ -66,7 +67,17 @@ +
+ + +
+ +
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts index 6dd11f334..7f18d0981 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts @@ -127,7 +127,7 @@ export class GeneralInfoComponent implements OnInit { return this._fb.group({ pd_co_applicant_id: [elementValue.pd_co_applicant_id], applicant_name: [elementValue.applicant_name], - company_name: [elementValue.company_name], + company_name: [elementValue.company_name,], exist_status:[elementValue.exist_status==1 && elementValue.pd_co_applicant_id > 0 ? true : false] }); } @@ -192,6 +192,18 @@ export class GeneralInfoComponent implements OnInit { } } + // remove other details + removeOthers(index, item: any){ + console.log(item) + if(item.pd_co_applicant_id==0){ + let relationControl = this._generalForm.controls['applicant_relation']; + relationControl.removeAt(index); + // remove related to details + let pos_name=this.fetch_related_details.indexOf(item.applicant_name); + this.fetch_related_details.splice(pos_name, 1); + } + } + // submit form details submitGeneralForm(formData:any) { if (this._generalForm.invalid) { From 86902dfc639b0660dd703a50b5f69df965bbb4c0 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 21 Dec 2018 15:05:11 +0530 Subject: [PATCH 02/21] merge : kms --- .../client-info/client-info.component.html | 8 +- .../client-info/client-info.component.ts | 3 + .../family-details.component.html | 430 +++++++++++------- .../family-details.component.ts | 352 +++++++++++++- .../supplier-info.component.html | 7 +- .../supplier-info/supplier-info.component.ts | 4 +- .../list-pd/start-pd/start-pd.component.html | 6 +- 7 files changed, 636 insertions(+), 174 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index f1a738b42..aea09fcdc 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -200,4 +200,10 @@ - \ No newline at end of file + + +
+
{{ errorMessage }}
+
+ \ No newline at end of file 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 67ec1a524..1da10a7a3 100755 --- 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 @@ -101,6 +101,7 @@ export class ClientInfoComponent implements OnInit { }; noRecordsFound: Boolean = false; + errorMessage: any = ''; ngOnInit() { this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { @@ -135,10 +136,12 @@ export class ClientInfoComponent implements OnInit { }else { this.notifier.notify('warning', 'No Category Records Found.!'); this.noRecordsFound = false; + this.errorMessage = data.msg; } }, err => { this.notifier.notify('warning', 'No Category Records Found.!'); this.noRecordsFound = false; + this.errorMessage = 'No Records Found , Something went Wrong!'; }) // this.getM_FreqOfPurchase(); 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 f632b397b..56803b3fd 100755 --- 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 @@ -269,181 +269,277 @@ + - - \ No newline at end of file + +--> diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts index 93585e27d..5f32b8ba6 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts @@ -254,4 +254,354 @@ export class FamilyDetailsComponent implements OnInit { // } // } -} \ No newline at end of file +} + + + + + + + +// =================== other family details multiple add + +// import { +// Component, +// OnInit, +// Inject, +// Input, Output +// } from '@angular/core'; + +// import { +// FormBuilder, +// FormGroup, +// Validators, +// FormArray, FormControl, AbstractControl, +// } from '@angular/forms'; + +// import { NotifierService } from 'angular-notifier'; + +// import { +// MatDialog, +// MatDialogRef, +// MAT_DIALOG_DATA +// } from '@angular/material'; +// /** Service */ +// import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; +// import {ActivatedRoute, Router} from "@angular/router"; + +// @Component({ +// selector: 'app-family-details', +// templateUrl: './family-details.component.html', +// styleUrls: ['./family-details.component.scss'] +// }) +// export class FamilyDetailsComponent implements OnInit { +// //@Input() pdid: number; +// pageTitle: string ="Other Family Details"; +// pdid : string; +// form_id : number; + +// private notifier: NotifierService; +// public familyForm: FormGroup; +// public selectPerson; +// // selectPerson = [{ +// // name : 'person 1', +// // id : 111 +// // }, { +// // name : 'person 2', +// // id : 222 +// // }]; + +// earningStatus = [{ +// type: 'Earning', +// id: 1 +// }, { +// type: 'Non Earning', +// id: 2 +// }] + +// relationData: any = []; +// occupationData: any = []; +// //personMetData: any = []; +// ownerShipData: any = []; +// customerSegData: any = []; +// // earnMemberArrCount :any ; +// // nonEarnMemberArrCount :any ; +// count : number; +// constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, +// private router: Router, +// private _pd: PdTrigerService, +// @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { +// console.log(pd_all_details); +// this.selectPerson = this.pd_all_details.pdapplicants_detials; +// this.pdid = this.pd_all_details.pdmaster_details.pd_id; +// this.form_id = 6; +// this.notifier = notifier; +// } +// ngOnInit() { +// this.getMasterDetails('RELATIONSHIPS',1); +// this.getMasterDetails('OCCUPATIONMEMBERS',2); +// //this.getMasterDetails('PERSONSMET',3); +// this.getMasterDetails('RESIDENCEOWNERSHIP',4); +// this.getMasterDetails('CUSTOMERSEGMENT',5); +// this.initFamilyFormDetails(); +// let params: any = {}; +// params.pd_id = this.pdid; +// params.pd_form_id = '6'; +// this._pd.retriveForm(params).subscribe(data => { +// const control = this.familyForm.controls['nonEarningMembers']; +// const value = this.familyForm.controls['earningMembers']; +// if (data.status == 200) { +// this.initFamilyForm(data.records); +// // this.familyForm.controls.selected_person.setValue(data.records.selected_person); +// // this.familyForm.controls.residence_place.setValue(data.records.residence_place); +// // this.familyForm.controls.residence_city.setValue(data.records.residence_city); +// // this.familyForm.controls.residence_state.setValue(data.records.residence_state); +// // this.familyForm.controls.residence_pin.setValue(data.records.residence_pin); +// // this.familyForm.controls.residence_No_of_years.setValue(data.records.residence_No_of_years); +// // this.familyForm.controls.residence_ownership.setValue(data.records.residence_ownership); +// // this.familyForm.controls.ownershipOther.setValue(data.records.ownershipOther); +// // this.familyForm.controls.rent.setValue(data.records.rent); +// // this.familyForm.controls.total_number_of_family_members.setValue(data.records.total_number_of_family_members); +// // this.familyForm.controls.family_details_form_remark.setValue(data.records.family_details_form_remark); +// // this.generateFamilyMembersDetailsGetData(data.records.family_members_details); +// } else { +// // value.push(this.createMembers()); +// // control.push(this.createNonMembers()); +// } +// }); +// } + +// initgenerateFamilyMembersDetailsGet(val): FormGroup { +// return this.fb.group({ +// family_member_name : [val.family_member_name, Validators.compose([])], +// family_member_relationship : [val.family_member_relationship, Validators.compose([])], +// family_member_age : [val.family_member_age, Validators.compose([])], +// family_member_earning_status : [val.family_member_earning_status, Validators.compose([])], +// earning_segment: [val.earning_segment, Validators.compose([])], +// earning_gross_income_per_month: [val.earning_gross_income_per_month, Validators.compose([])], +// earning_name_of_the_employer_or_business: [val.earning_name_of_the_employer_or_business, Validators.compose([])], +// earning_number_of_years_in_employment_or_business: [val.earning_number_of_years_in_employment_or_business, Validators.compose([])], +// non_earning_occupation: [val.non_earning_occupation, Validators.compose([])], +// non_earning_if_others: [val.non_earning_if_others, Validators.compose([])], +// non_earning_if_retired_from: [val.non_earning_if_retired_from, Validators.compose([])], +// }) +// } + +// generateFamilyMembersDetailsGetData(data) { +// var result = Object.keys(data).map(function (key) { +// return data[key]; +// }); +// if (result.length > 0) { +// for (let val of result) { +// const control = this.familyForm.controls['family_members_details']; +// control.push(this.initgenerateFamilyMembersDetailsGet(val)); +// } +// } +// } + +// onSearchChange(e):void { +// e.preventDefault(); +// } +// public initFamilyFormDetails(): void { +// this.familyForm = this.fb.group({ +// family_details: this.fb.array([]), +// family_details_form_remark: [''] +// }) +// } + +// public noRecordsFound: Boolean = false; + +// public initFamilyForm(records): void { +// // let data = [...records]; +// let recordss = { +// "selected_person":"95", +// "residence_place":"check ", +// "residence_city":"check ", +// "residence_state":"check ", +// "residence_pin":"123456", +// "residence_No_of_years":"2", +// "residence_ownership":"1", +// "ownershipOther":"", +// "rent":"", +// "total_number_of_family_members":"2", +// "family_members_details":{ +// "1":{ +// "family_member_name":"name", +// "family_member_relationship":"1", +// "family_member_age":"21", +// "family_member_earning_status":"1", +// "earning_segment":"1", +// "earning_gross_income_per_month":"12000", +// "earning_name_of_the_employer_or_business":"check", +// "earning_number_of_years_in_employment_or_business":"2", +// "non_earning_occupation":"", +// "non_earning_if_others":"", +// "non_earning_if_retired_from":"" +// }, +// "2":{ +// "family_member_name":"chekc ", +// "family_member_relationship":"2", +// "family_member_age":"31", +// "family_member_earning_status":"2", +// "earning_segment":"", +// "earning_gross_income_per_month":"", +// "earning_name_of_the_employer_or_business":"", +// "earning_number_of_years_in_employment_or_business":"", +// "non_earning_occupation":"9", +// "non_earning_if_others":"others check ", +// "non_earning_if_retired_from":"" +// } +// }, +// "family_details_form_remark":"check remark" +// }; +// if(recordss === null) { +// this.fb.group({ +// selected_person: ['', Validators.compose([Validators.required])], +// residence_place: ['', Validators.compose([])], +// residence_city: ['', Validators.compose([])], +// residence_state: ['', Validators.compose([])], +// residence_pin: ['', Validators.compose([])], +// residence_No_of_years: ['', Validators.compose([])], +// residence_ownership: ['', Validators.compose([])], +// ownershipOther: [''], +// rent: [''], +// total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])], +// family_members_details: this.fb.array([this.addFamilyMemberDetails()]), +// }); +// } else { +// let formData: FormGroup = this.fb.group({ +// selected_person: ['1', Validators.compose([Validators.required])], +// residence_place: ['as', Validators.compose([])], +// residence_city: ['as', Validators.compose([])], +// residence_state: ['sa', Validators.compose([])], +// residence_pin: ['sa', Validators.compose([])], +// residence_No_of_years: ['sa', Validators.compose([])], +// residence_ownership: ['s', Validators.compose([])], +// ownershipOther: ['s'], +// rent: ['as'], +// total_number_of_family_members: ['1', Validators.compose([Validators.min(1), Validators.max(20)])], +// family_members_details: this.fb.array([]), +// }); + +// const control = this.familyForm.controls['family_details']; +// control.push(formData); +// console.log(this.familyForm.value); +// } +// this.noRecordsFound = true; +// } + +// addFamilyMemberDetails(): void { + +// } + +// addMoreApplicantFamilyDetails(e): void { +// e.stopPropagation(); +// this.initFamilyForm('chck'); +// } + +// getNumberOfFamilyMemberDetails(inx){ +// // alert(inx); +// let formData = this.familyForm.controls['family_details']['controls'][inx].controls; +// // alert(formData['total_number_of_family_members'].value); +// // alert(this.familyForm.controls.total_number_of_family_members.valid); +// if(formData['total_number_of_family_members'].valid){ +// let totalMem = formData['total_number_of_family_members'].value; +// const control = this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details; +// if(totalMem > control.length) { +// let len = totalMem - control.length; +// for(let i = 0; i < len; i++){ +// control.push(this.generateFamilyMembersDetailsGet()); +// } +// } else if (totalMem < control.length) { +// // control.controls.slice(0, totalMem); +// control.controls = []; +// for(let i = 0; i < totalMem; i++){ +// control.push(this.generateFamilyMembersDetailsGet()); +// } +// } +// } else { + +// } +// } + +// generateFamilyMembersDetailsGet(): FormGroup { +// return this.fb.group({ +// family_member_name : ['', Validators.compose([])], +// family_member_relationship : ['', Validators.compose([])], +// family_member_age : ['', Validators.compose([])], +// family_member_earning_status : ['', Validators.compose([])], +// earning_segment: ['', Validators.compose([])], +// earning_gross_income_per_month: ['', Validators.compose([])], +// earning_name_of_the_employer_or_business: ['', Validators.compose([])], +// earning_number_of_years_in_employment_or_business: ['', Validators.compose([])], +// non_earning_occupation: ['', Validators.compose([])], +// non_earning_if_others: ['', Validators.compose([])], +// non_earning_if_retired_from: ['', Validators.compose([])], +// }) +// } + +// // get all master details +// getMasterDetails(table:string,type:number){ +// this._pd.getAllMasterDatas(table).subscribe( +// data => { +// if (data.status == 200) { +// if(type==1){ +// this.relationData=data.records.filter(item => item.isactive == 1); +// } +// else if(type==2){ +// this.occupationData=data.records.filter(item => item.isactive == 1); +// } +// // else if(type==3){ +// // this.personMetData=data.records.filter(item => item.isactive == 1); +// // } +// else if(type==4){ +// this.ownerShipData=data.records.filter(item => item.isactive == 1); +// } +// else if(type==5){ +// this.customerSegData=data.records.filter(item => item.isactive == 1); +// } + +// } +// }); +// } + +// submitFamily() { +// if (!this.familyForm.valid) { +// return; +// } +// var records = this.familyForm.value; +// //To Remove The "Null" With Key also +// Object.keys(records).forEach((key) => (records[key] == null) && delete records[key]); +// // records.other_family_details = answerFormValues; +// records.pdid = this.pdid; +// records.formid = '6'; +// // records.fk_createdby = '251'; +// console.log(JSON.stringify(records)); +// this._pd.saveForm(records).subscribe(data => { +// this.notifier.notify('success', 'Saved Successfully.'); +// }, error => { +// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); +// }); +// } +// // validateAllFormFields(formGroup: FormGroup) { +// // Object.keys(formGroup.controls).forEach(field => { +// // const control = formGroup.get(field); +// // if (control instanceof FormControl) { +// // control.markAsTouched({onlySelf: true}); +// // } else if (control instanceof FormGroup) { +// // this.validateAllFormFields(control); +// // } +// // }); +// // } + +// // /** On Key Press Event For Age */ +// // keyPress(event: any) { +// // const pattern = /[0-9]/; + +// // let inputChar = String.fromCharCode(event.charCode); +// // if (event.keyCode != 8 && !pattern.test(inputChar)) { +// // event.preventDefault(); +// // } +// // } + +// } \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index bea4ae748..b43043049 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -131,4 +131,9 @@ - \ No newline at end of file + +
+
{{ errorMessage }}
+
+ \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts index 0e9ab8f5b..9dad4a868 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts @@ -74,8 +74,8 @@ export class SupplierInfoComponent implements OnInit { }; noRecordsFound: Boolean = false; + errorMessage: any = ''; ngOnInit() { - this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { if(data.dataStatus){ // let datas = { @@ -100,10 +100,12 @@ export class SupplierInfoComponent implements OnInit { }else { this.notifier.notify('warning', 'No Category Records Found.!'); this.noRecordsFound = false; + this.errorMessage = data.msg; } }, err => { this.notifier.notify('warning', 'No Category Records Found.!'); this.noRecordsFound = false; + this.errorMessage = 'No Records Found , Something went Wrong!'; }) // this.getM_FreqOfPurchase(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 3c40f3481..7f6e2a2a5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -16,13 +16,13 @@
- - + +
{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}
- Q{{formButton.pd_form_order}} + {{quesIndex+1}}
From c82f0388905349f2061eaf24d53f65fa63f7df77 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 21 Dec 2018 15:26:28 +0530 Subject: [PATCH 03/21] change general form --- .../start-pd/forms/general-info/general-info.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html index e9660370b..25f21ceb7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html @@ -37,7 +37,7 @@ - + From e945a07cbf0d2c99e43afcb965007c5dde7684fe Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 21 Dec 2018 15:54:09 +0530 Subject: [PATCH 04/21] start pd border colr change --- .../manage-pd/list-pd/start-pd/start-pd.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss index 38778876d..ce04f2137 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.scss @@ -60,7 +60,7 @@ mat-card .child_mat_card > mat-card { transition: box-shadow 0.5s, transform 0.5s; &:hover { cursor: pointer; - background-color: #e00201 !important; + // background-color: #e00201 !important; transform: scale(1); box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); } From b499970aa9e859df46fd5c1917f4de5e5881deda Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 21 Dec 2018 16:46:26 +0530 Subject: [PATCH 05/21] small issues : ps --- .../assets-info/assets-info.component.html | 4 +- .../assets-info/assets-info.component.ts | 13 +- .../current-loan/current-loan.component.html | 2 +- .../current-loan/current-loan.component.ts | 6 +- .../financial-info.component.html | 2 +- .../start-pd/forms/stock/stock.component.html | 21 ++- .../start-pd/forms/stock/stock.component.ts | 151 ++++++++++-------- .../list-pd/view-pd/view-pd.component.html | 16 +- 8 files changed, 131 insertions(+), 84 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 0571707b9..5bc8d63e2 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 @@ -146,11 +146,11 @@
- +
- +
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 4304d3314..827c39105 100755 --- 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 @@ -31,6 +31,7 @@ export class AssetsInfoComponent implements OnInit { pageTitle: string ="Assets Details"; //@Input() pdid: number; pdid:string; + businessProfessionName :string; public _assetsQuesFrom: FormGroup; public submitted = false; @@ -198,7 +199,8 @@ public m_investmentType = []; ngOnInit() { this.getPdSupplierFormDetails(); - + this.getOwnerName(); + this.getM_Assets_Type(); this.getM_PropertyType(); this.getM_InvestmentType(); @@ -208,6 +210,11 @@ public m_investmentType = []; } // ====================== +getOwnerName(){ + this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { + this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; + }); +} getM_Assets_Type() { this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( @@ -361,7 +368,7 @@ public m_investmentType = []; business_assets_mode: ['', Validators.compose([Validators.required])], business_details: this._formBuilder.array([]), business_approximate_market_value: ['', Validators.compose([])], - business_name_of_the_owner: ['', Validators.compose([])], + business_name_of_the_owner: [this.businessProfessionName, Validators.compose([])], // other_owner:[''], // relation:[''], // purchase_year: ['', Validators.compose([])], @@ -556,7 +563,7 @@ public m_investmentType = []; loadInvestDescriptionWithData(data) { return this._formBuilder.group({ investments_type: [data.investments_type, Validators.compose([Validators.required])], - other_investment_type : [data.other_investment_type], + other_investments_type : [data.other_investments_type], amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])], bank_name: [data.bank_name, Validators.compose([Validators.required])] }); 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 6f215861d..b4154fdeb 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 @@ -46,7 +46,7 @@ {{freq.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 8a35d1bfc..d3a9f368e 100755 --- 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 @@ -103,7 +103,8 @@ export class CurrentLoanComponent implements OnInit { } } } else { - control.push(this.createLoanDetail()); + // console.log('overall else'); + // control.push(this.createLoanDetail()); } }) } @@ -116,10 +117,13 @@ export class CurrentLoanComponent implements OnInit { } selectedLoanChanges(e): void { + console.log(e); if (e.value == 'Yes') { + // console.log('if()'); const control = this.currentLoanForm.controls['loan_details']; control.push(this.createLoanDetail()); } else if (e.value == 'No') { + // console.log('else()'); const arr = this.currentLoanForm.controls.loan_details; arr.removeAt(0); } 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 6ee1a4bb7..0b90adbee 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 @@ -135,7 +135,7 @@ - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index ea0fce859..397353269 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -50,7 +50,7 @@ - + {{"₹"}} {{M_rawValueInWords}} Only (keyup)="inWords($event,1)" @@ -97,7 +97,7 @@ - + {{"₹"}} {{M_goodsValueInWords}} Only (keyup)="inWords($event,2)" @@ -145,7 +145,7 @@ - + {{"₹"}} {{M_tradedGoodsValueInWords}} Only(keyup)="inWords($event,3)" @@ -205,7 +205,7 @@ - + {{"₹"}} {{R_goodsValueInWords}} Only(keyup)="inWords($event,4)" @@ -254,7 +254,7 @@ - + {{"₹"}} {{R_tradedGoodsValueInWords}} Only(keyup)="inWords($event,5)" @@ -315,7 +315,7 @@ - + {{"₹"}} {{T_goodsValueInWords}} Only(keyup)="inWords($event,6)" @@ -365,7 +365,7 @@ - + {{"₹"}} {{T_tradedGoodsValueInWords}} Only (keyup)="inWords($event,7)" @@ -399,6 +399,13 @@
+ + + +

Service Provider

+
+
Service Provider Details Not applicable here !!
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 9eff1689c..6c83ae348 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -40,14 +40,23 @@ export class StockComponent implements OnInit { public uomData : any = []; rawmaterial : any; - goodsValueInWords : any; - rawValueInWords : any; - tradedGoodsValueInWords : any; + + M_rawValueInWords : any; + + M_goodsValueInWords : any; + R_goodsValueInWords : any; + T_goodsValueInWords : any; + + M_tradedGoodsValueInWords : any; + R_tradedGoodsValueInWords : any; + T_tradedGoodsValueInWords : any; + rawMaterialAccess: boolean; finishedGoodsAccess: boolean; tradeConcernAccess: boolean; public submitted = false; noRecordsFound: Boolean = false; + serviceProviderForm: Boolean = false; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -85,37 +94,27 @@ export class StockComponent implements OnInit { // this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!'); // }) - this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { - // if(data.dataStatus === undefined){ - let datas = { - "profession_name": "Others", - "type_of_activity": [ - { - "type_of_activity_id": 1, - "name": "Manufacturing Details" - }, - { - "type_of_activity_id": 2, - "name": "Retail trading" - }, - { - "type_of_activity_id": 3, - "name": "Trading Concern" - }, - { - "type_of_activity_id": 4, - "name": "Service Provider" - } - ] - }; - this.initstockForms(datas.type_of_activity); - // }else { - // this.notifier.notify('warning', 'No Category Records Found.!'); - // this.noRecordsFound = false; - // } + //this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe( + this._pd.stockFormAccess({pd_id:this.pdid}).subscribe(data => { + + if(data.dataStatus == true){ + let datas = data.records; + if(datas.type_of_activity != undefined){ + this.initstockForms(datas.type_of_activity) + } + else{ + this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!'); + } + }else if(data.dataStatus == false) + { + this.notifier.notify('warning', data.msg); + return; + } + else{ + return; + } }, err => { - - this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!'); + this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!'); this.noRecordsFound = false; }) @@ -133,7 +132,7 @@ export class StockComponent implements OnInit { let dataForm = value.records; if(dataForm !== undefined) { - console.log('dtaForm',dataForm); + this.stockForms = this.fb.group({ pdid: [this.pdid], formid: [this.form_id], @@ -142,7 +141,12 @@ export class StockComponent implements OnInit { retail_details : this.fb.array([this.retailFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id === 1); + + let arr0 = Object.keys(record).map(function (key) { + return record[key]; + }); + let arr = record.filter(data => data.type_of_activity_id == 1); + if(arr.length > 0) { let retail_finished_goods; let manufacturing_raw_materials; @@ -175,7 +179,7 @@ export class StockComponent implements OnInit { manufacturing_temparr['manufacturing_traded_goods'] = manufacturing_traded_goods;manufacturing_temparr['manufacturing_finished_goods'] = manufacturing_finished_goods;manufacturing_temparr['manufacturing_raw_materials'] = manufacturing_raw_materials; this.initManufacturingDetails(manufacturing_temparr); } - let arr1 = record.filter(data => data.type_of_activity_id === 2); + let arr1 = record.filter(data => data.type_of_activity_id == 2); if(arr1.length > 0) { let retail_finished_goods; let retail_traded_goods; @@ -199,7 +203,7 @@ export class StockComponent implements OnInit { retail_temparr['retail_finished_goods'] = retail_finished_goods; this.initRetailDetails(retail_temparr); } - let arr2 = record.filter(data => data.type_of_activity_id === 3); + let arr2 = record.filter(data => data.type_of_activity_id == 3); if(arr2.length > 0) { let trading_finished_goods; let trading_traded_goods; @@ -223,10 +227,14 @@ export class StockComponent implements OnInit { trading_temparr['trading_traded_goods'] = trading_traded_goods; this.initTradingDetails(trading_temparr); } + let arr3 = record.filter(data => data.type_of_activity_id == 4); + if(arr3.length > 0) { + this.serviceProviderForm = true; + } this.noRecordsFound = true; } else{ - console.log('dataForm',dataForm); + // console.log('dataForm',dataForm); this.stockForms = this.fb.group({ pdid: [this.pdid], formid: [this.form_id], @@ -235,21 +243,21 @@ export class StockComponent implements OnInit { retail_details : this.fb.array([this.retailFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id === 1); + let arr = record.filter(data => data.type_of_activity_id == 1); if(arr.length > 0) { this.initManufacturingDetails(null); } - let arr1 = record.filter(data => data.type_of_activity_id === 2); + let arr1 = record.filter(data => data.type_of_activity_id == 2); if(arr1.length > 0) { this.initRetailDetails(null); } - let arr2 = record.filter(data => data.type_of_activity_id === 3); + let arr2 = record.filter(data => data.type_of_activity_id == 3); if(arr2.length > 0) { this.initTradingDetails(null); } - let arr3 = record.filter(data => data.type_of_activity_id === 4); + let arr3 = record.filter(data => data.type_of_activity_id == 4); if(arr3.length > 0) { - //this.serviceProviderForm = true; + this.serviceProviderForm = true; } this.noRecordsFound = true; } @@ -263,21 +271,21 @@ export class StockComponent implements OnInit { retail_details : this.fb.array([this.retailFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id === 1); + let arr = record.filter(data => data.type_of_activity_id == 1); if(arr.length > 0) { this.initManufacturingDetails(null); } - let arr1 = record.filter(data => data.type_of_activity_id === 2); + let arr1 = record.filter(data => data.type_of_activity_id == 2); if(arr1.length > 0) { this.initRetailDetails(null); } - let arr2 = record.filter(data => data.type_of_activity_id === 3); + let arr2 = record.filter(data => data.type_of_activity_id == 3); if(arr2.length > 0) { this.initTradingDetails(null); } - let arr3 = record.filter(data => data.type_of_activity_id === 4); + let arr3 = record.filter(data => data.type_of_activity_id == 4); if(arr3.length > 0) { - //this.serviceProviderForm = true; + this.serviceProviderForm = true; } this.noRecordsFound = true; } @@ -292,8 +300,8 @@ export class StockComponent implements OnInit { } manufacturingForm: Boolean = false; - manufacturingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id === 1); + manufacturingFormCreation(record) { + let arr = record.filter(data => data.type_of_activity_id == 1); if (arr.length > 0) { this.manufacturingForm = true; return this.fb.group({ @@ -309,7 +317,8 @@ export class StockComponent implements OnInit { retailForm: Boolean = false; retailFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id === 2); + + let arr = val.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { this.retailForm = true; return this.fb.group({ @@ -324,7 +333,7 @@ export class StockComponent implements OnInit { tradingForm: Boolean = false; tradingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id === 3); + let arr = val.filter(data => data.type_of_activity_id == 3); if (arr.length > 0) { this.tradingForm = true; return this.fb.group({ @@ -350,32 +359,32 @@ export class StockComponent implements OnInit { const control = this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials']; if(datas === null){ - console.log(299,'if'); + // console.log(299,'if'); // rawMaterial.push(this.createRawmaterial(null)); // finishedGoods.push(this.createGoods(null)); // tradedGoods.push(this.createTradedGoods(null)); } else { - console.log(305,'else') + // console.log(305,'else') for (let val of datas.manufacturing_raw_materials) { - console.log(val); + // console.log(val); rawMaterial.push(this.createRawmaterial(val)); } for (let val of datas.manufacturing_finished_goods) { - console.log(val); + // console.log(val); finishedGoods.push(this.createGoods(val)); } for (let val of datas.manufacturing_traded_goods) { - console.log(val); + // console.log(val); tradedGoods.push(this.createTradedGoods(val)); } - console.log(310,rawMaterial); + // console.log(310,rawMaterial); } } @@ -439,13 +448,13 @@ export class StockComponent implements OnInit { } else { for (let val of datas.retail_finished_goods) { - console.log(val); + // console.log(val); finishedGoods.push(this.createGoods(val)); } for (let val of datas.retail_traded_goods) { - console.log(val); + // console.log(val); tradedGoods.push(this.createTradedGoods(val)); } @@ -521,13 +530,13 @@ export class StockComponent implements OnInit { // } for (let val of datas.trading_finished_goods) { - console.log(val); + // console.log(val); finishedGoods.push(this.createGoods(val)); } for (let val of datas.trading_traded_goods) { - console.log(val); + // console.log(val); tradedGoods.push(this.createTradedGoods(val)); } @@ -751,13 +760,25 @@ export class StockComponent implements OnInit { inWords(e,flag:number){ switch(flag){ case 1 : - this.rawValueInWords = this._pd.convertNumberToWords(e.target.value); + this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value); break; case 2 : - this.goodsValueInWords = this._pd.convertNumberToWords(e.target.value); + this.M_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); break; case 3 : - this.tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); + this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 4 : + this.R_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 5 : + this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 6 : + this.T_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 7 : + this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); break; default: break; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 8697b5004..f690e1625 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -82,10 +82,18 @@

- -  {{applicant.applicant_name}}     - -  {{applicant.mobile_no}}
Main Applicant + +  {{applicant.applicant_name}} +     + + +  {{applicant.mobile_no}} +     + + +  {{applicant.landline}} + +
Main Applicant {{applicant.relation_name}}

From 3660a9890750fb9d2c9afa32f9f4fe0a6d9d0de1 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 21 Dec 2018 16:47:49 +0530 Subject: [PATCH 06/21] issue : ps --- ng6-seed/src/app/settings/service/entity/entity.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ng6-seed/src/app/settings/service/entity/entity.service.ts b/ng6-seed/src/app/settings/service/entity/entity.service.ts index 1a859a99f..ffd8d6557 100755 --- a/ng6-seed/src/app/settings/service/entity/entity.service.ts +++ b/ng6-seed/src/app/settings/service/entity/entity.service.ts @@ -7,6 +7,10 @@ import 'rxjs/add/operator/map'; /** Imported Service Files Are., */ import { AwsService } from '../../../AwsService/aws.service'; + +/** Environment */ +import { environment } from '../../../../environments/environment'; + /** Consant Value For Created Date And Updated Date */ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); @@ -20,7 +24,8 @@ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); * Kdk */ export class EntityService { - private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; + + private apiUrl = environment.apiEndpoint; private serviceUrl = 'https://jsonplaceholder.typicode.com/users'; constructor(private _http: HttpClient, From 064077e38b42ac4937039eccdbaebaccc1b8313f Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 21 Dec 2018 17:27:08 +0530 Subject: [PATCH 07/21] issues: ps --- .../src/app/settings/service/entity/entity.service.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ng6-seed/src/app/settings/service/entity/entity.service.ts b/ng6-seed/src/app/settings/service/entity/entity.service.ts index 3adb41f8b..8fb6020ae 100755 --- a/ng6-seed/src/app/settings/service/entity/entity.service.ts +++ b/ng6-seed/src/app/settings/service/entity/entity.service.ts @@ -12,13 +12,9 @@ import { environment } from 'environments/environment'; /** Imported Service Files Are., */ import { AwsService } from '../../../AwsService/aws.service'; -/** Environment */ -import { environment } from '../../../../environments/environment'; - /** Consant Value For Created Date And Updated Date */ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); - @Injectable({ providedIn: 'root' }) @@ -28,10 +24,7 @@ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); * Kdk */ export class EntityService { -<<<<<<< HEAD - -======= ->>>>>>> e945a07cbf0d2c99e43afcb965007c5dde7684fe + private apiUrl = environment.apiEndpoint; private serviceUrl = 'https://jsonplaceholder.typicode.com/users'; From b4f1ece0633efc98fa02a09ea9ef1cb0938251ce Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 21 Dec 2018 17:31:56 +0530 Subject: [PATCH 08/21] UI Changes --- .../forms/address/address.component.html | 95 +++++++++++-------- .../business-info.component.html | 20 ++-- .../loan-details/loan-details.component.html | 40 +++++--- .../supplier-info.component.html | 24 ++--- 4 files changed, 107 insertions(+), 72 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 78a36ac59..6f2bfb35d 100755 --- 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 @@ -19,26 +19,29 @@ - - +
+
+ + - - +
+
+ {{m_addressType.address_type}} - - + - - +
+
+ {{m_locality.locality_name}} @@ -46,27 +49,65 @@ - + - - +
+ + +
+
+
+ {{data.description}} - - +
+
+ {{data.rating}} +
+
+ + + + {{ownerShip.name}} + + + + + + + + + + + +
+
+
+
+ + + Yes + No + + + +
+
- - - - {{ownerShip.name}} - - - - - - - - - - - - - - - Yes - No - - + + - - - {{list.name}} - - +
- + +
+ - +
+ + +
+
+ Yes No +
+ +
+ +
- + {{"₹"}} {{balTxrfAmtInWords}} Only - + Yes No - + {{ btLen.lender_name }} - + - + {{"₹"}} {{topUpAmtInWords}} Only
- + {{"₹"}} {{ownContributionInWords}} Only - + {{ sour.name }} @@ -102,7 +118,7 @@
- + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index bea4ae748..9b4adab9e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -17,26 +17,26 @@
Raw Material #{{l+1}}
- + - + - +
- + - + {{ pm.name }} - +
@@ -70,26 +70,26 @@
Trading Product #{{l+1}}
- + - + - +
- + - + {{ pm.name }} - +
From 15caf265b15f29f7588fa322f99649e2eaed92ca Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 21 Dec 2018 18:33:34 +0530 Subject: [PATCH 09/21] std code changes in neighbour hood --- .../edit-pd-applicant/edit-pd-applicant.component.ts | 2 +- .../forms/neighbour-hood/neighbour-hood.component.html | 10 +++++++--- .../forms/neighbour-hood/neighbour-hood.component.ts | 10 +++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts index 0cceec89d..247b93d73 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts @@ -43,6 +43,7 @@ export class EditPdApplicantComponent implements OnInit { fk_applicant_primary_id: [null], applicant_name: [null, Validators.compose([Validators.required])], mobile_no: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])], + stdcode: [null, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])], landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])], company_name: [null], applicant_type: [1], @@ -54,7 +55,6 @@ export class EditPdApplicantComponent implements OnInit { loadApplicantFormData() { let stdcodesearch = this.mainApplicantData[0].landline.search("-"); let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch); - console.log(stdcode); let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8); this._EditApplicantForm = this._fb.group({ fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html index e8da740ae..d137527b2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html @@ -57,11 +57,15 @@ - + Enter Valid Mobile Number. - + + + Enter Valid STD Code. + - + Enter Valid Landline Number. @@ -77,7 +81,7 @@ - +

Period of Relationship

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 9919dd140..ce94b7288 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 @@ -16,7 +16,7 @@ export class NeighbourHoodComponent implements OnInit { form_id:number; private notifier: NotifierService; check_type:any=[{'id':0,'type_name':'Neighbourhood'},{'id':1,'type_name':'Reference Check'}] - default_reference_details: any= {'reference_name':'','mobile':'','landline':'','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':''}; + default_reference_details: any= {'reference_name':'','mobile':'','landline':'-','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':''}; default_neighbourhood_details: any= {'neighbourhood_name':'','do_know':'','how_long_do_know':'','is_applicant_owner':''}; busineesRelationshipList:any=[]; @@ -128,10 +128,14 @@ export class NeighbourHoodComponent implements OnInit { // create reference check form array createReerenceCheck(elementValue:any){ + let stdcodesearch = elementValue.landline.search("-"); + let stdcode = elementValue.landline.substr(0,stdcodesearch); + let landline = elementValue.landline.substr(+stdcodesearch + 1,8); return this._fb.group({ reference_name: [elementValue.reference_name, Validators.required], mobile: [elementValue.mobile,Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(10)])], - landline: [elementValue.landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])], + std_code: [stdcode,Validators.compose([Validators.minLength(2),Validators.maxLength(4)])], + landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])], location:[elementValue.location,Validators.required], relationship_with:[elementValue.relationship_with,Validators.required], others: [elementValue.others], @@ -217,7 +221,7 @@ export class NeighbourHoodComponent implements OnInit { referencecheck_list.push({ "reference_name":element.reference_name, "mobile":element.mobile, - "landline":element.landline, + "landline":element.std_code+'-'+element.landline, "location":element.location, "relationship_with":element.relationship_with, "others":element.others, From 551690e1f20cbfa00aec02202e7110b7d6211b56 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 21 Dec 2018 18:34:22 +0530 Subject: [PATCH 10/21] merge : kms --- .../forms/address/address.component.html | 95 ++++++----- .../assets-info/assets-info.component.html | 4 +- .../assets-info/assets-info.component.ts | 13 +- .../business-info.component.html | 20 +-- .../current-loan/current-loan.component.html | 2 +- .../current-loan/current-loan.component.ts | 6 +- .../financial-info.component.html | 2 +- .../loan-details/loan-details.component.html | 40 +++-- .../start-pd/forms/stock/stock.component.html | 21 ++- .../start-pd/forms/stock/stock.component.ts | 151 ++++++++++-------- .../supplier-info.component.html | 24 +-- .../list-pd/view-pd/view-pd.component.html | 16 +- .../settings/service/entity/entity.service.ts | 3 +- 13 files changed, 240 insertions(+), 157 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 78a36ac59..6f2bfb35d 100755 --- 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 @@ -19,26 +19,29 @@ - - +
+
+ + - - +
+
+ {{m_addressType.address_type}} - - + - - +
+
+ {{m_locality.locality_name}} @@ -46,27 +49,65 @@ - + - - +
+ + +
+
+
+ {{data.description}} - - +
+
+ {{data.rating}} +
+
+ + + + {{ownerShip.name}} + + + + + + + + + + + +
+
+
+
+ + + Yes + No + + + +
+
- - - - {{ownerShip.name}} - - - - - - - - - - - - - - - Yes - No - - + + +
- +
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 4304d3314..827c39105 100755 --- 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 @@ -31,6 +31,7 @@ export class AssetsInfoComponent implements OnInit { pageTitle: string ="Assets Details"; //@Input() pdid: number; pdid:string; + businessProfessionName :string; public _assetsQuesFrom: FormGroup; public submitted = false; @@ -198,7 +199,8 @@ public m_investmentType = []; ngOnInit() { this.getPdSupplierFormDetails(); - + this.getOwnerName(); + this.getM_Assets_Type(); this.getM_PropertyType(); this.getM_InvestmentType(); @@ -208,6 +210,11 @@ public m_investmentType = []; } // ====================== +getOwnerName(){ + this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { + this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; + }); +} getM_Assets_Type() { this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( @@ -361,7 +368,7 @@ public m_investmentType = []; business_assets_mode: ['', Validators.compose([Validators.required])], business_details: this._formBuilder.array([]), business_approximate_market_value: ['', Validators.compose([])], - business_name_of_the_owner: ['', Validators.compose([])], + business_name_of_the_owner: [this.businessProfessionName, Validators.compose([])], // other_owner:[''], // relation:[''], // purchase_year: ['', Validators.compose([])], @@ -556,7 +563,7 @@ public m_investmentType = []; loadInvestDescriptionWithData(data) { return this._formBuilder.group({ investments_type: [data.investments_type, Validators.compose([Validators.required])], - other_investment_type : [data.other_investment_type], + other_investments_type : [data.other_investments_type], amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])], bank_name: [data.bank_name, Validators.compose([Validators.required])] }); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index afaceb53b..f25950d8d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -33,8 +33,7 @@ -
-
+ @@ -44,6 +43,12 @@ + + + {{list.name}} + +
- - - {{list.name}} - - +
- + +
+ - +
+ + +
+
+ Yes No +
+ +
+ +
- + {{"₹"}} {{balTxrfAmtInWords}} Only - + Yes No - + {{ btLen.lender_name }} - + - + {{"₹"}} {{topUpAmtInWords}} Only
- + {{"₹"}} {{ownContributionInWords}} Only - + {{ sour.name }} @@ -102,7 +118,7 @@
- + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index ea0fce859..397353269 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -50,7 +50,7 @@ - + {{"₹"}} {{M_rawValueInWords}} Only (keyup)="inWords($event,1)" @@ -97,7 +97,7 @@ - + {{"₹"}} {{M_goodsValueInWords}} Only (keyup)="inWords($event,2)" @@ -145,7 +145,7 @@ - + {{"₹"}} {{M_tradedGoodsValueInWords}} Only(keyup)="inWords($event,3)" @@ -205,7 +205,7 @@ - + {{"₹"}} {{R_goodsValueInWords}} Only(keyup)="inWords($event,4)" @@ -254,7 +254,7 @@ - + {{"₹"}} {{R_tradedGoodsValueInWords}} Only(keyup)="inWords($event,5)" @@ -315,7 +315,7 @@ - + {{"₹"}} {{T_goodsValueInWords}} Only(keyup)="inWords($event,6)" @@ -365,7 +365,7 @@ - + {{"₹"}} {{T_tradedGoodsValueInWords}} Only (keyup)="inWords($event,7)" @@ -399,6 +399,13 @@
+ + + +

Service Provider

+
+
Service Provider Details Not applicable here !!
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 9eff1689c..6c83ae348 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -40,14 +40,23 @@ export class StockComponent implements OnInit { public uomData : any = []; rawmaterial : any; - goodsValueInWords : any; - rawValueInWords : any; - tradedGoodsValueInWords : any; + + M_rawValueInWords : any; + + M_goodsValueInWords : any; + R_goodsValueInWords : any; + T_goodsValueInWords : any; + + M_tradedGoodsValueInWords : any; + R_tradedGoodsValueInWords : any; + T_tradedGoodsValueInWords : any; + rawMaterialAccess: boolean; finishedGoodsAccess: boolean; tradeConcernAccess: boolean; public submitted = false; noRecordsFound: Boolean = false; + serviceProviderForm: Boolean = false; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -85,37 +94,27 @@ export class StockComponent implements OnInit { // this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!'); // }) - this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { - // if(data.dataStatus === undefined){ - let datas = { - "profession_name": "Others", - "type_of_activity": [ - { - "type_of_activity_id": 1, - "name": "Manufacturing Details" - }, - { - "type_of_activity_id": 2, - "name": "Retail trading" - }, - { - "type_of_activity_id": 3, - "name": "Trading Concern" - }, - { - "type_of_activity_id": 4, - "name": "Service Provider" - } - ] - }; - this.initstockForms(datas.type_of_activity); - // }else { - // this.notifier.notify('warning', 'No Category Records Found.!'); - // this.noRecordsFound = false; - // } + //this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe( + this._pd.stockFormAccess({pd_id:this.pdid}).subscribe(data => { + + if(data.dataStatus == true){ + let datas = data.records; + if(datas.type_of_activity != undefined){ + this.initstockForms(datas.type_of_activity) + } + else{ + this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!'); + } + }else if(data.dataStatus == false) + { + this.notifier.notify('warning', data.msg); + return; + } + else{ + return; + } }, err => { - - this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!'); + this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!'); this.noRecordsFound = false; }) @@ -133,7 +132,7 @@ export class StockComponent implements OnInit { let dataForm = value.records; if(dataForm !== undefined) { - console.log('dtaForm',dataForm); + this.stockForms = this.fb.group({ pdid: [this.pdid], formid: [this.form_id], @@ -142,7 +141,12 @@ export class StockComponent implements OnInit { retail_details : this.fb.array([this.retailFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id === 1); + + let arr0 = Object.keys(record).map(function (key) { + return record[key]; + }); + let arr = record.filter(data => data.type_of_activity_id == 1); + if(arr.length > 0) { let retail_finished_goods; let manufacturing_raw_materials; @@ -175,7 +179,7 @@ export class StockComponent implements OnInit { manufacturing_temparr['manufacturing_traded_goods'] = manufacturing_traded_goods;manufacturing_temparr['manufacturing_finished_goods'] = manufacturing_finished_goods;manufacturing_temparr['manufacturing_raw_materials'] = manufacturing_raw_materials; this.initManufacturingDetails(manufacturing_temparr); } - let arr1 = record.filter(data => data.type_of_activity_id === 2); + let arr1 = record.filter(data => data.type_of_activity_id == 2); if(arr1.length > 0) { let retail_finished_goods; let retail_traded_goods; @@ -199,7 +203,7 @@ export class StockComponent implements OnInit { retail_temparr['retail_finished_goods'] = retail_finished_goods; this.initRetailDetails(retail_temparr); } - let arr2 = record.filter(data => data.type_of_activity_id === 3); + let arr2 = record.filter(data => data.type_of_activity_id == 3); if(arr2.length > 0) { let trading_finished_goods; let trading_traded_goods; @@ -223,10 +227,14 @@ export class StockComponent implements OnInit { trading_temparr['trading_traded_goods'] = trading_traded_goods; this.initTradingDetails(trading_temparr); } + let arr3 = record.filter(data => data.type_of_activity_id == 4); + if(arr3.length > 0) { + this.serviceProviderForm = true; + } this.noRecordsFound = true; } else{ - console.log('dataForm',dataForm); + // console.log('dataForm',dataForm); this.stockForms = this.fb.group({ pdid: [this.pdid], formid: [this.form_id], @@ -235,21 +243,21 @@ export class StockComponent implements OnInit { retail_details : this.fb.array([this.retailFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id === 1); + let arr = record.filter(data => data.type_of_activity_id == 1); if(arr.length > 0) { this.initManufacturingDetails(null); } - let arr1 = record.filter(data => data.type_of_activity_id === 2); + let arr1 = record.filter(data => data.type_of_activity_id == 2); if(arr1.length > 0) { this.initRetailDetails(null); } - let arr2 = record.filter(data => data.type_of_activity_id === 3); + let arr2 = record.filter(data => data.type_of_activity_id == 3); if(arr2.length > 0) { this.initTradingDetails(null); } - let arr3 = record.filter(data => data.type_of_activity_id === 4); + let arr3 = record.filter(data => data.type_of_activity_id == 4); if(arr3.length > 0) { - //this.serviceProviderForm = true; + this.serviceProviderForm = true; } this.noRecordsFound = true; } @@ -263,21 +271,21 @@ export class StockComponent implements OnInit { retail_details : this.fb.array([this.retailFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id === 1); + let arr = record.filter(data => data.type_of_activity_id == 1); if(arr.length > 0) { this.initManufacturingDetails(null); } - let arr1 = record.filter(data => data.type_of_activity_id === 2); + let arr1 = record.filter(data => data.type_of_activity_id == 2); if(arr1.length > 0) { this.initRetailDetails(null); } - let arr2 = record.filter(data => data.type_of_activity_id === 3); + let arr2 = record.filter(data => data.type_of_activity_id == 3); if(arr2.length > 0) { this.initTradingDetails(null); } - let arr3 = record.filter(data => data.type_of_activity_id === 4); + let arr3 = record.filter(data => data.type_of_activity_id == 4); if(arr3.length > 0) { - //this.serviceProviderForm = true; + this.serviceProviderForm = true; } this.noRecordsFound = true; } @@ -292,8 +300,8 @@ export class StockComponent implements OnInit { } manufacturingForm: Boolean = false; - manufacturingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id === 1); + manufacturingFormCreation(record) { + let arr = record.filter(data => data.type_of_activity_id == 1); if (arr.length > 0) { this.manufacturingForm = true; return this.fb.group({ @@ -309,7 +317,8 @@ export class StockComponent implements OnInit { retailForm: Boolean = false; retailFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id === 2); + + let arr = val.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { this.retailForm = true; return this.fb.group({ @@ -324,7 +333,7 @@ export class StockComponent implements OnInit { tradingForm: Boolean = false; tradingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id === 3); + let arr = val.filter(data => data.type_of_activity_id == 3); if (arr.length > 0) { this.tradingForm = true; return this.fb.group({ @@ -350,32 +359,32 @@ export class StockComponent implements OnInit { const control = this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials']; if(datas === null){ - console.log(299,'if'); + // console.log(299,'if'); // rawMaterial.push(this.createRawmaterial(null)); // finishedGoods.push(this.createGoods(null)); // tradedGoods.push(this.createTradedGoods(null)); } else { - console.log(305,'else') + // console.log(305,'else') for (let val of datas.manufacturing_raw_materials) { - console.log(val); + // console.log(val); rawMaterial.push(this.createRawmaterial(val)); } for (let val of datas.manufacturing_finished_goods) { - console.log(val); + // console.log(val); finishedGoods.push(this.createGoods(val)); } for (let val of datas.manufacturing_traded_goods) { - console.log(val); + // console.log(val); tradedGoods.push(this.createTradedGoods(val)); } - console.log(310,rawMaterial); + // console.log(310,rawMaterial); } } @@ -439,13 +448,13 @@ export class StockComponent implements OnInit { } else { for (let val of datas.retail_finished_goods) { - console.log(val); + // console.log(val); finishedGoods.push(this.createGoods(val)); } for (let val of datas.retail_traded_goods) { - console.log(val); + // console.log(val); tradedGoods.push(this.createTradedGoods(val)); } @@ -521,13 +530,13 @@ export class StockComponent implements OnInit { // } for (let val of datas.trading_finished_goods) { - console.log(val); + // console.log(val); finishedGoods.push(this.createGoods(val)); } for (let val of datas.trading_traded_goods) { - console.log(val); + // console.log(val); tradedGoods.push(this.createTradedGoods(val)); } @@ -751,13 +760,25 @@ export class StockComponent implements OnInit { inWords(e,flag:number){ switch(flag){ case 1 : - this.rawValueInWords = this._pd.convertNumberToWords(e.target.value); + this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value); break; case 2 : - this.goodsValueInWords = this._pd.convertNumberToWords(e.target.value); + this.M_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); break; case 3 : - this.tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); + this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 4 : + this.R_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 5 : + this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 6 : + this.T_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); + break; + case 7 : + this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); break; default: break; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index b43043049..982ab5fdf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -17,26 +17,26 @@
Raw Material #{{l+1}}
- + - + - +
- + - + {{ pm.name }} - +
@@ -70,26 +70,26 @@
Trading Product #{{l+1}}
- + - + - +
- + - + {{ pm.name }} - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 3c7d65a08..8c26e9ebf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -82,10 +82,18 @@

- -  {{applicant.applicant_name}}     - -  {{applicant.mobile_no}}
Main Applicant + +  {{applicant.applicant_name}} +     + + +  {{applicant.mobile_no}} +     + + +  {{applicant.landline}} + +
Main Applicant {{applicant.relation_name}}

diff --git a/ng6-seed/src/app/settings/service/entity/entity.service.ts b/ng6-seed/src/app/settings/service/entity/entity.service.ts index d40a3639e..8fb6020ae 100755 --- a/ng6-seed/src/app/settings/service/entity/entity.service.ts +++ b/ng6-seed/src/app/settings/service/entity/entity.service.ts @@ -11,10 +11,10 @@ import { environment } from 'environments/environment'; /** Imported Service Files Are., */ import { AwsService } from '../../../AwsService/aws.service'; + /** Consant Value For Created Date And Updated Date */ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); - @Injectable({ providedIn: 'root' }) @@ -24,6 +24,7 @@ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); * Kdk */ export class EntityService { + private apiUrl = environment.apiEndpoint; private serviceUrl = 'https://jsonplaceholder.typicode.com/users'; From a4c7e9665602c04c78bb80f1ebc6ceb541c12f71 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 21 Dec 2018 22:21:18 +0530 Subject: [PATCH 11/21] Issues Fixes : ps --- .../forms/address/address.component.html | 18 +++-- .../forms/address/address.component.ts | 53 ++++++++------ .../assets-info/assets-info.component.html | 36 ++++++++-- .../assets-info/assets-info.component.ts | 69 ++++++++++++------- .../start-pd/forms/stock/stock.component.html | 28 ++++---- .../start-pd/forms/stock/stock.component.ts | 34 +++++++-- 6 files changed, 165 insertions(+), 73 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 78a36ac59..b609e9e9a 100755 --- 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 @@ -101,7 +101,17 @@ No
- + + +
+ + + + + + + +
-

Type of Premises

-
+ +
{{at.address_type}}
@@ -162,7 +172,7 @@ formControlName="premises_remarks" style="width: 65%;" autocomplete="off">
- + @@ -329,7 +329,7 @@
- + {{ asset.name }} @@ -504,6 +504,30 @@ + + + + {{owner.applicant_name}} + + + +
+ + + +
+
+ + + + {{relations.name}} + + + +
@@ -511,12 +535,12 @@ Yes No - NAN + NA - - + + 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 827c39105..b4d11a7e7 100755 --- 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 @@ -197,10 +197,12 @@ public m_investmentType = []; }; ngOnInit() { + + this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { + this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; + }); this.getPdSupplierFormDetails(); - this.getOwnerName(); - this.getM_Assets_Type(); this.getM_PropertyType(); this.getM_InvestmentType(); @@ -210,11 +212,7 @@ public m_investmentType = []; } // ====================== -getOwnerName(){ - this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { - this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; - }); -} + getM_Assets_Type() { this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( @@ -329,7 +327,7 @@ getOwnerName(){ this.initDetails(), ]), business_assets_details : this._formBuilder.array([ - this.initBusinessDetails(), + this.initBusinessDetails(this.businessProfessionName), ]), assets_form_remark:[''] }); @@ -363,12 +361,12 @@ getOwnerName(){ }); } - initBusinessDetails() { + initBusinessDetails(data) { return this._formBuilder.group({ business_assets_mode: ['', Validators.compose([Validators.required])], business_details: this._formBuilder.array([]), business_approximate_market_value: ['', Validators.compose([])], - business_name_of_the_owner: [this.businessProfessionName, Validators.compose([])], + business_name_of_the_owner: [data], // other_owner:[''], // relation:[''], // purchase_year: ['', Validators.compose([])], @@ -441,9 +439,14 @@ getOwnerName(){ break; } case '8': { - const control = (flag == 1) ? (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray - : (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('details') as FormArray ; - control.push(this.otherAssetsDescription()); + if(flag == 1){ + const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray ; + control.push(this.otherAssetsDescription()); + } + else if (flag == 2){ + const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ; + control.push(this.otherBusinessAssetsDescription()); + } break; } default: { @@ -473,6 +476,19 @@ getOwnerName(){ } otherAssetsDescription() { + return this._formBuilder.group({ + any_other_assets: ['', Validators.compose([Validators.required])], + name_of_the_owner:[''], + other_owner:[''], + relation:[''], + any_other_asset_value : [''], + any_other_asset_loan : [''], + other_asset_emi_amt : [''] + + }); + } + + otherBusinessAssetsDescription() { return this._formBuilder.group({ any_other_assets: ['', Validators.compose([Validators.required])], any_other_asset_value : [''], @@ -522,13 +538,6 @@ getOwnerName(){ }); } - loadPropertyWithData2(data) { - return this._formBuilder.group({ - property_type: [data.property_type, Validators.compose([Validators.required])] - //property_type:[''] - }); - } - loadJwellDescriptionWithData(data) { return this._formBuilder.group({ jwell_description: [data.jwell_description, Validators.compose([Validators.required])] @@ -544,12 +553,26 @@ getOwnerName(){ otherAssetsDescriptionWithData(data) { return this._formBuilder.group({ any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], + name_of_the_owner:[data.name_of_the_owner], + other_owner:[data.other_owner], + relation:[data.relation], any_other_asset_value : [data.any_other_asset_value], any_other_asset_loan : [data.any_other_asset_loan], other_asset_emi_amt : [data.other_asset_emi_amt] }); } + otherBusinessAssetsDescriptionWithData(data) { + return this._formBuilder.group({ + any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], + any_other_asset_value : [data.any_other_asset_value], + any_other_asset_loan : [data.any_other_asset_loan], + other_asset_emi_amt : [data.other_asset_emi_amt] + }); + } + + + loadInsuranceDescriptionWithData(data) { return this._formBuilder.group({ //insurance_type: [data.insurance_type, Validators.compose([Validators.required])], @@ -748,7 +771,7 @@ getOwnerName(){ switch (assets_details_mode) { case '1': { const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ; - control.push(this.loadPropertyWithData2(data)); + control.push(this.loadPropertyWithData(data)); break; } case '2': { @@ -781,7 +804,7 @@ getOwnerName(){ } case '8': { const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ; - control.push(this.otherAssetsDescriptionWithData(data)); + control.push(this.otherBusinessAssetsDescriptionWithData(data)); break; } default: { @@ -798,7 +821,7 @@ getOwnerName(){ control.push(this.initDetails()); }else if(flag == 2){ const control = this._assetsQuesFrom.controls['business_assets_details']; - control.push(this.initBusinessDetails()); + control.push(this.initBusinessDetails(this.businessProfessionName)); } } removeLanguage(i: number,flag) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index 397353269..184df23a6 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -49,8 +49,8 @@ - - {{"₹"}} {{M_rawValueInWords}} Only (keyup)="inWords($event,1)" + + {{"₹"}} {{M_rawValueInWords}} Only @@ -96,8 +96,8 @@ - - {{"₹"}} {{M_goodsValueInWords}} Only (keyup)="inWords($event,2)" + + {{"₹"}} {{M_goodsValueInWords}} Only @@ -144,8 +144,8 @@ - - {{"₹"}} {{M_tradedGoodsValueInWords}} Only(keyup)="inWords($event,3)" + + {{"₹"}} {{M_tradedGoodsValueInWords}} Only @@ -204,8 +204,8 @@ - - {{"₹"}} {{R_goodsValueInWords}} Only(keyup)="inWords($event,4)" + + {{"₹"}} {{R_goodsValueInWords}} Only @@ -253,8 +253,8 @@ - - {{"₹"}} {{R_tradedGoodsValueInWords}} Only(keyup)="inWords($event,5)" + + {{"₹"}} {{R_tradedGoodsValueInWords}} Only @@ -314,8 +314,8 @@ - - {{"₹"}} {{T_goodsValueInWords}} Only(keyup)="inWords($event,6)" + + {{"₹"}} {{T_goodsValueInWords}} Only @@ -364,8 +364,8 @@ - - {{"₹"}} {{T_tradedGoodsValueInWords}} Only (keyup)="inWords($event,7)" + + {{"₹"}} {{T_tradedGoodsValueInWords}} Only diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 6c83ae348..d220137bd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -122,7 +122,7 @@ export class StockComponent implements OnInit { } public initstockForms(record){ - +console.log(record); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; @@ -301,8 +301,11 @@ export class StockComponent implements OnInit { manufacturingForm: Boolean = false; manufacturingFormCreation(record) { + console.log(record); let arr = record.filter(data => data.type_of_activity_id == 1); + console.log(arr); if (arr.length > 0) { + console.log(arr.length); this.manufacturingForm = true; return this.fb.group({ manufacturing_raw_materials: this.fb.array([]), @@ -368,19 +371,26 @@ export class StockComponent implements OnInit { // console.log(305,'else') for (let val of datas.manufacturing_raw_materials) { // console.log(val); - + if(val.raw_value){ + this.M_rawValueInWords = this._pd.convertNumberToWords(val.raw_value); + } rawMaterial.push(this.createRawmaterial(val)); + } for (let val of datas.manufacturing_finished_goods) { // console.log(val); - + if(val.goods_value){ + this.M_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); + } finishedGoods.push(this.createGoods(val)); } for (let val of datas.manufacturing_traded_goods) { // console.log(val); - + if(val.estimated_traded_goods_value){ + this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); + } tradedGoods.push(this.createTradedGoods(val)); } @@ -449,12 +459,18 @@ export class StockComponent implements OnInit { for (let val of datas.retail_finished_goods) { // console.log(val); - + + if(val.goods_value){ + this.R_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); + } finishedGoods.push(this.createGoods(val)); } for (let val of datas.retail_traded_goods) { // console.log(val); + if(val.estimated_traded_goods_value){ + this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); + } tradedGoods.push(this.createTradedGoods(val)); } @@ -531,12 +547,17 @@ export class StockComponent implements OnInit { for (let val of datas.trading_finished_goods) { // console.log(val); - + if(val.goods_value){ + this.T_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); + } finishedGoods.push(this.createGoods(val)); } for (let val of datas.trading_traded_goods) { // console.log(val); + if(val.estimated_traded_goods_value){ + this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); + } tradedGoods.push(this.createTradedGoods(val)); } @@ -758,6 +779,7 @@ export class StockComponent implements OnInit { /** To Convert Amount into Words */ inWords(e,flag:number){ + switch(flag){ case 1 : this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value); From 826d0e9c22a0f08760c618edb2278f77eb035501 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 22 Dec 2018 12:48:30 +0530 Subject: [PATCH 12/21] UI changes --- .../client-info/client-info.component.html | 32 +++++++++---------- .../employment-info.component.html | 22 +++++++------ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index aea09fcdc..1ba1c7b45 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -17,7 +17,7 @@
Raw Material #{{l+1}}
- + {{ pm.name }} @@ -25,23 +25,23 @@ - + - +
- + - + {{ pm.name }} - +
@@ -75,7 +75,7 @@
Trading Product #{{l+1}}
- + {{ pm.name }} @@ -83,23 +83,23 @@ - + - +
- + - + {{ pm.name }} - +
@@ -142,18 +142,18 @@ - + - +
- + - + {{ pm.name }} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 5aba83c46..ecfd75fbf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -74,32 +74,34 @@

Salary Details

- - + +

+
+ - + - + - + - + {{ fd.name }} - + Fixed @@ -107,10 +109,10 @@ Others - + - + Yes @@ -119,6 +121,8 @@ +
+
From 11ed4e195c7e7edb2242ff8d5b8ae6b174723d64 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 22 Dec 2018 12:57:47 +0530 Subject: [PATCH 13/21] issues : ps --- .../start-pd/forms/assets-info/assets-info.component.html | 4 ++-- .../start-pd/forms/loan-details/loan-details.component.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 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 bf4cb7d53..62516d7cb 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 @@ -539,8 +539,8 @@
- - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 0b227700e..f0405408d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -378,10 +378,10 @@ getM_sourceofamount() { } submitLoanDetails() { console.log('formData', this.loanDetailsForm.value); - if (!this.loanDetailsForm.valid) { - //this.notifier.notify('warning', 'Form Invaild Check all requried Field .!'); - return; - } + // if (!this.loanDetailsForm.valid) { + // //this.notifier.notify('warning', 'Form Invaild Check all requried Field .!'); + // return; + // } let records: any = {}; records.pdid = this.pdid; records.formid = this.form_id; From 43898682c6d99ad90e69beef241fb03cea107a53 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 13:06:39 +0530 Subject: [PATCH 14/21] start pd complete button changes --- .../list-pd/start-pd/start-pd.component.html | 7 +- .../list-pd/start-pd/start-pd.component.ts | 517 +----------------- 2 files changed, 14 insertions(+), 510 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 7f6e2a2a5..5972e04b9 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -24,12 +24,11 @@
{{quesIndex+1}}
-
- + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index d1a7e83ec..70d19e4b3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -40,141 +40,10 @@ export class StartPdComponent implements OnInit, OnDestroy { selectedCategory: any = []; categoryList: any = []; pdMasterList: any = []; - optionsForm: FormGroup; - checkBoxForm: FormGroup; - textBoxForm: FormGroup; - next: number; - previous: number; - selectedCategoryIndex: number; - selectedQuestionIndex: number; - getQuestionsLength: number; - answerList: any = []; - ansPDList: any = []; - relationDetails: any = [1]; - rentalDetail: any = { form_id: "16", form_name: "Rental Information", isAnswered: true} -// errorMessage:any; -// selectedCategory:any=[]; -// categoryList: any=[]; -// pdMasterList: any=[]; -// optionsForm: FormGroup; -// checkBoxForm:FormGroup; -// textBoxForm:FormGroup; -// next:number; -// previous:number; -// selectedCategoryIndex:number; -// selectedQuestionIndex:number; -// getQuestionsLength:number; -// answerList:any=[]; -// ansPDList:any=[]; - - -// category static form buttons - // categoryFormButtons: any = [ - // { - // "form_id": 1, - // "form_name": "Supplier Details" - // }, - // { - // "form_id": 2, - // "form_name": "Client Details", - // }, - // { - // "form_id": 3, - // "form_name": "Personal Details", - // }, - // { - // "form_id":4, - // "form_name":"Asset Details", - // }, - // { - // "form_id": 5, - // "form_name": "Address" - // }, - // { - // "form_id": 6, - // "form_name": "Family", - // }, - // { - // "form_id": 7, - // "form_name": "Banking", - // }, - // { - // "form_id": 8, - // "form_name": "Current Loan", - // }, - // { - // "form_id": 9, - // "form_name": "Other Income", - // }, - // { - // "form_id": 10, - // "form_name": "Loan Details", - // }, - // { - // "form_id": 11, - // "form_name": "Stock", - // }, - // { - // "form_id": 12, - // "form_name": "Employmet Info", - // }, - // { - // "form_id": 13, - // "form_name": "Business Info", - // }, - // { - // "form_id": 14, - // "form_name": "Financial Info", - // }, - // ]; - -pdFullDetails:any=[]; + pdFullDetails:any=[]; // category static form buttons categoryFormButtons: any; - // = [ - // { - // "form_id": 1, - // "form_name": "Supplier Details" - // }, - // { - // "form_id": 2, - // "form_name": "Client Details", - // }, - // { - // "form_id": 3, - // "form_name": "Personal Details", - // }, - // { - // "form_id":4, - // "form_name":"Asset Details", - // }, - // { - // "form_id": 5, - // "form_name": "Address" - // }, - // { - // "form_id": 6, - // "form_name": "Family", - // }, - // { - // "form_id": 7, - // "form_name": "Banking", - // }, - // { - // "form_id": 8, - // "form_name": "Current Loan", - // }, - // { - // "form_id": 9, - // "form_name": "Other Income", - // }, - // { - // "form_id": 10, - // "form_name": "Loan Details", - // }, - - // ]; formsCategoryEnable: boolean = false; selectedFormsCategory: any; // create values for status check @@ -190,15 +59,8 @@ pdFullDetails:any=[]; currentPDStatus: string; actualQuestions: number; answeredQuestions: number; - - - - // start - - // end private notifier: NotifierService; - constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private listPDComponent: ListPdComponent, private _pd: PdTrigerService,) { @@ -221,8 +83,6 @@ pdFullDetails:any=[]; } this.loadTemplates(this.startPD); - this.next = 1; - this.previous = 2; } // start @@ -237,93 +97,23 @@ pdFullDetails:any=[]; return bool; } -// load pd template details - -// loadTemplates(startID: string) { -// this._pd.loadPDTemplates(startID).subscribe( -// data => { -// if (data.status == 200) { -// this.pdMasterList = data.records.pdmaster_details; -// this.categoryList = data.records.question_answers; -// let filterApplicantName = data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); -// this.mainApplicantName = filterApplicantName[0].applicant_name; -// this.currentPDStatus = data.records.pdmaster_details.pd_status; -// -// this.actualQuestions = data.records.counts.overall_question_count; -// this.answeredQuestions = data.records.counts.overall_answered_count; -// -// } -// else { -// this.pdMasterList = ""; -// this.mainApplicantName = ""; -// this.categoryList = []; -// this.currentPDStatus = ""; -// } -// }, error => this.errorMessage = error); -// } -// loadTemplates(startID: string) { -// this._pd.loadPDTemplates(startID).subscribe( -// data => { -// if (data.status == 200) { -// this.pdMasterList = data.records.pdmaster_details; -// this.categoryList = data.records.question_answers; -// // this.categoryFormButtons = data.records.template_forms; -// let filterApplicantName = data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); -// this.mainApplicantName = filterApplicantName[0].applicant_name; -// this.currentPDStatus = data.records.pdmaster_details.pd_status; -// -// this.actualQuestions = data.records.counts.overall_question_count; -// this.answeredQuestions = data.records.counts.overall_answered_count; -// -// this.pdFullDetails = data.records -// } -// else { -// this.pdMasterList = ""; -// this.mainApplicantName = ""; -// this.categoryList = []; -// this.currentPDStatus = ""; -// } -// }, error => this.errorMessage = error); -// } - - ngOnDestroy(): void { - this.listPDComponent.showListView(true); - } - - isOver(): boolean { return window.matchMedia(`(max-width: 960px)`).matches; } - OnSelectDirectQuestions(selectedQuestions: any, categoryIndex: number, questionsIndex: number) { - this.formsCategoryEnable = false; - this.selectedCategory = selectedQuestions; - this.selectedCategoryIndex = categoryIndex; - this.selectedQuestionIndex = questionsIndex; - - let serachQuestions = { - "question_id": selectedQuestions.fk_question_id, - "pd_id": this.startPD, - "template_id": selectedQuestions.fk_template_id, - "category_id": selectedQuestions.fk_template_question_category_id - } - this.getAnswers(serachQuestions); - } - loadTemplates(startID:string){ this._pd.loadPDTemplates(startID).subscribe( data => { if (data.status == 200) { this.pdMasterList=data.records.pdmaster_details; - this.categoryList=data.records.question_answers; - this.categoryFormButtons = data.records.template_forms; + // this.categoryList=data.records.question_answers; let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName[0].applicant_name; this.currentPDStatus = data.records.pdmaster_details.pd_status; - - this.actualQuestions = data.records.counts.overall_question_count; - this.answeredQuestions = data.records.counts.overall_answered_count; - + this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]); + this.actualQuestions = this.categoryFormButtons.length; + let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered==true); + this.answeredQuestions = getAnsweredFormsCount.length; this.pdFullDetails = data.records @@ -339,292 +129,7 @@ pdFullDetails:any=[]; }); } - // load question based answer list - getAnswers(serachList: any) { - this.answerList = []; - this._pd.getAnswersForPD(serachList).subscribe( - data => { - if (data.status == 200) { - this.answerList = data.records.answers; - this.ansPDList = data.records; - this.actualQuestions = data.records.counts.overall_question_count, - this.answeredQuestions = data.records.counts.overall_answered_count - - // this for options type questions - if (this.selectedCategory.fk_question_answertype == 1) { - this.loadOtionsForm(this.selectedCategory, this.answerList); - } - //this for text box type questions - else if (this.selectedCategory.fk_question_answertype == 2) { - - this.loadTextBoxForm(this.selectedCategory, this.answerList); - } -//this for check box type questions - else if (this.selectedCategory.fk_question_answertype == 3) { - - this.loadCheckBoxForm(this.selectedCategory, this.answerList); - } - } - }, error => this.errorMessage = error); - - - } - - // load check box form - - loadCheckBoxForm(selectedCategory: any, ansItem: any) { - // create checkbox group - let checkboxGroup = new FormArray(ansItem.map(item => new FormGroup({ - fk_pd_id: new FormControl(this.startPD), - pd_detail_answer_id: new FormControl(item.pd_detail_answer_id), - pd_answer_id: new FormControl(item.question_answer_id), - pd_answer: new FormControl(item.answer), - pd_answer_weightage: new FormControl(item.template_answer_weightage), - checkbox: new FormControl(item.isactive == null ? false : true) - }))); - // create documents group - let documentsGroup = new FormArray(this.ansPDList.images.map(item => new FormGroup({ - pd_document_title: new FormControl(item.pd_document_title), - pd_document_url: new FormControl(item.pd_document_name), - - }))); - - // create a hidden reuired formControl to keep status of checkbox group - let hiddenControl = new FormControl(this.mapItems(checkboxGroup.value), Validators.required); - // update checkbox group's value to hidden formcontrol - checkboxGroup.valueChanges.subscribe((v) => { - hiddenControl.setValue(this.mapItems(v)); - }); - - - this.checkBoxForm = new FormGroup({ - pd_detail_id: new FormControl(this.ansPDList.pd_detail_id), - fk_pd_id: new FormControl(this.startPD), - fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id), - fk_question_id: new FormControl(this.selectedCategory.fk_question_id), - pd_question: new FormControl(this.selectedCategory.question), - pd_question_weightage: new FormControl(this.selectedCategory.question_weightage), - pd_answer_remark: new FormControl(this.ansPDList.question_remark), - items: checkboxGroup, - selectedItems: hiddenControl, - documents: documentsGroup - }); - } - - // map options form group values - mapItems(items) { - let selectedItems = items.filter((item) => item.checkbox).map((item) => item); - return selectedItems.length ? selectedItems : null; - } - - // load Options form - loadOtionsForm(selectedCategory: any, ansItem: any) { - // create options type group - let optionsGroup = new FormArray(ansItem.map(item => new FormGroup({ - fk_pd_id: new FormControl(this.startPD), - pd_detail_answer_id: new FormControl(item.pd_detail_answer_id), - pd_answer_id: new FormControl(item.question_answer_id), - pd_answer: new FormControl(item.answer), - pd_answer_weightage: new FormControl(item.template_answer_weightage), - options: new FormControl(item.isactive == null ? false : true) - }))); - - // create documents group - let documentsGroup = new FormArray(this.ansPDList.images.map(item => new FormGroup({ - pd_document_title: new FormControl(item.pd_document_title), - pd_document_url: new FormControl(item.pd_document_name), - - }))); - - // create a hidden reuired formControl to keep status of checkbox group - let hiddenControl = new FormControl(this.optionsMapItems(optionsGroup.value), Validators.required); - let checkedItem = hiddenControl.value != null ? new FormControl(hiddenControl.value[0].pd_answer_id) : new FormControl(null); - - this.optionsForm = new FormGroup({ - pd_detail_id: new FormControl(this.ansPDList.pd_detail_id), - fk_pd_id: new FormControl(this.startPD), - fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id), - fk_question_id: new FormControl(this.selectedCategory.fk_question_id), - pd_question: new FormControl(this.selectedCategory.question), - pd_question_weightage: new FormControl(this.selectedCategory.question_weightage), - pd_answer_remark: new FormControl(this.ansPDList.question_remark), - items: optionsGroup, - selectedItems: hiddenControl, - modelValue: checkedItem, - documents: documentsGroup - - }); - this.optionsForm.controls.modelValue.valueChanges.subscribe((v) => { - hiddenControl.setValue(this.updateOptionsMapItems(v, optionsGroup.value)); - }); - - } - -// map option type group values - optionsMapItems(items) { - - let optionSelectedItems = items.filter((item) => item.options == true).map((item) => item); - return optionSelectedItems.length ? optionSelectedItems : null; - } - - // map options type while change options - updateOptionsMapItems(key, items) { - - let updateSelectedItems = items.filter((item) => item.pd_answer_id == key).map((item) => item); - return updateSelectedItems.length ? updateSelectedItems : null; - } - - // load text box form - loadTextBoxForm(selectedCategory: any, ansItem: any) { - // create text box type group - let textGroup = new FormArray(ansItem.map(item => new FormGroup({ - fk_pd_id: new FormControl(this.startPD), - pd_detail_answer_id: new FormControl(item.pd_detail_answer_id), - pd_answer_id: new FormControl(item.question_answer_id), - pd_answer: new FormControl(item.pd_answer), - pd_answer_weightage: new FormControl(item.template_answer_weightage), - text: new FormControl(item.pd_detail_answer_id == null ? false : true) - }))); - - // create documents group - let documentsGroup = new FormArray(this.ansPDList.images.map(item => new FormGroup({ - pd_document_title: new FormControl(item.pd_document_title), - pd_document_url: new FormControl(item.pd_document_name), - - }))); - - this.textBoxForm = new FormGroup({ - pd_detail_id: new FormControl(this.ansPDList.pd_detail_id), - fk_pd_id: new FormControl(this.startPD), - fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id), - fk_question_id: new FormControl(this.selectedCategory.fk_question_id), - pd_question: new FormControl(this.selectedCategory.question), - pd_question_weightage: new FormControl(this.selectedCategory.question_weightage), - pd_answer_remark: new FormControl(this.ansPDList.question_remark), - items: textGroup, - documents: documentsGroup - }); - } - - // next save and previous save for options and check box type questions - saveNextPrevious(details: any, type: number) { - - let fetchAns = []; - details.selectedItems.value.forEach((itemElement, itemIndex) => { - let obj1 = { - fk_pd_detail_id: details.pd_detail_id.value, - fk_pd_id: itemElement.fk_pd_id, - pd_detail_answer_id: itemElement.pd_detail_answer_id, - pd_answer_id: itemElement.pd_answer_id, - pd_answer: itemElement.pd_answer, - pd_answer_weightage: itemElement.pd_answer_weightage, - } - fetchAns.push(obj1) - }); - - let pd_details: any = [{ - "pd_detail_id": details.pd_detail_id.value, - "fk_pd_id": details.fk_pd_id.value, - "fk_category_id": details.fk_category_id.value, - "fk_question_id": details.fk_question_id.value, - "pd_question": details.pd_question.value, - "pd_question_weightage": details.pd_question_weightage.value, - "question_remark": details.pd_answer_remark.value, - "answers": fetchAns, - "images": [] - }]; - this._pd.savePDQuestions(pd_details).subscribe(result => { - if (result.status == 200) { - if (type == 1) { - this.skipNextPrevious(this.next); - } - else { - this.skipNextPrevious(this.previous); - } - } - }, error => { - }); - } - - // next save and previous save for text type questions - saveNextPreviousText(details: any, type: number) { - let fetchAns = []; - details.items.value.forEach((itemElement, itemIndex) => { - let obj1 = { - fk_pd_detail_id: details.pd_detail_id.value, - fk_pd_id: itemElement.fk_pd_id, - pd_detail_answer_id: itemElement.pd_detail_answer_id, - pd_answer_id: itemElement.pd_answer_id, - pd_answer: itemElement.pd_answer, - pd_answer_weightage: itemElement.pd_answer_weightage, - } - fetchAns.push(obj1) - }); - let pd_details: any = [{ - "pd_detail_id": details.pd_detail_id.value, - "fk_pd_id": details.fk_pd_id.value, - "fk_category_id": details.fk_category_id.value, - "fk_question_id": details.fk_question_id.value, - "pd_question": details.pd_question.value, - "pd_question_weightage": details.pd_question_weightage.value, - "question_remark": details.pd_answer_remark.value, - "answers": fetchAns, - "images": [] - }]; - this._pd.savePDQuestions(pd_details).subscribe(result => { - if (result.status == 200) { - if (type == 1) { - this.skipNextPrevious(this.next); - } - else { - this.skipNextPrevious(this.previous); - } - } - }, error => { - }); - } - - // skip to previous and next questions - - skipNextPrevious(type: number) { - // for skip to next - if (type == 1) { - if (this.categoryList.length > this.selectedCategoryIndex) { - let nextCatList = this.categoryList[this.selectedCategoryIndex]; - this.selectedQuestionIndex = this.selectedQuestionIndex < nextCatList.questions.length - 1 ? this.selectedQuestionIndex + 1 : this.selectedQuestionIndex; - let nextQuesList = nextCatList.questions[this.selectedQuestionIndex]; - this.selectedCategory = nextQuesList; - this.selectedCategoryIndex = this.selectedCategoryIndex; - this.selectedQuestionIndex = this.selectedQuestionIndex; - let serachQuestions = { - "question_id": nextQuesList.fk_question_id, - "pd_id": this.startPD, - "template_id": nextQuesList.fk_template_id, - "category_id": nextQuesList.fk_template_question_category_id - } - this.getAnswers(serachQuestions); - } - } - // for skip to previous - else if (type == 2) { - if (this.categoryList.length > this.selectedCategoryIndex) { - let preCatList = this.categoryList[this.selectedCategoryIndex]; - this.selectedQuestionIndex = this.selectedQuestionIndex == 0 ? this.selectedQuestionIndex : this.selectedQuestionIndex - 1; - let preQuesList = preCatList.questions[this.selectedQuestionIndex]; - this.selectedCategory = preQuesList; - this.selectedCategoryIndex = this.selectedCategoryIndex; - this.selectedQuestionIndex = this.selectedQuestionIndex; - let serachQuestions = { - "question_id": preQuesList.fk_question_id, - "pd_id": this.startPD, - "template_id": preQuesList.fk_template_id, - "category_id": preQuesList.fk_template_question_category_id - } - this.getAnswers(serachQuestions); - } - - } - } + //change pd status changePDStatus(status: string) { @@ -916,12 +421,12 @@ pdFullDetails:any=[]; } - + ngOnDestroy(): void { + this.listPDComponent.showListView(true); + } // load pd view component loadPdViewCompoent() { this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route}); } - - -// end + } From 72464e220f04325a6d19112690e23006e78ba0c4 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 13:07:30 +0530 Subject: [PATCH 15/21] merge : kms --- .../assets-info/assets-info.component.html | 4 +-- .../client-info/client-info.component.html | 32 +++++++++---------- .../employment-info.component.html | 22 +++++++------ .../loan-details/loan-details.component.ts | 8 ++--- 4 files changed, 35 insertions(+), 31 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 bf4cb7d53..62516d7cb 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 @@ -539,8 +539,8 @@ - - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index aea09fcdc..1ba1c7b45 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -17,7 +17,7 @@
Raw Material #{{l+1}}
- + {{ pm.name }} @@ -25,23 +25,23 @@ - + - +
- + - + {{ pm.name }} - +
@@ -75,7 +75,7 @@
Trading Product #{{l+1}}
- + {{ pm.name }} @@ -83,23 +83,23 @@ - + - +
- + - + {{ pm.name }} - +
@@ -142,18 +142,18 @@ - + - +
- + - + {{ pm.name }} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 5aba83c46..ecfd75fbf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -74,32 +74,34 @@

Salary Details

- - + +

+
+ - + - + - + - + {{ fd.name }} - + Fixed @@ -107,10 +109,10 @@ Others - + - + Yes @@ -119,6 +121,8 @@ +
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 0b227700e..f0405408d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -378,10 +378,10 @@ getM_sourceofamount() { } submitLoanDetails() { console.log('formData', this.loanDetailsForm.value); - if (!this.loanDetailsForm.valid) { - //this.notifier.notify('warning', 'Form Invaild Check all requried Field .!'); - return; - } + // if (!this.loanDetailsForm.valid) { + // //this.notifier.notify('warning', 'Form Invaild Check all requried Field .!'); + // return; + // } let records: any = {}; records.pdid = this.pdid; records.formid = this.form_id; From 893fb760ca13c7b401dce7fae9b374a0dd3eb72f Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 14:29:30 +0530 Subject: [PATCH 16/21] start pd changes --- .../manage-pd/list-pd/start-pd/start-pd.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 5972e04b9..dd279eb5f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -29,6 +29,6 @@
- + From 59a0317dee36a77073122d52ddaccdf8a741db58 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 15:14:35 +0530 Subject: [PATCH 17/21] qc view changes --- .../qc-list/qc-view/qc-view.component.html | 26 +++++++++- .../qc-list/qc-view/qc-view.component.ts | 47 ++++++++++++++++++- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 76b13c847..fd3aa26fb 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -11,7 +11,7 @@
- +
person{{master.pd_allocated_to | titlecase}}    @@ -80,6 +80,30 @@

No Applicant

+
+ + +
+ +
+ + Additional Requirements + + + + + +

{{requirement.add_requirement}}

+
+
+
+

No Additional Requirements

+
+ + + + +
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts index 5aebabbe6..0dcaefe8e 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -11,7 +11,8 @@ import { TelePdAllocationComponent } from './../../../personal-discussion/manage import { SchedulePdComponent } from './../../../personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component'; import { EditPdApplicantComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component'; import { EditPdMasterComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component'; - +import { PdRequirementComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component'; +import {DatePipe } from '@angular/common'; @Component({ selector: 'app-qc-view', templateUrl: './qc-view.component.html', @@ -19,6 +20,7 @@ import { EditPdMasterComponent } from './../../../personal-discussion/manage-pd/ encapsulation: ViewEncapsulation.None }) export class QcViewComponent implements OnInit, OnDestroy { + pipe = new DatePipe('en-US'); public selectedMoment = new Date(); private notifier:NotifierService; errorMessage: any; @@ -31,7 +33,8 @@ export class QcViewComponent implements OnInit, OnDestroy { viewParams:any; destroyType:number=1; currentPDStatus:string; - + pdAdditionalReqData: any=[]; + enableStartPD: boolean; // create values for status check pdStatusCheck :any={ "DRAFT" :'DRAFT', @@ -46,6 +49,7 @@ export class QcViewComponent implements OnInit, OnDestroy { constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder, private _qc: QcService,private route: ActivatedRoute,private router: Router, private QcListComponent: QcListComponent) { this.notifier=notifier + this.enableStartPD=false; } ngOnInit() { @@ -64,8 +68,25 @@ export class QcViewComponent implements OnInit, OnDestroy { this.pdApplicantData= data.records.applicants_details; this.pdDocumentsData=data.records.pd_documnets; this.masterPdLogsData=data.records.pd_logs.master; + this.pdAdditionalReqData = data.records.pd_additional_requirements; //this.applicantPDLogsData= data.records.pd_logs.master; this.currentPDStatus = data.records.pd_master_details[0].pd_status; + // enable pd start time + if(data.records.pd_master_details[0].scheduled_on_for_validation){ + let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm'); + let scheduledDateTime: string=data.records.pd_master_details[0].scheduled_on_for_validation; + let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime); + let diffInHours: number = Math.floor(diffInMs / 1000 / 60 / 60); + if(diffInHours>=-4){ + this.enableStartPD=true; + } + else { + this.enableStartPD=false; + } + } + else { + this.enableStartPD=false; + } } }, error => this.errorMessage = error); @@ -84,6 +105,8 @@ export class QcViewComponent implements OnInit, OnDestroy { } const dialogPDMaster = this.dialog.open(EditPdMasterComponent, { data: record, + position: { right: '0'}, + width: '80%', disableClose: true }); dialogPDMaster.afterClosed() @@ -99,6 +122,8 @@ export class QcViewComponent implements OnInit, OnDestroy { } const dialogApplicant = this.dialog.open(EditPdApplicantComponent, { data: setPdDetails, + position: { right: '0'}, + width: '60%', disableClose: true }); dialogApplicant.afterClosed() @@ -107,6 +132,24 @@ export class QcViewComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID) }); } + // edit pd addtional requirements + editAdditionalRequirement(requirementData:any){ + let setPdDetails = { + "pdID":this.viewID, + "records":requirementData + } + const dialogRequirement = this.dialog.open(PdRequirementComponent, { + data: setPdDetails, + position: { right: '0'}, + width: '60%', + disableClose: true + }); + dialogRequirement.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID) + }); + } // pd allocation to pdAllocationTo(pdData:any) { if(pdData.fk_pd_type == 1){ From de0cbc7dd3d130fd65964946a66520b8dc4844e4 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 17:04:53 +0530 Subject: [PATCH 18/21] business form issues fixed --- .../start-pd/forms/business-info/business-info.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 57cf18d9e..19d62f38a 100755 --- 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 @@ -60,7 +60,8 @@ export class BusinessInfoComponent implements OnInit { this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.applicants = this.pd_all_details.pdapplicants_detials; this.form_id = 13; - this.notifier = notifier; + this.notifier = notifier; + } public viewerOptions: any = { navbar: false, @@ -971,7 +972,7 @@ export class BusinessInfoComponent implements OnInit { filterCity(datasource: any,filterid:number) { if(filterid){ let filter = datasource.filter(x=>x.state_id==filterid); - return filter[0].cities; + return filter.length > 0 ? filter[0].cities : []; } From 1eb2fc8c214619104f90b70bd2af5380a1e9e126 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 17:16:59 +0530 Subject: [PATCH 19/21] remove unwanted codes --- .../app/personal-discussion/pd-service/pd-triger.service.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index e45388092..0cec83e9f 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -40,14 +40,12 @@ export class PdTrigerService { // get add pd master details getAllMasterDatas(TableName: string): Observable { - console.log('table', TableName); return this._http.post(this.apiUrl + 'getListOfMaster', {"master_name": TableName}) .pipe( catchError(this.handleError('role', [])) ) } saveForm(records: any): Observable { - console.log('table', records); records.fk_createdby = this._aws.getlocale(); let params = {records} return this._http.post(this.apiUrl + 'savePDFormDetails', params) @@ -56,7 +54,6 @@ export class PdTrigerService { ) } retriveForm(params): Observable { - console.log('data', params); return this._http.post(this.apiUrl + 'getPDFormDetails', params) .pipe( catchError(this.handleError('role', [])) From 34a3b0da6623caa7e5c71bda49e2d946fccb4683 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 22 Dec 2018 17:59:16 +0530 Subject: [PATCH 20/21] start pd validation changes --- .../manage-pd/list-pd/start-pd/start-pd.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index dd279eb5f..a79735f1e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -29,6 +29,6 @@
- + From a6542e9027db451b4d568eabf7bb4af1c2248d30 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 24 Dec 2018 12:53:33 +0530 Subject: [PATCH 21/21] issues fixes : ps --- .../assets-info/assets-info.component.html | 76 ++++++------ .../assets-info/assets-info.component.ts | 98 ++++++++-------- .../current-loan/current-loan.component.html | 64 ++++++----- .../current-loan/current-loan.component.ts | 33 ++++-- .../financial-info.component.html | 82 ++++++------- .../financial-info.component.ts | 36 +++--- .../other-income/other-income.component.ts | 2 +- .../start-pd/forms/stock/stock.component.html | 108 +++++++++--------- 8 files changed, 257 insertions(+), 242 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 62516d7cb..a52057c6b 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 @@ -42,7 +42,7 @@
- + {{ prop.name }} @@ -63,7 +63,7 @@
- +
@@ -77,7 +77,7 @@
- +
@@ -91,7 +91,7 @@
- +
@@ -106,26 +106,26 @@
- +
- + {{ freqn.name }}
- +
- +
@@ -141,7 +141,7 @@
- + {{ ins_type.name }} @@ -153,12 +153,12 @@
- +
- +
@@ -174,16 +174,16 @@
- + - + - + - + Yes No NA @@ -215,7 +215,7 @@
- +
@@ -223,7 +223,7 @@ + formControlName="business_name_of_the_owner" > {{owner.applicant_name}} @@ -238,7 +238,7 @@
- + {{relations.name}} @@ -343,7 +343,7 @@
- + {{ prop.name }} @@ -364,7 +364,7 @@
- +
@@ -378,7 +378,7 @@
- +
@@ -406,7 +406,7 @@
- +
@@ -421,33 +421,33 @@
- +
- + {{ freqn.name }}
- +
- +
@@ -463,7 +463,7 @@
- + {{ ins_type.name }} @@ -477,14 +477,14 @@
- +
- +
@@ -499,14 +499,14 @@
- + - + + formControlName="name_of_the_owner" > {{owner.applicant_name}} @@ -520,7 +520,7 @@
- + {{relations.name}} @@ -529,10 +529,10 @@
- + - + Yes No NA @@ -569,7 +569,7 @@
+ formControlName="name_of_the_owner" > {{owner.applicant_name}} @@ -584,7 +584,7 @@
- + {{relations.name}} 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 b4d11a7e7..90c350611 100755 --- 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 @@ -345,14 +345,14 @@ public m_investmentType = []; // Dynamic Form field creation Functionality : START ===> initDetails() { return this._formBuilder.group({ - assets_mode: ['', Validators.compose([Validators.required])], + assets_mode: [''], details: this._formBuilder.array([]), - approximate_market_value: ['', Validators.compose([])], - name_of_the_owner: ['', Validators.compose([])], + approximate_market_value: [''], + name_of_the_owner: [''], other_owner:[''], relation: [''], - // purchase_year: ['', Validators.compose([])], - //purchase_month: ['', Validators.compose([])], + // purchase_year: [''], + //purchase_month: [''], emi: [''], emi_paid: [''], original_loan_tenure: [''], @@ -363,14 +363,14 @@ public m_investmentType = []; initBusinessDetails(data) { return this._formBuilder.group({ - business_assets_mode: ['', Validators.compose([Validators.required])], + business_assets_mode: [''], business_details: this._formBuilder.array([]), - business_approximate_market_value: ['', Validators.compose([])], + business_approximate_market_value: [''], business_name_of_the_owner: [data], // other_owner:[''], // relation:[''], - // purchase_year: ['', Validators.compose([])], - //purchase_month: ['', Validators.compose([])], + // purchase_year: [''], + //purchase_month: [''], business_emi: [''], business_emi_paid: [''], business_original_loan_tenure: [''], @@ -458,26 +458,26 @@ public m_investmentType = []; loadProperty() { return this._formBuilder.group({ - property_type: ['', Validators.compose([Validators.required])], + property_type: [''], other_property_type: [''] }); } loadJwellDescription() { return this._formBuilder.group({ - jwell_description: ['', Validators.compose([])] + jwell_description: [''] }); } loadConsumerDurableDescription() { return this._formBuilder.group({ - consumer_durable_description: ['', Validators.compose([Validators.required])] + consumer_durable_description: [''] }); } otherAssetsDescription() { return this._formBuilder.group({ - any_other_assets: ['', Validators.compose([Validators.required])], + any_other_assets: [''], name_of_the_owner:[''], other_owner:[''], relation:[''], @@ -490,7 +490,7 @@ public m_investmentType = []; otherBusinessAssetsDescription() { return this._formBuilder.group({ - any_other_assets: ['', Validators.compose([Validators.required])], + any_other_assets: [''], any_other_asset_value : [''], any_other_asset_loan : [''], other_asset_emi_amt : [''] @@ -500,32 +500,32 @@ public m_investmentType = []; loadInsuranceDescription() { return this._formBuilder.group({ - //insurance_type: ['', Validators.compose([Validators.required])], - premium_paid: ['', Validators.compose([])], - frequency_mode: ['', Validators.compose([])], - sum_assured: ['', Validators.compose([])], - members_coverd: ['', Validators.compose([])] + //insurance_type: [''], + premium_paid: [''], + frequency_mode: [''], + sum_assured: [''], + members_coverd: [''] }); } loadInvestDescription() { return this._formBuilder.group({ - investments_type: ['', Validators.compose([])], + investments_type: [''], other_investments_type:[''], - amount_of_invest: ['', Validators.compose([])], - bank_name: ['', Validators.compose([])] + amount_of_invest: [''], + bank_name: [''] }); } load_Four_Weeler() { return this._formBuilder.group({ - manufacturer_model_four_weeler: ['', Validators.compose([])] + manufacturer_model_four_weeler: [''] }); } load_Two_Weeler() { return this._formBuilder.group({ - manufacturer_model_two_weeler: ['', Validators.compose([Validators.required])] + manufacturer_model_two_weeler: [''] }); } @@ -533,26 +533,26 @@ public m_investmentType = []; loadPropertyWithData(data) { return this._formBuilder.group({ - property_type: [data.property_type, Validators.compose([Validators.required])] + property_type: [data.property_type] //property_type:[''] }); } loadJwellDescriptionWithData(data) { return this._formBuilder.group({ - jwell_description: [data.jwell_description, Validators.compose([Validators.required])] + jwell_description: [data.jwell_description] }); } loadConsumerDurableDescriptionWithData(data) { return this._formBuilder.group({ - consumer_durable_description: [data.consumer_durable_description, Validators.compose([Validators.required])] + consumer_durable_description: [data.consumer_durable_description] }); } otherAssetsDescriptionWithData(data) { return this._formBuilder.group({ - any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], + any_other_assets: [data.any_other_assets], name_of_the_owner:[data.name_of_the_owner], other_owner:[data.other_owner], relation:[data.relation], @@ -564,7 +564,7 @@ public m_investmentType = []; otherBusinessAssetsDescriptionWithData(data) { return this._formBuilder.group({ - any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], + any_other_assets: [data.any_other_assets], any_other_asset_value : [data.any_other_asset_value], any_other_asset_loan : [data.any_other_asset_loan], other_asset_emi_amt : [data.other_asset_emi_amt] @@ -575,32 +575,32 @@ public m_investmentType = []; loadInsuranceDescriptionWithData(data) { return this._formBuilder.group({ - //insurance_type: [data.insurance_type, Validators.compose([Validators.required])], - premium_paid: [data.premium_paid, Validators.compose([Validators.required])], - frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])], - sum_assured: [data.sum_assured, Validators.compose([Validators.required])], - members_coverd: [data.members_coverd, Validators.compose([Validators.required])] + //insurance_type: [data.insurance_type], + premium_paid: [data.premium_paid], + frequency_mode: [data.frequency_mode], + sum_assured: [data.sum_assured], + members_coverd: [data.members_coverd] }); } loadInvestDescriptionWithData(data) { return this._formBuilder.group({ - investments_type: [data.investments_type, Validators.compose([Validators.required])], + investments_type: [data.investments_type], other_investments_type : [data.other_investments_type], - amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])], - bank_name: [data.bank_name, Validators.compose([Validators.required])] + amount_of_invest: [data.amount_of_invest], + bank_name: [data.bank_name] }); } load_Four_WeelerWithData(data) { return this._formBuilder.group({ - manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler, Validators.compose([Validators.required])] + manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler] }); } load_Two_WeelerWithData(data) { return this._formBuilder.group({ - manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler, Validators.compose([Validators.required])] + manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler] }); } @@ -608,14 +608,14 @@ public m_investmentType = []; initDetailsWithdata(data) { return this._formBuilder.group({ - assets_mode: [data.assets_mode, Validators.compose([Validators.required])], + assets_mode: [data.assets_mode], details: this._formBuilder.array([]), - approximate_market_value: [data.approximate_market_value, Validators.compose([])], - name_of_the_owner: [data.name_of_the_owner, Validators.compose([])], + approximate_market_value: [data.approximate_market_value], + name_of_the_owner: [data.name_of_the_owner], other_owner:[data.other_owner || ''], relation: [data.relation || ''], - // purchase_year: [data.purchase_year, Validators.compose([])], - // purchase_month: [data.purchase_month, Validators.compose([])], + // purchase_year: [data.purchase_year], + // purchase_month: [data.purchase_month], emi: [data.emi || 0], emi_paid: [data.emi_paid || ''], original_loan_tenure: [data.original_loan_tenure || ''], @@ -625,14 +625,14 @@ public m_investmentType = []; } initBusinessDetailsWithdata(data) { return this._formBuilder.group({ - business_assets_mode: [data.business_assets_mode, Validators.compose([Validators.required])], + business_assets_mode: [data.business_assets_mode], business_details: this._formBuilder.array([]), - business_approximate_market_value: [data.business_approximate_market_value, Validators.compose([])], - business_name_of_the_owner: [data.business_name_of_the_owner, Validators.compose([])], + business_approximate_market_value: [data.business_approximate_market_value], + business_name_of_the_owner: [data.business_name_of_the_owner], // other_owner:[data.other_owner || ''], // relation: [data.relation || ''], - // purchase_year: [data.purchase_year, Validators.compose([])], - // purchase_month: [data.purchase_month, Validators.compose([])], + // purchase_year: [data.purchase_year], + // purchase_month: [data.purchase_month], business_emi: [data.business_emi || 0], business_emi_paid: [data.business_emi_paid || ''], business_original_loan_tenure: [data.business_original_loan_tenure || ''], 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 b4154fdeb..cd2bf8ef3 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 @@ -22,7 +22,7 @@ + formControlName="existing_loan" > Yes No @@ -38,45 +38,51 @@ - + + formControlName="frequency" > {{freq.name}} - + - + + {{types.loan_type_name}} + + + + + - + {{owner.applicant_name}} - Others + - - + + - + {{ btLen.lender_name }} - + - + - +