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:
Adriano Dal Pastro
2026-05-24 07:32:48 +00:00
parent e05eb66a1c
commit 9bd605c958
3 changed files with 60 additions and 0 deletions
@@ -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;