Fix workflow changes getting saved on cancel

This commit is contained in:
shamoon 2023-12-27 22:53:00 -08:00
parent c31085374c
commit d8ff19a372

View File

@ -65,7 +65,13 @@ export class WorkflowsComponent
modal.componentInstance.dialogMode = workflow modal.componentInstance.dialogMode = workflow
? EditDialogMode.EDIT ? EditDialogMode.EDIT
: EditDialogMode.CREATE : EditDialogMode.CREATE
modal.componentInstance.object = workflow if (workflow) {
// quick "deep" clone so original doesnt get modified
const clone = Object.assign({}, workflow)
clone.actions = [...workflow.actions]
clone.triggers = [...workflow.triggers]
modal.componentInstance.object = clone
}
modal.componentInstance.succeeded modal.componentInstance.succeeded
.pipe(takeUntil(this.unsubscribeNotifier)) .pipe(takeUntil(this.unsubscribeNotifier))
.subscribe((newWorkflow) => { .subscribe((newWorkflow) => {