Prevent workflow execution for finalized transitions

Added a check in the workflow-show page script to stop the execution if a transition is marked as finalized (`toFinal`). This ensures that transitions leading to final states are not processed further.
This commit is contained in:
Julien Fastré 2024-11-07 21:52:44 +01:00
parent 8e34f6962a
commit 0439c29305
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -25,6 +25,10 @@ window.addEventListener('DOMContentLoaded', function() {
for (let transition of froms) {
for (let input of transition.querySelectorAll('input')) {
if (input.checked) {
if ('1' === input.dataset.toFinal) {
return false;
}
if ('1' === input.dataset.isSentExternal) {
return false;
}
@ -151,6 +155,7 @@ window.addEventListener('DOMContentLoaded', function() {
}
}
}
return true;
},
toggle_callback: function (c, dir) {
for (let div of c) {