From 3b71c3f3d022dd5b35929173fe9fad2da6f72c33 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Fri, 8 Nov 2019 16:45:43 +0530 Subject: [PATCH 1/5] MONEYWISE added in all form --- .../forms/address/address.component.ts | 12 +++---- .../assets-info/assets-info.component.html | 8 ++--- .../business-assets-info.component.html | 8 ++--- .../business-info.component.html | 2 +- .../business-info/business-info.component.ts | 14 ++++---- .../client-info/client-info.component.html | 33 +++++++++++++++---- .../client-info/client-info.component.ts | 10 ++++-- .../family-details.component.html | 4 +-- .../final-remarks.component.html | 3 +- .../final-remarks/final-remarks.component.ts | 4 +-- .../financial-info.component.html | 4 +-- .../loan-details/loan-details.component.html | 8 ++--- .../loan-details/loan-details.component.ts | 6 ++-- .../start-pd/forms/stock/stock.component.html | 21 ++++++++---- .../start-pd/forms/stock/stock.component.ts | 3 ++ .../supplier-info.component.html | 33 +++++++++++++++---- .../supplier-info/supplier-info.component.ts | 7 ++++ 17 files changed, 123 insertions(+), 57 deletions(-) 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 69b67fdf9..62b53d73d 100755 --- 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 @@ -179,7 +179,7 @@ export class AddressComponent implements OnInit { } } - if(this.lender_short_name != 'CLIX') { + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE') { this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '') this.addressForm.controls.uom.setValue(datas.uom); @@ -222,7 +222,7 @@ export class AddressComponent implements OnInit { // was_the_company_name_board_sighted:['', Validators.compose([Validators.required])], address_form_remark: [''] }); - if(this.lender_short_name == 'CLIX'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE'){ this.addressForm.removeControl('estimated_area'); this.addressForm.removeControl('uom'); } @@ -532,7 +532,7 @@ export class AddressComponent implements OnInit { records.addresses[0].locality_mixuse = this.addressForm.controls.locality_mixuse.value; records.addresses[0].pd_location = this.addressForm.controls.pd_location.value; records.addresses[0].comment_locality = this.addressForm.controls.comment_locality.value; - if(this.lender_short_name != 'CLIX') { + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE') { records.addresses[0].estimated_area = this.addressForm.controls.estimated_area.value records.addresses[0].uom = this.addressForm.controls.uom.value; if (this.addressForm.controls.uom.value == 1) { @@ -557,7 +557,7 @@ export class AddressComponent implements OnInit { records.alternative_addresses[0].locality_mixuse = this.addressForm.controls.locality_mixuse.value; records.alternative_addresses[0].pd_location = this.addressForm.controls.pd_location.value; records.alternative_addresses[0].comment_locality = this.addressForm.controls.comment_locality.value; - if(this.lender_short_name != 'CLIX') { + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE') { records.alternative_addresses[0].estimated_area = this.addressForm.controls.estimated_area.value records.alternative_addresses[0].uom = this.addressForm.controls.uom.value; if (this.addressForm.controls.uom.value == 1) { @@ -735,7 +735,7 @@ export class AddressComponent implements OnInit { this.addressForm.controls.locality_others.setValue(datas.locality_others); } - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '') this.addressForm.controls.uom.setValue(datas.uom) this.setOthers(datas.uom, '', 5); @@ -806,7 +806,7 @@ export class AddressComponent implements OnInit { this.addressForm.controls.locality_others.setValue(datas.locality_others); } - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ this.addressForm.controls.estimated_area.setValue(datas.estimated_area); this.addressForm.controls.uom.setValue(datas.uom); this.setOthers(datas.uom, '', 5); 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 884e9b4df..f63c4aab2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -74,13 +74,13 @@ - + -
+
@@ -358,7 +358,7 @@ -->
- + @@ -386,7 +386,7 @@ -
+
- + Age of Asset in Years - +
@@ -416,7 +416,7 @@ Owned by is Required - + Age of Asset in Years + *ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned' && (lender_short_name != 'CLIX' && lender_short_name != 'MONEYWISE')">
Permanent Required - + Temporary Required 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 cd4fbb770..6100500d4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -258,7 +258,7 @@ export class BusinessInfoComponent implements OnInit { //businessVal.designation = DesgnArray; businessVal.partners = PartnrArray; businessVal.documents = DocArray; - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ if (data.records.persons_with_relationships) { let selectedFamilyMember = Object.keys(data.records.persons_with_relationships).map(function (key) { return data.records.persons_with_relationships[key]; @@ -394,7 +394,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedRetail.length > 0) { selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -461,7 +461,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedWholesale.length > 0) { selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -530,7 +530,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedService.length > 0) { selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert'); - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -657,7 +657,7 @@ export class BusinessInfoComponent implements OnInit { this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc'); - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ // change relation with businees update dat sorce table this.businessForm.controls['persons_with_relationships'].valueChanges.subscribe(val => { let relationControl = this.businessForm.controls['persons_with_relationships']; @@ -719,7 +719,7 @@ export class BusinessInfoComponent implements OnInit { service_provider_activity_details: this.fb.array([]), // others_activity_details: this.fb.array([]), }); - if(this.lender_short_name == 'CLIX'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE'){ this.businessForm.removeControl('persons_with_relationships'); } } @@ -800,7 +800,7 @@ export class BusinessInfoComponent implements OnInit { this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert'); // check activity for extra question make dynamic - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets'); this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines'); if (this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0) { 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 12fd1c5a6..bb5b28b9e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -56,7 +56,7 @@
-
+
Select @@ -104,7 +104,7 @@ Enter Valid LandLine Number.
-
+
@@ -382,7 +396,7 @@ Enter Valid LandLine Number.
-
+
-
+
@@ -273,7 +273,7 @@
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html index e54872b00..6d6d2ab7d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html @@ -147,9 +147,10 @@ Specify the Mode of Transport Used to Visit the PD address Required - + CLIX + MONEYWISE diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts index bd8fcf686..c379216e2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts @@ -100,7 +100,7 @@ export class FinalRemarksComponent implements OnInit { final_form_remarks: [''] }); - if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE' || this.product_abbr == 'LAEP'){ this.product_abbr == 'LAEP' ? this._finalRemarkForm.addControl('outlet_location', new FormControl('', Validators.required)) : this._finalRemarkForm.removeControl('outlet_location'); this._finalRemarkForm.addControl('is_competition', new FormControl('')); this._finalRemarkForm.addControl('sealing_activity', new FormControl('')); @@ -239,7 +239,7 @@ export class FinalRemarksComponent implements OnInit { this._finalRemarkForm.controls.market_intelligence.setValue(data.records.market_intelligence || ''); - if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE' || this.product_abbr == 'LAEP'){ if(this.product_abbr == 'LAEP') {this._finalRemarkForm.controls.outlet_location.setValue(this.product_abbr == 'LAEP' ? data.records.outlet_location : ''); } this._finalRemarkForm.controls.is_competition.setValue(data.records.is_competition); 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 e1038369f..2bf2b6808 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -397,7 +397,7 @@ {{AV_netProfitAmtInwords[i]}} Only --> - + {{"₹"}} @@ -486,7 +486,7 @@
-
+
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 de7c0f7a2..64839cefb 100755 --- 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 @@ -58,7 +58,7 @@ End Use Required - + Select @@ -76,7 +76,7 @@ -
+
@@ -119,7 +119,7 @@ - + Select @@ -166,7 +166,7 @@ - + {{"₹"}} {{ loanDetailsForm.controls['emi_level'].value | numberToWords }} Only 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 0ace46d78..36a6dfebc 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -335,7 +335,7 @@ export class LoanDetailsComponent implements OnInit { if (this.pd_all_details.pdmaster_details.fk_subproduct_id) { this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id); } - if(this.lenderShortName == 'CLIX'){ + if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'MONEYWISE'){ // console.log(this.lenderShortName); this.loanDetailsForm.controls['is_transfer'].setValue("no"); this.selectedBalancesTransferChanges("no") @@ -838,7 +838,7 @@ export class LoanDetailsComponent implements OnInit { } } } - if(this.lenderShortName == 'CLIX'){ + if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'MONEYWISE'){ this.loanDetailsForm.controls['own_contribution'].setValue(''); this.loanDetailsForm.controls['own_contribution'].clearValidators(); this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity(); @@ -892,7 +892,7 @@ export class LoanDetailsComponent implements OnInit { records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value; } else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') { - if (this.isContribution || this.lenderShortName == 'CLIX') { + if (this.isContribution || this.lenderShortName == 'CLIX' || this.lenderShortName == 'MONEYWISE') { records.own_contribution = ''; records.source_group = ''; records.other_source = ''; 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 4682378f2..42d21368b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -12,7 +12,7 @@
-
+ @@ -46,7 +46,7 @@ Stock Required -
+
@@ -141,7 +141,7 @@ -
+
-
+
-
+
- +

@@ -430,7 +430,7 @@ -
+
+
+ + + +

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 084d44818..19b60a76f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -176,6 +176,7 @@ export class StockComponent implements OnInit { trade_details: this.fb.array([this.tradingFormCreation(type4length)]), servicing_details: this.fb.array([this.servicingFormCreation(type5length)]), is_sufficiant_finished_and_traded_goods: [dataForm.is_sufficiant_finished_and_traded_goods], + stock_validated: [dataForm.stock_validated || null], finished_and_traded_goods_remarks: [dataForm.finished_and_traded_goods_remarks], is_sufficiant_service_goods: [dataForm.hasOwnProperty('is_sufficiant_service_goods') ? dataForm.is_sufficiant_service_goods : ''], service_goods_remarks: [dataForm.hasOwnProperty('service_goods_remarks') ? dataForm.service_goods_remarks : '' ] @@ -240,6 +241,7 @@ export class StockComponent implements OnInit { trade_details: this.fb.array([this.tradingFormCreation(type4length)]), servicing_details: this.fb.array([this.servicingFormCreation(type5length)]), is_sufficiant_finished_and_traded_goods: [''], + stock_validated: [''], finished_and_traded_goods_remarks: [''], is_sufficiant_service_goods: [''], service_goods_remarks: [''] @@ -294,6 +296,7 @@ export class StockComponent implements OnInit { trade_details: this.fb.array([this.tradingFormCreation(type4length)]), servicing_details: this.fb.array([this.servicingFormCreation(type5length)]), is_sufficiant_finished_and_traded_goods: [''], + stock_validated: [''], finished_and_traded_goods_remarks: [''], is_sufficiant_service_goods: [''], service_goods_remarks: [''] 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 522c2ed2a..c2b8904b1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -50,7 +50,7 @@ formControlName="manufacturing_supplier_name">
-
+
@@ -108,7 +108,7 @@ Enter Valid LandLine Number.
-
+
- + @@ -386,7 +386,7 @@ -
+
Asset Owned by Required - - +
+ Age of Asset in Years Invalid year format -->
+
- +
@@ -415,8 +416,8 @@ *ngIf="sup.controls['business_name_of_the_other_owner'].hasError('required')">Asset Owned by is Required - - +
+ Age of Asset in Years Invalid year format -->
+
+ *ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned' && (lender_short_name != 'CLIX' && lender_short_name != 'SMC' || product_abbr === 'LFMP')">
appt.applicant_type != 2) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts index a8f8836d3..20ae9b662 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts @@ -47,7 +47,9 @@ export class BusinessInfoGroupComponent implements OnInit { this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr; this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr; this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name; + console.log(this.lender_short_name); this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; + console.log(this.product_abbr); } @@ -197,7 +199,7 @@ export class BusinessInfoGroupComponent implements OnInit { this.getCompanyListForBusiness(); }); }else - if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && details.form_id==23){ + if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' || (this.product_abbr == 'LFMP' && this.lender_short_name == 'SMC')) && details.form_id==23){ const dialogRef = this.dialog.open(FuturePlansAndBusinessEnvironmentComponent, { data: this.pd_all_details, maxWidth: '100vw', 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 6835041e3..7aa7b55cb 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -1577,7 +1577,7 @@ type="number" formControlName="employees_permanent" required> Permanent Required - + Temporary Required 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 6100500d4..bb5f646fd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -130,7 +130,9 @@ export class BusinessInfoComponent implements OnInit { this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr; this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr; this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name; + console.log(this.lender_short_name); this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; + console.log(this.product_abbr); console.log("com",this.company_id) this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:this.company_id} } @@ -258,7 +260,7 @@ export class BusinessInfoComponent implements OnInit { //businessVal.designation = DesgnArray; businessVal.partners = PartnrArray; businessVal.documents = DocArray; - if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ + if(this.lender_short_name != 'CLIX'){ if (data.records.persons_with_relationships) { let selectedFamilyMember = Object.keys(data.records.persons_with_relationships).map(function (key) { return data.records.persons_with_relationships[key]; @@ -394,12 +396,16 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedRetail.length > 0) { selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); - if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ + if( !(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ + console.log('###PAY');console.log(this.lender_short_name,this.product_abbr) selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details'); } + else{ + console.log('###ELSE');console.log(this.lender_short_name,this.product_abbr) + } selectedRetail.forEach((element, index) => { this.CheckExport(element.area_of_sale, 'RActivity', index); @@ -461,7 +467,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedWholesale.length > 0) { selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); - if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ + if(!(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -530,7 +536,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedService.length > 0) { selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert'); - if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ + if(!(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -657,7 +663,7 @@ export class BusinessInfoComponent implements OnInit { this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc'); - if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ + if(this.lender_short_name != 'CLIX'){ // change relation with businees update dat sorce table this.businessForm.controls['persons_with_relationships'].valueChanges.subscribe(val => { let relationControl = this.businessForm.controls['persons_with_relationships']; @@ -719,7 +725,7 @@ export class BusinessInfoComponent implements OnInit { service_provider_activity_details: this.fb.array([]), // others_activity_details: this.fb.array([]), }); - if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE'){ + if(this.lender_short_name == 'CLIX'){ this.businessForm.removeControl('persons_with_relationships'); } } @@ -800,7 +806,7 @@ export class BusinessInfoComponent implements OnInit { this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert'); // check activity for extra question make dynamic - if(this.lender_short_name != 'CLIX' && this.lender_short_name != 'MONEYWISE'){ + if(!(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets'); this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines'); if (this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0) { 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 bb5b28b9e..d0fbd22c1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -56,7 +56,7 @@
-
+
Select @@ -104,7 +104,7 @@ Enter Valid LandLine Number.
-
+
@@ -396,7 +396,7 @@ Enter Valid LandLine Number.
-
+
-
+
@@ -273,7 +273,7 @@
-
+
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 387b106b1..cd1f58984 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts @@ -67,6 +67,7 @@ export class FamilyDetailsComponent implements OnInit { stateDataList: any = []; cityDataList: any = []; pincodeDataList: any = []; + product_abbr: any; /** constructor Of the class */ constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, @@ -81,6 +82,7 @@ export class FamilyDetailsComponent implements OnInit { this.selectPerson = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type != '2'); this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id; this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name; + this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant; this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html index 6d6d2ab7d..95a6a785f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html @@ -147,10 +147,10 @@ Specify the Mode of Transport Used to Visit the PD address Required - + CLIX - MONEYWISE + SMC diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts index c379216e2..40b4c62dd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts @@ -100,7 +100,7 @@ export class FinalRemarksComponent implements OnInit { final_form_remarks: [''] }); - if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE' || this.product_abbr == 'LAEP'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'SMC' || this.product_abbr == 'LAEP'){ this.product_abbr == 'LAEP' ? this._finalRemarkForm.addControl('outlet_location', new FormControl('', Validators.required)) : this._finalRemarkForm.removeControl('outlet_location'); this._finalRemarkForm.addControl('is_competition', new FormControl('')); this._finalRemarkForm.addControl('sealing_activity', new FormControl('')); @@ -239,7 +239,7 @@ export class FinalRemarksComponent implements OnInit { this._finalRemarkForm.controls.market_intelligence.setValue(data.records.market_intelligence || ''); - if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'MONEYWISE' || this.product_abbr == 'LAEP'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'SMC' || this.product_abbr == 'LAEP'){ if(this.product_abbr == 'LAEP') {this._finalRemarkForm.controls.outlet_location.setValue(this.product_abbr == 'LAEP' ? data.records.outlet_location : ''); } this._finalRemarkForm.controls.is_competition.setValue(data.records.is_competition); 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 2bf2b6808..a2e1960e7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -397,7 +397,7 @@ {{AV_netProfitAmtInwords[i]}} Only --> - + {{"₹"}} @@ -486,7 +486,7 @@
-
+
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 64839cefb..ece26c11d 100755 --- 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 @@ -58,7 +58,7 @@ End Use Required - + Select @@ -76,7 +76,7 @@ -
+
@@ -119,7 +119,7 @@ - + Select @@ -166,7 +166,7 @@ - + {{"₹"}} {{ loanDetailsForm.controls['emi_level'].value | numberToWords }} Only @@ -246,7 +246,7 @@ {{"₹"}} {{ loanDetailsForm.controls['emv_per_customer'].value | numberToWords }} Only - + 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 36a6dfebc..7056adae4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -335,7 +335,7 @@ export class LoanDetailsComponent implements OnInit { if (this.pd_all_details.pdmaster_details.fk_subproduct_id) { this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id); } - if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'MONEYWISE'){ + if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'SMC'){ // console.log(this.lenderShortName); this.loanDetailsForm.controls['is_transfer'].setValue("no"); this.selectedBalancesTransferChanges("no") @@ -838,7 +838,7 @@ export class LoanDetailsComponent implements OnInit { } } } - if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'MONEYWISE'){ + if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'SMC'){ this.loanDetailsForm.controls['own_contribution'].setValue(''); this.loanDetailsForm.controls['own_contribution'].clearValidators(); this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity(); @@ -892,7 +892,7 @@ export class LoanDetailsComponent implements OnInit { records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value; } else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') { - if (this.isContribution || this.lenderShortName == 'CLIX' || this.lenderShortName == 'MONEYWISE') { + if (this.isContribution || this.lenderShortName == 'CLIX' || this.lenderShortName == 'SMC') { records.own_contribution = ''; records.source_group = ''; records.other_source = ''; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts index 882d6bd78..69fd6a9f0 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts @@ -128,21 +128,23 @@ export class QueriesDocsComponent implements OnInit { // geoCoords=retrieved_data.link // } - retrieved_data.docs_to_be_sighted.forEach((doc_value,index)=>{ - if(doc_value.hasOwnProperty('img')){ - this.docs_change_fun(index,'yes') - } - else if(doc_value.hasOwnProperty('reason')){ - this.docs_change_fun(index,'no'); - } - // let data=doc_value.control_name - // data=parseInt(data) - // console.log("data",data); - // data=doc_value.data - // this.docs_change_fun(index,data) - }) + if(retrieved_data.docs_to_be_sighted != null){ + retrieved_data.docs_to_be_sighted.forEach((doc_value,index)=>{ + if(doc_value.hasOwnProperty('img')){ + this.docs_change_fun(index,'yes') + } + else if(doc_value.hasOwnProperty('reason')){ + this.docs_change_fun(index,'no'); + } + // let data=doc_value.control_name + // data=parseInt(data) + // console.log("data",data); + // data=doc_value.data + // this.docs_change_fun(index,data) + }) + } // console.log("form123",this.docsCollectedForm.value); - this.docsCollectedForm.setValue(retrieved_data) + this.docsCollectedForm.patchValue(retrieved_data) } },err=>{ 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 42d21368b..45da5fed6 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -46,7 +46,7 @@ Stock Required -
+
@@ -141,7 +141,7 @@ -
+
-
+
-
+
-
+
-
+
-
+
@@ -108,7 +108,7 @@ Enter Valid LandLine Number.
-
+
+ + filter_list + + Advance Filter + + + + + + + +
+ + + + + {{details.sales_pd_id}} + + + + + + Not Available +
+ + {{details.applicant_name}} +
+ {{details.applicant_id}} +
+
+ + + {{details.short_name}} + + + + + {{details.abbr}} + + + + + + Not Available +
+ + {{details.officer_name}} + +
+
+ + + {{details.createdon | date: 'dd/MM/yyyy'}} + + + + + + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.scss b/ng6-seed/src/app/sales-pd/sales-pd.component.scss new file mode 100644 index 000000000..51db57442 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.scss @@ -0,0 +1,20 @@ +.ic-change:hover { + transform: scale(1.1); + color: green; +} +.cell{ + display:inline !important; + text-align: center !important; +} +.cellhide{ + display: none !important; +} +.center{ + text-align:center; +} +.fontsize{ + font-size:14px; +} +.toolbar-space { + flex: 0.01 0 auto; +} diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.spec.ts b/ng6-seed/src/app/sales-pd/sales-pd.component.spec.ts new file mode 100644 index 000000000..60fd919b6 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SalesPdComponent } from './sales-pd.component'; + +describe('SalesPdComponent', () => { + let component: SalesPdComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SalesPdComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SalesPdComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.ts b/ng6-seed/src/app/sales-pd/sales-pd.component.ts new file mode 100644 index 000000000..8699d8e42 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.ts @@ -0,0 +1,77 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; +import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; + +@Component({ + selector: 'app-sales-pd', + templateUrl: './sales-pd.component.html', + styleUrls: ['./sales-pd.component.scss'] +}) +export class SalesPdComponent implements OnInit { + + public dataLengthTab4: number; + public dataSourceTab4 = new MatTableDataSource(); + + displayedColumns = ['SalesPdId','Applicant Name','Short Name','Abbr','Officer Name','Create On','Action']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + + // data source variable details + salesPdData:any[] = []; + + errorMessage:any[]=[]; + recordStatus: boolean; + + // pagination variable details + length = 5; + pageIndex = 0; + pageSize = 10; + pageEvent: PageEvent; + todaydate:Date = new Date(); + + constructor(private _pdSales: PdTrigerService) { } + + ngOnInit() { + this.loadSalesPDDetails() + } + + + + loadSalesPDDetails() { + this._pdSales.getSalesPd() + .subscribe( + data => { + if (data.status == 200) { + this.salesPdData = data.records; + this.dataLengthTab4 = data.records.length; + this.dataSourceTab4.data = this.salesPdData; + } + else{ + this.salesPdData=[]; + this.dataLengthTab4= null; + this.recordStatus=true; + } + } + // , error => this.errorMessage = error); + ,error => { + this.errorMessage.push(error); + // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + alert(error.html_format); + }); + + + } + pageChange(e) { + console.log(e); + } + ngAfterViewInit() { + this.dataSourceTab4.paginator = this.paginator; + this.dataSourceTab4.sort = this.sort; + } + + applyFilter(filterValue: string) { + this.dataSourceTab4.filter = filterValue.trim().toLowerCase(); + } + +} diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts index 7e504706f..96d0ce804 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -482,8 +482,8 @@ callrole(flag,type,usersData){ resetAdminPassword(){ - - this.AWS.adminSetpassword(this.users.localUserId.aws_name).subscribe(res=>{ + // console.log(this.types); + this.AWS.adminSetpassword(this.users.localUserId.aws_name,this.types[0].name).subscribe(res=>{ if(res == 'success'){ // this.notifier.notify('success','Please Fill all the Fields') diff --git a/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts b/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts index 3838f8a2d..4dbb1f212 100755 --- a/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts @@ -59,6 +59,12 @@ const HORIZONTALMENUITEMS = [ type:'link', icon:'done_all', }, + { + state:'sales-pd-list', + name:'Sales PD', + type:'link', + icon:'work', + }, { state:'reports', name:'Reports', diff --git a/ng6-seed/src/app/shared/menu-items/menu-items.ts b/ng6-seed/src/app/shared/menu-items/menu-items.ts index 1aabe360c..72843ff5c 100755 --- a/ng6-seed/src/app/shared/menu-items/menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/menu-items.ts @@ -100,6 +100,12 @@ const MENUITEMS : Menu[] = [ type:'link', icon:'done_all', }, + { + state:'sales-pd-list', + name:'Sales PD', + type:'link', + icon:'work', + }, { state:'reports', name:'Reports', From c6ac4664e2ee7063afcaf30c6a8f7f5bfd83ff4a Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Fri, 15 Nov 2019 14:31:05 +0530 Subject: [PATCH 4/5] sales PD pdf --- .../other-applicant-details.component.html | 2 +- .../other-applicant-details.component.ts | 6 +++-- .../general-info/general-info.component.html | 2 +- .../general-info/general-info.component.ts | 1 + .../pd-service/pd-triger.service.ts | 6 +++++ .../src/app/sales-pd/sales-pd.component.html | 6 ++--- .../src/app/sales-pd/sales-pd.component.ts | 25 ++++++++++++++++--- 7 files changed, 38 insertions(+), 10 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html index 98c09f699..69a88e926 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html @@ -70,7 +70,7 @@ add --> \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts index eb3c1c646..8cac3dc77 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts @@ -15,6 +15,7 @@ export class OtherApplicantDetailsComponent implements OnInit { applicantInfo: any = { 'pd_co_applicant_id': "", 'applicant_name': '', 'is_applicant': false, 'is_person_met': false, applicant_title_name: '', age: '', qualification: '', course_name: '' }; titleList: any = []; qualificationList: any = []; + individuals_order_id: any; //EditGeneralFormData: any=[]; //EditFlag: boolean = false; @@ -77,10 +78,11 @@ export class OtherApplicantDetailsComponent implements OnInit { // create applicant form array createApplicant(elementValue: any) { + console.log('00000',elementValue); return this._fb.group({ pd_co_applicant_id: [elementValue.pd_co_applicant_id], - applicant_title_name: [elementValue.applicant_title_name, Validators.required], - applicant_name: [elementValue.applicant_name || '', Validators.required], + applicant_title_name: [elementValue.applicant_title_name, Validators.required], + applicant_name: [{value:elementValue.applicant_name, disabled : elementValue.individuals_order_id == 1 ? true : false} || '', Validators.required], is_applicant: [elementValue.is_applicant || false], is_person_met: [elementValue.is_person_met || false], age: [elementValue.age || ''], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html index 20d43ab9e..d4dbdd2b3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html @@ -97,7 +97,7 @@ - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts index d197f31eb..3e05a54e4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts @@ -574,6 +574,7 @@ export class GeneralInfoComponent implements OnInit { width: '40%', disableClose: true }); + console.log(value); dialogRef.afterClosed() .subscribe(dataRes=>{ // console.log("close",dataRes) 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 8de13e322..d0e4b2835 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -190,6 +190,12 @@ export class PdTrigerService { catchError(this.handleError('operation', [])) ) } + getSalesPdpdf(pdfdetail): Observable { + return this._http.get(this.apiUrl + "downloadSalesPDReport/" + pdfdetail) + .pipe( + catchError(this.handleError('operation', [])) + ) + } // get edit row pd details // This function also called in Final Remarks Form diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.html b/ng6-seed/src/app/sales-pd/sales-pd.component.html index 832af6ef3..592875d90 100644 --- a/ng6-seed/src/app/sales-pd/sales-pd.component.html +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.html @@ -89,7 +89,7 @@ - Not Available + --
{{details.applicant_name}} @@ -110,7 +110,7 @@ - Not Available + --
{{details.officer_name}} @@ -125,7 +125,7 @@ + matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)">file_download diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.ts b/ng6-seed/src/app/sales-pd/sales-pd.component.ts index 8699d8e42..cd35947da 100644 --- a/ng6-seed/src/app/sales-pd/sales-pd.component.ts +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.ts @@ -19,6 +19,7 @@ export class SalesPdComponent implements OnInit { // data source variable details salesPdData:any[] = []; + salesPdpdf:any[] = []; errorMessage:any[]=[]; recordStatus: boolean; @@ -33,7 +34,8 @@ export class SalesPdComponent implements OnInit { constructor(private _pdSales: PdTrigerService) { } ngOnInit() { - this.loadSalesPDDetails() + this.loadSalesPDDetails(); + // this.salesPDpdf(); } @@ -58,9 +60,26 @@ export class SalesPdComponent implements OnInit { this.errorMessage.push(error); // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); alert(error.html_format); - }); + }); + } + + salesPDpdf(pdfdetail){ + this._pdSales.getSalesPdpdf(pdfdetail) + .subscribe( + data => { + if (data.status == 200) { + // window.location.href=data.records; + window.open(data.records, '_blank'); + } + + } + // , error => this.errorMessage = error); + ,error => { + this.errorMessage.push(error); + // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + alert(error.html_format); + }); - } pageChange(e) { console.log(e); From 067ecb896306c90236cce79413bf351e21a640a8 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Fri, 15 Nov 2019 15:08:55 +0530 Subject: [PATCH 5/5] sales changes --- ng6-seed/src/app/sales-pd/sales-pd.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.ts b/ng6-seed/src/app/sales-pd/sales-pd.component.ts index cd35947da..f216cf6fc 100644 --- a/ng6-seed/src/app/sales-pd/sales-pd.component.ts +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.ts @@ -24,6 +24,8 @@ export class SalesPdComponent implements OnInit { errorMessage:any[]=[]; recordStatus: boolean; + xpandStatus: boolean = false; + // pagination variable details length = 5; pageIndex = 0;