Skip to content

Commit d198e78

Browse files
authored
Merge pull request #8456 from ProcessMaker/bugfix/FOUR-25273
FOUR-25273:Labels in stage flows are not lost after deleting all stages.
2 parents 9ce83af + 1ffe35a commit d198e78

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎resources/js/processes/modeler/components/inspector/StageManager.vue‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
</template>
1919

2020
<script setup>
21-
import { ref, onMounted, getCurrentInstance } from "vue";
21+
import {
22+
ref, onMounted, getCurrentInstance, nextTick,
23+
} from "vue";
2224
import StageList from "./StageList.vue";
2325
import AgregationProperty from "./AgregationProperty.vue";
2426
@@ -109,15 +111,16 @@ const updateStagesForAllFlowConfigs = (stages) => {
109111
110112
const removeStageInAllFlowConfig = (stage) => {
111113
const links = getModeler().graph.getLinks();
112-
for (const link of links) {
114+
links.forEach((link) => {
113115
const config = getConfigFromDefinition(link.component.node.definition);
114116
if (config?.stage?.id === stage.id) {
115117
delete config.stage;
116118
Vue.set(link.component.node.definition, "config", JSON.stringify(config));
119+
nextTick(() => {
120+
link.component.removeStageLabels();
121+
});
117122
}
118-
link.component.removeStageLabels();
119-
removeStageToFlow();
120-
}
123+
});
121124
};
122125
123126
const applyStageToFlow = (stage) => {

0 commit comments

Comments
 (0)