Fix workflow changes getting saved on cancel
This commit is contained in:
parent
c31085374c
commit
d8ff19a372
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user