Skip to content

Commit

Permalink
Merge branch 'next' into vite-workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
josechirivella authored Jan 18, 2024
2 parents 5e06735 + 2a30e78 commit 1c2d189
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "@processmaker/modeler",
"version": "1.43.17",
"version": "1.43.18",
"scripts": {
"serve": "vue-cli-service serve --mode development",
"test:unit": "vue-cli-service test:unit",
Expand Down
2 changes: 2 additions & 0 deletions src/components/inspectors/InspectorPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export default {
'highlightedNode.definition.assignmentRules'(current, previous) { this.handleAssignmentChanges(current, previous); },
'highlightedNode.definition.allowInterstitial'(current, previous) { this.handleAssignmentChanges(current, previous); },
'highlightedNode.definition.interstitialScreenRef'(current, previous) { this.handleAssignmentChanges(current, previous); },
'highlightedNode.definition.screenRef'(current, previous) { this.handleAssignmentChanges(current, previous); },
'highlightedNode.definition.scriptRef'(current, previous) { this.handleAssignmentChanges(current, previous); },
},
computed: {
inspectorHeaderTitle() {
Expand Down
29 changes: 26 additions & 3 deletions src/components/modeler/Modeler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2215,9 +2215,8 @@ export default {
streamCompletedEvent,
(response) => {
if (response.data) {
setTimeout(() => {
window.location.replace(window.location.href.split('?')[0]);
}, 1500);
this.updateScreenRefs(response.data.screenIds);
this.updateScriptRefs(response.data.scriptIds);
}
},
);
Expand All @@ -2241,6 +2240,30 @@ export default {
this.loadingAI = false;
}
},
updateScreenRefs(elements) {
elements.forEach(el => {
const node = this.nodes.find(n => n.definition.id === el.node_id);
let definition = node.definition;
if (node.type === 'processmaker-modeler-task') {
definition.screenRef = el.screen_id;
store.commit('updateNodeProp', { node, key: 'definition', value: definition });
this.$emit('save-state');
}
});
},
updateScriptRefs(elements) {
elements.forEach(el => {
const node = this.nodes.find(n => n.definition.id === el.node_id);
let definition = node.definition;
if (node.type === 'processmaker-modeler-script-task') {
definition.scriptRef = el.script_id;
store.commit('updateNodeProp', { node, key: 'definition', value: definition });
this.$emit('save-state');
}
});
},
},
created() {
if (runningInCypressTest()) {
Expand Down

0 comments on commit 1c2d189

Please sign in to comment.