From 9bd605c95854f9bb2c820a0d38f2e09d1080c5c0 Mon Sep 17 00:00:00 2001 From: Adriano Dal Pastro Date: Sun, 24 May 2026 07:32:48 +0000 Subject: [PATCH] feat(measure): bottone Avvio Produzione placeholder dopo primo ciclo misura - Bottone "Avvio Produzione" appare solo dopo il primo ciclo confermato - Conferma visiva "Produzione avviata" dopo il click - Placeholder per futura integrazione GAIA (TODO nel codice) Co-Authored-By: Claude Opus 4.7 (1M context) --- .../templates/measure/task_execute.html | 42 +++++++++++++++++++ .../translations/en/LC_MESSAGES/messages.po | 9 ++++ .../translations/it/LC_MESSAGES/messages.po | 9 ++++ 3 files changed, 60 insertions(+) diff --git a/src/frontend/flask_app/templates/measure/task_execute.html b/src/frontend/flask_app/templates/measure/task_execute.html index 9d9c5be..198579d 100644 --- a/src/frontend/flask_app/templates/measure/task_execute.html +++ b/src/frontend/flask_app/templates/measure/task_execute.html @@ -428,6 +428,40 @@ + {# ================================================================ + AVVIO PRODUZIONE — visible after first cycle, before production started + ================================================================ #} +
+
+ +
+

+ {{ _('Invia segnale al gestionale per avviare il timer della linea') }} +

+
+
+
+ + + + {{ _('Produzione avviata') }} +
+
+ {# ================================================================ FOOTER — Progress bar + navigation ================================================================ #} @@ -657,6 +691,7 @@ function taskExecute() { timerRemaining: 0, _timerInterval: null, cycleCount: 0, + productionStarted: false, // ---- Cycle & workflow state ---- cycleConfirmed: false, @@ -939,6 +974,13 @@ function taskExecute() { } catch (_) {} }, + // ---- Avvio Produzione (GAIA placeholder) ---- + startProduction() { + this.productionStarted = true; + // TODO: integrazione GAIA — inviare segnale per avviare timer linea + // await fetch('/measure/api/gaia/start-production', { method: 'POST', ... }); + }, + 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 3b4fd97..fff642e 100644 --- a/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po +++ b/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po @@ -759,6 +759,15 @@ msgstr "seconds due to inactivity." msgid "Continua a lavorare" msgstr "Continue working" +msgid "Avvio Produzione" +msgstr "Start Production" + +msgid "Invia segnale al gestionale per avviare il timer della linea" +msgstr "Send signal to management system to start the line timer" + +msgid "Produzione avviata" +msgstr "Production started" + msgid "Prossima misurazione tra" msgstr "Next measurement in" diff --git a/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po b/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po index f2afef3..04b07c7 100644 --- a/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po +++ b/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po @@ -789,6 +789,15 @@ msgstr "secondi per inattività." msgid "Continua a lavorare" msgstr "Continua a lavorare" +msgid "Avvio Produzione" +msgstr "Avvio Produzione" + +msgid "Invia segnale al gestionale per avviare il timer della linea" +msgstr "Invia segnale al gestionale per avviare il timer della linea" + +msgid "Produzione avviata" +msgstr "Produzione avviata" + msgid "Prossima misurazione tra" msgstr "Prossima misurazione tra"