diff --git a/ng6-seed/src/app/dashboard/dashboard.service.ts b/ng6-seed/src/app/dashboard/dashboard.service.ts index e13b822e6..bca8717dc 100644 --- a/ng6-seed/src/app/dashboard/dashboard.service.ts +++ b/ng6-seed/src/app/dashboard/dashboard.service.ts @@ -14,7 +14,6 @@ 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' }) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index b993c2532..58a8e09a6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -1,293 +1,290 @@ - -
+ + + + +
+ +
+
+
+ +
PD Details
+ +
+ + + + + {{LL.full_name}} + + + + + - -
- -
-
-
- -
PD Details
- -
- - - - - {{LL.full_name}} + + + Applicant ID Required + + + + + {{billL.billing_name}} - - - - - - - Applicant ID Required + + + + + Contact Person Required - - - {{billL.billing_name}} - - - - - - - Contact Person Required + + Contact Number Required + Enter Valid Mobile Number. + - - Contact Number Required - Enter Valid Mobile Number. - - - - - - {{PL.product_name}} - - - - - - - - - - {{SPL.subproduct_name}} - - - - - - - - - - {{CSL.customer_segment}} + + + {{PL.product_name}} - - - - - - {{PDL.type_name}} - - - - - + + - - - Enter valid amount. - - - - - - - - - - - - - - - - - - {{SL.state_name}} - - - - - - - - -` - {{CL.city_name}} + + + + {{SPL.subproduct_name}} - - - - - - - - - - Enter Valid Pincode. - - - - - - - -
-
-
-
-
-
- -
Main Applicant
- - + + + + + - - Name is Required. - - - - - - Enter Valid Mobile Number. - - - - - - - - - - -
-
-
-
- -
- - -
{{coDetails.controls.label.value}} {{i+1}}
- -
- - - - - - Enter Valid Mobile Number. - - - - - - - - - {{rel.name}} - + + + {{CSL.customer_segment}} + + + + + + + + {{PDL.type_name}} + + + + + + + + + + Enter valid amount. + + + + + + + + + + + + + + + + + + {{SL.state_name}} + + + + + + + + ` + {{CL.city_name}} + + + + + + + + + + + Enter Valid Pincode. + + + + - -
- - - -
-
-
-
-
-
- -
- -
Co-Applicant
- - - - - -
-
-
-
+ + +
+ +
+
+
+
+ +
Main Applicant
+ + + + + Name is Required. + + + + + + Enter Valid Mobile Number. + + + + + + + + + + +
+
+
+
+ +
+ + +
{{coDetails.controls.label.value}} {{i+1}}
+ +
+ + + + + + Enter Valid Mobile Number. + + + + + + + + + {{rel.name}} + + + + +
+ + + +
+
+
+
+
+
+ +
+ +
Co-Applicant
+ + + + + +
+
+
+
+ +
-
- - -
Document
- - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
-
+ +
Document
+ + + + + +
+
+ + + + + + + + +
+ - - - - - + + + +
+
+
+
+
+
+ +
+ + + + + + + + + + + +
+
- - - - - - - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index 5c90edc5b..4badcdf6d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -309,7 +309,7 @@ export class AddPdComponent implements OnInit, OnDestroy { "pd_status": status, //"fk_pd_allocation_type":this.allocationTypeModel , "fk_createdby" : this._aws.getlocale(), - "createdon": new Date().toJSON().slice(0,19).replace('T',' ') + // "createdon": new Date().toJSON().slice(0,19).replace('T',' ') }; let pd_applicant_details : any=[{ "applicant_name":formValue.applicant_name, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html index 6b83b14eb..3ae92fc5a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html @@ -62,19 +62,9 @@ -
- -
- - - - - -
-
- - -
+
+ + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html index 5a84f3f3b..294808f73 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html @@ -86,7 +86,7 @@ - + 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 a932c765d..78cda05de 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -9,27 +9,18 @@ - Office - Clinic - Factory - Warehouse - Shop - Residence cum Office - Residence - Other (PD officer to fill) + {{m_addressType.address_type}} + + - Commercial (Office type) Area - - Commercial (shop type) Area - Industrial Area - Residential Area - Mix use (Comment mandatory) - Rural (Village) area - Others (Please specify) + {{m_locality.locality_name}} + @@ -37,14 +28,14 @@ formControlName="locality_others"> - + {{data.description}} - + {{data.rating}} @@ -66,14 +57,15 @@
- - Yes - No + {{m_neighbourStatus}} + @@ -83,17 +75,18 @@ - Yes - No - Dont Know + + {{m_applicantOwner}} + - -
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts index 58294fabb..a12341059 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts @@ -34,6 +34,11 @@ export class AddressComponent implements OnInit { locationdata: any = []; commentData: any = []; customerData: any = []; + addressData:any = []; + localityData:any = []; + neighbourStatusData:any=["Yes","No"]; + applicantOwnerData:any=["Yes","No","Dont Know"]; + public currentLoanForm: FormGroup; private notifier: NotifierService; public addressForm: FormGroup; @@ -53,9 +58,11 @@ export class AddressComponent implements OnInit { } ngOnInit() { - this.getLocation(); - this.getComment(); - this.getCustomer(); + this.getMasterDetails('PDLOCATIONAPPROACH',1); + this.getMasterDetails('COMMENTSONLOCALITY',2); + this.getMasterDetails('CUSTOMERBEHAVIOUR',3); + this.getMasterDetails('LOCALITY',4); + this.getMasterDetails('ADDRESSTYPE',5); this.initAddressForm(); let params: any = {}; params.pd_id = this.pdid; @@ -85,7 +92,6 @@ export class AddressComponent implements OnInit { }); this.addressForm.controls.neighbourhood.setValue(result); } - console.log('result', result); } else { control.push(this.createNeighbour()); } @@ -118,36 +124,24 @@ export class AddressComponent implements OnInit { is_owner: ['', Validators.compose([Validators.required])], }); } - getLocation() { - let master_name = 'PDLOCATIONAPPROACH'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); + getMasterDetails(table:string,type:number){ + this._pd.getAllMasterDatas(table).subscribe(data => { data.records.forEach(val => { - if (val.isactive == 1) { + if (type==1 && val.isactive == 1) { this.locationdata.push(val); } - }) - }); - } - getComment() { - let master_name = 'COMMENTSONLOCALITY'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); - data.records.forEach(val => { - if (val.isactive == 1) { + else if(type==2 && val.isactive == 1){ this.commentData.push(val); } - }) - }); - } - getCustomer() { - let master_name = 'CUSTOMERBEHAVIOUR'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); - data.records.forEach(val => { - if (val.isactive == 1) { + else if(type==3 && val.isactive == 1){ this.customerData.push(val); } + else if(type==4 && val.isactive == 1){ + this.localityData.push(val); + } + else if(type==5 && val.isactive == 1){ + this.addressData.push(val); + } }) }); } 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 e5baf4036..bd79a2d1b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -1,73 +1,70 @@ - - - -

Assets Details

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

Assets Details

