diff --git a/src/frontend/flask_app/templates/measure/select_recipe.html b/src/frontend/flask_app/templates/measure/select_recipe.html index 98c1ae9..4a04009 100644 --- a/src/frontend/flask_app/templates/measure/select_recipe.html +++ b/src/frontend/flask_app/templates/measure/select_recipe.html @@ -13,6 +13,15 @@ barcodeInput: '', barcodeLoading: false, barcodeError: '', + /* #63/#64: ricetta scelta che richiede lotto/seriale; il pannello compare solo allora. */ + selected: null, + needsTrace(recipe) { + return !!(recipe && (recipe.requires_lot || recipe.requires_serial)); + }, + choose(recipe) { + this.selected = recipe; + this.$nextTick(() => { const el = document.getElementById('trace-panel'); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'center' }); }); + }, get filteredRecipes() { if (!this.search) return this.recipes; const q = this.search.toLowerCase(); @@ -62,9 +71,12 @@ // The scanner is a way in like any other: a recipe that demands a lot // demands it here too, or the rule would last exactly as long as it // took someone to reach for the barcode reader. - const missing = this.missingTraceability(data); - if (missing.length) { - this.barcodeError = {{ _("Compila prima:")|tojson_attr }} + ' ' + missing.join(', '); + // #63/#64: se la ricetta chiede lotto/seriale mancanti, la si sceglie e + // compare il pannello con i soli campi richiesti. + if (this.missingTraceability(data).length) { + this.barcodeModal = false; + this.barcodeInput = ''; + this.choose(data); return; } this.barcodeModal = false; @@ -149,50 +161,6 @@ - -
-
-
- - - -
-

{{ _('Tracciabilità') }}

-

{{ _('Dati del pezzo da misurare — compila prima di selezionare la ricetta') }}

-
-
-
- -
- - -
- - -
- - -
-
-
-
-

@@ -269,30 +237,25 @@

- {# What this recipe insists on before anyone measures. Said on the card - rather than after the fact: a measurement taken without its lot cannot - be traced back, and finding that out later is finding it out too late. #} -
+ +
+
+
+ + + +
+

{{ _('Tracciabilità') }}:

+

{{ _('Dati del pezzo da misurare — compila prima di selezionare la ricetta') }}

+
+
+
+
+ + +
+
+ + +
+
+ + {{ _('AVVIA ATTIVITÀ') }} + +
+
+
diff --git a/src/frontend/flask_app/templates/measure/task_execute.html b/src/frontend/flask_app/templates/measure/task_execute.html index cd925b6..35d0e0c 100644 --- a/src/frontend/flask_app/templates/measure/task_execute.html +++ b/src/frontend/flask_app/templates/measure/task_execute.html @@ -115,20 +115,12 @@ {{ _('Lista task') }} - + {# #60: un solo «Completato», quello grande in fondo (touch); qui resta solo la lista. #}
{# Fermo linea + Fine produzione (measurement tasks only) #} -