From 70979ce716f50a1e81e46d06e92bf89653952127 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Sat, 27 Jun 2020 13:07:00 +0530 Subject: [PATCH 1/2] vendor status update --- .../manage-pd/list-pd/all-pd/all-pd.component.html | 10 ++++++---- .../completed-pd/completed-pd.component.html | 7 ++++--- .../inprogress-pd/inprogress-pd.component.html | 7 ++++--- .../qc-completed-pd/qc-completed-pd.component.html | 7 ++++--- .../scheduled-pd/scheduled-pd.component.html | 7 ++++--- .../list-pd/view-pd/view-pd.component.html | 14 ++++++++++---- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index a8ab988db..1a1c08240 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -121,18 +121,20 @@ - {{details.pd_status}} - QC COMPLETED + {{details.pd_status}} + QC COMPLETED
{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }} - +
+ ( {{details.vendor_status}} ) {{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }} {{details.scheduled_on}} +
-
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index 25f4c31b2..984816466 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -111,11 +111,12 @@ - {{details.pd_status}}
+ {{details.pd_status}}
{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }} - +
+ ( {{details.vendor_status}} )
-
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html index 886760bc7..b7b839ac9 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html @@ -108,11 +108,12 @@ - {{details.pd_status}}
+ {{details.pd_status}}
{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }} - +
+ ( {{details.vendor_status}} )
-
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html index 35c5c88e1..1698efbc3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html @@ -108,14 +108,15 @@ - {{details.pd_status}}
+ {{details.pd_status}}
{{details.scheduled_on}} - +
+ ( {{details.vendor_status}} )
-
+ {{details.scheduled_on}}
- ( {{details.vendor_status}} ) + ( {{details.vendor_status}} )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent.ts index b2b16d74d..418ffe083 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent.ts @@ -11,7 +11,7 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service'; encapsulation: ViewEncapsulation.None }) export class VendorPdAllocationComponent implements OnInit { - public pageTitle: string = "Allocation To PD Officer"; + public pageTitle: string = "Allocation To Vendor"; public _pdAllocationForm: FormGroup; public pdOfficerList: any = []; errorMessage: any; @@ -24,6 +24,7 @@ export class VendorPdAllocationComponent implements OnInit { private dialogRef: MatDialogRef, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public data: any) { + console.log(data) this.notifier = notifier; } @@ -58,6 +59,7 @@ export class VendorPdAllocationComponent implements OnInit { } else { let updateData = { + "pd_id":this.data.pd_id, "pd_agency_id": allocateDetails.entity_id, "pd_status": "ALLOCATED_TO_PARTNER", }; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/vendor-pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/vendor-pd-allocation.component.html index b0e0b0aff..f35692e2f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/vendor-pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/vendor-pd-allocation.component.html @@ -47,7 +47,7 @@
-

PD Officer: {{selectedItem.full_name}}

+

Vendor: {{selectedItem.full_name}}

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index bea14ebaf..3568ac553 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -172,7 +172,7 @@ videocam  Call - @@ -248,7 +248,7 @@
{{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}
- ( {{master.vendor_status}} ) + ( {{master.vendor_status}} )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 1275c08b4..615ef3f81 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -22,6 +22,7 @@ import Swal from 'sweetalert2'; import { VideoChatComponent } from 'app/video-chat/video-chat.component'; import { MastersComponent } from 'app/settings/masters/masters.component'; import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.component'; +import { VendorPdAllocationComponent } from '../vendor-pd-allocation/VendorPdAllocationComponent'; @Component({ selector: 'app-view-pd', @@ -128,6 +129,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { ] }; videoplayback: any = {enableBtn:false,url:null}; + openvendorallocation: any; constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder, private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) { @@ -371,8 +373,27 @@ export class ViewPdComponent implements OnInit, OnDestroy { }); dialogRef.afterClosed() .subscribe(dataresult => { + console.log(dataresult) + if(dataresult == 'openvendorallocation'){ + const dialogSchedule = this.dialog.open(VendorPdAllocationComponent, { + data: pdData, + disableClose: true, + position: { right: '0'}, + width:'100%', + // hasBackdrop:false + }); + dialogSchedule.afterClosed() + .subscribe(dataresult => { + 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) { 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 a3d04af14..1306bda8e 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 @@ -304,7 +304,7 @@ export class PdTrigerService { } // update Vendor updateVendor(updateData: any): Observable { - // updateData.fk_updatedby = this._aws.getlocale(); + updateData.fk_updatedby = this._aws.getlocale(); // updateData.updatedon = currentdate; return this._http.post(this.apiUrl + "allocatePD", { "records": updateData }) .pipe(