Skip to content

Commit

Permalink
fix: once Edited, the related process disappears - EXO-75002
Browse files Browse the repository at this point in the history
Before this change, when edited, ProcessA disappears unless page is refreshed. 
To resolve this problem,once edited, conditions added where the filter equals (all or I manage) to change the workflow list by the edited workflow. 
After this change, processA is displayed without needing to refresh page.
(cherry picked from commit e310077)
(cherry picked from commit ccb8eb7)
  • Loading branch information
Jihed525 authored Oct 24, 2024
1 parent 3e38706 commit 1b99b94
Showing 1 changed file with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,31 @@ export default {
this.$root.$on('workflow-updated', (workflow) => {
workflow = JSON.parse(workflow);
const index = this.workflowList.map(workflow => workflow.id).indexOf(workflow.id);
if (this.filter.value === 'activated' && workflow.enabled) {
this.workflowList.splice(index, 1, workflow);
} else if (this.filter.value === 'deactivated' && !workflow.enabled) {
switch (this.filter.value) {
case 'activated':
if (workflow.enabled) {
this.workflowList.splice(index, 1, workflow);
} else {
this.workflowList.splice(index, 1);
}
break;
case 'deactivated':
if (!workflow.enabled) {
this.workflowList.splice(index, 1, workflow);
} else {
this.workflowList.splice(index, 1);
}
break;
case 'manager':
if (workflow.acl.canEdit) {
this.workflowList.splice(index, 1, workflow);
} else {
this.workflowList.splice(index, 1);
}
break;
default:
this.workflowList.splice(index, 1, workflow);
} else {
this.workflowList.splice(index, 1);
break;
}
});
this.$root.$on('workflow-removed', (workflow) => {
Expand Down

0 comments on commit 1b99b94

Please sign in to comment.