fix(measure): skip completion overlay during START, auto-advance task

The previous change made the overlay phase-aware but it still popped up after
every task during the START run. Operators want to flow straight to the next
task. Skip showing the "Misurazioni Complete" overlay when production has not
started and this is not the last task — call goToNextTask() directly. The
overlay still appears on the last START task (for "Avvio Produzione") and in
production (for "Conferma ciclo").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-06-05 09:36:29 +00:00
parent 4c75a32186
commit 34a72e6f1a
@@ -885,8 +885,16 @@ function taskExecute() {
return; return;
} }
// Check if all done — show overlay but do NOT auto-navigate // Check if all done
if (this.completedCount >= this.totalSubtasks) { if (this.completedCount >= this.totalSubtasks) {
// START run (production not yet started): don't block with the
// "Misurazioni Complete" overlay — just advance to the next task.
// The overlay is shown only on the last task (to offer "Avvio
// Produzione") or once production is running ("Conferma ciclo").
if (!this.productionStarted && !this.isLastTask) {
this.goToNextTask();
return;
}
this.showCompletionOverlay = true; this.showCompletionOverlay = true;
return; return;
} }