From 991b34c22f3cbeafc16491841c4543862ffc4b40 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Tue, 30 Jun 2020 18:24:33 +0530 Subject: [PATCH] Smart PD and Vendor changes done --- .../forms/address/address.component.html | 6 +-- .../forms/address/address.component.ts | 2 +- .../business-assets-info.component.html | 4 +- .../business-info.component.html | 12 +++--- .../business-info/business-info.component.ts | 2 +- .../final-remarks.component.html | 12 +++--- .../final-remarks/final-remarks.component.ts | 4 +- .../financial-info.component.html | 8 ++-- .../neighbour-hood.component.html | 14 +++---- .../queries-docs/queries-docs.component.html | 4 +- .../start-pd/forms/stock/stock.component.html | 20 +++++----- .../start-pd/forms/stock/stock.component.ts | 2 +- .../qc-list/qc-view/qc-view.component.ts | 40 ++++++++++++++----- 13 files changed, 74 insertions(+), 56 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index d20f7d92d..18003f29e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -196,7 +196,7 @@
- + Select @@ -290,7 +290,7 @@ Approach to PD Location Required - + Select 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 fe9c5eb07..b3e357167 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 @@ -245,7 +245,7 @@ export class AddressComponent implements OnInit { // was_the_company_name_board_sighted:['', Validators.compose([Validators.required])], address_form_remark: [''] }); - if(this.fk_pd_type == '3'){ + if(this.fk_pd_type == '3' || this.fk_pd_type == '2'){ this.addressForm.controls['pd_location'].clearValidators(); this.addressForm.controls['pd_location'].updateValueAndValidity(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html index 8286dbfbf..20279e546 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html @@ -71,7 +71,7 @@
- + @@ -84,7 +84,7 @@ - + Remarks 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 b152e8e9d..7fb1134c4 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 @@ -1605,11 +1605,11 @@ - No of Employees Sighted By PD Officer During His Visit - Company Name Board + No of Employees Sighted By PD Officer During His Visit + Company Name Board - + Total Required @@ -1622,7 +1622,7 @@ formControlName="officer_temporary" required> --> - Yes No @@ -1634,8 +1634,8 @@ - Documents Sighted - Documents Images Shared + Documents Sighted + Documents Images Shared 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 e83310390..05b020680 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 @@ -764,7 +764,7 @@ export class BusinessInfoComponent implements OnInit { // others_activity_details: this.fb.array([]), }); - if(this.fk_pd_type == '3'){ + if(this.fk_pd_type == '3' || this.fk_pd_type == '2'){ this.businessForm.controls['officer_total'].clearValidators(); this.businessForm.controls['officer_total'].updateValueAndValidity(); 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 cddca78e0..436115b3d 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 @@ -31,7 +31,7 @@ Location - + Select @@ -136,11 +136,11 @@ -
+
Any additional visit (Godown /multiple rental properties)  
- + Select @@ -160,7 +160,7 @@ CLIX MWISE - + Select @@ -176,7 +176,7 @@ Is there Competition to the applicant’s business in the location ( {{ _finalRemarkForm.value.is_competition ===true ? 'Yes' : 'No'}} )
--> -
+
Select @@ -222,7 +222,7 @@ Any sealing activity observed in the locality by PD office ( {{ _finalRemarkForm.value.sealing_activity ===true ? 'Yes' : 'No'}} )
--> -
+
Select 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 06bdd4622..010e9d10b 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 @@ -108,7 +108,7 @@ export class FinalRemarksComponent implements OnInit { final_form_remarks: [''] }); - if(this.fk_pd_type == '3'){ + if(this.fk_pd_type == '3' || this.fk_pd_type == '2'){ this._finalRemarkForm.controls['is_service_provided'].clearValidators(); this._finalRemarkForm.controls['is_service_provided'].updateValueAndValidity(); @@ -116,7 +116,7 @@ export class FinalRemarksComponent implements OnInit { this._finalRemarkForm.controls['mode_of_transport_during_visit'].updateValueAndValidity(); } - if(this.fk_pd_type != '3' && (this.lender_short_name == 'CLIX' || this.lender_short_name == 'MWISE' || this.prod_catagory == 'LAEP')){ + if((this.fk_pd_type != '3' && this.fk_pd_type != '2') && (this.lender_short_name == 'CLIX' || this.lender_short_name == 'MWISE' || this.prod_catagory == 'LAEP')){ this.prod_catagory == '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('')); 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 147e3d991..2058feb50 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 @@ -17,7 +17,7 @@
- +

Data as Per Financial Statements

@@ -499,15 +499,15 @@

- Photograph of Kuchha bills allowed
- Photographs of kuccha bills uploaded
+ Photograph of Kuchha bills allowed
+ Photographs of kuccha bills uploaded
Yes    No

-
+
Does the Number of Kuccha Bills and Values therein, justify the customer declared turnover?
Yes diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html index 364f916bb..b5e10d308 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html @@ -29,12 +29,12 @@ - + - + @@ -44,8 +44,8 @@ -
-
+
+
Year @@ -58,7 +58,7 @@ OnlyNumber type="text" (change)="ConvertMonthintoYear(neighbourhood,$event.target.value,1)">
-
+
-
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html index 6300e421d..e0ffc8901 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html @@ -60,8 +60,8 @@ -
Documents to be collected
-
Docuements to be uploaded
+
Documents to be collected
+
Docuements to be uploaded
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 df7f427bc..b97f38d94 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 @@ -40,8 +40,8 @@ (selectionChange)="checkComments($event.value,1,a);" required> Select Add Stock Details - No Stock Observed - No Stock Available + No Stock Observed + No Stock Available Stock Required @@ -137,8 +137,8 @@ (selectionChange)="checkComments($event.value,2,b);" required> Select Add Stock Details - No Stock Observed - No Stock Available + No Stock Observed + No Stock Available @@ -224,8 +224,8 @@ (selectionChange)="checkComments($event.value,3,e)" required> Select Add Stock Details - No Stock Observed - No Stock Available + No Stock Observed + No Stock Available @@ -314,8 +314,8 @@ (selectionChange)="checkComments($event.value,4,g)" required> Select Add Stock Details - No Stock Observed - No Stock Available + No Stock Observed + No Stock Available @@ -429,8 +429,8 @@ (selectionChange)="checkComments($event.value,5,g)" required> Select Add Stock Details - No Stock Observed - No Stock Available + No Stock Observed + No Stock Available 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 de4ae1354..c814cf202 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 @@ -88,7 +88,7 @@ export class StockComponent 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.fk_pd_type = this.pd_all_details.pdmaster_details.fk_pd_type; - if(this.fk_pd_type == '3'){ + if(this.fk_pd_type == '3' || this.fk_pd_type == '2'){ this.SPsufficientList.push({value:"not able to assess",isdisplayvalue:"Not able to assess",isdisabled:false}) this.TGsufficientList.push({value:"not able to assess",isdisplayvalue:"Not able to assess",isdisabled:false}) this.RMsufficientList.push({value:"not able to assess",isdisplayvalue:"Not able to assess",isdisabled:false}) 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 b54572021..ca04c3f1c 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -17,6 +17,7 @@ import { InitiateAdditionalPdComponent } from './../../../personal-discussion/ma import {QcStartComponent} from '../qc-start/qc-start.component' import {DatePipe } from '@angular/common'; +import { VendorPdAllocationComponent } from 'app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent'; @Component({ selector: 'app-qc-view', @@ -193,7 +194,7 @@ export class QcViewComponent implements OnInit, OnDestroy { // pd allocation to pdAllocationTo(pdData:any,childData: any) { pdData.pd_id = childData.assigned_pd; - if (pdData.fk_pd_type == 1 || pdData.fk_pd_type == 3) { + if (pdData.fk_pd_type == 1 || pdData.fk_pd_type == 3 || pdData.fk_pd_type == 2) { const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, position: { right: '0'}, @@ -203,23 +204,40 @@ export class QcViewComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.viewPdDetails(this.viewID,this.masterRandomString) - }); - } - else if(pdData.fk_pd_type == 2){ - const dialogRef = this.dialog.open(SmartPdAllocationComponent, { + console.log(dataresult) + if(dataresult == 'openvendorallocation'){ + const dialogSchedule = this.dialog.open(VendorPdAllocationComponent, { data: pdData, + disableClose: true, position: { right: '0'}, - width: '80%', - disableClose: true + width:'100%', + // hasBackdrop:false }); - dialogRef.afterClosed() + dialogSchedule.afterClosed() .subscribe(dataresult => { - // this.notifier.notify('success', 'Successfully allocated.!'); - this.viewPdDetails(this.viewID,this.masterRandomString) + }); + // this.notifier.notify('warning', 'No PD In Hand'); + }else{ + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID,this.masterRandomString) + } }); } + // else if(pdData.fk_pd_type == 2){ + // const dialogRef = this.dialog.open(SmartPdAllocationComponent, { + // data: pdData, + // position: { right: '0'}, + // width: '80%', + // disableClose: true + // }); + // dialogRef.afterClosed() + // .subscribe(dataresult => { + // // this.notifier.notify('success', 'Successfully allocated.!'); + + // this.viewPdDetails(this.viewID,this.masterRandomString) + // }); + // } // else if(pdData.fk_pd_type == 3){ // const dialogRef = this.dialog.open(TelePdAllocationComponent, { // data: pdData,