+ +
+
+
+ + +
+
+ + + {{ asset.name }} + + +
+ +
+ +
+
+
+
+
+ + + {{ prop.name }} + + +
+
+
- -
- -
-
-
-
-
- - - {{ prop.name }} - - -
+ +
+
+
+
+
+ + +
- -
-
-
-
-
- - - -
+
+ +
+
+
+
+
+ + +
- -
-
-
-
-
- - - -
-
-
-
-
- + - -
-
-
-
-
+ +
+
+
+
+
+ + + +
+
+
+
+
+ +
+
+
+
+
+
+ + + {{ ins_type.name }} + + +
+
- + + +
+
+ + + {{ freqn.name }} +
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - {{ freqn.name }} - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
+
+
- + + +
+
+ +
@@ -179,74 +133,119 @@
- -
-
-
- - + +
+
+
+
+
+
+ + + {{ ins_type.name }} +
+
+ + + +
+
+ + + +
+
-
- +
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+ + + +
+
+
+
-
-
-
-
- - - -
-
- +
+
+ +
+ + + + + + +
+
+
- Is there a loan? -
-
+ + + Yes + No + + +
+
-
+
- +
-
+
- +
-
-
-
- - - - -
-
- - - - -
- -
- +
+
+ + + +
+
+
+ +
- -
- - -
- +
+ + + + +
+ - - - + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 03138ffeb..f111a2091 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -33,123 +33,131 @@ export class AssetsInfoComponent implements OnInit { public _assetsQuesFrom: FormGroup; public submitted = false; + public m_assets_type = []; + // public m_assets_type = [ + // { + // 'id': "1", + // 'name': "Property" + // }, + // { + // 'id': "2", + // 'name': "Four Wheeler" + // }, + // { + // 'id': "3", + // 'name': "Two Wheeler" + // }, + // { + // 'id': "4", + // 'name': "Jewellery" + // }, + // { + // 'id': "5", + // 'name': "Consumer Durable" + // }, + // { + // 'id': "6", + // 'name': "Insurance" + // }, + // { + // 'id': "7", + // 'name': "Investments" + // }, + // { + // 'id': "8", + // 'name': "Others" + // } + // ] - public m_assets_type = [ - { - 'id': "1", - 'name': "Property" - }, - { - 'id': "2", - 'name': "Four Wheeler" - }, - { - 'id': "3", - 'name': "Two Wheeler" - }, - { - 'id': "4", - 'name': "Jewellery" - }, - { - 'id': "5", - 'name': "Consumer Durable" - }, - { - 'id': "6", - 'name': "Insurance" - }, - { - 'id': "7", - 'name': "Investments" - }, - { - 'id': "8", - 'name': "Others" - } - ] +public m_propertyType = []; - public m_propertyType = [ - { - 'id': "1", - 'name': 'Residential' - }, - { - 'id': "2", - 'name': 'Commercial' - }, - { - 'id': "3", - 'name': 'Industrial' - }, - { - 'id': "4", - 'name': 'Land' - } - ]; + // public m_propertyType = [ + // { + // 'id': "1", + // 'name': 'Residential' + // }, + // { + // 'id': "2", + // 'name': 'Commercial' + // }, + // { + // 'id': "3", + // 'name': 'Industrial' + // }, + // { + // 'id': "4", + // 'name': 'Land' + // } + // ]; - public m_insuranceType = [{ - 'id': "1", - 'name': 'Life' - }, { - 'id': "2", - 'name': 'Health' - }] +public m_insuranceType = []; - public m_investmentType = [{ - 'id': "1", - 'name': 'FD' - }, { - 'id': "2", - 'name': 'RD' - }, { - 'id': "3", - 'name': 'Mutual Funds' - }, { - 'id': "4", - 'name': 'PPF' - }, { - 'id': "5", - 'name': 'Shares' - }, { - 'id': "6", - 'name': 'Others' - }] + // public m_insuranceType = [{ + // 'id': "1", + // 'name': 'Life' + // }, { + // 'id': "2", + // 'name': 'Health' + // }] - public m_freqOfPurchase = [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] +public m_investmentType = []; + + // public m_investmentType = [{ + // 'id': "1", + // 'name': 'FD' + // }, { + // 'id': "2", + // 'name': 'RD' + // }, { + // 'id': "3", + // 'name': 'Mutual Funds' + // }, { + // 'id': "4", + // 'name': 'PPF' + // }, { + // 'id': "5", + // 'name': 'Shares' + // }, { + // 'id': "6", + // 'name': 'Others' + // }] + + public m_freqOfPurchase = []; + + // public m_freqOfPurchase = [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] private notifier: NotifierService; constructor( @@ -162,7 +170,78 @@ export class AssetsInfoComponent implements OnInit { ngOnInit() { this.getPdSupplierFormDetails(); + + this.getM_Assets_Type(); + this.getM_PropertyType(); + this.getM_InvestmentType(); + this.getM_FreqOfPurchase(); + this.getM_InsuranceType(); } + +// ====================== + + getM_Assets_Type() { + this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( + data => { + this.m_assets_type = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PropertyType() { + this.pdTrigerService.getAllMasterDatas('PROPERTIES').subscribe( + data => { + this.m_propertyType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_InvestmentType() { + this.pdTrigerService.getAllMasterDatas('INVESTMENTTYPE').subscribe( + data => { + this.m_investmentType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_InsuranceType() { + this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe( + data => { + this.m_insuranceType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + +// ============================= + apiLoadFinish: boolean = false; getPdSupplierFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '4').subscribe( @@ -218,9 +297,10 @@ export class AssetsInfoComponent implements OnInit { return this._formBuilder.group({ assets_mode: ['', Validators.compose([Validators.required])], details: this._formBuilder.array([]), - approximate_market_value: ['', Validators.compose([Validators.required])], - name_of_the_owner: ['', Validators.compose([Validators.required])], - year_of_purchase: ['', Validators.compose([Validators.required])], + approximate_market_value: ['', Validators.compose([])], + name_of_the_owner: ['', Validators.compose([])], + purchase_year: ['', Validators.compose([])], + purchase_month: ['', Validators.compose([])], emi: [''], emi_paid: [''], elapsed_tenure: [''], @@ -243,12 +323,12 @@ export class AssetsInfoComponent implements OnInit { } case '2': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_Weeler()); + control.push(this.load_Four_Weeler()); break; } case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_Weeler()); + control.push(this.load_Two_Weeler()); break; } case '4': { @@ -291,7 +371,7 @@ export class AssetsInfoComponent implements OnInit { loadJwellDescription() { return this._formBuilder.group({ - jwell_description: ['', Validators.compose([Validators.required])] + jwell_description: ['', Validators.compose([])] }); } @@ -325,9 +405,15 @@ export class AssetsInfoComponent implements OnInit { }); } - load_Two_Four_Weeler() { + load_Four_Weeler() { return this._formBuilder.group({ - manufacturer_model: ['', Validators.compose([Validators.required])] + manufacturer_model_four_weeler: ['', Validators.compose([Validators.required])] + }); + } + + load_Two_Weeler() { + return this._formBuilder.group({ + manufacturer_model_two_weeler: ['', Validators.compose([Validators.required])] }); } @@ -375,20 +461,28 @@ export class AssetsInfoComponent implements OnInit { }); } - load_Two_Four_WeelerWithData(data) { + load_Four_WeelerWithData(data) { return this._formBuilder.group({ - manufacturer_model: [data.manufacturer_model, Validators.compose([Validators.required])] + manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler, Validators.compose([Validators.required])] }); } + load_Two_WeelerWithData(data) { + return this._formBuilder.group({ + manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler, Validators.compose([Validators.required])] + }); + } + + initDetailsWithdata(data) { return this._formBuilder.group({ assets_mode: [data.assets_mode, Validators.compose([Validators.required])], details: this._formBuilder.array([]), - approximate_market_value: [data.approximate_market_value, Validators.compose([Validators.required])], - name_of_the_owner: [data.name_of_the_owner, Validators.compose([Validators.required])], - year_of_purchase: [data.year_of_purchase, Validators.compose([Validators.required])], + approximate_market_value: [data.approximate_market_value, Validators.compose([])], + name_of_the_owner: [data.name_of_the_owner, Validators.compose([])], + purchase_year: [data.purchase_year, Validators.compose([])], + purchase_month: [data.purchase_month, Validators.compose([])], emi: [data.emi || 0], emi_paid: [data.emi_paid || ''], elapsed_tenure: [data.elapsed_tenure || ''], @@ -406,7 +500,8 @@ export class AssetsInfoComponent implements OnInit { assets_mode: val.assets_mode, approximate_market_value: val.approximate_market_value, name_of_the_owner: val.name_of_the_owner, - year_of_purchase: val.year_of_purchase, + purchase_year: val.purchase_year, + purchase_month: val.purchase_month, emi: val.emi, emi_paid: val.emi_paid, elapsed_tenure: val.elapsed_tenure, @@ -437,12 +532,12 @@ export class AssetsInfoComponent implements OnInit { } case '2': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_WeelerWithData(data)); + control.push(this.load_Four_WeelerWithData(data)); break; } case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_WeelerWithData(data)); + control.push(this.load_Two_WeelerWithData(data)); break; } case '4': { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index 622f281b1..910aa3602 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -92,14 +92,17 @@ - + {{ prop.name }} + + @@ -129,8 +132,8 @@ delete -
-
@@ -147,7 +150,7 @@ -
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index f832d64f4..08279586e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -32,6 +32,7 @@ export class BankingDetailsComponent implements OnInit { public bankingForm: FormGroup; step: number; private notifier: NotifierService; + m_accountType= []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -43,6 +44,7 @@ export class BankingDetailsComponent implements OnInit { ngOnInit() { this.step = 0; this.initBankingForm(); + this.getM_AccountType(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '7'; @@ -68,6 +70,20 @@ export class BankingDetailsComponent implements OnInit { }); } + // ====================== + + getM_AccountType() { + this._pd.getAllMasterDatas('ACCOUNTTYPE').subscribe( + data => { + this.m_accountType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + public initBankingForm(): void { this.bankingForm = this.fb.group({ banking_form_remark: [''], 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 a508f499c..2e77dd01a 100644 --- 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 @@ -5,7 +5,7 @@ - +

Designation -

+

- -
@@ -65,12 +65,12 @@ - + formControlName="family_members_involved" (selectionChange)="relationChanged($event)"> {{member.name}} @@ -85,7 +85,7 @@

Partners / Directors / Shareholders -

+

- - -
@@ -122,7 +122,7 @@

Employees As per applicant -

+

@@ -142,7 +142,7 @@

As per PD Officer -

+

@@ -162,15 +162,15 @@

Investments -

+

- - @@ -178,9 +178,9 @@

Location -

+

- +

Business Setup -

+

- + - self owned Rented @@ -208,11 +208,11 @@ - - @@ -220,7 +220,7 @@

Is the below documents seen and photo captured ? -

+

@@ -231,28 +231,28 @@
- Yes No - Yes No - Yes No - Yes No @@ -273,7 +273,7 @@ - Yes No @@ -282,17 +282,17 @@
- + - -
@@ -306,6 +306,9 @@
- +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss index 3be75d28c..c1a248bc2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss @@ -8,13 +8,19 @@ width: 100%; } .matcard > * { - width: 80%; + width: 98%; } .card mat-form-field { margin: 0 2%; + width: 40%; } .matcard mat-form-field { margin: 0 2%; + width: 40%; +} +.matcards mat-form-field { + margin: 0 2%; + width: 98%; } .address .button { float: right; 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 624cb0caf..732af4e74 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -75,13 +75,19 @@ export class BusinessInfoComponent implements OnInit { return data.records.family_members_involved[key]; }); let enduse: any = []; + let existRelative: any =[]; selectedMembers.forEach(val => { enduse.push(val.member); + existRelative.push(val); }); + this.relativeNames = existRelative; if (DesgnArray.length == 0) { Desgn.push(this.createDesignation()); } else { + DesgnArray.forEach(datas => { Desgn.push(this.createDesignation()); + }); + } if (PartnrArray.length == 0) { Partnr.push(this.createPartners()); @@ -90,7 +96,7 @@ export class BusinessInfoComponent implements OnInit { Partnr.push(this.createPartners()); }); } - if (data.other_documents == 'yes') { + if (data.records.other_documents == 'yes') { DocArray = Object.keys(data.records.documents).map(function (key) { return data.records.documents[key]; }); @@ -114,7 +120,6 @@ export class BusinessInfoComponent implements OnInit { businessVal.designation = DesgnArray; businessVal.partners = PartnrArray; businessVal.documents = DocArray; - console.log('businessVal', businessVal); this.businessForm.setValue(businessVal); } else { 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 2582904d1..8a7c5933b 100644 --- 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 @@ -1,14 +1,14 @@ -
+
-
-
+
+
- +
@@ -62,7 +62,7 @@
- +
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 cc1911240..7d03785e4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -31,69 +31,103 @@ export class ClientInfoComponent implements OnInit { @Input() pdid: number; - public _supplierQuesFrom: FormGroup; + public _clientQuesFrom: FormGroup; public submitted = false; - public m_paymentModeType= [ - { - 'id': "1", - 'name': 'Immediate Or Advanced Payment' - }, - { - 'id': "2", - 'name': 'Credit' - }, - { - 'id': "3", - 'name': 'Combination of Both' - }, - ]; - public m_freqOfPurchase= [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] + public m_paymentModeType= []; + // public m_paymentModeType= [ + // { + // 'id': "1", + // 'name': 'Immediate Or Advanced Payment' + // }, + // { + // 'id': "2", + // 'name': 'Credit' + // }, + // { + // 'id': "3", + // 'name': 'Combination of Both' + // }, + // ]; + public m_freqOfPurchase= []; + // public m_freqOfPurchase= [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] constructor( private _formBuilder: FormBuilder, private pdTrigerService: PdTrigerService) { } ngOnInit() { - - this.getPdSupplierFormDetails(); + this.getM_FreqOfPurchase(); + this.getM_PaymentModeType(); + this.getClientFormDetails(); } + + +// ================== + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PaymentModeType() { + this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe( + data => { + this.m_paymentModeType = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + +// ================== + apiLoadFinish: boolean = false; - getPdSupplierFormDetails() { - this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe( + getClientFormDetails() { + this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '2').subscribe( data => { if (data) { if(data.dataStatus){ @@ -112,21 +146,19 @@ apiLoadFinish: boolean = false; formLoadData(val) { if(val !== null) { let value = val; - this._supplierQuesFrom = this._formBuilder.group({ + this._clientQuesFrom = this._formBuilder.group({ pdid: [this.pdid], - formid: ['1'], - main_raw_materials: [value.main_raw_materials, Validators.compose([Validators.required])], - supplier_details: this._formBuilder.array([ + formid: ['2'], + client_details: this._formBuilder.array([ // this.initDetails(), ]) }); - this.addSupplierDetailsWithData(value.supplier_details); + this.addClientDetailsWithData(value.client_details); } else { - this._supplierQuesFrom = this._formBuilder.group({ + this._clientQuesFrom = this._formBuilder.group({ pdid: [this.pdid], - formid: ['1'], - main_raw_materials: [null, Validators.compose([Validators.required])], - supplier_details: this._formBuilder.array([ + formid: ['2'], + client_details: this._formBuilder.array([ this.initDetails(), ]) }); @@ -134,12 +166,12 @@ apiLoadFinish: boolean = false; } // convenience getter for easy access to form fields - get f() { return this._supplierQuesFrom.controls; } + get f() { return this._clientQuesFrom.controls; } // Dynamic Form field creation Functionality : START ===> initDetails() { return this._formBuilder.group({ - supplier_name: ['', Validators.compose([Validators.required])], + client_name: ['', Validators.compose([Validators.required])], contact_person: ['', Validators.compose([Validators.required])], mobile_number: ['', Validators.compose([Validators.required])], payment_mode: ['', Validators.compose([Validators.required])], @@ -152,7 +184,7 @@ apiLoadFinish: boolean = false; initDetailsWithdata(data) { return this._formBuilder.group({ - supplier_name: [data.supplier_name, Validators.compose([Validators.required])], + client_name: [data.client_name, Validators.compose([Validators.required])], contact_person: [data.contact_person, Validators.compose([Validators.required])], mobile_number: [data.mobile_number, Validators.compose([Validators.required])], payment_mode: [data.payment_mode, Validators.compose([Validators.required])], @@ -163,7 +195,7 @@ apiLoadFinish: boolean = false; }); } - addSupplierDetailsWithData(supp_data) { + addClientDetailsWithData(supp_data) { var result = Object.keys(supp_data).map(function(key) { return supp_data[key]; @@ -171,7 +203,7 @@ var result = Object.keys(supp_data).map(function(key) { if (result.length > 0) { for (let val of result) { let vals = { - supplier_name: val.supplier_name, + client_name: val.client_name, contact_person: val.contact_person, mobile_number: val.mobile_number, payment_mode: val.payment_mode, @@ -180,18 +212,18 @@ var result = Object.keys(supp_data).map(function(key) { frequency_of_purchase: val.frequency_of_purchase, freq_purchase_others_text_value: val.freq_purchase_others_text_value }; - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.push(this.initDetailsWithdata(vals)); } } } addSupplierDetails(e) { - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.push(this.initDetails()); } removeLanguage(i: number) { - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.removeAt(i); } @@ -209,14 +241,14 @@ var result = Object.keys(supp_data).map(function(key) { onSubmit() { this.submitted = true; // stop here if form is invalid - if (this._supplierQuesFrom.invalid) { + if (this._clientQuesFrom.invalid) { return; } else { - var answerFormValues = this._supplierQuesFrom.value; + var answerFormValues = this._clientQuesFrom.value; // To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - alert(JSON.stringify(answerFormValues)); + // Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { 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 ca8fb72ff..ec2f92b62 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -3,7 +3,7 @@

Current Loan Details

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

Employement Information

- + - - - - +
+ +
+
+ + + + + + +
+
+ Yes No - - - - +
+ + + + + + +
+ Yes @@ -26,14 +41,14 @@ - - + Yes No - + Yes @@ -46,19 +61,21 @@ - + - + + - - @@ -71,6 +88,9 @@
- +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts index 2a95ace92..119ac1e7a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts @@ -31,27 +31,34 @@ import {ActivatedRoute, Router} from '@angular/router'; export class EmploymentInfoComponent implements OnInit { @Input() pdid: number; @Input() form_id: number; + @Input() pd_all_details:any; + public employmentForm: FormGroup; private notifier: NotifierService; - + public pd_cus_segment:string; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { this.notifier = notifier; + } ngOnInit() { + this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase(); this.initemploymentForm(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; this._pd.retriveForm(params).subscribe(value => { - console.log('value', value); if (value.status == 200) { this.employmentForm.controls['employer_name'].setValue(value.records.employer_name); - this.employmentForm.controls['how_long'].setValue(value.records.how_long); + this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year); + this.employmentForm.controls['how_long_month'].setValue(value.records.how_long_month); this.employmentForm.controls['was_met'].setValue(value.records.was_met); - if (value.records.name_designation) { - this.employmentForm.controls['name_designation'].setValue(value.records.name_designation); + if (value.records.name_person_met) { + this.employmentForm.controls['name_person_met'].setValue(value.records.name_person_met); + } + if (value.records.designation_person_met) { + this.employmentForm.controls['designation_person_met'].setValue(value.records.designation_person_met); } this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary); if (value.records.confirm_salary_amount) { @@ -59,8 +66,8 @@ export class EmploymentInfoComponent implements OnInit { } this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen); this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen); - this.employmentForm.controls['gross'].setValue(value.records.gross); - this.employmentForm.controls['net_take_home'].setValue(value.records.net_take_home); + this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary); + this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary); this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive); this.employmentForm.controls['any_delays'].setValue(value.records.any_delays); this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks); @@ -70,15 +77,17 @@ export class EmploymentInfoComponent implements OnInit { public initemploymentForm(): void { this.employmentForm = this.fb.group({ employer_name: ['', Validators.compose([Validators.required])], - how_long: ['', Validators.compose([Validators.required])], - was_met: ['', Validators.compose([Validators.required])], - name_designation: [''], - confirm_salary: ['', Validators.compose([Validators.required])], + how_long_year: ['', Validators.compose([Validators.required])], + how_long_month: ['', Validators.compose([Validators.required])], + was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], + name_person_met: [''], + designation_person_met: [''], + confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], confirm_salary_amount: [''], - attendance_seen: ['', Validators.compose([Validators.required])], - sal_reg_seen: ['', Validators.compose([Validators.required])], - gross: ['', Validators.compose([Validators.required])], - net_take_home: ['', Validators.compose([Validators.required])], + attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], + sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], + gross_monthly_salary: ['', Validators.compose([Validators.required])], + net_monthly_salary: ['', Validators.compose([Validators.required])], bonus_incentive: ['', Validators.compose([Validators.required])], any_delays: ['', Validators.compose([Validators.required])], employment_remarks: ['', Validators.compose([Validators.required])], @@ -93,10 +102,12 @@ export class EmploymentInfoComponent implements OnInit { records.formid = this.form_id; records.fk_createdby = this.pdid; records.employer_name = this.employmentForm.controls['employer_name'].value; - records.how_long = this.employmentForm.controls['how_long'].value; + records.how_long_year = this.employmentForm.controls['how_long_year'].value; + records.how_long_month = this.employmentForm.controls['how_long_month'].value; records.was_met = this.employmentForm.controls['was_met'].value; if (this.employmentForm.controls['was_met'].value == 'yes') { - records.name_designation = this.employmentForm.controls['name_designation'].value; + records.name_person_met = this.employmentForm.controls['name_person_met'].value; + records.designation_person_met = this.employmentForm.controls['designation_person_met'].value; } records.confirm_salary = this.employmentForm.controls['confirm_salary'].value; if (this.employmentForm.controls['confirm_salary'].value == 'yes') { @@ -104,8 +115,8 @@ export class EmploymentInfoComponent implements OnInit { } records.attendance_seen = this.employmentForm.controls['attendance_seen'].value; records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value; - records.gross = this.employmentForm.controls['gross'].value; - records.net_take_home = this.employmentForm.controls['net_take_home'].value; + records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value; + records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value; records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value; records.any_delays = this.employmentForm.controls['any_delays'].value; records.employment_remarks = this.employmentForm.controls['employment_remarks'].value; 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 f62fc181e..526514332 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -5,21 +5,21 @@
- - {{state}} + + {{personMet.person_met_name}} - + - +

Earning Members -

+

- Salaried - SENP - SEP + + {{cusSeg.name}} + @@ -49,12 +50,12 @@ - @@ -64,7 +65,7 @@

Non Earning Members -

+

- + - @@ -105,7 +106,7 @@ -

Residence

+

Residence

@@ -117,16 +118,16 @@ - Self Owned - Family Owned - Rented - Others + + {{ownerShip.name}} + - + - + 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 5d7148a1c..f5c65ad57 100644 --- 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 @@ -43,32 +43,28 @@ export class FamilyDetailsComponent implements OnInit { public ownership: AbstractControl; public ownershipOther: AbstractControl; public rent: AbstractControl; - filteredStates: any = [ - 'Main Applicant', - 'Co-Applicant ', - 'Accountant', - 'Manager', - 'Relative of the applicant', - 'Friend of the Applicant', - 'DSA', - 'Other' - ]; + relationData: any = []; occupationData: any = []; + personMetData: any = []; + ownerShipData: any = []; + customerSegData: any = []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { this.notifier = notifier; } ngOnInit() { - this.getRelation(); - this.getOccupation(); + this.getMasterDetails('RELATIONSHIPS',1); + this.getMasterDetails('OCCUPATIONMEMBERS',2); + this.getMasterDetails('PERSONSMET',3); + this.getMasterDetails('RESIDENCEOWNERSHIP',4); + this.getMasterDetails('CUSTOMERSEGMENT',5) this.initFamilyForm(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '6'; this._pd.retriveForm(params).subscribe(data => { - console.log('data', data); const control = this.familyForm.controls['nonEarningMembers']; const value = this.familyForm.controls['earningMembers']; if (data.status == 200) { @@ -149,7 +145,7 @@ export class FamilyDetailsComponent implements OnInit { return this.fb.group({ relationship: ['', Validators.compose([Validators.required])], occupation: ['', Validators.compose([Validators.required])], - retired: ['', Validators.compose([Validators.required])], + retired: [''], }); } @@ -169,59 +165,67 @@ export class FamilyDetailsComponent implements OnInit { const control = this.familyForm.controls['nonEarningMembers']; control.removeAt(index); } - - - getRelation() { - let master_name = 'RELATIONSHIPS'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); - data.records.forEach(val => { - if (val.isactive == 1) { - this.relationData.push(val); + // 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); } - }) - }); - } - getOccupation() { - let master_name = 'OCCUPATIONMEMBERS'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); - data.records.forEach(val => { - if (val.isactive == 1) { - this.occupationData.push(val); + 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; } - console.log('data', this.familyForm.value); let records: any = {}; records.no_of_years = this.years.value; - if (this.ownership.value == 'Others') { + if (this.ownership.value == 4) { records.ownership_others = this.ownershipOther.value; } records.ownership = this.ownership.value; records.residence = this.residence.value; - if (this.ownership.value == 'Rented') { + if (this.ownership.value == 3) { records.what_rent = this.rent.value; } - if (this.person.value == 'Other') { + if (this.person.value == 8) { records.person_met_other = this.personOther.value; } records.person_met = this.person.value; records.family_members = this.members.value; records.earning_members = this.familyForm.controls['earningMembers'].value; - records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value; + // filter retired conditions + let non_earning_members_filter = this.familyForm.controls['nonEarningMembers'].value.map(function(obj) { + if(obj.occupation==3){ + return obj; + } + else{ + obj.retired=''; + return obj; + } + }); + records.non_earning_members = non_earning_members_filter; records.family_details_form_remark = this.familyForm.controls['family_details_form_remark'].value; records.pdid = this.pdid; records.formid = '6'; // records.fk_createdby = '251'; - console.log('params', records); this._pd.saveForm(records).subscribe(data => { - console.log('data', data); this.notifier.notify('success', 'Saved Successfully.'); }, error => { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); 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 720f89fc3..adadb2070 100644 --- 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 @@ -1,8 +1,9 @@ +

Financial Information

-

Data as per Financial statements

+

Data as Per Financial Statements

- + - + @@ -24,16 +25,16 @@ - +
@@ -51,10 +52,10 @@ - + - + @@ -63,15 +64,15 @@ - +
@@ -85,6 +86,9 @@
- +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss index efbc1400d..833488467 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss @@ -9,6 +9,7 @@ } .matcard mat-form-field { margin: 0 2%; + width:26% } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index 41e4e8014..6d12f4675 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -46,7 +46,6 @@ export class FinancialInfoComponent implements OnInit { params.pd_id = this.pdid; params.pd_form_id = this.form_id; this._pd.retriveForm(params).subscribe(value => { - console.log('value', value); const financial_date = this.financialForm.controls['date_per_financial']; const estimated_val = this.financialForm.controls['estimated_value']; if (value.status == 200) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index dd8ad6799..db7dbacfa 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -1,10 +1,14 @@ +

Loan Details

- + - + {{ enduse.name }} + + - + - Yes No - - + + + + Yes No - - - - + - - + + - + - + {{ sour.name }} + + + - + - + @@ -67,7 +76,11 @@ - + + {{ typeprop.name }} + + + - + - {{owner.applicant_name}} - + {{ status.name }} + + + - - @@ -120,6 +138,9 @@
- +
+ +
\ No newline at end of file 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 01648a36d..30dff2db8 100644 --- 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 @@ -39,6 +39,10 @@ export class LoanDetailsComponent implements OnInit { isSource: boolean = false; endUserList: any = []; ownerNames: any = []; + m_endUseofLoad = []; + m_sourceofamount = []; + m_mortageTypeProperty = []; + m_statusofCunstruction = []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { @@ -48,6 +52,10 @@ export class LoanDetailsComponent implements OnInit { ngOnInit() { this.applicants = this.applicant_details.pdapplicants_detials; this.initloanDetailsForm(); + this.getM_EndUseofLoad(); + this.getM_sourceofamount(); + this.getM_MortageTypeProperty(); + this.getM_StatusofCunstruction(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; @@ -102,6 +110,60 @@ export class LoanDetailsComponent implements OnInit { } }) } + +// ============= + + getM_EndUseofLoad() { + this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe( + data => { + this.m_endUseofLoad = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + +getM_sourceofamount() { + this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe( + data => { + this.m_sourceofamount = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_MortageTypeProperty() { + this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe( + data => { + this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_StatusofCunstruction() { + this._pd.getAllMasterDatas('STATUSOFCONSTRUCTION').subscribe( + data => { + this.m_statusofCunstruction = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + + +// ================== public initloanDetailsForm(): void { this.loanDetailsForm = this.fb.group({ loan_amount: ['', Validators.compose([Validators.required])], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html index fc82feab0..67ff552a5 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html @@ -80,11 +80,11 @@ {{frq.name}}
- - @@ -101,7 +101,7 @@
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html index 163347dd9..1623f9e05 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html @@ -1,4 +1,6 @@ -
+ +

Personal Details

+ @@ -15,10 +17,13 @@ + + Enter Valid Age. + @@ -27,16 +32,16 @@ - - {{education}} + + {{education.qualification_name}} - - {{earning}} + + {{earning.earning_member_status}} @@ -68,6 +73,8 @@ + Enter Valid Age. + @@ -78,8 +85,8 @@ - - {{education}} + + {{education.qualification_name}} @@ -87,8 +94,8 @@ - - {{earning}} + + {{earning.earning_member_status}} @@ -117,7 +124,7 @@
Remarks - +
@@ -126,8 +133,9 @@
- +
+ \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index 7f83ff4c8..4faf03284 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -11,9 +11,12 @@ import { Key } from 'protractor'; }) export class PersonalInfoComponent implements OnInit { - qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"]; - earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"]; + //qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"]; + //earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"]; + earningStatus:any=[]; + qualifications:any=[]; relationShipList:any=[]; + @Input() pdid : string; @Input() pd_all_details:any; form_id:number; @@ -38,9 +41,10 @@ export class PersonalInfoComponent implements OnInit { } ngOnInit() { - this.loadPDDetails(this.pdid,this.form_id); - this.getRelationMaster(); + this.getMasterDetails('RELATIONSHIPS',1); + this.getMasterDetails('EARNINGMEMBERSSTATUS',2); + this.getMasterDetails('EDUQUALIFICATION',3); this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1); // console.log(this.mainApplicantDetails) this.coApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 0); @@ -74,7 +78,7 @@ loadFormWithIDData(data) { let mainApplicantGroup = new FormArray(main_result.map((item,key) => new FormGroup({ name_ans:new FormControl(item.name_ans, Validators.required), - age_ans:new FormControl(item.age_ans, Validators.required), + age_ans:new FormControl(item.age_ans, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ans:new FormControl(item.entity_ans, Validators.required), qualification_ans:new FormControl(item.qualification_ans, Validators.required), earning_ans:new FormControl(item.earning_ans, Validators.required), @@ -88,7 +92,7 @@ loadFormWithIDData(data) { coApplicantGroup = new FormArray(co_result.map((item,key) => new FormGroup({ name_ans:new FormControl(item.name_ans, Validators.required), - age_ans:new FormControl(item.age_ans, Validators.required), + age_ans:new FormControl(item.age_ans, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ans:new FormControl(item.entity_ans, Validators.required), qualification_ans:new FormControl(item.qualification_ans, Validators.required), earning_ans:new FormControl(item.earning_ans, Validators.required), @@ -103,10 +107,10 @@ loadFormWithIDData(data) { name_id:new FormControl(0), age_ques:new FormControl(this.coApplicantQuestions[1]), age_id:new FormControl(1), - age_ans:new FormControl(null, Validators.required), + age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ques: new FormControl(this.coApplicantQuestions[2]), entity_id: new FormControl(2), - entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required), + entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required), qualification_ques: new FormControl(this.coApplicantQuestions[3]), qualification_id: new FormControl(3), qualification_ans:new FormControl(null, Validators.required), @@ -131,6 +135,7 @@ loadFormWithIDData(data) { }); //console.log(this._personalForm); this.loadDataStatus = true; + } loadFormData(){ @@ -142,10 +147,10 @@ loadFormWithIDData(data) { name_id:new FormControl(0), age_ques:new FormControl(this.mainApplicantQuestions[1]), age_id:new FormControl(1), - age_ans:new FormControl(null, Validators.required), + age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ques: new FormControl(this.mainApplicantQuestions[2]), entity_id: new FormControl(2), - entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required), + entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required), qualification_ques: new FormControl(this.mainApplicantQuestions[3]), qualification_id: new FormControl(3), qualification_ans:new FormControl(null, Validators.required), @@ -161,10 +166,10 @@ loadFormWithIDData(data) { name_id:new FormControl(0), age_ques:new FormControl(this.coApplicantQuestions[1]), age_id:new FormControl(1), - age_ans:new FormControl(null, Validators.required), + age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ques: new FormControl(this.coApplicantQuestions[2]), entity_id: new FormControl(2), - entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required), + entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required), qualification_ques: new FormControl(this.coApplicantQuestions[3]), qualification_id: new FormControl(3), qualification_ans:new FormControl(null, Validators.required), @@ -186,6 +191,7 @@ loadFormWithIDData(data) { }); //console.log(this._personalForm); this.loadDataStatus = true; + } //get pd main applicant array values @@ -194,21 +200,35 @@ this.loadDataStatus = true; // get pd co applicant array values get pdCoapplicant() {return this._personalForm.get('coItem') as FormArray;} - // get relation master details - getRelationMaster(){ - let relation ="RELATIONSHIPS"; - this._pd.getAllMasterDatas(relation).subscribe( + // get all master details + getMasterDetails(table:string,type:number){ + this._pd.getAllMasterDatas(table).subscribe( data => { if (data.status == 200) { - this.relationShipList=data.records; + if(type==1){ + this.relationShipList=data.records.filter(item => item.isactive == 1); + } + else if(type==2){ + this.earningStatus=data.records.filter(item => item.isactive == 1); + } + else if(type==3){ + this.qualifications=data.records.filter(item => item.isactive == 1); + } + } }, error => this.errorMessage = error); } - // submit forms details submitPersonalForm(formData:any) { - if(this._personalForm.valid){ + if (this._personalForm.invalid) { + this.validateAllFormFields(this._personalForm); + + // this.notifier.notify('warning', 'All Fields Are Required.!'); + + return; + } + else{ let main_applicantDetails:any=[]; let co_applicantDetails:any=[]; @@ -257,5 +277,20 @@ submitPersonalForm(formData:any) { } } +// validate all form group and form array fields +validateAllFormFields(formGroup: any) { + 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); + } else if (control instanceof FormArray) { + this.validateAllFormFields(control); + } + }); +} + } 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 3a55530a2..d293f4b58 100644 --- 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 @@ -1,4 +1,5 @@ +

Stock Details

@@ -18,20 +19,20 @@ - - + + - - + +
@@ -54,20 +55,20 @@ - - + + - - + +
@@ -81,6 +82,10 @@
- +
+ +
+ \ 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 b244be4e3..aebcd79b4 100644 --- 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 @@ -5,7 +5,7 @@
- + You must Include Raw Material Details.
@@ -40,7 +40,7 @@
- + {{ pm.name }} @@ -61,8 +61,8 @@
- - {{ feq.name }} + + {{ feq.name }}
@@ -75,7 +75,7 @@
- +
@@ -84,12 +84,12 @@
- -
+
- + +
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 674a1dd52..e359094f9 100644 --- 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 @@ -33,64 +33,102 @@ export class SupplierInfoComponent implements OnInit { public _supplierQuesFrom: FormGroup; public submitted = false; - public m_paymentModeType= [ - { - 'id': "1", - 'name': 'Immediate Or Advanced Payment' - }, - { - 'id': "2", - 'name': 'Credit' - }, - { - 'id': "3", - 'name': 'Combination of Both' - }, - ]; - public m_freqOfPurchase= [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] +public m_paymentModeType= []; + // public m_paymentModeType= [ + // { + // 'id': "1", + // 'name': 'Immediate Or Advanced Payment' + // }, + // { + // 'id': "2", + // 'name': 'Credit' + // }, + // { + // 'id': "3", + // 'name': 'Combination of Both' + // }, + // ]; +public m_freqOfPurchase= []; + // public m_freqOfPurchase= [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] + + private notifier: NotifierService; constructor( + notifier: NotifierService, private _formBuilder: FormBuilder, - private pdTrigerService: PdTrigerService) { } + private pdTrigerService: PdTrigerService) { + this.notifier = notifier; + } ngOnInit() { - + this.getM_FreqOfPurchase(); + this.getM_PaymentModeType(); this.getPdSupplierFormDetails(); } + +// ================== + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PaymentModeType() { + this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe( + data => { + this.m_paymentModeType = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + +// ================== + apiLoadFinish: boolean = false; getPdSupplierFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe( @@ -217,22 +255,22 @@ apiLoadFinish: boolean = false; //To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - alert(JSON.stringify(answerFormValues)); + // alert(JSON.stringify(answerFormValues)); //Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { if (dataresult.status == 200) { // console.log(dataresult); - // this.notifier.notify('success', 'Record Saved Successfully.!'); + this.notifier.notify('success', 'Record Saved Successfully.!'); // this.dialogRef.close(); // alert("sample alert for Saving"); } else { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); // this.errorMessage = "Some Thing Wents Wrong Try Again !"; } }, error => { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); // this.errorMessage = "Something Wents Wrong Try Again !"; // this.dialogRef.close(); }); 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 ab40fa472..830380285 100644 --- 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 @@ -422,7 +422,7 @@ - + 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 026e6a552..627291c50 100644 --- 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 @@ -46,69 +46,69 @@ export class StartPdComponent implements OnInit, OnDestroy { // 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", - }, - ]; + // 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=[]; // category static form buttons -// categoryFormButtons: any; + categoryFormButtons: any; // = [ // { // "form_id": 1, @@ -293,6 +293,7 @@ pdFullDetails:any=[]; 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; 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 234582cf1..60a7d8168 100644 --- 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 @@ -5,7 +5,7 @@

{{master.lender_full_name}} - {{master.lender_applicant_id}}

{{master.pd_date_of_initiation}} -
+
@@ -15,7 +15,7 @@
- + person{{master.pd_allocated_to | titlecase}} person{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} person{{master.centralofficer | titlecase}} @@ -72,13 +72,13 @@ - +

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

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 4ccb8e100..24c4e74dd 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -165,7 +165,7 @@ const pdCustomNotifierOptions: NotifierOptions = { OwlNativeDateTimeModule, ], // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], - exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], + exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent], providers: [PdTrigerService, GetGeometricLocationService], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] }) 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 212ab19e0..547f93f6e 100644 --- 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 @@ -150,7 +150,7 @@ export class PdTrigerService { editPdMasterDetails(editData: any, status: string): Observable { editData.pd_status = status; editData.fk_updatedby = this._aws.getlocale(); - editData.updatedon = currentdate; + // editData.updatedon = currentdate; return this._http.post(this.apiUrl + "updatePDMaster", {records: editData}) .pipe( @@ -180,7 +180,7 @@ export class PdTrigerService { // update pd officer updatePdOfficer(updateData: any): Observable { updateData.fk_updatedby = this._aws.getlocale(); - updateData.updatedon = currentdate; + // updateData.updatedon = currentdate; return this._http.post(this.apiUrl + "allocatePD", {"records": updateData}) .pipe( catchError(this.handleError('operation', [])) @@ -190,7 +190,7 @@ export class PdTrigerService { // update pd schedule updateSchedule(updateData: any): Observable { updateData.fk_scheduled_by = this._aws.getlocale(); - updateData.createdon = currentdate; + // updateData.createdon = currentdate; return this._http.post(this.apiUrl + "schdulePD", {"records": updateData}) .pipe( catchError(this.handleError('operation', [])) @@ -262,7 +262,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable { // save pd answers savePDQuestions(saveData: any): Observable { saveData.createdby = this._aws.getlocale(); - saveData.fk_createdon = currentdate; + //saveData.fk_createdon = currentdate; // saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].updatedon = currentdate; diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html index db51c2644..a931c74f1 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html @@ -24,6 +24,13 @@ + + + {{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }} + + + + @@ -37,7 +44,7 @@
-

{{mainApplicantName}}

@@ -52,10 +59,12 @@

- +
+

No Records Found..

+
@@ -362,7 +371,66 @@ - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss index fc7ac8814..9db46e8db 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss @@ -1,118 +1,136 @@ @import "./../../../../assets/styles/scss/components/messages"; :host { - margin-left: -5px; - margin-right: -5px; - margin-top: -5px; - display: block; -} -:host /deep/ { - mat-sidenav { - width: 250px; - } - .mat-sidenav-content { - padding: 0; - - } - @media (min-width: 959px) { - .mat-sidenav-side { - background-color: transparent; - box-shadow: none!important; - } - - } -} - -.mat-expansion-panel-header-description { - color: rgba(0, 0, 0, 87); -} -.mat-card-content { - background-color: white; -} -.mat-card-actions { - background-color: white; -} - -.text-ellipsis { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.custm-list-item { - cursor: pointer; -} - - -$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; -$product-bg-color-hover: rgba(103, 58, 183, 0.7); -.p-list-main { - background: white; - margin: auto; - position: relative; - overflow: hidden !important; - border-radius: 10px 10px 10px 10px; - box-shadow: $base-card-box-shadow; - transform: scale(0.95); - transition: box-shadow 0.5s, transform 0.5s; - &:hover { - transform: scale(1); - box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); - } - .p-list { - position: relative; - .top { - height: 100%; - width: 100%; - // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; - -webkit-background-size: 100%; - -moz-background-size: 100%; - -o-background-size: 100%; - background-size: 100%; - } - .bottom { - width: 200%; - height: 15%; - transition: transform 0.5s; - h1 { - margin: 0; - padding: 0; - } - p { - margin: 0; - padding: 0; - } - .left { - height: 100%; - width: 50%; - background: #f4f4f4; - position: relative; - float: left; - .details { - padding: 5px; - float: left; - // width: calc(70% - 40px); - } + margin-left: -5px; + margin-right: -5px; + margin-top: -5px; + display: block; + } + :host /deep/ { + mat-sidenav { + width: 250px; + } + .mat-sidenav-content { + padding: 0; + + } + @media (min-width: 959px) { + .mat-sidenav-side { + background-color: transparent; + box-shadow: none!important; + } + + } + } + + .mat-expansion-panel-header-description { + color: rgba(0, 0, 0, 87); + } + .mat-card-content { + background-color: white; + } + .mat-card-actions { + background-color: white; + } + + .text-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .custm-list-item { + cursor: pointer; + } + + + $base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; + $product-bg-color-hover: rgba(103, 58, 183, 0.7); + .p-list-main { + background: white; + margin: auto; + position: relative; + overflow: hidden !important; + border-radius: 10px 10px 10px 10px; + box-shadow: $base-card-box-shadow; + transform: scale(0.95); + transition: box-shadow 0.5s, transform 0.5s; + &:hover { + transform: scale(1); + box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); + } + .p-list { + position: relative; + .top { + height: 100%; + width: 100%; + // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + } + .bottom { + width: 200%; + height: 15%; + transition: transform 0.5s; + h1 { + margin: 0; + padding: 0; + } + p { + margin: 0; + padding: 0; + } + .left { + height: 100%; + width: 50%; + background: #f4f4f4; + position: relative; + float: left; + .details { + padding: 5px; + float: left; + // width: calc(70% - 40px); + } + + } + .right { + width: 50%; + background: #A6CDDE; + color: white; + float: right; + height: 200%; + overflow: hidden; + .details { + padding: 20px; + float: right; + width: calc(70% - 40px); + } + - } - .right { - width: 50%; - background: #A6CDDE; - color: white; - float: right; - height: 200%; - overflow: hidden; - .details { - padding: 20px; - float: right; - width: calc(70% - 40px); - } - - - } - } - } - -} -mat-icon{ - color: #ff3636; -} + } + } + } + + } + mat-icon{ + color: #ff3636; + } + .address { + display: flex; + padding: 0 2%; + flex-direction: column; + } + + .address > * { + width: 100%; + } + .matcard mat-form-field { + margin: 0 2%; + } + .address .button { + float: right; + width: 10px; + background: #62B013; + color: white; + } diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts index 3111050c5..296a97fe3 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts @@ -30,6 +30,12 @@ selectedQuestionIndex:number; getQuestionsLength:number; answerList:any=[]; ansPDList:any=[]; + +// forms details +pdFullDetails:any=[]; +categoryFormButtons: any; +formsCategoryEnable: boolean = false; +selectedFormsCategory: any; // create values for status check pdStatusCheck :any={ "DRAFT" :'DRAFT', @@ -83,9 +89,10 @@ loadTemplates(startID:string){ 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 = data.records.template_forms; + this.pdFullDetails = data.records } else{ this.pdMasterList=""; @@ -106,6 +113,7 @@ loadTemplates(startID:string){ } OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){ + this.formsCategoryEnable = false; this.selectedCategory=selectedQuestions; this.selectedCategoryIndex=categoryIndex; this.selectedQuestionIndex=questionsIndex; @@ -427,6 +435,13 @@ optionsMapItems(items) { }); } + // direct form based questions + OnSelectDirectForms(details: any) { + this.formsCategoryEnable = true; + this.selectedFormsCategory = details; + +} + // load pd view component loadPdViewCompoent(){ this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route }); 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 6d24d5113..f31e1a45f 100644 --- 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 @@ -61,34 +61,23 @@ Applicants - - -

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

- - -
- -
- -
- + +

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

+
+ +

No Applicant

- - - - +
- - -
+
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 ef3bad0c4..67819b0e6 100644 --- 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 @@ -7,6 +7,7 @@ import { QcService } from './../../qc-service/qc.service'; import { QcListComponent } from './../qc-list.component'; import { PdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component'; import { SmartPdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component'; +import { TelePdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component'; 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'; @@ -108,7 +109,7 @@ export class QcViewComponent implements OnInit, OnDestroy { } // pd allocation to pdAllocationTo(pdData:any) { - if(pdData.fk_pd_type != 2){ + if(pdData.fk_pd_type == 1){ const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, disableClose: true @@ -131,6 +132,18 @@ export class QcViewComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID) }); } + else if(pdData.fk_pd_type == 3){ + const dialogRef = this.dialog.open(TelePdAllocationComponent, { + data: pdData, + disableClose: true, + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + + this.viewPdDetails(this.viewID) + }); + } } diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts index 101e6da51..8103d42fe 100644 --- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts +++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts @@ -52,7 +52,7 @@ export class QcService { editPdMasterDetails(editData:any,status:string):Observable{ editData.pd_status = status; editData.fk_updatedby = this._aws.getlocale(); - editData.updatedon = currentdate; + // editData.updatedon = currentdate; return this._http.post(this.apiUrl+"updatePDMaster",{records:editData}) .pipe( @@ -86,7 +86,7 @@ export class QcService { // save pd answers savePDQuestions(saveData: any): Observable { saveData.createdby = this._aws.getlocale(); - saveData.fk_createdon = currentdate; + // saveData.fk_createdon = currentdate; // saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].updatedon = currentdate; diff --git a/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html b/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html index d1e73369d..30604576f 100644 --- a/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html +++ b/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html @@ -1,10 +1,15 @@
+ + +
+
+ Entity Master +
+
-
- Entity Master -
-
+ +
@@ -52,6 +57,8 @@ + +
diff --git a/ng6-seed/src/app/settings/entity/entity.component.ts b/ng6-seed/src/app/settings/entity/entity.component.ts index 81b196f17..eed9accb7 100644 --- a/ng6-seed/src/app/settings/entity/entity.component.ts +++ b/ng6-seed/src/app/settings/entity/entity.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; -@Component({ - template: `

Entity Master Details List

- ` -}) -export class EntityComponent { -} \ No newline at end of file +// import { Component } from '@angular/core'; +// @Component({ +// template: `

Entity Master Details List

+// ` +// }) +// export class EntityComponent { +// } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity.module.ts b/ng6-seed/src/app/settings/entity/entity.module.ts index 44148d555..a6a5d04e7 100644 --- a/ng6-seed/src/app/settings/entity/entity.module.ts +++ b/ng6-seed/src/app/settings/entity/entity.module.ts @@ -22,7 +22,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { EntityRouting } from './entity.routing'; -import { EntityComponent } from './entity.component'; +// import { EntityComponent } from './entity.component'; import { EntityListComponent } from './entity-list/entity.list.component'; import { EntityAddComponent } from './entity-add/entity.add.component'; import { EntityEditComponent } from './entity-edit/entity.edit.component'; @@ -38,7 +38,7 @@ import { EntityEditBillingInfoComponent } from './entity-edit/entity-edit-billin import { DialogAddEditBillingInfo } from './entity-edit/entity-edit-billing-info/entity-edit-billing-info.component'; import { EntityEditVendorCityInfoComponent } from './entity-edit/entity-edit-vendor-city-info/entity-edit-vendor-city-info.component'; -import { MatTooltipModule } from '@angular/material/tooltip'; +// import { MatTooltipModule } from '@angular/material/tooltip'; /** * Custom angular notifier options */ @@ -96,7 +96,7 @@ const customNotifierOptions: NotifierOptions = { MatProgressBarModule,MatDialogModule, MatSortModule, MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule, MatCheckboxModule, - MatTooltipModule, + // MatTooltipModule, MatTabsModule, MatChipsModule, MatExpansionModule, @@ -105,7 +105,7 @@ const customNotifierOptions: NotifierOptions = { ReactiveFormsModule ], declarations: [ - EntityComponent, + // EntityComponent, EntityListComponent, EntityEditComponent, EntityAddComponent, @@ -118,7 +118,7 @@ const customNotifierOptions: NotifierOptions = { EntityEditVendorCityInfoComponent ], entryComponents: [ - // EntityEditComponent + EntityEditComponent, DialogAddEditBillingInfo, DialogEntityAddTatComponent, EntityAddComponent diff --git a/ng6-seed/src/app/settings/entity/entity.routing.ts b/ng6-seed/src/app/settings/entity/entity.routing.ts index dd088e903..da8366b0e 100644 --- a/ng6-seed/src/app/settings/entity/entity.routing.ts +++ b/ng6-seed/src/app/settings/entity/entity.routing.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; // Entity Component -import { EntityComponent } from './entity.component'; +// import { EntityComponent } from './entity.component'; import { EntityListComponent } from './entity-list/entity.list.component'; import { EntityAddComponent } from './entity-add/entity.add.component'; import { EntityEditComponent } from './entity-edit/entity.edit.component'; diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts index 1a9feee41..045a2017c 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IndustryMasterDialogComponent } from './industry-master-dialog.component'; +import { IndustryClassificationDialogComponent } from './industry_classification-dialog.component'; describe('IndustryMasterDialogComponent ', () => { - let component: IndustryMasterDialogComponent ; - let fixture: ComponentFixture; + let component: IndustryClassificationDialogComponent ; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ IndustryMasterDialogComponent ] + declarations: [ IndustryClassificationDialogComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(IndustryMasterDialogComponent ); + fixture = TestBed.createComponent(IndustryClassificationDialogComponent ); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts index 22d79c3df..2a4fc995a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component'; +import { PdNotificationListComponent } from './pd-notification-list.component'; describe('PdAllocationTypeListComponent', () => { - let component: PdAllocationTypeListComponent; - let fixture: ComponentFixture; + let component: PdNotificationListComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ PdAllocationTypeListComponent ] + declarations: [ PdNotificationListComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(PdAllocationTypeListComponent); + fixture = TestBed.createComponent(PdNotificationListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index e20d2a1f1..c81881908 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -1,90 +1,78 @@
-
- PD Team -
-
- - +
+ PD Team +
+
+ -
-
-
+
+
+
+
+ +
+ + + + +
+
- -
- - - -
+ - -
- - - - - Sl - {{row.serialno}} - - - - Team - {{row.team_name}} - + + Sl + {{row.serialno}} + - - Lender - {{row.lender_name}} - - - - Active - - - - - - - - Action - - - - - - - - - - - - - -
+ + Team + {{row.team_name}} + + + Lender + {{row.lender_name}} + - + + Active + + + + + + - - + + Action + + + + + + + + + + + + + +
+ +
- -
+ + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts index dac9173f9..5dd92d6e3 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts @@ -94,14 +94,14 @@ const customNotifierOptions: NotifierOptions = { MatProgressBarModule, MatDialogModule, MatSortModule, - MatToolbarModule, MatSelectModule, FlexLayoutModule, NgxMatSelectSearchModule, NgxDatatableModule, MatSortModule, MatSlideToggleModule, - MatTooltipModule,MatListModule,DragulaModule, + MatTooltipModule, + MatListModule,DragulaModule, NotifierModule.withConfig(customNotifierOptions), ], declarations: [ diff --git a/ng6-seed/src/app/settings/service/masters/masters.service.ts b/ng6-seed/src/app/settings/service/masters/masters.service.ts index eb8d45625..67a22174f 100644 --- a/ng6-seed/src/app/settings/service/masters/masters.service.ts +++ b/ng6-seed/src/app/settings/service/masters/masters.service.ts @@ -21,7 +21,9 @@ export interface Master { constant_name:string; } -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MastersService { diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts index 1a837032a..544aa2401 100644 --- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -14,7 +14,9 @@ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); /** Environment */ import { environment } from 'environments/environment'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PdTeamService { diff --git a/ng6-seed/src/app/settings/settings.module.ts b/ng6-seed/src/app/settings/settings.module.ts index 1278c61a9..102385a5b 100644 --- a/ng6-seed/src/app/settings/settings.module.ts +++ b/ng6-seed/src/app/settings/settings.module.ts @@ -25,7 +25,7 @@ import { UserListComponent } from './users/user-list/user-list.component'; import { RouterModule } from '@angular/router'; import { SettingsRoutes } from './settings.routing'; import { RegisterComponent } from '../session/register/register.component'; -import { UserService } from './service/user.service'; +// import { UserService } from './service/user.service'; import { MastersModule } from './masters/masters.module'; import { PdTeamModule } from './pd-team/pd-team.module'; @@ -50,7 +50,7 @@ import { EntityModule } from './entity/entity.module'; ], providers:[ - UserService + // UserService ], // declarations: [AddEntityComponent, EditEntityComponent, EntityListComponent] diff --git a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html index 4b0fc9fb6..d65d984fd 100755 --- a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html +++ b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html @@ -12,29 +12,32 @@
-
-
+
+
-
+

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

-

{{userDetails.role_name}}

-

{{userDetails.email}}

-

{{userDetails.mobile_no}}

+

{{userDetails.role_name}}

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

-
- - +
- +
diff --git a/ng6-seed/src/app/settings/users/users.module.ts b/ng6-seed/src/app/settings/users/users.module.ts index 0f8c5e310..debf4f1a2 100644 --- a/ng6-seed/src/app/settings/users/users.module.ts +++ b/ng6-seed/src/app/settings/users/users.module.ts @@ -23,6 +23,7 @@ import { RegisterComponent } from './register/register.component'; import { UserListComponent} from './user-list/user-list.component'; import { UserProfileComponent, ChangePasswordDialog } from './user-profile/user-profile.component'; +import { UserService } from './../service/user.service'; import { NewPasswordDialog, ForgotPass } from '../../session/login/login.component'; // import { HttpClientModule } from '@angular/common/http'; @NgModule({ @@ -41,7 +42,7 @@ import { NewPasswordDialog, ForgotPass } from '../../session/login/login.compone // HttpClientModule, ], declarations: [UserListComponent, RegisterComponent,UserProfileComponent], - + providers: [ UserService ] }) export class UsersModule { } diff --git a/ng6-seed/src/app/template/questions/add/add.component.html b/ng6-seed/src/app/template/questions/add/add.component.html index 433d85fc7..6e401d019 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -1,13 +1,17 @@ -

{{pageTitle}}

+
+
{{pageTitle}}
+
+
+
-
- - +
+ + {{ ct.category_name }} You must Select Category. @@ -39,14 +43,12 @@
-
- - + + {{ ans.answer_type_name }} You must Select Answer Type. - -
+
@@ -64,20 +66,21 @@ {{ gp.group_name }} -
--> -
+
--> +
- +
- -
+
+ +
@@ -85,5 +88,5 @@ - + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index f39261d1d..fead08903 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -1,12 +1,15 @@ -

{{pageTitle}}

+
+
{{pageTitle}}
+
+
-
- - +
+ + {{ ct.category_name }} You must Select Category. @@ -37,15 +40,13 @@
-
-
- - +
+ + {{ ans.answer_type_name }} You must Select Answer Type. - -
+
-
- - + +
- +
-
@@ -94,6 +93,9 @@ -->
+ + @@ -103,6 +105,6 @@ - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/list/list.component.html b/ng6-seed/src/app/template/questions/list/list.component.html index ac0ed4c45..afaf902e9 100644 --- a/ng6-seed/src/app/template/questions/list/list.component.html +++ b/ng6-seed/src/app/template/questions/list/list.component.html @@ -1,123 +1,126 @@ - - - -
-
- Questions Master -
-
-
- -
- - - - - - {{cat.category_name}} - - - + + +
+
+ Questions Master
-
- -
-
- - - - - - - - {{ product.category_name }} - - - - - {{ product.question }} - - - - - - - - - - - - - - - - - + + {{cat.category_name}} + + +
-
-
{{ product.question }} +
+ +
+
+ + + + + + {{ product.category_name }} + + + + + {{ product.question }} + + + + + + + + + + + + + + + + + + + +
No Record Found ...
+
+
+ + + - - -
No Record Found ...
-
-
- + --> + + + + + - - - -
+ + +
+
+ Template Master + +
+
+ + - -
-
- Template Master - -
-
- - -
-
- - + +
+
+ + +
+
+ @@ -58,15 +61,11 @@
-
- - - -
- -
+ + + +
+
- - - \ No newline at end of file + \ No newline at end of file