{% extends "base.html" %} {% block title %}{{ recipe.name }} — {{ _('Task') }} — TieMeasureFlow{% endblock %} {% block content %}
{# The clock follows the operator here too, and brings them back when it expires. #} {% include "components/production_clock.html" %}
{{ _('Seleziona altra ricetta') }}
{{ recipe.code }} {% if recipe.current_version or recipe.version %} v{{ recipe.current_version.version_number if recipe.current_version else recipe.version }} {% endif %}

{{ recipe.name }}

{% if recipe.description %}

{{ recipe.description }}

{% endif %}
{% if tasks %} {{ _('AVVIA') }} {% endif %} {% if lot_number %}
{{ _('Lotto') }}: {{ lot_number }}
{% endif %} {% if serial_number %}
{{ _('Seriale') }}: {{ serial_number }}
{% endif %}

{{ _('Task da eseguire') }}

{{ tasks|length }} task {%- set total_subs = namespace(count=0) -%} {%- for t in tasks -%} {%- if t.subtask_count is defined -%} {%- set total_subs.count = total_subs.count + t.subtask_count -%} {%- elif t.subtasks -%} {%- set total_subs.count = total_subs.count + t.subtasks|length -%} {%- endif -%} {%- endfor -%} {%- if total_subs.count > 0 %} · {{ total_subs.count }} {{ _('misurazioni totali') }}{% endif %}
{% if tasks %}
{% for task in tasks %}
{{ loop.index }}

{{ task.title or task.name or (_('Task') ~ ' ' ~ loop.index) }}

{% if task.directive or task.description %}

{{ task.directive or task.description }}

{% endif %}
{# The declared type, so the operator sees what a task is before opening it - and a measurement task still reads as one before its quotes are in. #} {% set task_type_labels = { 'measure': _('Misura'), 'drawing': _('Disegno'), 'note': _('Nota'), 'xf_compare': _('Confronto profilo'), 'camera_measure': _('Misura camera'), } %} {% set is_measure = task.task_type in ('measure', 'camera_measure') %} {% if task.task_type %} {{ task_type_labels.get(task.task_type, task.task_type) }} {% endif %} {% if task.subtask_count is defined or task.subtasks %} {% if task.subtask_count is defined %}{{ task.subtask_count }}{% elif task.subtasks %}{{ task.subtasks|length }}{% endif %} {% endif %} {% if task.file_path %} {% if task.file_path.endswith('.pdf') %} {% else %} {% endif %} {% endif %}
{% if current_user and 'Maker' in current_user.get('roles', []) %} {% endif %}
{% endfor %}
{% else %}

{{ _('Nessun task disponibile') }}

{{ _('Questa ricetta non ha ancora task definiti.') }}

{% endif %}
{% endblock %}