From ed303f6303805a98742dfd602f6aa6951caf5896 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Wed, 11 Nov 2020 17:44:30 +0530 Subject: [PATCH] cancel PD Added --- .../pd-status-change-dialogue.component.ts | 6 +++--- .../list-pd/view-pd/view-pd.component.html | 5 +++-- .../list-pd/view-pd/view-pd.component.ts | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index 4f0504af6..6648bce87 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -27,8 +27,8 @@ export class PdStatusChangeDialogueComponent implements OnInit { constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; - this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion'; - this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion'; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' :this.data.pd_status=='CANCELLED' ? 'PD Cancel': 'Change Discussion'; + this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : this.data.pd_status=='CANCELLED' ? 'Are you going to cancel this PD' : 'Change Discussion'; this.enableAddonPD = false; this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true; this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false; @@ -74,7 +74,7 @@ export class PdStatusChangeDialogueComponent implements OnInit { this.pd.editPdMasterDetails(update_status, status,this.masterRandomString).subscribe(result => { if (result.status == 200) { this.dialogRef.close({update_status:true}); - this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully' : 'Discussions Updated Successfully'); + this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully' : this.data.pd_status=='CANCELLED' ? 'PD Cancelled Successfully' : 'Discussions Updated Successfully'); } else { this.dialogRef.close({update_status:false}); 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 c1ae76764..57370c363 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 @@ -208,11 +208,12 @@ {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
( {{master.agency_short_name}} - {{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 51100e60e..3be315474 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 @@ -92,7 +92,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { "QC_COMPLETED": 'QC_COMPLETED', "ALLOCATED_TO_FIA":'ALLOCATED_TO_FIA', "FIA_REJECTED":'FIA_REJECTED', - "FIA_ACCEPTED":'FIA_ACCEPTED' + "FIA_ACCEPTED":'FIA_ACCEPTED', + "CANCELLED":'CANCELLED' }; mandatoryFieldsValidations: any = []; @@ -458,6 +459,20 @@ export class ViewPdComponent implements OnInit, OnDestroy { }); } + + cancelPD(pdDetails: any){ + const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { + data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.CANCELLED ,random_string:this.masterRandomString}, + disableClose: true, + minWidth: '30%', + maxWidth: '40%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + this.viewPdDetails(this.viewID,this.masterRandomString) + }); + } + // start pd getPDStart(pdDetails: any, status: string) { this.destroyType = 3;