Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@cypress/code-coverage": "^3.12.10",
"@faker-js/faker": "^8.1.0",
"@panter/vue-i18next": "^0.15.2",
"@processmaker/processmaker-bpmn-moddle": "0.16.0",
"@processmaker/processmaker-bpmn-moddle": "0.16.1",
"@types/jest": "^24.9.1",
"@vue/babel-preset-app": "^5.0.4",
"@vue/cli-plugin-babel": "~5.0.0",
Expand Down
33 changes: 33 additions & 0 deletions src/components/inspectors/ConditionalRedirect/TaskDestination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export default {
saveConditionDebounced: null,
};
},
computed: {
node() {
return this.$root.$children[0].$refs.modeler.highlightedNode.definition;
},
},
watch: {
condition: {
handler(newValue, oldValue) {
Expand All @@ -123,6 +128,10 @@ export default {
if (!isEqual(newValue, oldValue)) {
this.onSaveCondition();
}

this.$nextTick(() => {
this.handleInterstitial(newValue.value);
});
},
deep: true,
},
Expand Down Expand Up @@ -223,6 +232,30 @@ export default {
onDashboardSearchChange(filter) {
this.getCustomDashboardsDebounced(filter);
},
/**
* Handles interstitial logic for supported task node types.
* @param {string} newValue - The new destination type value selected.
*/
handleInterstitial(newValue) {
const { $type: nodeType, id: nodeId } = this.node;
const supportedTypes = ['bpmn:Task', 'bpmn:ManualTask'];

if (supportedTypes.includes(nodeType)) {
this.handleTaskInterstitial(newValue, nodeId);
}
},
/**
* Handle interstitial for task elements
*
* @param {String} newValue - The new destination type value selected
* @param {String} nodeId - The ID of the task node being modified
*/
handleTaskInterstitial(newValue, nodeId) {
this.$root.$emit('handle-task-interstitial', {
nodeId,
show: newValue === 'displayNextAssignedTask',
});
},
},
};
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/components/nodes/manualTask/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import advancedAccordionConfig from '@/components/inspectors/advancedAccordionCo
import documentationAccordionConfig from '@/components/inspectors/documentationAccordionConfig';
import defaultNames from '@/components/nodes/task/defaultNames';
import elementDestination from '@/components/inspectors/taskElementDestination';
import conditionalRedirect from '@/components/inspectors/ConditionalRedirect/conditionalRedirect';

export const taskHeight = 76;
export const id = 'processmaker-modeler-manual-task';
Expand Down Expand Up @@ -52,11 +53,12 @@ export default {
config: nameConfigSettings,
},
elementDestination,
conditionalRedirect,
],
},
documentationAccordionConfig,
advancedAccordionConfig,
],
},
],
};
};
Loading