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) <noreply@anthropic.com>
This commit is contained in:
@@ -428,6 +428,40 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ================================================================
|
||||
AVVIO PRODUZIONE — visible after first cycle, before production started
|
||||
================================================================ #}
|
||||
<div x-show="cycleConfirmed && cycleCount === 1 && !productionStarted && subtasks.length > 0"
|
||||
x-transition
|
||||
x-cloak
|
||||
class="shrink-0 border-t border-[var(--border-color)] bg-[var(--bg-card)] px-4 py-3">
|
||||
<div class="flex items-center justify-center">
|
||||
<button @click="startProduction()"
|
||||
class="btn gap-2 px-6 py-2.5 text-sm font-bold
|
||||
bg-emerald-600 hover:bg-emerald-700 text-white shadow-lg hover:shadow-xl
|
||||
rounded-xl transition-all duration-200">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 3l14 9-14 9V3z"/>
|
||||
</svg>
|
||||
{{ _('Avvio Produzione') }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-xs text-center text-[var(--text-muted)] mt-1.5">
|
||||
{{ _('Invia segnale al gestionale per avviare il timer della linea') }}
|
||||
</p>
|
||||
</div>
|
||||
<div x-show="productionStarted && subtasks.length > 0"
|
||||
x-transition
|
||||
x-cloak
|
||||
class="shrink-0 border-t border-emerald-200 dark:border-emerald-800 bg-emerald-50 dark:bg-emerald-900/20 px-4 py-1.5">
|
||||
<div class="flex items-center justify-center gap-2 text-xs text-emerald-700 dark:text-emerald-300">
|
||||
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/>
|
||||
</svg>
|
||||
<span class="font-medium">{{ _('Produzione avviata') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ================================================================
|
||||
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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user