diff --git a/src/frontend/flask_app/templates/measure/task_execute.html b/src/frontend/flask_app/templates/measure/task_execute.html index 0ab1f52..4dabd82 100644 --- a/src/frontend/flask_app/templates/measure/task_execute.html +++ b/src/frontend/flask_app/templates/measure/task_execute.html @@ -584,13 +584,36 @@ class="btn btn-secondary flex-1 justify-center gap-2"> {{ _('Riepilogo') }} - + + {# START phase, more tasks to go: advance without blocking or exiting #} + + + {# START phase, last task: start production #} + @@ -980,6 +1003,25 @@ function taskExecute() { // await fetch('/measure/api/gaia/start-production', { method: 'POST', ... }); }, + // Is the current task the last one in the recipe sequence? + get isLastTask() { + const taskIds = window.__allTaskIds || []; + const idx = taskIds.indexOf(this.task.id); + return idx === -1 || idx >= taskIds.length - 1; + }, + + // Start production from the completion overlay (last START task) and begin + // the measurement-interval cycle if the recipe defines one. + startProductionFromOverlay() { + this.showCompletionOverlay = false; + this.startProduction(); + this.cycleConfirmed = true; + this.cycleCount++; + if (this.measurementIntervalMinutes && this.measurementIntervalMinutes > 0) { + this.startMeasurementTimer(); + } + }, + get timerDisplay() { var m = Math.floor(this.timerRemaining / 60); var s = this.timerRemaining % 60; diff --git a/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po b/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po index 91a7590..90bcd1a 100644 --- a/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po +++ b/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po @@ -2188,3 +2188,6 @@ msgstr "E.g. SN-000123 (optional)" msgid "Supervisor (capoturno)" msgstr "Supervisor (shift leader)" +msgid "Task successivo" +msgstr "Next task" +