templates/role/user/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Scrivania{% endblock %}
  3. {% block body_on_load %}onload="hidePreloader();"{% endblock %}
  4. {% block pageTitleH1 %}Benvenuto {{ app.user }} ({{ app.user.accountType }}){% endblock %}
  5. {% block menu %}
  6.     <li class="menu-item"><a class="menu-link" href="{{ path ('user_index') }}">Scrivania</a>
  7.         <ul class="sub-menu-container bg_pr">
  8.             {% if app.user.getAccountTypology == 'agency' %}
  9.                 <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_settings') }}">Impostazioni</a></li>
  10.             {% endif %}
  11.             <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_utility') }}">Utility</a></li>
  12.         </ul>
  13.     </li>
  14.     {% if app.user.canRead('company') %}
  15.         <li class="menu-item"><a class="menu-link" href="javascript: void(0)">Azienda</a>
  16.             <ul class="sub-menu-container bg_pr">
  17.                 <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_company') }}">Dati anagrafici</a></li>
  18.                 <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_company_economic') }}">Economico</a></li>
  19.             </ul>
  20.         </li>
  21.     {% endif %}
  22.     <li class="menu-item">
  23.         <a class="menu-link" {% if app.user.canRead('anagraphic_users') %}href="{{ path ('user_users_index') }}"{% else %}href="javascript: void(0)"{% endif %}>Utenti</a>
  24.         <ul class="sub-menu-container bg_pr">
  25.             <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_user_profile') }}">Profilo</a></li>
  26.             {% if app.user.canRead('staff') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_users_staff') }}">Staff</a></li>{% endif %}
  27.             {% if app.user.canRead('technician') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_users_technicians') }}">Tecnici</a></li>{% endif %}
  28.         </ul>
  29.     </li>
  30.     {% if app.user.canRead('anagraphic') %}
  31.         <li class="menu-item">
  32.             <a class="menu-link" href="{{ path ('user_anagraphics') }}">Anagrafiche</a>
  33.             {% if app.user.canRead('anagraphic_supplier') or app.user.canRead('anagraphic_producer') or app.user.canRead('anagraphic_client') or app.user.canRead('anagraphic_destination') %}
  34.                 <ul class="sub-menu-container bg_pr">
  35.                     {% if app.user.canRead('anagraphic_supplier') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_anagraphic_suppliers') }}">Fornitori</a></li>{% endif %}
  36.                     {% if app.user.canRead('anagraphic_producer') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_anagraphic_producers') }}">Produttori</a></li>{% endif %}
  37.                     {% if app.user.canRead('anagraphic_client') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_anagraphic_clients') }}">Clienti</a></li>{% endif %}
  38.                     {% if app.user.canRead('anagraphic_destination') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_anagraphic_destinations') }}">Destinazioni</a></li>{% endif %}
  39.                 </ul>
  40.             {% endif %}
  41.         </li>
  42.     {% endif %}
  43.     {% if app.user.canRead('product') %}
  44.         <li class="menu-item">
  45.             <a class="menu-link" href="{{ path ('user_product_search') }}">Prodotti</a>
  46.             {% if app.user.canRead('product') or app.user.canRead('product_category') or app.user.canRead('product_subcategory') or app.user.canRead('product_model') or app.user.canRead('product_component') %}
  47.                 <ul class="sub-menu-container bg_pr">
  48.                     {% if app.user.canRead('product') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_search') }}">Ricerca</a></li>{% endif %}
  49.                     {% if app.user.canRead('product_category') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_categories') }}">Categorie</a></li>{% endif %}
  50.                     {% if app.user.canRead('product_subcategory') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_subcategories') }}">Sottocategorie</a></li>{% endif %}
  51.                     {% if app.user.canRead('product_component') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_components') }}">Componenti</a></li>{% endif %}
  52.                     {% if app.user.canRead('product_model') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_models') }}">Modelli</a></li>{% endif %}
  53.                     {% if app.user.canRead('product') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_regenerated') }}">Rigenerati</a></li>{% endif %}
  54.                     {% if app.user.canRead('product') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_product_stationary') }}">Fermi</a></li>{% endif %}
  55.                 </ul>
  56.             {% endif %}
  57.         </li>
  58.     {% endif %}
  59.     {% if app.user.canRead('warehouse') %}
  60.         {% if app.user.getAccountTypology == 'agency' or app.user.getAccountTypology == 'warehouse' %}
  61.             <li class="menu-item"><a class="menu-link" href="{{ path ('user_warehouse_list') }}">Magazzini</a>
  62.                 <ul class="sub-menu-container bg_pr">
  63.                     {% for w in global_hqw.headquarterWarehouses %}
  64.                         <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_warehouse_sheet', {'warehouseId':w.id}) }}">{{ w.nickname }}</a></li>
  65.                     {% endfor %}
  66.                 </ul>
  67.             </li>
  68.         {% elseif app.user.getAccountTypology == 'technician' %}
  69.             {% if app.user.warehouses|length == 1 %}
  70.                 <li class="menu-item"><a class="menu-link" href="{{ path ('user_warehouse_sheet', {'warehouseId':app.user.warehouses[0].warehouse.id}) }}">Magazzino</a></li>
  71.             {% else %}
  72.                 <li class="menu-item"><a class="menu-link" href="{{ path ('user_warehouse_list') }}">Magazzini</a></li>
  73.             {% endif %}
  74.         {% endif %}
  75.     {% endif %}
  76.     {% if app.user.canRead('transfer') %}
  77.         <li class="menu-item"><a class="menu-link" href="{{ path ('user_transfer_search') }}">Trasferimenti</a></li>
  78.     {% endif %}
  79.     {% if app.user.canRead('ticket') %}
  80.         <li class="menu-item">
  81.             <a class="menu-link" href="{{ path ('user_ticket_list') }}">Ticket</a>
  82.             <ul class="sub-menu-container bg_pr">
  83.                 {% if app.user.canRead('ticket') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_ticket_search') }}">Ricerca</a></li>{% endif %}
  84.                 {% if app.user.canRead('ticket') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_ticket_list') }}">Lista</a></li>{% endif %}
  85.                 {% if app.user.getAccountTypology == 'agency' %}
  86.                     <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_ticket_import') }}">Importa da CSV</a></li>
  87.                     <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_ticket_new') }}">Aggiungi manualmente</a></li>
  88.                 {% endif %}
  89.             </ul>
  90.         </li>
  91.     {% endif %}
  92.     {% if app.user.canRead('intervention') %}
  93.         <li class="menu-item"><a class="menu-link" href="{{ path ('user_intervention_search') }}">Interventi</a></li>
  94.     {% endif %}
  95.     {% if app.user.canRead('configuration') %}
  96.         <li class="menu-item">
  97.             <a class="menu-link" href="{{ path ('user_configurations') }}">Configurazioni</a>
  98.             <ul class="sub-menu-container bg_pr">
  99.                 {% if app.user.canRead('configuration_regions') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_regions') }}">Regioni di competenza</a></li>{% endif %}
  100.                 {% if app.user.canRead('configuration_city_alias') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_city_aliases') }}">Alias città</a></li>{% endif %}
  101.                 {% if app.user.canRead('configuration_intervention_outcome') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_intervention_outcomes') }}">Esiti intervento</a></li>{% endif %}
  102.                 {% if app.user.canRead('configuration_intervention_activity_type') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_intervention_activity_types') }}">Tipi attività intervento</a></li>{% endif %}
  103.                 {% if app.user.canRead('configuration_operation_group') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_operation_groups') }}">Gruppi operazione</a></li>{% endif %}
  104.                 {% if app.user.canRead('configuration_account_type') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_account_types') }}">Tipi account</a></li>{% endif %}
  105.                 {% if app.user.canRead('configuration_courier') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_couriers') }}">Corrieri</a></li>{% endif %}
  106.                 {% if app.user.canRead('configuration_ddt_header') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_ddt_headers') }}">Intestazioni DDT</a></li>{% endif %}
  107.                 {% if app.user.canRead('configuration_ddt_causal') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_ddt_causals') }}">Causali DDT</a></li>{% endif %}
  108.                 {% if app.user.canRead('configuration_ticket_column_value') %}<li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_configuration_ticket_column_values') }}">Aggiungi valore colonna ticket</a></li>{% endif %}
  109.             </ul>
  110.         </li>
  111.     {% endif %}
  112.     <li class="menu-item">
  113.         <a class="menu-link" href="javascript: void(0)">Info</a>
  114.         <ul class="sub-menu-container bg_pr">
  115.             <li class="menu-item"><a class="menu-link color_w" href="{{ path ('user_info_updates') }}">Aggiornamenti</a></li>
  116.         </ul>
  117.     </li>
  118.     <li class="menu-item"><a class="menu-link" href="{{ path ('logout') }}"><div>Esci</div></a></li>
  119. {% endblock %}
  120. {% block subMenuLeft %}{% endblock %}
  121. {% block subMenuRight %}
  122.     {% if app.user.getAccountTypology == 'agency' %}<li class="nav-item"><a class="nav-link" href="{{ path ('user_settings') }}">Impostazioni</a></li>{% endif %}
  123. {% endblock %}
  124. {% block content %}
  125.     <section class="m_tb_40p p_lr_30p">
  126.         {% if app.user.getAccountTypology == 'agency' or app.user.getAccountTypology == 'administration' or app.user.getAccountTypology == 'commercial' or app.user.getAccountTypology == 'warehouse' %} {# Agenzia / Amministrazione / Commerciale / Magazzino #}
  127.             <div class="row">
  128.                 <div class="col-12 responsive_font_size">
  129.                     <div class="tabs clearfix m_b_none">
  130.                         <ul class="tab-nav clearfix">
  131.                             {% if app.user.canViewTab('desk_ticket') %}<li><a id="btn_tab_tickets" href="#tickets" class="tab_session" data-filterTab="tickets"><i class="icon-tag d-block d-md-none" data-bs-toggle="tooltip" title="Ticket"></i><span class="d-none d-md-block">Ticket</span></a></li>{% endif %}
  132.                             {% if app.user.canViewTab('desk_warehouse') %}<li><a id="btn_tab_warehouses" href="#warehouses" class="tab_session" data-filterTab="warehouses"><i class="icon-warehouse d-block d-md-none" data-bs-toggle="tooltip" title="Magazzini"></i><span class="d-none d-md-block">Magazzini</span></a></li>{% endif %}
  133.                             {% if app.user.canViewTab('desk_operation') %}<li><a id="btn_tab_operations" href="#operations" class="tab_session" data-filterTab="operations"><i class="icon-wrench d-block d-md-none" data-bs-toggle="tooltip" title="Operazioni"></i><span class="d-none d-md-block">Operazioni</span></a></li>{% endif %}
  134.                             {% if app.user.canViewTab('desk_product') %}<li><a id="btn_tab_products" href="#products" class="tab_session" data-filterTab="products"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Prodotti"></i><span class="d-none d-md-block">Prodotti</span></a></li>{% endif %}
  135.                             {% if app.user.canViewTab('desk_search') %}<li><a id="btn_tab_search" href="#search" class="tab_session" data-filterTabsearch="" id="tab_search"><i class="icon-search1 d-block d-md-none" data-bs-toggle="tooltip" title="Ricerca"></i><span class="d-none d-md-block">Ricerca</span></a></li>{% endif %}
  136.                         </ul>
  137.                         <div class="tab-container">
  138.                             {# Ticket #}
  139.                             {% if app.user.canViewTab('desk_ticket') %}
  140.                                 <div class="tab-content clearfix" id="tickets">
  141.                                     <div class="row">
  142.                                         <div class="col-12">
  143.                                             <div class="tabs side-tabs clearfix m_b_none">
  144.                                                 <ul class="tab-nav tab-nav2 clearfix">
  145.                                                     {% if app.user.canRead('desk_ticket_summary_ticket') %}<li><a id="btn_tab_ticket" href="#summary_ticket" class="tab_session2" data-filterTab="ticket"><i class="icon-table1 d-block d-md-none" data-bs-toggle="tooltip" title="Situazione ticket"></i><span class="d-none d-md-block">Situazione ticket</span></a></li>{% endif %}
  146.                                                     {% if app.user.canRead('desk_ticket_summary_techs') %}<li><a id="btn_tab_techs" href="#summary_techs" class="tab_session2" data-filterTab="techs"><i class="icon-table1 d-block d-md-none" data-bs-toggle="tooltip" title="Situazione tecnici"></i><span class="d-none d-md-block">Situazione tecnici</span></a></li>{% endif %}
  147.                                                     {% if app.user.canRead('desk_ticket_errors') %}<li><a id="btn_tab_errors" href="#errors" class="tab_session2" data-filterTab="errors"><i class="icon-minus-sign d-block d-md-none" data-bs-toggle="tooltip" title="Con errori ({{ ticketWithErrors|length }})"></i><span class="d-none d-md-block">Con errori ({{ ticketWithErrors|length }})</span></a></li>{% endif %}
  148.                                                     {% if app.user.canRead('desk_ticket_suspension_requests') %}<li><a id="btn_tab_suspension_requests" href="#suspension_requests" class="tab_session2" data-filterTab="suspension_requests"><i class="icon-stopwatch d-block d-md-none" data-bs-toggle="tooltip" title="Richieste sospensioni ({{ ticketSuspensionRequest|length }})"></i><span class="d-none d-md-block">Richieste sospensioni ({{ ticketSuspensionRequest|length }})</span></a></li>{% endif %}
  149.                                                     {% if app.user.canRead('desk_ticket_closed_portal') %}<li><a id="btn_tab_closed_portal" href="#closed_portal" class="tab_session2" data-filterTab="closed_portal"><i class="icon-lock d-block d-md-none" data-bs-toggle="tooltip" title="Chiusi su fornitore ({{ ticketClosedPortal|length }})"></i><span class="d-none d-md-block">Chiusi su fornitore ({{ ticketClosedPortal|length }})</span></a></li>{% endif %}
  150.                                                     {% if app.user.canRead('desk_ticket_waiting_for_material') %}<li><a id="btn_tab_waiting_for_material" href="#waiting_for_material" class="tab_session2" data-filterTab="waiting_for_material">{% include 'components/twig/index/tab_label.html.twig' with {'icon':'icon-truck-loading', 'text':"In attesa di materiale (" ~ ticketWaitingForMaterial|length ~ ")"} %}</a></li>{% endif %}
  151.                                                     {% if app.user.canRead('desk_ticket_intervention_without_activities') %}<li><a id="btn_tab_intervention_without_activities" href="#intervention_without_activities" class="tab_session2" data-filterTab="intervention_without_activities"><i class="icon-question d-block d-md-none" data-bs-toggle="tooltip" title="Interventi senza attività ({{ interventionWithoutActivities|length }})"></i><span class="d-none d-md-block">Interventi senza attività ({{ interventionWithoutActivities|length }})</span></a></li>{% endif %}
  152.                                                     {% if app.user.canRead('desk_ticket_intervention_tariff_out') %}<li><a id="btn_tab_intervention_tariff_out" href="#intervention_tariff_out" class="tab_session2" data-filterTab="intervention_tariff_out"><i class="icon-dollar d-block d-md-none" data-bs-toggle="tooltip" title="Interventi fuori zona ({{ interventionTariffOut|length }})"></i><span class="d-none d-md-block">Interventi fuori zona ({{ interventionTariffOut|length }})</span></a></li>{% endif %}
  153.                                                     {% if app.user.canRead('desk_ticket_extras') %}<li><a id="btn_tab_extras" href="#extras" class="tab_session2" data-filterTab="extras"><i class="icon-plus1 d-block d-md-none" data-bs-toggle="tooltip" title="Extra da gestire ({{ interventionExtras|length }})"></i><span class="d-none d-md-block">Extra da gestire ({{ interventionExtras|length }})</span></a></li>{% endif %}
  154.                                                     {% if app.user.canRead('desk_ticket_reminders') %}<li><a id="btn_tab_reminders" href="#reminders" class="tab_session2" data-filterTab="reminders"><i class="icon-clock d-block d-md-none" data-bs-toggle="tooltip" title="Promemoria ({{ ticketReminders|length }})"></i><span class="d-none d-md-block">Promemoria ({{ ticketReminders|length }})</span></a></li>{% endif %}
  155.                                                 </ul>
  156.                                                 <div class="tab-container overflow_a">
  157.                                                     {% if app.user.canRead('desk_ticket_summary_ticket') %}
  158.                                                         {# Situazione ticket #}
  159.                                                         <div class="tab-content clearfix" id="summary_ticket">
  160.                                                             <h4 class="form_title">Situazione ticket</h4>
  161.                                                             <hr class="m_t_none">
  162.                                                             <div class="overflow_a">
  163.                                                                 <table class="table table-bordered responsive_font_size">
  164.                                                                     <thead>
  165.                                                                         <tr class="bg_pr color_w">
  166.                                                                             <th class="td_w_120p">Gruppo</th>
  167.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('to_assign', '')">Da assegnare</th>
  168.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('assigned', '')">Assegnati</th>
  169.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('taken_charge', '')">Presi in carico</th>
  170.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('closed', '')">Chiusi</th>
  171.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('suspension_request', '')">Richieste sosp</th>
  172.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('suspended', '')">Sospesi</th>
  173.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('canceled', '')">Annullati</th>
  174.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('wrong', '')">Errati</th>
  175.                                                                             <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTicketList('closed_portal', '')">Chiusi portale</th>
  176.                                                                             <td class="bg_pr" style="padding: 0px 0px 0px px; width: 0px;"></td>
  177.                                                                             <th class="td_w_110p txt_a_c">Totale</th>
  178.                                                                         </tr>
  179.                                                                     </thead>
  180.                                                                     <tbody>
  181.                                                                         {% set total = 0 %}
  182.                                                                         {% for og in operationGroups %}
  183.                                                                             {% set rowTotal = 0 %}
  184.                                                                             <tr>
  185.                                                                                 <td>{{ og.value }}</td>
  186.                                                                                 {% for ts in ticketStatuses %}
  187.                                                                                     {% for ticketGroup in matrixTickets %}
  188.                                                                                         {% if ticketGroup[0] == og.id %}
  189.                                                                                             {% for grCounts in ticketGroup[1] %}
  190.                                                                                                 {% if grCounts[0] == ts.id %}
  191.                                                                                                     {% if app.user.accountTypology == 'technician' %}
  192.                                                                                                         <td class="txt_a_c a_td_hover" onclick="goToTicketList('{{ ts.slug }}', '{{ og.slug }}')">{{ grCounts[1] }}</td>
  193.                                                                                                     {% else %}
  194.                                                                                                         <td class="txt_a_c a_td_hover" onclick="goToTicketList('{{ ts.slug }}', '{{ og.id }}')">{{ grCounts[1] }}</td>
  195.                                                                                                     {% endif %}
  196.                                                                                                     {% set rowTotal = rowTotal + grCounts[1] %}
  197.                                                                                                 {% endif %}
  198.                                                                                             {% endfor %}
  199.                                                                                         {% endif %}
  200.                                                                                     {% endfor %}
  201.                                                                                 {% endfor %}
  202.                                                                                 <td class="bg_pr"></td>
  203.                                                                                 <th class="txt_a_c">{{ rowTotal }}</th>
  204.                                                                             </tr>
  205.                                                                             {% set total = total + rowTotal %}
  206.                                                                         {% endfor %}
  207.                                                                         <tr class="bg_pr">
  208.                                                                             <td></td>
  209.                                                                             {% for ts in ticketStatuses %}
  210.                                                                                 <td></td>
  211.                                                                             {% endfor %}
  212.                                                                             <td></td>
  213.                                                                             <td></td>
  214.                                                                         </tr>
  215.                                                                         <tr>
  216.                                                                             <th>Totale</th>
  217.                                                                             {% for ts in ticketStatuses %}
  218.                                                                                 {% set columnTotal = 0 %}
  219.                                                                                 {% for ticketGroup in matrixTickets %}
  220.                                                                                     {% for grCounts in ticketGroup[1] %}
  221.                                                                                         {% if grCounts[0] == ts.id %}
  222.                                                                                             {% set columnTotal = columnTotal + grCounts[1] %}
  223.                                                                                         {% endif %}
  224.                                                                                     {% endfor %}
  225.                                                                                 {% endfor %}
  226.                                                                                 <th class="txt_a_c">{{ columnTotal }}</th>
  227.                                                                             {% endfor %}
  228.                                                                             <th class="bg_pr"></th>
  229.                                                                             <th class="txt_a_c">{{ total }}</th>
  230.                                                                         </tr>
  231.                                                                     </tbody>
  232.                                                                 </table>
  233.                                                             </div>
  234.                                                         </div>
  235.                                                     {% endif %}
  236.                                                     {% if app.user.canRead('desk_ticket_summary_techs') %}
  237.                                                         {# Situazione tecnici #}
  238.                                                         <div class="tab-content clearfix" id="summary_techs">
  239.                                                             <h4 class="form_title">Situazione tecnici - Presi in carico (Assegnati)</h4>
  240.                                                             <hr class="m_t_none">
  241.                                                             <div class="overflow_a">
  242.                                                                 <table class="table table-bordered responsive_font_size">
  243.                                                                     <thead>
  244.                                                                         <tr class="bg_pr color_w">
  245.                                                                             <th class="td_w_120p">Tecnico</th>
  246.                                                                             {% for og in operationGroups %}
  247.                                                                                 <th class="td_w_110p txt_a_c a_th_hover" onclick="goToTechTicketList('{{ og.id }}', '')">{{ og.value }}</th>
  248.                                                                             {% endfor %}
  249.                                                                             <td class="bg_pr" style="padding: 0px 0px 0px px; width: 0px;"></td>
  250.                                                                             <th class="td_w_110p txt_a_c">Totali</th>
  251.                                                                         </tr>
  252.                                                                     </thead>
  253.                                                                     <tbody>
  254.                                                                         {% set totalAssigned = 0 %}
  255.                                                                         {% set totalTakenCharge = 0 %}
  256.                                                                         {% for tech in technicians %}
  257.                                                                             {% set rowTotalAssigned = 0 %}
  258.                                                                             {% set rowTotalTakenCharge = 0 %}
  259.                                                                             <tr>
  260.                                                                                 <td>{{ tech }}</td>
  261.                                                                                 {% for og in operationGroups %}
  262.                                                                                     {% for techGroup in matrixTechsTickets %}
  263.                                                                                         {% if techGroup[0] == tech.id %}
  264.                                                                                             {% for techCounts in techGroup[1] %}
  265.                                                                                                 {% if techCounts[0] == og.id %}
  266.                                                                                                     <td class="txt_a_c a_td_hover" onclick="goToTechTicketList('{{ og.id }}', '{{ tech }}')">{{ techCounts[2] }} {% if techCounts[1] > 0 %}({{ techCounts[1] }}){% endif %}</td>
  267.                                                                                                     {% set rowTotalAssigned = rowTotalAssigned + techCounts[1] %}
  268.                                                                                                     {% set rowTotalTakenCharge = rowTotalTakenCharge + techCounts[2] %}
  269.                                                                                                 {% endif %}
  270.                                                                                             {% endfor %}
  271.                                                                                         {% endif %}
  272.                                                                                     {% endfor %}
  273.                                                                                 {% endfor %}
  274.                                                                                 <td class="bg_pr"></td>
  275.                                                                                 <th class="txt_a_c">{{ rowTotalTakenCharge }} {% if rowTotalAssigned > 0 %}({{ rowTotalAssigned }}){% endif %}</th>
  276.                                                                             </tr>
  277.                                                                             {% set totalAssigned = totalAssigned + rowTotalAssigned %}
  278.                                                                             {% set totalTakenCharge = totalTakenCharge + rowTotalTakenCharge %}
  279.                                                                         {% endfor %}
  280.                                                                         <tr class="bg_pr">
  281.                                                                             <td></td>
  282.                                                                             {% for og in operationGroups %}
  283.                                                                                 <td></td>
  284.                                                                             {% endfor %}
  285.                                                                             <td></td>
  286.                                                                             <td></td>
  287.                                                                         </tr>
  288.                                                                         <tr>
  289.                                                                             <th>Totale</th>
  290.                                                                             {% for og in operationGroups %}
  291.                                                                                 {% set columnTotalAssigned = 0 %}
  292.                                                                                 {% set columnTotalTakenCharge = 0 %}
  293.                                                                                 {% for techGroup in matrixTechsTickets %}
  294.                                                                                     {% for techCounts in techGroup[1] %}
  295.                                                                                         {% if techCounts[0] == og.id %}
  296.                                                                                             {% set columnTotalAssigned = columnTotalAssigned + techCounts[1] %}
  297.                                                                                             {% set columnTotalTakenCharge = columnTotalTakenCharge + techCounts[2] %}
  298.                                                                                         {% endif %}
  299.                                                                                     {% endfor %}
  300.                                                                                 {% endfor %}
  301.                                                                                 <th class="txt_a_c">{{ columnTotalTakenCharge }} {% if columnTotalAssigned > 0 %}({{ columnTotalAssigned }}){% endif %}</th>
  302.                                                                             {% endfor %}
  303.                                                                             <th class="bg_pr"></th>
  304.                                                                             <th class="txt_a_c">{{ totalTakenCharge }} {% if totalAssigned > 0 %}({{ totalAssigned }}){% endif %}</th>
  305.                                                                         </tr>
  306.                                                                     </tbody>
  307.                                                                 </table>
  308.                                                             </div>
  309.                                                         </div>
  310.                                                     {% endif %}
  311.                                                     {% if app.user.canRead('desk_ticket_errors') %}
  312.                                                         {# Con errori #}
  313.                                                         <div class="tab-content clearfix" id="errors">
  314.                                                             <h4 class="form_title">Ticket con errori</h4>
  315.                                                             <hr class="m_t_none">
  316.                                                             <div class="overflow_a">
  317.                                                                 {% if ticketWithErrors|length > 0 %}
  318.                                                                     <table class="table table-sm responsive_font_size">
  319.                                                                         <thead>
  320.                                                                             <tr>
  321.                                                                                 <th class="td_w_60p">Numero</th>
  322.                                                                                 <th class="td_w_130p">Fornitore</th>
  323.                                                                                 <th class="td_w_150p">Operazione</th>
  324.                                                                                 <th class="td_w_150p">Cliente</th>
  325.                                                                                 <th class="td_w_300p">Errore</th>
  326.                                                                                 <th></th>
  327.                                                                             </tr>
  328.                                                                         </thead>
  329.                                                                         <tbody>
  330.                                                                             {% for t in ticketWithErrors %}
  331.                                                                                 {% if loop.index < 50 %}
  332.                                                                                     <tr>
  333.                                                                                         <td>{{ t.number }}</td>
  334.                                                                                         <td>{{ t.supplier }}</td>
  335.                                                                                         <td>{{ t.operation }}</td>
  336.                                                                                         <td>{{ t.client }}</td>
  337.                                                                                         <td>{{ t.systemErrorDetails }}</td>
  338.                                                                                         <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':t.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  339.                                                                                     </tr>
  340.                                                                                 {% endif %}
  341.                                                                             {% endfor %}
  342.                                                                         </tbody>
  343.                                                                     </table>
  344.                                                                     {% if ticketWithErrors|length > 50 %}
  345.                                                                         <div class="style-msg alertmsg m_b_none">
  346.                                                                             <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> Per ridurre i tempi di caricamento della scrivania, sono visualizzati solo 50 risultati</div>
  347.                                                                         </div>
  348.                                                                     {% endif %}
  349.                                                                 {% else %}
  350.                                                                     <div class="style-msg successmsg m_b_none">
  351.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessuna ticket con errori!</div>
  352.                                                                     </div>
  353.                                                                 {% endif %}
  354.                                                             </div>
  355.                                                         </div>
  356.                                                     {% endif %}
  357.                                                     {% if app.user.canRead('desk_ticket_suspension_requests') %}
  358.                                                         {# Richieste sospensioni #}
  359.                                                         <div class="tab-content clearfix" id="suspension_requests">
  360.                                                             <h4 class="form_title">Ticket con sospensioni da approvare</h4>
  361.                                                             <hr class="m_t_none">
  362.                                                             <div class="overflow_a">
  363.                                                                 {% if ticketSuspensionRequest|length > 0 %}
  364.                                                                     <table class="table table-sm responsive_font_size">
  365.                                                                         <thead>
  366.                                                                             <tr>
  367.                                                                                 <th class="td_w_100p">Numero</th>
  368.                                                                                 <th class="td_w_140p">Fornitore</th>
  369.                                                                                 <th class="td_w_150p">Operazione</th>
  370.                                                                                 <th class="td_w_140p">Cliente</th>
  371.                                                                                 <th class="td_w_120p">Tecnico</th>
  372.                                                                                 <th></th>
  373.                                                                             </tr>
  374.                                                                         </thead>
  375.                                                                         <tbody>
  376.                                                                             {% for t in ticketSuspensionRequest %}
  377.                                                                                 <tr>
  378.                                                                                     <td>{{ t.number }}</td>
  379.                                                                                     <td>{{ t.supplier }}</td>
  380.                                                                                     <td>{{ t.operation }}</td>
  381.                                                                                     <td>{{ t.client }}</td>
  382.                                                                                     <td>{{ t.technician }}</td>
  383.                                                                                     <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':t.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  384.                                                                                 </tr>
  385.                                                                             {% endfor %}
  386.                                                                         </tbody>
  387.                                                                     </table>
  388.                                                                 {% else %}
  389.                                                                     <div class="style-msg successmsg m_b_none">
  390.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun ticket con sospensioni da approvare!</div>
  391.                                                                     </div>
  392.                                                                 {% endif %}
  393.                                                             </div>
  394.                                                         </div>
  395.                                                     {% endif %}
  396.                                                     {% if app.user.canRead('desk_ticket_closed_portal') %}
  397.                                                         {# Chiusi su portale #}
  398.                                                         <div class="tab-content clearfix" id="closed_portal">
  399.                                                             <h4 class="form_title">Ticket chiusi su portale e non su piattaforma</h4>
  400.                                                             <hr class="m_t_none">
  401.                                                             <div class="overflow_a">
  402.                                                                 {% if ticketClosedPortal|length > 0 %}
  403.                                                                     <table class="table table-sm responsive_font_size">
  404.                                                                         <thead>
  405.                                                                             <tr>
  406.                                                                                 <th class="td_w_100p">Numero</th>
  407.                                                                                 <th class="td_w_140p">Fornitore</th>
  408.                                                                                 <th class="td_w_250p">Operazione</th>
  409.                                                                                 <th class="td_w_200p">Cliente</th>
  410.                                                                                 <th class="td_w_170p">Data inizio/Data scadenza</th>
  411.                                                                                 <th></th>
  412.                                                                             </tr>
  413.                                                                         </thead>
  414.                                                                         <tbody>
  415.                                                                             {% for t in ticketClosedPortal %}
  416.                                                                                 <tr>
  417.                                                                                     <td>{{ t.number }}</td>
  418.                                                                                     <td>{{ t.supplier }}</td>
  419.                                                                                     <td>{{ t.operation }}</td>
  420.                                                                                     <td>{{ t.client }}</td>
  421.                                                                                     <td>{% if t.datetimeStart != null %}{{ t.datetimeStart|date('d-m-Y H:i') }}{% else %}---{% endif %}/{% if t.datetimeExpiration != null %}{{ t.datetimeExpiration|date('d-m-Y H:i') }}{% else %}---{% endif %}</td>
  422.                                                                                     <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':t.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  423.                                                                                 </tr>
  424.                                                                             {% endfor %}
  425.                                                                         </tbody>
  426.                                                                     </table>
  427.                                                                 {% else %}
  428.                                                                     <div class="style-msg successmsg m_b_none">
  429.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessuna ticket con ticket chiuso su portale e non su piattaforma!</div>
  430.                                                                     </div>
  431.                                                                 {% endif %}
  432.                                                             </div>
  433.                                                         </div>
  434.                                                     {% endif %}
  435.                                                     {% if app.user.canRead('desk_ticket_waiting_for_material') %}
  436.                                                         {# In attesa di materiale #}
  437.                                                         <div class="tab-content clearfix" id="waiting_for_material">
  438.                                                             <h4 class="form_title">Ticket in attesa del materiale</h4>
  439.                                                             <hr class="m_t_none">
  440.                                                             <div class="overflow_a">
  441.                                                                 {% include 'components/twig/index/ticket_waiting.html.twig' with {'ticketWaitingForMaterial':ticketWaitingForMaterial} %}
  442.                                                             </div>
  443.                                                         </div>
  444.                                                     {% endif %}
  445.                                                     {% if app.user.canRead('desk_ticket_intervention_without_activities') %}
  446.                                                         {# Interventi senza attività #}
  447.                                                         <div class="tab-content clearfix" id="intervention_without_activities">
  448.                                                             <h4 class="form_title">Interventi senza attività</h4>
  449.                                                             <hr class="m_t_none">
  450.                                                             <div class="overflow_a">
  451.                                                                 {% if interventionWithoutActivities|length > 0 %}
  452.                                                                     <table class="table table-sm responsive_font_size">
  453.                                                                         <thead>
  454.                                                                             <tr>
  455.                                                                                 <th class="td_w_100p">N° ticket</th>
  456.                                                                                 <th class="td_w_300p">Data</th>
  457.                                                                                 <th class="td_w_300p">Intervento</th>
  458.                                                                                 <th class="td_w_200p">Esito</th>
  459.                                                                                 <th class="td_w_150p">Tecnico</th>
  460.                                                                                 <th class="td_w_150p">Operatore</th>
  461.                                                                                 <th></th>
  462.                                                                             </tr>
  463.                                                                         </thead>
  464.                                                                         <tbody>
  465.                                                                             {% for i in interventionWithoutActivities %}
  466.                                                                                 <tr>
  467.                                                                                     <td>{{ i.ticket.number }}</td>
  468.                                                                                     <td>{{ i.datetime|date('d-m-Y H:i') }}</td>
  469.                                                                                     <td>{{ i }}</td>
  470.                                                                                     <td>{{ i.outcome }}</td>
  471.                                                                                     <td>{{ i.technician }}</td>
  472.                                                                                     <td>{{ i.operator }}</td>
  473.                                                                                     <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':i.ticket.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda ticket"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  474.                                                                                 </tr>
  475.                                                                             {% endfor %}
  476.                                                                         </tbody>
  477.                                                                     </table>
  478.                                                                 {% else %}
  479.                                                                     <div class="style-msg successmsg m_b_none">
  480.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun intervento senza attività!</div>
  481.                                                                     </div>
  482.                                                                 {% endif %}
  483.                                                             </div>
  484.                                                         </div>
  485.                                                     {% endif %}
  486.                                                     {% if app.user.canRead('desk_ticket_intervention_tariff_out') %}
  487.                                                         {# Interventi fuori zona #}
  488.                                                         <div class="tab-content clearfix" id="intervention_tariff_out">
  489.                                                             <h4 class="form_title">Interventi fuori zona</h4>
  490.                                                             <hr class="m_t_none">
  491.                                                             <div class="overflow_a">
  492.                                                                 {% if interventionTariffOut|length > 0 %}
  493.                                                                     <table class="table table-sm responsive_font_size">
  494.                                                                         <thead>
  495.                                                                             <tr>
  496.                                                                                 <th class="td_w_100p">N° ticket</th>
  497.                                                                                 <th class="td_w_150p">Data/Ora</th>
  498.                                                                                 <th class="td_w_300p">Intervento</th>
  499.                                                                                 <th class="td_w_200p">Esito</th>
  500.                                                                                 <th class="td_w_150p">Tecnico</th>
  501.                                                                                 <th class="td_w_150p">Operatore</th>
  502.                                                                                 <th class="td_w_200p">Città (Provincia)</th>
  503.                                                                                 <th></th>
  504.                                                                             </tr>
  505.                                                                         </thead>
  506.                                                                         <tbody>
  507.                                                                             {% for i in interventionTariffOut %}
  508.                                                                                 {% if loop.index < 50 %}
  509.                                                                                     <tr>
  510.                                                                                         <td>{{ i.ticket.number }}</td>
  511.                                                                                         <td>{{ i.datetime|date('d-m-Y H:i') }}</td>
  512.                                                                                         <td>{{ i }}</td>
  513.                                                                                         <td>{{ i.outcome }}</td>
  514.                                                                                         <td>{{ i.technician }}</td>
  515.                                                                                         <td>{{ i.operator }}</td>
  516.                                                                                         <td>{{ i.ticket.idCity|translate_city() }}</td>
  517.                                                                                         <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':i.ticket.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda ticket"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  518.                                                                                     </tr>
  519.                                                                                 {% endif %}
  520.                                                                             {% endfor %}
  521.                                                                         </tbody>
  522.                                                                     </table>
  523.                                                                     {% if interventionTariffOut|length > 50 %}
  524.                                                                         <div class="style-msg alertmsg m_b_none">
  525.                                                                             <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> Per ridurre i tempi di caricamento della scrivania, sono visualizzati solo 50 risultati</div>
  526.                                                                         </div>
  527.                                                                     {% endif %}
  528.                                                                 {% else %}
  529.                                                                     <div class="style-msg successmsg m_b_none">
  530.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun intervento fuori zona da gestire!</div>
  531.                                                                     </div>
  532.                                                                 {% endif %}
  533.                                                             </div>
  534.                                                         </div>
  535.                                                     {% endif %}
  536.                                                     {% if app.user.canRead('desk_ticket_extras') %}
  537.                                                         {# Extra da gestire #}
  538.                                                         <div class="tab-content clearfix" id="extras">
  539.                                                             <h4 class="form_title">Extra da gestire</h4>
  540.                                                             <hr class="m_t_none">
  541.                                                             <div class="overflow_a">
  542.                                                                 {% if interventionExtras|length > 0 %}
  543.                                                                     <table class="table table-sm responsive_font_size">
  544.                                                                         <thead>
  545.                                                                             <tr>
  546.                                                                                 <th class="td_w_500p">Intervento</th>
  547.                                                                                 <th class="td_w_150p">Tipo</th>
  548.                                                                                 <th class="td_w_150p txt_a_c">Ammontare</th>
  549.                                                                                 <th class="td_w_100p txt_a_c">Ore</th>
  550.                                                                                 <th>Note</th>
  551.                                                                                 <th></th>
  552.                                                                             </tr>
  553.                                                                         </thead>
  554.                                                                         <tbody>
  555.                                                                             {% for e in interventionExtras %}
  556.                                                                                 <tr>
  557.                                                                                     <td>{{ e.intervention }}</td>
  558.                                                                                     <td>{{ e.displayType() }}</td>
  559.                                                                                     <td class="txt_a_c">{{ e.cost }} €</td>
  560.                                                                                     <td class="txt_a_c">{% if e.hours != null %}{{ e.hours }}{% else %}---{% endif %}</td>
  561.                                                                                     <td class="font_14">{% if e.notes != null %}{{ e.notes }}{% else %}---{% endif %}</td>
  562.                                                                                     <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':e.intervention.ticket.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  563.                                                                                 </tr>
  564.                                                                             {% endfor %}
  565.                                                                         </tbody>
  566.                                                                     </table>
  567.                                                                 {% else %}
  568.                                                                     <div class="style-msg successmsg m_b_none">
  569.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun ticket con extra da gestire!</div>
  570.                                                                     </div>
  571.                                                                 {% endif %}
  572.                                                             </div>
  573.                                                         </div>
  574.                                                     {% endif %}
  575.                                                     {% if app.user.canRead('desk_ticket_reminders') %}
  576.                                                         {# Reminder #}
  577.                                                         <div class="tab-content clearfix" id="reminders">
  578.                                                             <h4 class="form_title">Promemoria</h4>
  579.                                                             <hr class="m_t_none">
  580.                                                             <div class="overflow_a">
  581.                                                                 {% if ticketReminders|length > 0 %}
  582.                                                                     <table class="table table-sm responsive_font_size">
  583.                                                                         <thead>
  584.                                                                             <tr>
  585.                                                                                 <th class="td_w_150p">Data/Ora</th>
  586.                                                                                 <th class="td_w_150p">Utente</th>
  587.                                                                                 <th>Dettagli</th>
  588.                                                                                 <th></th>
  589.                                                                             </tr>
  590.                                                                         </thead>
  591.                                                                         <tbody>
  592.                                                                             {% for r in ticketReminders %}
  593.                                                                                 <tr {% if r.datetime|date('YmdHi') < "now"|date('YmdHi') %}class="bg_r_h"{% endif %}>
  594.                                                                                     <td>{{ r.datetime|date('d-m-Y H:i') }}</td>
  595.                                                                                     <td>{{ r.technician }}</td>
  596.                                                                                     <td>{{ r.details }}</td>
  597.                                                                                     <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':r.ticket.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  598.                                                                                 </tr>
  599.                                                                             {% endfor %}
  600.                                                                         </tbody>
  601.                                                                     </table>
  602.                                                                 {% else %}
  603.                                                                     <div class="style-msg successmsg m_b_none">
  604.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun promemoria presente!</div>
  605.                                                                     </div>
  606.                                                                 {% endif %}
  607.                                                             </div>
  608.                                                         </div>
  609.                                                     {% endif %}
  610.                                                 </div>
  611.                                             </div>
  612.                                         </div>
  613.                                     </div>
  614.                                 </div>
  615.                             {% endif %}
  616.                             {# Magazzini #}
  617.                             {% if app.user.canViewTab('desk_warehouse') %}
  618.                                 <div class="tab-content clearfix" id="warehouses">
  619.                                     {% if warehouseAlarms|length == 1 %}
  620.                                         {% for warehouseData in warehouseAlarms %}
  621.                                             <div class="row">
  622.                                                 <div class="col-12">
  623.                                                     <h4 class="form_title">{{ warehouseData[1] }}</h4>
  624.                                                     <hr class="m_t_none m_b_none">
  625.                                                 </div>
  626.                                                 <div class="col-12 overflow_a">
  627.                                                     <div class="tabs side-tabs clearfix m_b_none">
  628.                                                         <ul class="tab-nav tab-nav2 clearfix">
  629.                                                             {% if app.user.canRead('desk_warehouse_product_to_manage') %}<li><a id="btn_tab_{{ warehouseData[0] }}_product_to_manage" href="#{{ warehouseData[0] }}_product_to_manage" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_product_to_manage"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Prodotti da gestire ({{ warehouseData[2] }})"></i><span class="d-none d-md-block">Prodotti da gestire ({{ warehouseData[2] }})</span></a></li>{% endif %}
  630.                                                             {% if app.user.canRead('desk_warehouse_transfer_incoming') %}<li><a id="btn_tab_{{ warehouseData[0] }}_transfers_incoming" href="#{{ warehouseData[0] }}_transfers_incoming" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_transfers_incoming"><i class="icon-truck d-block d-md-none" data-bs-toggle="tooltip" title="Trasferimenti in entrata ({{ warehouseData[3]|length }})"></i><span class="d-none d-md-block">Trasferimenti in entrata ({{ warehouseData[3]|length }})</span></a></li>{% endif %}
  631.                                                             {% if app.user.canRead('desk_warehouse_transfer_output') %}<li><a id="btn_tab_{{ warehouseData[0] }}_transfers_output" href="#{{ warehouseData[0] }}_transfers_output" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_transfers_output"><i class="icon-truck-loading d-block d-md-none" data-bs-toggle="tooltip" title="Trasferimenti in uscita ({{ warehouseData[4]|length }})"></i><span class="d-none d-md-block">Trasferimenti in uscita ({{ warehouseData[4]|length }})</span></a></li>{% endif %}
  632.                                                             {% if app.user.canRead('desk_warehouse_transfer_ddt_missing') %}<li><a id="btn_tab_{{ warehouseData[0] }}_transfers_ddt_missing" href="#{{ warehouseData[0] }}_transfers_ddt_missing" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_transfers_ddt_missing"><i class="icon-signature d-block d-md-none" data-bs-toggle="tooltip" title="Trasferimenti senza DDT firmato ({{ warehouseData[5]|length }})"></i><span class="d-none d-md-block">Trasferimenti senza DDT firmato ({{ warehouseData[5]|length }})</span></a></li>{% endif %}
  633.                                                             {% if app.user.canRead('desk_warehouse_request_technicians') %}<li><a id="btn_tab_{{ warehouseData[0] }}_request_technicians" href="#{{ warehouseData[0] }}_request_technicians" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_request_technicians"><i class="icon-question d-block d-md-none" data-bs-toggle="tooltip" title="Richieste tecnici ({{ warehouseData[6]|length }})"></i><span class="d-none d-md-block">Richieste tecnici ({{ warehouseData[6]|length }})</span></a></li>{% endif %}
  634.                                                             {% if app.user.canRead('desk_warehouse_stocks_red') %}<li><a id="btn_tab_{{ warehouseData[0] }}_product_stocks_red" href="#{{ warehouseData[0] }}_product_stocks_red" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_product_stocks_red"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Scorte prodotti rosse ({{ warehouseData[7]|length }})"></i><span class="d-none d-md-block">Scorte prodotti rosse ({{ warehouseData[7]|length }})</span></a></li>{% endif %}
  635.                                                             {% if app.user.canRead('desk_warehouse_stocks_yellow') %}<li><a id="btn_tab_{{ warehouseData[0] }}_product_stocks_yellow" href="#{{ warehouseData[0] }}_product_stocks_yellow" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_product_stocks_yellow"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Scorte prodotti gialle ({{ warehouseData[8]|length }})"></i><span class="d-none d-md-block">Scorte prodotti gialle ({{ warehouseData[8]|length }})</span></a></li>{% endif %}
  636.                                                         </ul>
  637.                                                         <div class="tab-container">
  638.                                                             {# Sede centrale #}
  639.                                                             {% if app.user.canRead('desk_warehouse_product_to_manage') %}
  640.                                                                 {# Prodotti da gestire #}
  641.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_product_to_manage">
  642.                                                                     <h4 class="form_title">Prodotti da gestire</h4>
  643.                                                                     <hr class="m_t_none">
  644.                                                                     {% if warehouseData[2] > 0 %}
  645.                                                                         <div class="style-msg infomsg m_b_none">
  646.                                                                             <div class="sb-msg"><i class="icon-info"></i><strong>Attenzione!</strong> Ci sono {{ warehouseData[2] }} prodotti da gestire in questo magazzino!<a href="{{ path ('user_warehouse_sheet', {'warehouseId':warehouseData[0]}) }}" class="button button-3d button-mini button-amber f_right m_none">Vai al magazzino</a></div>
  647.                                                                         </div>
  648.                                                                     {% else %}
  649.                                                                         <div class="style-msg successmsg m_b_none">
  650.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun prodotto da gestire presente nel magazzino</div>
  651.                                                                         </div>                                                                        
  652.                                                                     {% endif %}
  653.                                                                 </div>
  654.                                                             {% endif %}
  655.                                                             {% if app.user.canRead('desk_warehouse_transfer_incoming') %}
  656.                                                                 {# Trasferimenti in entrata #}
  657.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_transfers_incoming">
  658.                                                                     <h4 class="form_title">Trasferimenti in entrata non completati</h4>
  659.                                                                     <hr class="m_t_none">
  660.                                                                     {% if warehouseData[3]|length > 0 %}
  661.                                                                         <table class="table table-sm">
  662.                                                                             <thead>
  663.                                                                                 <tr>
  664.                                                                                     <th class="txt_a_c">Fase</th>
  665.                                                                                     <th>Magazzino provenienza</th>
  666.                                                                                     <th>Fornitore</th>
  667.                                                                                     <th>Data creazione</th>
  668.                                                                                     <th>Data invio</th>
  669.                                                                                     <th>Data completamento</th>
  670.                                                                                     <th></th>
  671.                                                                                 </tr>
  672.                                                                             </thead>
  673.                                                                             <tbody>
  674.                                                                                 {% for pt in warehouseData[3] %}
  675.                                                                                     <tr>
  676.                                                                                         <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  677.                                                                                         <td>{{ pt.warehouseFrom }}</td>
  678.                                                                                         <td>{{ pt.supplier }}</td>
  679.                                                                                         <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  680.                                                                                         <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  681.                                                                                         <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  682.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':warehouseData[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  683.                                                                                     </tr>
  684.                                                                                 {% endfor %}
  685.                                                                             </tbody>
  686.                                                                         </table>
  687.                                                                     {% else %}
  688.                                                                         <div class="style-msg successmsg m_b_none">
  689.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in entrata non completato!</div>
  690.                                                                         </div>
  691.                                                                     {% endif %}
  692.                                                                 </div>
  693.                                                             {% endif %}
  694.                                                             {% if app.user.canRead('desk_warehouse_transfer_output') %}
  695.                                                                 {# Trasferimenti in uscita #}
  696.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_transfers_output">
  697.                                                                     <h4 class="form_title">Trasferimenti in uscita non completati</h4>
  698.                                                                     <hr class="m_t_none">
  699.                                                                     {% if warehouseData[4]|length > 0 %}
  700.                                                                         <table class="table table-sm">
  701.                                                                             <thead>
  702.                                                                                 <tr>
  703.                                                                                     <th class="txt_a_c">Fase</th>
  704.                                                                                     <th>Magazzino destinazione</th>
  705.                                                                                     <th>Fornitore</th>
  706.                                                                                     <th>Data creazione</th>
  707.                                                                                     <th>Data invio</th>
  708.                                                                                     <th>Data completamento</th>
  709.                                                                                     <th></th>
  710.                                                                                 </tr>
  711.                                                                             </thead>
  712.                                                                             <tbody>
  713.                                                                                 {% for pt in warehouseData[4] %}
  714.                                                                                     <tr>
  715.                                                                                         <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  716.                                                                                         <td>{{ pt.warehouseTo }}</td>
  717.                                                                                         <td>{{ pt.supplier }}</td>
  718.                                                                                         <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  719.                                                                                         <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  720.                                                                                         <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  721.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':warehouseData[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  722.                                                                                     </tr>
  723.                                                                                 {% endfor %}
  724.                                                                             </tbody>
  725.                                                                         </table>
  726.                                                                     {% else %}
  727.                                                                         <div class="style-msg successmsg m_b_none">
  728.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in uscita non completato!</div>
  729.                                                                         </div>
  730.                                                                     {% endif %}
  731.                                                                 </div>
  732.                                                             {% endif %}
  733.                                                             {% if app.user.canRead('desk_warehouse_transfer_ddt_missing') %}
  734.                                                                 {# Trasferimenti senza DDT firmato #}
  735.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_transfers_ddt_missing">
  736.                                                                     <h4 class="form_title">Trasferimenti senza DDT firmato</h4>
  737.                                                                     <hr class="m_t_none">
  738.                                                                     {% if warehouseData[5]|length > 0 %}
  739.                                                                         <table class="table table-sm">
  740.                                                                             <thead>
  741.                                                                                 <tr>
  742.                                                                                     <th class="td_w_80p txt_a_c">Fase</th>
  743.                                                                                     <th class="td_w_80p txt_a_c">Fase DDT</th>
  744.                                                                                     <th>Magazzino provenienza</th>
  745.                                                                                     <th>Magazzino destinazione</th>
  746.                                                                                     <th>Fornitore</th>
  747.                                                                                     <th>Data creazione</th>
  748.                                                                                     <th>Data invio</th>
  749.                                                                                     <th>Data completamento</th>
  750.                                                                                     <th></th>
  751.                                                                                 </tr>
  752.                                                                             </thead>
  753.                                                                             <tbody>
  754.                                                                                 {% for pt in warehouseData[5] %}
  755.                                                                                     <tr>
  756.                                                                                         <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  757.                                                                                         <td class="txt_a_c">{{ pt.displayPhaseDdt('icon')|raw }}</td>
  758.                                                                                         <td>{{ pt.warehouseFrom }}</td>
  759.                                                                                         <td>{{ pt.warehouseTo }}</td>
  760.                                                                                         <td>{{ pt.supplier }}</td>
  761.                                                                                         <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  762.                                                                                         <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  763.                                                                                         <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  764.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':warehouseData[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  765.                                                                                     </tr>
  766.                                                                                 {% endfor %}
  767.                                                                             </tbody>
  768.                                                                         </table>
  769.                                                                     {% else %}
  770.                                                                         <div class="style-msg successmsg m_b_none">
  771.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento senza DDT firmato!</div>
  772.                                                                         </div>
  773.                                                                     {% endif %}
  774.                                                                 </div>
  775.                                                             {% endif %}
  776.                                                             {% if app.user.canRead('desk_warehouse_request_technicians') %}
  777.                                                                 {# Richieste tecnici #}
  778.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_request_technicians">
  779.                                                                     <h4 class="form_title">Richieste tecnici non gestite</h4>
  780.                                                                     <hr class="m_t_none">
  781.                                                                     {% if warehouseData[6]|length > 0 %}
  782.                                                                         <table class="table table-sm">
  783.                                                                             <thead>
  784.                                                                                 <tr>
  785.                                                                                     <th>Tecnico</th>
  786.                                                                                     <th>Magazzino</th>
  787.                                                                                     <th>Data</th>
  788.                                                                                     <th>Dettagli</th>
  789.                                                                                     <th></th>
  790.                                                                                 </tr>
  791.                                                                             </thead>
  792.                                                                             <tbody>
  793.                                                                                 {% for rt in warehouseData[6] %}
  794.                                                                                     <tr>
  795.                                                                                         <td>{{ rt.technician }}</td>
  796.                                                                                         <td>{{ rt.warehouse }}</td>
  797.                                                                                         <td>{{ rt.datetime|date('d-m-Y H:i') }}</td>
  798.                                                                                         <td>{{ rt.displayDetails()|raw }}</td>
  799.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_sheet', {'warehouseId':warehouseData[0]}) }}" data-bs-toggle="tooltip" title="Vai alla scheda magazzino"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  800.                                                                                     </tr>
  801.                                                                                 {% endfor %}
  802.                                                                             </tbody>
  803.                                                                         </table>
  804.                                                                     {% else %}
  805.                                                                         <div class="style-msg successmsg m_b_none">
  806.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun richiesta tecnico non gestita!</div>
  807.                                                                         </div>
  808.                                                                     {% endif %}
  809.                                                                 </div>
  810.                                                             {% endif %}
  811.                                                             {% if app.user.canRead('desk_warehouse_stocks_red') %}
  812.                                                                 {# Scorte prodotti rosse #}
  813.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_product_stocks_red">
  814.                                                                     <h4 class="form_title">Allarmi scorte prodotti rosse</h4>
  815.                                                                     <hr class="m_t_none">
  816.                                                                     {% if warehouseData[7]|length > 0 %}
  817.                                                                         <table class="table table-sm">
  818.                                                                             <thead>
  819.                                                                                 <tr>
  820.                                                                                     <th class="td_w_120p txt_a_c">Qtà disponibile</th>
  821.                                                                                     <th class="td_w_120p txt_a_c">Qtà rosso</th>
  822.                                                                                     <th>Modello</th>
  823.                                                                                     <th>Fornitore</th>
  824.                                                                                 </tr>
  825.                                                                             </thead>
  826.                                                                             <tbody>
  827.                                                                                 {% for ps in warehouseData[7] %}
  828.                                                                                     {% if loop.index < 50 %}
  829.                                                                                         <tr>
  830.                                                                                             <td class="txt_a_c">{{ ps[0] }}</td>
  831.                                                                                             <td class="txt_a_c">{{ ps[1] }}</td>
  832.                                                                                             <td>{{ ps[2] }}</td>
  833.                                                                                             <td>{{ ps[3] }}</td>
  834.                                                                                         </tr>
  835.                                                                                     {% endif %}
  836.                                                                                 {% endfor %}
  837.                                                                             </tbody>
  838.                                                                         </table>
  839.                                                                         {% if warehouseData[7]|length > 50 %}
  840.                                                                             <div class="style-msg alertmsg m_b_none">
  841.                                                                                 <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> Per ridurre i tempi di caricamento della scrivania, sono visualizzati solo 50 risultati</div>
  842.                                                                             </div>
  843.                                                                         {% endif %}
  844.                                                                     {% else %}
  845.                                                                         <div class="style-msg successmsg m_b_none">
  846.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun allarme scorte prodotto rosse!</div>
  847.                                                                         </div>
  848.                                                                     {% endif %}
  849.                                                                 </div>
  850.                                                             {% endif %}
  851.                                                             {% if app.user.canRead('desk_warehouse_stocks_yellow') %}
  852.                                                                 {# Scorte prodotti giallo #}
  853.                                                                 <div class="tab-content clearfix" id="{{ warehouseData[0] }}_product_stocks_yellow">
  854.                                                                     <h4 class="form_title">Allarmi scorte prodotti giallo</h4>
  855.                                                                     <hr class="m_t_none">
  856.                                                                     {% if warehouseData[8]|length > 0 %}
  857.                                                                         <table class="table table-sm">
  858.                                                                             <thead>
  859.                                                                                 <tr>
  860.                                                                                     <th class="td_w_120p txt_a_c">Qtà disponibile</th>
  861.                                                                                     <th class="td_w_120p txt_a_c">Qtà giallo</th>
  862.                                                                                     <th class="td_w_120p txt_a_c">Qtà rosso</th>
  863.                                                                                     <th>Modello</th>
  864.                                                                                     <th>Fornitore</th>
  865.                                                                                 </tr>
  866.                                                                             </thead>
  867.                                                                             <tbody>
  868.                                                                                 {% for ps in warehouseData[8] %}
  869.                                                                                     {% if loop.index < 50 %}
  870.                                                                                         <tr>
  871.                                                                                             <td class="txt_a_c">{{ ps[0] }}</td>
  872.                                                                                             <td class="txt_a_c">{{ ps[1] }}</td>
  873.                                                                                             <td class="txt_a_c">{{ ps[2] }}</td>
  874.                                                                                             <td>{{ ps[3] }}</td>
  875.                                                                                             <td>{{ ps[4] }}</td>
  876.                                                                                         </tr>
  877.                                                                                     {% endif %}
  878.                                                                                 {% endfor %}
  879.                                                                             </tbody>
  880.                                                                         </table>
  881.                                                                         {% if warehouseData[8]|length > 50 %}
  882.                                                                             <div class="style-msg alertmsg m_b_none">
  883.                                                                                 <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> Per ridurre i tempi di caricamento della scrivania, sono visualizzati solo 50 risultati</div>
  884.                                                                             </div>
  885.                                                                         {% endif %}
  886.                                                                     {% else %}
  887.                                                                         <div class="style-msg successmsg m_b_none">
  888.                                                                             <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun allarme scorte prodotto gialle!</div>
  889.                                                                         </div>
  890.                                                                     {% endif %}
  891.                                                                 </div>
  892.                                                             {% endif %}
  893.                                                         </div>
  894.                                                     </div>
  895.                                                 </div>
  896.                                             </div>
  897.                                         {% endfor %}
  898.                                     {% else %}
  899.                                         <div class="tabs clearfix m_b_none">
  900.                                             <ul class="tab-nav clearfix">
  901.                                                 {% for warehouseData in warehouseAlarms %}
  902.                                                     <li><a id="btn_tab_warehouse_{{ warehouseData[0] }}" href="#warehouse_{{ warehouseData[0] }}" class="tab_session2" data-filterTab="warehouse_{{ warehouseData[0] }}"><i class="icon-warehouse d-block d-md-none" data-bs-toggle="tooltip" title="{{ warehouseData[1] }}"></i><span class="d-none d-md-block">{{ warehouseData[1] }}</span></a></li>
  903.                                                 {% endfor %}
  904.                                             </ul>
  905.                                             <div class="tab-container">
  906.                                                 {% for warehouseData in warehouseAlarms %}
  907.                                                     <div class="tab-content clearfix" id="warehouse_{{ warehouseData[0] }}">
  908.                                                         <div class="row">
  909.                                                             <div class="col-12">
  910.                                                                 <h4 class="form_title">{{ warehouseData[1] }}</h4>
  911.                                                                 <hr class="m_t_none m_b_none">
  912.                                                             </div>
  913.                                                             <div class="col-12 overflow_a">
  914.                                                                 <div class="tabs side-tabs clearfix m_b_none">
  915.                                                                     <ul class="tab-nav tab-nav2 clearfix">
  916.                                                                         {% if app.user.canRead('desk_warehouse_product_to_manage') %}<li><a id="btn_tab_{{ warehouseData[0] }}_product_to_manage" href="#{{ warehouseData[0] }}_product_to_manage" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_product_to_manage"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Prodotti da gestire ({{ warehouseData[2] }})"></i><span class="d-none d-md-block">Prodotti da gestire ({{ warehouseData[2] }})</span></a></li>{% endif %}
  917.                                                                         {% if app.user.canRead('desk_warehouse_transfer_incoming') %}<li><a id="btn_tab_{{ warehouseData[0] }}_transfers_incoming" href="#{{ warehouseData[0] }}_transfers_incoming" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_transfers_incoming"><i class="icon-truck d-block d-md-none" data-bs-toggle="tooltip" title="Trasferimenti in entrata ({{ warehouseData[3]|length }})"></i><span class="d-none d-md-block">Trasferimenti in entrata ({{ warehouseData[3]|length }})</span></a></li>{% endif %}
  918.                                                                         {% if app.user.canRead('desk_warehouse_transfer_output') %}<li><a id="btn_tab_{{ warehouseData[0] }}_transfers_output" href="#{{ warehouseData[0] }}_transfers_output" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_transfers_output"><i class="icon-truck-loading d-block d-md-none" data-bs-toggle="tooltip" title="Trasferimenti in uscita ({{ warehouseData[4]|length }})"></i><span class="d-none d-md-block">Trasferimenti in uscita ({{ warehouseData[4]|length }})</span></a></li>{% endif %}
  919.                                                                         {% if app.user.canRead('desk_warehouse_transfer_ddt_missing') %}<li><a id="btn_tab_{{ warehouseData[0] }}_transfers_ddt_missing" href="#{{ warehouseData[0] }}_transfers_ddt_missing" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_transfers_ddt_missing"><i class="icon-signature d-block d-md-none" data-bs-toggle="tooltip" title="Trasferimenti senza DDT firmato ({{ warehouseData[5]|length }})"></i><span class="d-none d-md-block">Trasferimenti senza DDT firmato ({{ warehouseData[5]|length }})</span></a></li>{% endif %}
  920.                                                                         {% if app.user.canRead('desk_warehouse_request_technicians') %}<li><a id="btn_tab_{{ warehouseData[0] }}_request_technicians" href="#{{ warehouseData[0] }}_request_technicians" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_request_technicians"><i class="icon-question d-block d-md-none" data-bs-toggle="tooltip" title="Richieste tecnici ({{ warehouseData[6]|length }})"></i><span class="d-none d-md-block">Richieste tecnici ({{ warehouseData[6]|length }})</span></a></li>{% endif %}
  921.                                                                         {% if app.user.canRead('desk_warehouse_stocks_red') %}<li><a id="btn_tab_{{ warehouseData[0] }}_product_stocks_red" href="#{{ warehouseData[0] }}_product_stocks_red" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_product_stocks_red"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Scorte prodotti rosse ({{ warehouseData[7]|length }})"></i><span class="d-none d-md-block">Scorte prodotti rosse ({{ warehouseData[7]|length }})</span></a></li>{% endif %}
  922.                                                                         {% if app.user.canRead('desk_warehouse_stocks_yellow') %}<li><a id="btn_tab_{{ warehouseData[0] }}_product_stocks_yellow" href="#{{ warehouseData[0] }}_product_stocks_yellow" class="tab_session2" data-filterTab="{{ warehouseData[0] }}_product_stocks_yellow"><i class="icon-box d-block d-md-none" data-bs-toggle="tooltip" title="Scorte prodotti gialle ({{ warehouseData[8]|length }})"></i><span class="d-none d-md-block">Scorte prodotti gialle ({{ warehouseData[8]|length }})</span></a></li>{% endif %}
  923.                                                                     </ul>
  924.                                                                     <div class="tab-container">
  925.                                                                         {# Sede centrale #}
  926.                                                                         {% if app.user.canRead('desk_warehouse_product_to_manage') %}
  927.                                                                             {# Prodotti da gestire #}
  928.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_product_to_manage">
  929.                                                                                 <h4 class="form_title">Prodotti da gestire</h4>
  930.                                                                                 <hr class="m_t_none">
  931.                                                                                 {% if warehouseData[2] > 0 %}
  932.                                                                                     <div class="style-msg infomsg m_b_none">
  933.                                                                                         <div class="sb-msg"><i class="icon-info"></i><strong>Attenzione!</strong> Ci sono {{ warehouseData[2] }} prodotti da gestire in questo magazzino!<a href="{{ path ('user_warehouse_sheet', {'warehouseId':warehouseData[0]}) }}" class="button button-3d button-mini button-amber f_right m_none">Vai al magazzino</a></div>
  934.                                                                                     </div>
  935.                                                                                 {% else %}
  936.                                                                                     <div class="style-msg successmsg m_b_none">
  937.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun prodotto da gestire presente nel magazzino</div>
  938.                                                                                     </div>                                                                        
  939.                                                                                 {% endif %}
  940.                                                                             </div>
  941.                                                                         {% endif %}
  942.                                                                         {% if app.user.canRead('desk_warehouse_transfer_incoming') %}
  943.                                                                             {# Trasferimenti in entrata #}
  944.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_transfers_incoming">
  945.                                                                                 <h4 class="form_title">Trasferimenti in entrata non completati</h4>
  946.                                                                                 <hr class="m_t_none">
  947.                                                                                 {% if warehouseData[3]|length > 0 %}
  948.                                                                                     <table class="table table-sm">
  949.                                                                                         <thead>
  950.                                                                                             <tr>
  951.                                                                                                 <th class="txt_a_c">Fase</th>
  952.                                                                                                 <th>Magazzino provenienza</th>
  953.                                                                                                 <th>Fornitore</th>
  954.                                                                                                 <th>Data creazione</th>
  955.                                                                                                 <th>Data invio</th>
  956.                                                                                                 <th>Data completamento</th>
  957.                                                                                                 <th></th>
  958.                                                                                             </tr>
  959.                                                                                         </thead>
  960.                                                                                         <tbody>
  961.                                                                                             {% for pt in warehouseData[3] %}
  962.                                                                                                 <tr>
  963.                                                                                                     <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  964.                                                                                                     <td>{{ pt.warehouseFrom }}</td>
  965.                                                                                                     <td>{{ pt.supplier }}</td>
  966.                                                                                                     <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  967.                                                                                                     <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  968.                                                                                                     <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  969.                                                                                                     <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':warehouseData[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  970.                                                                                                 </tr>
  971.                                                                                             {% endfor %}
  972.                                                                                         </tbody>
  973.                                                                                     </table>
  974.                                                                                 {% else %}
  975.                                                                                     <div class="style-msg successmsg m_b_none">
  976.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in entrata non completato!</div>
  977.                                                                                     </div>
  978.                                                                                 {% endif %}
  979.                                                                             </div>
  980.                                                                         {% endif %}
  981.                                                                         {% if app.user.canRead('desk_warehouse_transfer_output') %}
  982.                                                                             {# Trasferimenti in uscita #}
  983.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_transfers_output">
  984.                                                                                 <h4 class="form_title">Trasferimenti in uscita non completati</h4>
  985.                                                                                 <hr class="m_t_none">
  986.                                                                                 {% if warehouseData[4]|length > 0 %}
  987.                                                                                     <table class="table table-sm">
  988.                                                                                         <thead>
  989.                                                                                             <tr>
  990.                                                                                                 <th class="txt_a_c">Fase</th>
  991.                                                                                                 <th>Magazzino destinazione</th>
  992.                                                                                                 <th>Fornitore</th>
  993.                                                                                                 <th>Data creazione</th>
  994.                                                                                                 <th>Data invio</th>
  995.                                                                                                 <th>Data completamento</th>
  996.                                                                                                 <th></th>
  997.                                                                                             </tr>
  998.                                                                                         </thead>
  999.                                                                                         <tbody>
  1000.                                                                                             {% for pt in warehouseData[4] %}
  1001.                                                                                                 <tr>
  1002.                                                                                                     <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  1003.                                                                                                     <td>{{ pt.warehouseTo }}</td>
  1004.                                                                                                     <td>{{ pt.supplier }}</td>
  1005.                                                                                                     <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  1006.                                                                                                     <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  1007.                                                                                                     <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  1008.                                                                                                     <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':warehouseData[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1009.                                                                                                 </tr>
  1010.                                                                                             {% endfor %}
  1011.                                                                                         </tbody>
  1012.                                                                                     </table>
  1013.                                                                                 {% else %}
  1014.                                                                                     <div class="style-msg successmsg m_b_none">
  1015.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in uscita non completato!</div>
  1016.                                                                                     </div>
  1017.                                                                                 {% endif %}
  1018.                                                                             </div>
  1019.                                                                         {% endif %}
  1020.                                                                         {% if app.user.canRead('desk_warehouse_transfer_ddt_missing') %}
  1021.                                                                             {# Trasferimenti senza DDT firmato #}
  1022.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_transfers_ddt_missing">
  1023.                                                                                 <h4 class="form_title">Trasferimenti senza DDT firmato</h4>
  1024.                                                                                 <hr class="m_t_none">
  1025.                                                                                 {% if warehouseData[5]|length > 0 %}
  1026.                                                                                     <table class="table table-sm">
  1027.                                                                                         <thead>
  1028.                                                                                             <tr>
  1029.                                                                                                 <th class="td_w_80p txt_a_c">Fase</th>
  1030.                                                                                                 <th class="td_w_80p txt_a_c">Fase DDT</th>
  1031.                                                                                                 <th>Magazzino provenienza</th>
  1032.                                                                                                 <th>Magazzino destinazione</th>
  1033.                                                                                                 <th>Fornitore</th>
  1034.                                                                                                 <th>Data creazione</th>
  1035.                                                                                                 <th>Data invio</th>
  1036.                                                                                                 <th>Data completamento</th>
  1037.                                                                                                 <th></th>
  1038.                                                                                             </tr>
  1039.                                                                                         </thead>
  1040.                                                                                         <tbody>
  1041.                                                                                             {% for pt in warehouseData[5] %}
  1042.                                                                                                 <tr>
  1043.                                                                                                     <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  1044.                                                                                                     <td class="txt_a_c">{{ pt.displayPhaseDdt('icon')|raw }}</td>
  1045.                                                                                                     <td>{{ pt.warehouseFrom }}</td>
  1046.                                                                                                     <td>{{ pt.warehouseTo }}</td>
  1047.                                                                                                     <td>{{ pt.supplier }}</td>
  1048.                                                                                                     <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  1049.                                                                                                     <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  1050.                                                                                                     <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  1051.                                                                                                     <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':warehouseData[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1052.                                                                                                 </tr>
  1053.                                                                                             {% endfor %}
  1054.                                                                                         </tbody>
  1055.                                                                                     </table>
  1056.                                                                                 {% else %}
  1057.                                                                                     <div class="style-msg successmsg m_b_none">
  1058.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento senza DDT firmato!</div>
  1059.                                                                                     </div>
  1060.                                                                                 {% endif %}
  1061.                                                                             </div>
  1062.                                                                         {% endif %}
  1063.                                                                         {% if app.user.canRead('desk_warehouse_request_technicians') %}
  1064.                                                                             {# Richieste tecnici #}
  1065.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_request_technicians">
  1066.                                                                                 <h4 class="form_title">Richieste tecnici non gestite</h4>
  1067.                                                                                 <hr class="m_t_none">
  1068.                                                                                 {% if warehouseData[6]|length > 0 %}
  1069.                                                                                     <table class="table table-sm">
  1070.                                                                                         <thead>
  1071.                                                                                             <tr>
  1072.                                                                                                 <th>Tecnico</th>
  1073.                                                                                                 <th>Magazzino</th>
  1074.                                                                                                 <th>Data</th>
  1075.                                                                                                 <th>Dettagli</th>
  1076.                                                                                                 <th></th>
  1077.                                                                                             </tr>
  1078.                                                                                         </thead>
  1079.                                                                                         <tbody>
  1080.                                                                                             {% for rt in warehouseData[6] %}
  1081.                                                                                                 <tr>
  1082.                                                                                                     <td>{{ rt.technician }}</td>
  1083.                                                                                                     <td>{{ rt.warehouse }}</td>
  1084.                                                                                                     <td>{{ rt.datetime|date('d-m-Y') }}</td>
  1085.                                                                                                     <td>{{ rt.displayDetails()|raw }}</td>
  1086.                                                                                                     <td class="td_action"><a href="{{ path ('user_warehouse_sheet', {'warehouseId':warehouseData[0]}) }}" data-bs-toggle="tooltip" title="Vai alla scheda magazzino"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1087.                                                                                                 </tr>
  1088.                                                                                             {% endfor %}
  1089.                                                                                         </tbody>
  1090.                                                                                     </table>
  1091.                                                                                 {% else %}
  1092.                                                                                     <div class="style-msg successmsg m_b_none">
  1093.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun richiesta tecnico non gestita!</div>
  1094.                                                                                     </div>
  1095.                                                                                 {% endif %}
  1096.                                                                             </div>
  1097.                                                                         {% endif %}
  1098.                                                                         {% if app.user.canRead('desk_warehouse_stocks_red') %}
  1099.                                                                             {# Scorte prodotti rosse #}
  1100.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_product_stocks_red">
  1101.                                                                                 <h4 class="form_title">Allarmi scorte prodotti rosse</h4>
  1102.                                                                                 <hr class="m_t_none">
  1103.                                                                                 {% if warehouseData[7]|length > 0 %}
  1104.                                                                                     <table class="table table-sm">
  1105.                                                                                         <thead>
  1106.                                                                                             <tr>
  1107.                                                                                                 <th class="td_w_120p txt_a_c">Qtà disponibile</th>
  1108.                                                                                                 <th class="td_w_120p txt_a_c">Qtà rosso</th>
  1109.                                                                                                 <th>Modello</th>
  1110.                                                                                                 <th>Fornitore</th>
  1111.                                                                                             </tr>
  1112.                                                                                         </thead>
  1113.                                                                                         <tbody>
  1114.                                                                                             {% for ps in warehouseData[7] %}
  1115.                                                                                                 {% if loop.index < 50 %}
  1116.                                                                                                     <tr>
  1117.                                                                                                         <td class="txt_a_c">{{ ps[0] }}</td>
  1118.                                                                                                         <td class="txt_a_c">{{ ps[1] }}</td>
  1119.                                                                                                         <td>{{ ps[2] }}</td>
  1120.                                                                                                         <td>{{ ps[3] }}</td>
  1121.                                                                                                     </tr>
  1122.                                                                                                 {% endif %}
  1123.                                                                                             {% endfor %}
  1124.                                                                                         </tbody>
  1125.                                                                                     </table>
  1126.                                                                                     {% if warehouseData[7]|length > 50 %}
  1127.                                                                                         <div class="style-msg alertmsg m_b_none">
  1128.                                                                                             <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> Per ridurre i tempi di caricamento della scrivania, sono visualizzati solo 50 risultati</div>
  1129.                                                                                         </div>
  1130.                                                                                     {% endif %}
  1131.                                                                                 {% else %}
  1132.                                                                                     <div class="style-msg successmsg m_b_none">
  1133.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun allarme scorte prodotto rosse!</div>
  1134.                                                                                     </div>
  1135.                                                                                 {% endif %}
  1136.                                                                             </div>
  1137.                                                                         {% endif %}
  1138.                                                                         {% if app.user.canRead('desk_warehouse_stocks_yellow') %}
  1139.                                                                             {# Scorte prodotti giallo #}
  1140.                                                                             <div class="tab-content clearfix" id="{{ warehouseData[0] }}_product_stocks_yellow">
  1141.                                                                                 <h4 class="form_title">Allarmi scorte prodotti giallo</h4>
  1142.                                                                                 <hr class="m_t_none">
  1143.                                                                                 {% if warehouseData[8]|length > 0 %}
  1144.                                                                                     <table class="table table-sm">
  1145.                                                                                         <thead>
  1146.                                                                                             <tr>
  1147.                                                                                                 <th class="td_w_120p txt_a_c">Qtà disponibile</th>
  1148.                                                                                                 <th class="td_w_120p txt_a_c">Qtà giallo</th>
  1149.                                                                                                 <th class="td_w_120p txt_a_c">Qtà rosso</th>
  1150.                                                                                                 <th>Modello</th>
  1151.                                                                                                 <th>Fornitore</th>
  1152.                                                                                             </tr>
  1153.                                                                                         </thead>
  1154.                                                                                         <tbody>
  1155.                                                                                             {% for ps in warehouseData[8] %}
  1156.                                                                                                 {% if loop.index < 50 %}
  1157.                                                                                                     <tr>
  1158.                                                                                                         <td class="txt_a_c">{{ ps[0] }}</td>
  1159.                                                                                                         <td class="txt_a_c">{{ ps[1] }}</td>
  1160.                                                                                                         <td class="txt_a_c">{{ ps[2] }}</td>
  1161.                                                                                                         <td>{{ ps[3] }}</td>
  1162.                                                                                                         <td>{{ ps[4] }}</td>
  1163.                                                                                                     </tr>
  1164.                                                                                                 {% endif %}
  1165.                                                                                             {% endfor %}
  1166.                                                                                         </tbody>
  1167.                                                                                     </table>
  1168.                                                                                     {% if warehouseData[8]|length > 50 %}
  1169.                                                                                         <div class="style-msg alertmsg m_b_none">
  1170.                                                                                             <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> Per ridurre i tempi di caricamento della scrivania, sono visualizzati solo 50 risultati</div>
  1171.                                                                                         </div>
  1172.                                                                                     {% endif %}
  1173.                                                                                 {% else %}
  1174.                                                                                     <div class="style-msg successmsg m_b_none">
  1175.                                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun allarme scorte prodotto gialle!</div>
  1176.                                                                                     </div>
  1177.                                                                                 {% endif %}
  1178.                                                                             </div>
  1179.                                                                         {% endif %}
  1180.                                                                     </div>
  1181.                                                                 </div>
  1182.                                                             </div>
  1183.                                                         </div>
  1184.                                                     </div>
  1185.                                                 {% endfor %}
  1186.                                             </div>
  1187.                                         </div>
  1188.                                     {% endif %}
  1189.                                 </div>
  1190.                             {% endif %}
  1191.                             {# Operazioni #}
  1192.                             {% if app.user.canViewTab('desk_operation') %}
  1193.                                 <div class="tab-content clearfix" id="operations">
  1194.                                     <div class="row">
  1195.                                         <div class="col-12 overflow_a">
  1196.                                             <div class="tabs side-tabs clearfix m_b_none">
  1197.                                                 <ul class="tab-nav tab-nav2 clearfix">
  1198.                                                     {% if app.user.canRead('desk_operation_tariffs') %}<li><a id="btn_tab_tariffs" href="#tariffs" class="tab_session2" data-filterTab="tariffs"><i class="icon-euro d-block d-md-none" data-bs-toggle="tooltip" title="Senza tariffe ({{ operationsWithoutTariffs|length }})"></i><span class="d-none d-md-block">Senza tariffe ({{ operationsWithoutTariffs|length }})</span></a></li>{% endif %}
  1199.                                                     {% if app.user.canRead('desk_operation_key_mappings') %}<li><a id="btn_tab_key_mappings" href="#key_mappings" class="tab_session2" data-filterTab="key_mappings"><i class="icon-tags d-block d-md-none" data-bs-toggle="tooltip" title="Senza mappatura ticket ({{ operationsWithoutKeyMappings|length }})"></i><span class="d-none d-md-block">Senza mappatura ticket ({{ operationsWithoutKeyMappings|length }})</span></a></li>{% endif %}
  1200.                                                 </ul>
  1201.                                                 <div class="tab-container">
  1202.                                                     {% if app.user.canRead('desk_operation_tariffs') %}
  1203.                                                         {# Senza tariffe #}
  1204.                                                         <div class="tab-content clearfix" id="tariffs">
  1205.                                                             <h4 class="form_title">Operazioni senza tariffe</h4>
  1206.                                                             <hr class="m_t_none">
  1207.                                                             {% if operationsWithoutTariffs|length > 0 %}
  1208.                                                                 <table class="table table-sm">
  1209.                                                                     <thead>
  1210.                                                                         <tr>
  1211.                                                                             <th>Fornitore</th>
  1212.                                                                             <th>Operazione</th>
  1213.                                                                             <th>Gruppo</th>
  1214.                                                                             <th></th>
  1215.                                                                         </tr>
  1216.                                                                     </thead>
  1217.                                                                     <tbody>
  1218.                                                                         {% for op in operationsWithoutTariffs %}
  1219.                                                                             <tr>
  1220.                                                                                 <td>{{ op.supplier }}</td>
  1221.                                                                                 <td>{{ op.value }}</td>
  1222.                                                                                 <td>{{ op.group }}</td>
  1223.                                                                                 <td class="td_action"><a href="{{ path ('user_anagraphic_supplier_operation_sheet', {'operationId':op.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1224.                                                                             </tr>
  1225.                                                                         {% endfor %}
  1226.                                                                     </tbody>
  1227.                                                                 </table>
  1228.                                                             {% else %}
  1229.                                                                 <div class="style-msg successmsg m_b_none">
  1230.                                                                     <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessuna operazione senza tariffe inserite!</div>
  1231.                                                                 </div>
  1232.                                                             {% endif %}
  1233.                                                         </div>
  1234.                                                     {% endif %}
  1235.                                                     {% if app.user.canRead('desk_operation_key_mappings') %}
  1236.                                                         {# Senza mappatura chiavi ticket #}
  1237.                                                         <div class="tab-content clearfix" id="key_mappings">
  1238.                                                             <h4 class="form_title">Operazioni senza mappatura chiavi ticket</h4>
  1239.                                                             <hr class="m_t_none">
  1240.                                                             {% if operationsWithoutKeyMappings|length > 0 %}
  1241.                                                                 <table class="table table-sm">
  1242.                                                                     <thead>
  1243.                                                                         <tr>
  1244.                                                                             <th>Fornitore</th>
  1245.                                                                             <th>Operazione</th>
  1246.                                                                             <th>Gruppo</th>
  1247.                                                                             <th></th>
  1248.                                                                         </tr>
  1249.                                                                     </thead>
  1250.                                                                     <tbody>
  1251.                                                                         {% for op in operationsWithoutKeyMappings %}
  1252.                                                                             <tr>
  1253.                                                                                 <td>{{ op.supplier }}</td>
  1254.                                                                                 <td>{{ op.value }}</td>
  1255.                                                                                 <td>{{ op.group }}</td>
  1256.                                                                                 <td class="td_action"><a href="{{ path ('user_anagraphic_supplier_operation_sheet', {'operationId':op.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1257.                                                                             </tr>
  1258.                                                                         {% endfor %}
  1259.                                                                     </tbody>
  1260.                                                                 </table>
  1261.                                                             {% else %}
  1262.                                                                 <div class="style-msg successmsg m_b_none">
  1263.                                                                     <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessuna operazione senza mappatura chiavi ticket!</div>
  1264.                                                                 </div>
  1265.                                                             {% endif %}
  1266.                                                         </div>
  1267.                                                     {% endif %}
  1268.                                                 </div>
  1269.                                             </div>
  1270.                                         </div>
  1271.                                     </div>
  1272.                                 </div>
  1273.                             {% endif %}
  1274.                             {# Prodotti #}
  1275.                             {% if app.user.canViewTab('desk_product') %}
  1276.                                 <div class="tab-content clearfix" id="products">
  1277.                                     {% block productsData %}
  1278.                                         <div class="row">
  1279.                                             <div class="col-12 overflow_a">
  1280.                                                 <div class="tabs side-tabs clearfix m_b_none">
  1281.                                                     <ul class="tab-nav tab-nav2 clearfix">
  1282.                                                         {% if app.user.canRead('desk_product_doubles') %}<li><a id="btn_tab_doubles" href="#doubles" class="tab_session2" data-filterTab="doubles"><i class="icon-euro d-block d-md-none" data-bs-toggle="tooltip" title="Matricole doppie ({{ doubleProducts|length }})"></i><span class="d-none d-md-block">Matricole doppie ({{ doubleProducts|length }})</span></a></li>{% endif %}
  1283.                                                         {% if app.user.canRead('desk_product_models') %}<li><a id="btn_tab_models" href="#models" class="tab_session2" data-filterTab="models"><i class="icon-tags d-block d-md-none" data-bs-toggle="tooltip" title="Modelli senza fornitori ({{ productModelsSuppliers|length }})"></i><span class="d-none d-md-block">Modelli senza fornitori ({{ productModelsSuppliers|length }})</span></a></li>{% endif %}
  1284.                                                     </ul>
  1285.                                                     <div class="tab-container">
  1286.                                                         {% if app.user.canRead('desk_product_doubles') %}
  1287.                                                             {# Matricole doppie #}
  1288.                                                             <div class="tab-content clearfix" id="doubles">
  1289.                                                                 <h4 class="form_title">Matricole doppie</h4>
  1290.                                                                 <hr class="m_t_none">
  1291.                                                                 {% if doubleProducts|length > 0 %}
  1292.                                                                     <table class="table table-sm">
  1293.                                                                         <thead>
  1294.                                                                             <tr>
  1295.                                                                                 <th colspan="3">Prodotto 1</th>
  1296.                                                                                 <th colspan="3">Prodotto 2</th>
  1297.                                                                             </tr>
  1298.                                                                             <tr>
  1299.                                                                                 <th class="txt_a_c">Id</th>
  1300.                                                                                 <th>Matricola produttore</th>
  1301.                                                                                 <th>Matricola fornitore</th>
  1302.                                                                                 <th class="txt_a_c">Id</th>
  1303.                                                                                 <th>Matricola produttore</th>
  1304.                                                                                 <th>Matricola fornitore</th>
  1305.                                                                             </tr>
  1306.                                                                         </thead>
  1307.                                                                         <tbody>
  1308.                                                                             {% for p in doubleProducts %}
  1309.                                                                                 <tr>
  1310.                                                                                     <td class="txt_a_c"><a href="{{ path ('user_product_sheet', {'productId':p[0]}) }}" data-bs-toggle="tooltip" title="Vai alla scheda prodotto" target="_blank" class="underline">{{ p[0] }}</a></td>
  1311.                                                                                     <td>{{ p[1] }}</td>
  1312.                                                                                     <td>{{ p[2] }}</td>
  1313.                                                                                     <td class="txt_a_c"><a href="{{ path ('user_product_sheet', {'productId':p[3]}) }}" data-bs-toggle="tooltip" title="Vai alla scheda prodotto" target="_blank" class="underline">{{ p[3] }}</a></td>
  1314.                                                                                     <td>{{ p[4] }}</td>
  1315.                                                                                     <td>{{ p[5] }}</td>
  1316.                                                                                 </tr>
  1317.                                                                             {% endfor %}
  1318.                                                                         </tbody>
  1319.                                                                     </table>
  1320.                                                                 {% else %}
  1321.                                                                     <div class="style-msg successmsg m_b_none">
  1322.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessuna matricola doppia presente nel software!</div>
  1323.                                                                     </div>
  1324.                                                                 {% endif %}
  1325.                                                             </div>
  1326.                                                         {% endif %}
  1327.                                                         {% if app.user.canRead('desk_product_models') %}
  1328.                                                             {# Modelli senza fornitore #}
  1329.                                                             <div class="tab-content clearfix" id="models">
  1330.                                                                 <h4 class="form_title">Modelli senza fornitori configurati</h4>
  1331.                                                                 <hr class="m_t_none">
  1332.                                                                 {% if productModelsSuppliers|length > 0 %}
  1333.                                                                     <table class="table table-sm">
  1334.                                                                         <thead>
  1335.                                                                             <tr>
  1336.                                                                                 <th>Modello</th>
  1337.                                                                                 <th>Produttore</th>
  1338.                                                                                 <th>Sku</th>
  1339.                                                                                 <th>PartNumber</th>
  1340.                                                                                 <th>Sottocategoria</th>
  1341.                                                                                 <th>Categoria</th>
  1342.                                                                                 <th></th>
  1343.                                                                             </tr>
  1344.                                                                         </thead>
  1345.                                                                         <tbody>
  1346.                                                                             {% for pm in productModelsSuppliers %}
  1347.                                                                                 <tr>
  1348.                                                                                     <td>{{ pm.name }}</td>
  1349.                                                                                     <td>{{ pm.producer }}</td>
  1350.                                                                                     <td>{{ pm.sku }}</td>
  1351.                                                                                     <td>{{ pm.partNumber }}</td>
  1352.                                                                                     <td>{{ pm.subcategory }}</td>
  1353.                                                                                     <td>{{ pm.subcategory.category }}</td>
  1354.                                                                                     <td class="td_action"><a href="{{ path ('user_product_model_sheet', {'modelId':pm.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda magazzino"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1355.                                                                                 </tr>
  1356.                                                                             {% endfor %}
  1357.                                                                         </tbody>
  1358.                                                                     </table>
  1359.                                                                 {% else %}
  1360.                                                                     <div class="style-msg successmsg m_b_none">
  1361.                                                                         <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun modello senza fornitore configurato!</div>
  1362.                                                                     </div>
  1363.                                                                 {% endif %}
  1364.                                                             </div>
  1365.                                                         {% endif %}
  1366.                                                     </div>
  1367.                                                 </div>
  1368.                                             </div>
  1369.                                         </div>
  1370.                                     {% endblock %}
  1371.                                 </div>
  1372.                             {% endif %}
  1373.                             {# Cerca #}
  1374.                             {% if app.user.canViewTab('desk_search') %}
  1375.                                 <div class="tab-content clearfix" id="search">
  1376.                                     {{ form_start(formSearch, {'attr': {'novalidate': 'novalidate'}}) }}
  1377.                                         <div class="row">
  1378.                                             <div class="col-12 col-md-3">
  1379.                                                 <h4 class="form_title">Ricerca</h4>
  1380.                                                 <hr class="m_t_none">
  1381.                                                 <div class="row">
  1382.                                                     <div class="col-12 form-group">
  1383.                                                         <label class="form_label">Soggetto*</label>
  1384.                                                         <div {{ form_errors(formSearch.type) }}>
  1385.                                                             <table class="table b_none table_no_padding m_none">
  1386.                                                                 {% for t in formSearch.type %}
  1387.                                                                     <tr>
  1388.                                                                         <td class="td_w_40p">{{ form_widget(t, {'attr': {'class':'switch-toggle switch-flat-mini switch-toggle-flat'}}) }}<label class="m_b_none" for="{{ t.vars.id }}"></label></td>
  1389.                                                                         <td><label class="m_b_none form_label">{{ t.vars.label }}</label></td>
  1390.                                                                     </tr>
  1391.                                                                 {% endfor %}
  1392.                                                             </table>
  1393.                                                         </div>
  1394.                                                     </div>
  1395.                                                     <div class="col-12 form-group">
  1396.                                                         <label class="form_label">Tipologia*</label>
  1397.                                                         <div {{ form_errors(formSearch.like) }}>
  1398.                                                             <table class="table b_none table_no_padding m_none">
  1399.                                                                 {% for l in formSearch.like %}
  1400.                                                                     <tr>
  1401.                                                                         <td class="td_w_40p">{{ form_widget(l, {'attr': {'class':'switch-toggle switch-flat-mini switch-toggle-flat'}}) }}<label class="m_b_none" for="{{ l.vars.id }}"></label></td>
  1402.                                                                         <td><label class="m_b_none form_label">{{ l.vars.label }}</label></td>
  1403.                                                                     </tr>
  1404.                                                                 {% endfor %}
  1405.                                                             </table>
  1406.                                                         </div>
  1407.                                                     </div>
  1408.                                                     <div class="col-12 form-group">
  1409.                                                         <label class="form_label">Valore*</label>
  1410.                                                         <div {{ form_errors(formSearch.value) }}>
  1411.                                                             {{ form_widget(formSearch.value) }}
  1412.                                                         </div>
  1413.                                                     </div>
  1414.                                                     <div class="col-12 txt_a_c">
  1415.                                                         <button type="submit" class="button button-3d button-small button-rounded button-green">Cerca</button>
  1416.                                                     </div>
  1417.                                                 </div>
  1418.                                             </div>
  1419.                                             <div class="col-12 col-md-9 overflow_a">
  1420.                                                 <h4 class="form_title">Risultati ricerca</h4>
  1421.                                                 <hr class="m_t_none">
  1422.                                                 {% if searchResults|length > 0 %}
  1423.                                                     {% if searchResults|length == 50 %}
  1424.                                                         <div class="style-msg alertmsg m_b_10p">
  1425.                                                             <div class="sb-msg"><i class="icon-warning-sign"></i><strong>Attenzione!</strong> La ricerca ha prodotto più di 50 risultati; utilizza un filtro più stringente per ottenerne meno!</div>
  1426.                                                         </div>
  1427.                                                     {% endif %}
  1428.                                                     <table class="table table-sm">
  1429.                                                         <thead>
  1430.                                                             <tr>
  1431.                                                                 {% if searchType == 'termid' or searchType == 'n_ticket' %}
  1432.                                                                     <th>Stato</th>
  1433.                                                                     <th>N° ticket</th>
  1434.                                                                     <th>Termid</th>
  1435.                                                                     <th>Cliente</th>
  1436.                                                                     <th>Fornitore</th>
  1437.                                                                     <th>Operazione</th>
  1438.                                                                 {% elseif searchType == 'code_producer' or searchType == 'code_supplier' %}
  1439.                                                                     <th>Modello</th>
  1440.                                                                     <th>Matr. Produttore</th>
  1441.                                                                     <th>Matr. Fornitore</th>
  1442.                                                                     <th>Termid</th>
  1443.                                                                     <th>Magazzino attuale</th>
  1444.                                                                     <th>Stato</th>
  1445.                                                                     <th>Condizione</th>
  1446.                                                                 {% elseif searchType == 'ddt' %}
  1447.                                                                     <th>N° DDT</th>
  1448.                                                                     <th>Stato</th>
  1449.                                                                     <th>Data/Ora</th>
  1450.                                                                     <th>Mag. Partenza</th>
  1451.                                                                     <th>Mag. Arrivo</th>
  1452.                                                                     <th>Stock order</th>
  1453.                                                                 {% elseif searchType == 'client_nickname' %}
  1454.                                                                     <th>Codice</th>
  1455.                                                                     <th>Insegna</th>
  1456.                                                                     <th>Indirizzo</th>
  1457.                                                                     <th>Telefoni</th>
  1458.                                                                 {% else %}
  1459.                                                                     <th>Telefono</th>
  1460.                                                                     <th>Cliente</th>
  1461.                                                                     <th>Indirizzo</th>
  1462.                                                                 {% endif %}
  1463.                                                                 <th></th>
  1464.                                                             </tr>
  1465.                                                         </thead>
  1466.                                                         <tbody>
  1467.                                                             {% for r in searchResults %}
  1468.                                                                 <tr>
  1469.                                                                     {% if searchType == 'termid' or searchType == 'n_ticket' %}
  1470.                                                                         <td>{{ r.displayStatus('string')|raw }}</td>
  1471.                                                                         <td>{{ r.number }}</td>
  1472.                                                                         <td>{{ r.termid }}</td>
  1473.                                                                         <td>{{ r.client }}</td>
  1474.                                                                         <td>{{ r.supplier }}</td>
  1475.                                                                         <td>{{ r.operation }}</td>
  1476.                                                                         <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':r.id}) }}"><img class="icon_pr" data-bs-toggle="tooltip" title="Scheda" src="{{ asset(icon_sheet) }}"></a></td>
  1477.                                                                     {% elseif searchType == 'code_producer' or searchType == 'code_supplier' %}
  1478.                                                                         <td>{{ r.model.name }}</td>
  1479.                                                                         <td>{{ r.codeProducer|default('---') }}</td>
  1480.                                                                         <td>{{ r.codeSupplier|default('---') }}</td>
  1481.                                                                         <td>{{ r.termid|default('---') }}</td>
  1482.                                                                         <td>{{ r.actualWarehouse }}</td>
  1483.                                                                         <td>{{ r.displayStatus('string')|raw }}</td>
  1484.                                                                         <td>{{ r.displayCondition('string-short')|raw }}</td>
  1485.                                                                         <td class="td_action"><a href="{{ path ('user_product_sheet', {'productId':r.id}) }}" data-bs-toggle="tooltip" title="Scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>        
  1486.                                                                     {% elseif searchType == 'ddt' %}
  1487.                                                                         <td>{{ r.ddt|default('---') }}</td>
  1488.                                                                         <td>{{ r.displayPhase('string')|raw }}</td>
  1489.                                                                         <td>{{ r.date|date('d-m-Y H:i') }}</td>
  1490.                                                                         <td>{{ r.warehouseFrom }}</td>
  1491.                                                                         <td>{{ r.warehouseTo }}</td>
  1492.                                                                         <td>{{ r.stockOrder|default('---') }}</td>
  1493.                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':r.warehouseFrom.id, 'transferId':r.id}) }}" data-bs-toggle="tooltip" title="Scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1494.                                                                     {% elseif searchType == 'client_nickname' %}
  1495.                                                                         <td>{{ r.code|default('---') }}</td>
  1496.                                                                         <td>{{ r.nickname }}</td>
  1497.                                                                         <td>{% include 'components/twig/display_address.html.twig' with {'type':'client', 'obj':r} %}</td>
  1498.                                                                         <td>{{ r.displayPhones|raw }}</td>
  1499.                                                                         <td class="td_action"><a href="{{ path ('user_anagraphic_client_sheet', {'clientId':r.id }) }}" data-bs-toggle="tooltip" title="Scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1500.                                                                     {% else %}
  1501.                                                                         <td>{{ r.number }}</td>
  1502.                                                                         <td>{{ r.client }}</td>
  1503.                                                                         <td>{% include 'components/twig/display_address.html.twig' with {'type':'client', 'obj':r.client} %}</td>
  1504.                                                                         <td class="td_action"><a href="tel:{{ r.number }}" data-bs-toggle="tooltip" title="Chiama"><img class="icon_pr" src="{{ asset(icon_telephone) }}"></a></td>
  1505.                                                                     {% endif %}
  1506.                                                                 </tr>
  1507.                                                             {% endfor %}
  1508.                                                         </tbody>
  1509.                                                     </table>
  1510.                                                 {% else %}
  1511.                                                     <div class="style-msg infomsg m_b_none">
  1512.                                                         <div class="sb-msg"><i class="icon-info"></i><strong>Info!</strong> La ricerca non ha dato risultati!</div>
  1513.                                                     </div>
  1514.                                                 {% endif %}
  1515.                                             </div>
  1516.                                         </div>
  1517.                                     {{ form_end(formSearch) }}
  1518.                                 </div>
  1519.                             {% endif %}
  1520.                         </div>
  1521.                     </div>
  1522.                 </div>
  1523.             </div>
  1524.         {% elseif app.user.getAccountTypology == 'technician' %} {# Tecnico interno e tecnico partita IVA #}
  1525.             <div class="row">
  1526.                 <div class="col-12">
  1527.                     <div class="tabs clearfix m_b_none">
  1528.                         <ul class="tab-nav clearfix">
  1529.                             <li><a id="btn_tab_tickets" href="#tickets" class="tab_session" data-filterTab="tickets"><i class="icon-tag d-block d-md-none" data-bs-toggle="tooltip" title="Ticket"></i><span class="d-none d-md-block">Ticket</span></a></li>
  1530.                             <li><a id="btn_tab_warehouse" href="#warehouse" class="tab_session" data-filterTab="warehouse"><i class="icon-warehouse d-block d-md-none" data-bs-toggle="tooltip" title="Magazzini gestiti"></i><span class="d-none d-md-block">Magazzini gestiti</span></a></li>
  1531.                             {% if app.user.canRead('desk_search') %}
  1532.                                 <li><a href="#search" class="tab_session" id="btn_tab_search" data-filterTab="search"><i class="icon-search1 d-block d-md-none" data-bs-toggle="tooltip" title="Ricerca"></i><span class="d-none d-md-block">Ricerca</span></a></li>
  1533.                             {% endif %}
  1534.                         </ul>
  1535.                         <div class="tab-container">
  1536.                             {# Ticket #}
  1537.                             <div class="tab-content clearfix" id="tickets">
  1538.                                 <div class="row">
  1539.                                     <div class="col-12 overflow_a">
  1540.                                         <div class="tabs side-tabs clearfix m_b_none">
  1541.                                             <ul class="tab-nav tab-nav2 clearfix">
  1542.                                                 <li><a id="btn_tab_summary" href="#summary" class="tab_session2" data-filterTab="summary"><i class="icon-table1 d-block d-md-none" data-bs-toggle="tooltip" title="Tabella riassuntiva"></i><span class="d-none d-md-block responsive_font_size">Tabella riassuntiva</span></a></li>
  1543.                                                 <li><a id="btn_tab_assigned" href="#assigned" class="tab_session2" data-filterTab="assigned"><i class="icon-user-clock d-block d-md-none" data-bs-toggle="tooltip" title="Da prendere in carico ({{ ticketAssigned|length }})"></i><span class="d-none d-md-block responsive_font_size">Da prendere in carico ({{ ticketAssigned|length }})</span></a></li>
  1544.                                                 <li><a id="btn_tab_reminders" href="#reminders" class="tab_session2" data-filterTab="reminders"><i class="icon-clock d-block d-md-none" data-bs-toggle="tooltip" title="Promemoria ({{ ticketReminders|length }})"></i><span class="d-none d-md-block responsive_font_size">Promemoria ({{ ticketReminders|length }})</span></a></li>
  1545.                                             </ul>
  1546.                                             <div class="tab-container">
  1547.                                                 {# Tabella riassuntiva #}
  1548.                                                 <div class="tab-content clearfix" id="summary">
  1549.                                                     <h4 class="form_title">Tabella riassuntiva</h4>
  1550.                                                     <hr class="m_t_none">
  1551.                                                     <div class="overflow_a">
  1552.                                                         <table class="table table-bordered font_12">
  1553.                                                             <thead>
  1554.                                                                 <tr class="bg_pr color_w">
  1555.                                                                     <th>Gruppo</th>
  1556.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('assigned', '')">Assegnati</th>
  1557.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('taken_charge', '')">Presi in carico</th>
  1558.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('closed', '')">Chiusi</th>
  1559.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('suspension_request', '')">Richieste sosp</th>
  1560.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('suspended', '')">Sospesi</th>
  1561.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('canceled', '')">Annullati</th>
  1562.                                                                     <th class="td_w_100p txt_a_c a_th_hover" onclick="javascript: goToTicketList('closed_portal', '')">Chiusi su portale</th>
  1563.                                                                     <td class="bg_pr" style="padding: 0px 0px 0px 0px; width: 0px;"></td>
  1564.                                                                     <th class="td_w_100p txt_a_c">Totale</th>
  1565.                                                                 </tr>
  1566.                                                             </thead>
  1567.                                                             <tbody class="table_td_hover">
  1568.                                                                 {% set total = 0 %}
  1569.                                                                 {% for og in operationGroups %}
  1570.                                                                     {% set rowTotal = 0 %}
  1571.                                                                     <tr>
  1572.                                                                         <td class="bg_w">{{ og.value }}</td>
  1573.                                                                         {% for ts in ticketStatuses %}
  1574.                                                                             {% for ticketGroup in matrixTickets %}
  1575.                                                                                 {% if ticketGroup[0] == og.id %}
  1576.                                                                                     {% for grCounts in ticketGroup[1] %}
  1577.                                                                                         {% if grCounts[0] == ts.id %}
  1578.                                                                                             {% if app.user.accountTypology == 'technician' %}
  1579.                                                                                                 <td class="txt_a_c a_td_hover" onclick="javascript: goToTicketList('{{ ts.slug }}', '{{ og.slug }}')">{{ grCounts[1] }}</td>
  1580.                                                                                             {% else %}
  1581.                                                                                                 <td class="txt_a_c a_td_hover" onclick="javascript: goToTicketList('{{ ts.slug }}', '{{ og.id }}')">{{ grCounts[1] }}</td>
  1582.                                                                                             {% endif %}
  1583.                                                                                             {% set rowTotal = rowTotal + grCounts[1] %}
  1584.                                                                                         {% endif %}
  1585.                                                                                     {% endfor %}
  1586.                                                                                 {% endif %}
  1587.                                                                             {% endfor %}
  1588.                                                                         {% endfor %}
  1589.                                                                         <td class="bg_pr"></td>
  1590.                                                                         <th class="txt_a_c">{{ rowTotal }}</th>
  1591.                                                                     </tr>
  1592.                                                                     {% set total = total + rowTotal %}
  1593.                                                                 {% endfor %}
  1594.                                                                 <tr class="bg_pr">
  1595.                                                                     <td class="bg_pr"></td>
  1596.                                                                     <td class="bg_pr"></td>
  1597.                                                                     <td class="bg_pr"></td>
  1598.                                                                     <td class="bg_pr"></td>
  1599.                                                                     <td class="bg_pr"></td>
  1600.                                                                     <td class="bg_pr"></td>
  1601.                                                                     <td class="bg_pr"></td>
  1602.                                                                     <td class="bg_pr"></td>
  1603.                                                                     <td class="bg_pr"></td>
  1604.                                                                     <td class="bg_pr"></td>
  1605.                                                                 </tr>
  1606.                                                                 <tr>
  1607.                                                                     <th>Totale</th>
  1608.                                                                     {% for ts in ticketStatuses %}
  1609.                                                                         {% set columnTotal = 0 %}
  1610.                                                                         {% for ticketGroup in matrixTickets %}
  1611.                                                                             {% for grCounts in ticketGroup[1] %}
  1612.                                                                                 {% if grCounts[0] == ts.id %}
  1613.                                                                                     {% set columnTotal = columnTotal + grCounts[1] %}
  1614.                                                                                 {% endif %}
  1615.                                                                             {% endfor %}
  1616.                                                                         {% endfor %}
  1617.                                                                         <th class="txt_a_c">{{ columnTotal }}</th>
  1618.                                                                     {% endfor %}
  1619.                                                                     <th class="bg_pr"></th>
  1620.                                                                     <th class="txt_a_c">{{ total }}</th>
  1621.                                                                 </tr>
  1622.                                                             </tbody>
  1623.                                                         </table>
  1624.                                                     </div>
  1625.                                                 </div>
  1626.                                                 {# Da prendere in carico #}
  1627.                                                 <div class="tab-content clearfix" id="assigned">
  1628.                                                     {% if ticketAssigned|length > 0 %}
  1629.                                                         <a href="javascript: ticketsTakeCharge()" class="button button-3d button-mini button-green f_right font_12 m_t_none m_b_none">Prendi in carico</a>
  1630.                                                     {% endif %}
  1631.                                                     <h4 class="form_title">Da prendere in carico</h4>
  1632.                                                     <hr class="m_t_none m_b_5p">
  1633.                                                     {% if ticketAssigned|length > 0 %}
  1634.                                                         <table class="table table-sm font_12">
  1635.                                                             <tbody>
  1636.                                                                 {% for t in ticketAssigned %}
  1637.                                                                     <tr>
  1638.                                                                         <td>
  1639.                                                                             <table class="table table_no_padding m_b_none b_none font_12">
  1640.                                                                                 <tr><td><b>Stato</b>: {{ t.displayStatus('string')|raw }}</td></tr>
  1641.                                                                                 <tr><td><b>N°</b>: {{ t.number }}</td></tr>
  1642.                                                                                 <tr><td><b>Indirizzo</b>: {% include 'components/twig/display_address.html.twig' with {'type':'ticket', 'obj':t} %}</td></tr>
  1643.                                                                                 <tr><td><b>Cliente</b>: {{ t.client }}</td></tr>
  1644.                                                                                 <tr><td><b>Cliente - Indirizzo</b>: {% if t.client != null %}{% include 'components/twig/display_address.html.twig' with {'type':'client', 'obj':t.client} %}{% else %}---{% endif %}</td></tr>
  1645.                                                                                 <tr><td><b>Operazione</b>: {{ t.operation }}</td></tr>
  1646.                                                                                 <tr><td><b>Fornitore</b>: {{ t.supplier }}</td></tr>
  1647.                                                                                 <tr><td><b>Ricezione</b>: {% if t.datetimeStart != null %}{{ t.datetimeStart|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1648.                                                                                 <tr><td><b>Scadenza</b>: {% if t.datetimeExpiration != null %}{{ t.datetimeExpiration|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1649.                                                                             </table>
  1650.                                                                         </td>
  1651.                                                                         <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':t.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1652.                                                                     </tr>
  1653.                                                                 {% endfor %}
  1654.                                                             </tbody>
  1655.                                                         </table>
  1656.                                                     {% else %}
  1657.                                                         <div class="style-msg successmsg m_b_none">
  1658.                                                             <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun ticket da prendere in carico!</div>
  1659.                                                         </div>
  1660.                                                     {% endif %}
  1661.                                                 </div>
  1662.                                                 {# Reminder #}
  1663.                                                 <div class="tab-content clearfix" id="reminders">
  1664.                                                     <h4 class="form_title">Promemoria</h4>
  1665.                                                     <hr class="m_t_none">
  1666.                                                     <div class="overflow_a">
  1667.                                                         {% if ticketReminders|length > 0 %}
  1668.                                                             <table class="table table-sm responsive_font_size">
  1669.                                                                 <thead>
  1670.                                                                     <tr>
  1671.                                                                         <th class="td_w_150p">Data/Ora</th>
  1672.                                                                         <th>Dettagli</th>
  1673.                                                                         <th></th>
  1674.                                                                     </tr>
  1675.                                                                 </thead>
  1676.                                                                 <tbody>
  1677.                                                                     {% for r in ticketReminders %}
  1678.                                                                         <tr {% if r.datetime|date('YmdHi') < "now"|date('YmdHi') %}class="bg_r_h"{% endif %}>
  1679.                                                                             <td>{{ r.datetime|date('d-m-Y H:i') }}</td>
  1680.                                                                             <td>{{ r.details }}</td>
  1681.                                                                             <td class="td_action"><a href="{{ path ('user_ticket_sheet', {'ticketId':r.ticket.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1682.                                                                         </tr>
  1683.                                                                     {% endfor %}
  1684.                                                                 </tbody>
  1685.                                                             </table>
  1686.                                                         {% else %}
  1687.                                                             <div class="style-msg successmsg m_b_none">
  1688.                                                                 <div class="sb-msg"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun promemoria presente!</div>
  1689.                                                             </div>
  1690.                                                         {% endif %}
  1691.                                                     </div>
  1692.                                                 </div>
  1693.                                             </div>
  1694.                                         </div>
  1695.                                     </div>
  1696.                                 </div>
  1697.                             </div>
  1698.                             {# Magazzini #}
  1699.                             <div class="tab-content clearfix" id="warehouse">
  1700.                                 <div class="row">
  1701.                                     <div class="col-12 overflow_a">
  1702.                                         {% if warehousesTransfers|length == 1 %}
  1703.                                             {% for wt in warehousesTransfers %}
  1704.                                                 <div class="row">
  1705.                                                     <div class="col-12">
  1706.                                                         <h4 class="form_title">{{ wt[1] }}</h4>
  1707.                                                         <hr class="m_t_none">
  1708.                                                     </div>
  1709.                                                     <div class="col-12 col-lg-4 m_b_20p">
  1710.                                                         <h5 class="form_title">Trasferimenti in entrata non completati</h5>
  1711.                                                         <hr class="m_t_none m_b_5p">
  1712.                                                         {% if wt[2]|length > 0 %}
  1713.                                                             <table class="table table-sm font_12">
  1714.                                                                 <tbody>
  1715.                                                                     {% for pt in wt[2] %}
  1716.                                                                         <tr>
  1717.                                                                             <td>
  1718.                                                                                 <table class="table table_no_padding m_b_none b_none font_12">
  1719.                                                                                     <tr><td><b>Fase</b>: {{ pt.displayPhase('string')|raw }}</td></tr>
  1720.                                                                                     <tr><td><b>Magazzino provenienza</b>: {{ pt.warehouseFrom }}</td></tr>
  1721.                                                                                     <tr><td><b>Fornitore</b>: {{ pt.supplier }}</td></tr>
  1722.                                                                                     <tr><td><b>Data creazione</b>: {{ pt.datetimeCreation|date('d-m-Y H:i') }}</td></tr>
  1723.                                                                                     <tr><td><b>Data invio</b>: {% if pt.datetimeSend != null %}{{ pt.datetimeSend|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1724.                                                                                     <tr><td><b>Data completamento</b>: {% if pt.datetimeCompletion %}{{ pt.datetimeCompletion|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1725.                                                                                 </table>
  1726.                                                                             </td>
  1727.                                                                             <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':wt[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1728.                                                                         </tr>
  1729.                                                                     {% endfor %}
  1730.                                                                 </tbody>
  1731.                                                             </table>
  1732.                                                         {% else %}
  1733.                                                             <div class="style-msg successmsg m_b_none">
  1734.                                                                 <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in entrata!</div>
  1735.                                                             </div>
  1736.                                                         {% endif %}
  1737.                                                     </div>
  1738.                                                     <div class="col-12 col-lg-4 m_b_20p">
  1739.                                                         <h5 class="form_title">Trasferimenti in uscita non completati</h5>
  1740.                                                         <hr class="m_t_none m_b_5p">
  1741.                                                         {% if wt[3]|length > 0 %}
  1742.                                                             <table class="table table-sm font_12">
  1743.                                                                 <tbody>
  1744.                                                                     {% for pt in wt[3] %}
  1745.                                                                         <tr>
  1746.                                                                             <td>
  1747.                                                                                 <table class="table table_no_padding m_b_none b_none font_12">
  1748.                                                                                     <tr><td><b>Fase</b>: {{ pt.displayPhase('string')|raw }}</td></tr>
  1749.                                                                                     <tr><td><b>Magazzino provenienza</b>: {{ pt.warehouseFrom }}</td></tr>
  1750.                                                                                     <tr><td><b>Fornitore</b>: {{ pt.supplier }}</td></tr>
  1751.                                                                                     <tr><td><b>Data creazione</b>: {{ pt.datetimeCreation|date('d-m-Y H:i') }}</td></tr>
  1752.                                                                                     <tr><td><b>Data invio</b>: {% if pt.datetimeSend != null %}{{ pt.datetimeSend|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1753.                                                                                     <tr><td><b>Data completamento</b>: {% if pt.datetimeCompletion %}{{ pt.datetimeCompletion|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1754.                                                                                 </table>
  1755.                                                                             </td>
  1756.                                                                             <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':wt[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1757.                                                                         </tr>
  1758.                                                                     {% endfor %}
  1759.                                                                 </tbody>
  1760.                                                             </table>
  1761.                                                         {% else %}
  1762.                                                             <div class="style-msg successmsg m_b_none">
  1763.                                                                 <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in uscita!</div>
  1764.                                                             </div>
  1765.                                                         {% endif %}
  1766.                                                     </div>
  1767.                                                     <div class="col-12 col-lg-4">
  1768.                                                         <h5 class="form_title">Trasferimenti senza DDT firmato</h5>
  1769.                                                         <hr class="m_t_none m_b_5p">
  1770.                                                         {% if wt[4]|length > 0 %}
  1771.                                                             <table class="table table-sm font_12">
  1772.                                                                 <tbody>
  1773.                                                                     {% for pt in wt[4] %}
  1774.                                                                         <tr>
  1775.                                                                             <td>
  1776.                                                                                 <table class="table table_no_padding m_b_none b_none font_12">
  1777.                                                                                     <tr><td><b>Fase</b>: {{ pt.displayPhase('string')|raw }}</td></tr>
  1778.                                                                                     <tr><td><b>Fase DDT</b>: {{ pt.displayPhaseDdt('string')|raw }}</td></tr>
  1779.                                                                                     <tr><td><b>Magazzino provenienza</b>: {{ pt.warehouseFrom }}</td></tr>
  1780.                                                                                     <tr><td><b>Magazzino destinazione</b>: {{ pt.warehouseTo }}</td></tr>
  1781.                                                                                     <tr><td><b>Fornitore</b>: {{ pt.supplier }}</td></tr>
  1782.                                                                                     <tr><td><b>Data creazione</b>: {{ pt.datetimeCreation|date('d-m-Y H:i') }}</td></tr>
  1783.                                                                                     <tr><td><b>Data invio</b>: {% if pt.datetimeSend != null %}{{ pt.datetimeSend|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1784.                                                                                     <tr><td><b>Data completamento</b>: {% if pt.datetimeCompletion %}{{ pt.datetimeCompletion|date('d-m-Y H:i') }}{% else %}---{% endif %}</td></tr>
  1785.                                                                                 </table>
  1786.                                                                             </td>
  1787.                                                                             <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':wt[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1788.                                                                         </tr>
  1789.                                                                     {% endfor %}
  1790.                                                                 </tbody>
  1791.                                                             </table>
  1792.                                                         {% else %}
  1793.                                                             <div class="style-msg successmsg m_b_none">
  1794.                                                                 <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in uscita!</div>
  1795.                                                             </div>
  1796.                                                         {% endif %}
  1797.                                                     </div>
  1798.                                                 </div>
  1799.                                             {% endfor %}
  1800.                                         {% else %}
  1801.                                             <div class="tabs side-tabs clearfix m_b_none">
  1802.                                                 <ul class="tab-nav tab-nav2 clearfix">
  1803.                                                     {% for wt in warehousesTransfers %}
  1804.                                                         <li><a id="btn_tab_wt_{{ wt[0] }}" href="#wt_{{ wt[0] }}" class="tab_session2" data-filterTab="wt_{{ wt[0] }}"><i class="icon-warehouse d-block d-md-none" data-bs-toggle="tooltip" title="{{ wt[1] }}"></i><span class="d-none d-md-block font_12">{{ wt[1] }}</span></a></li>
  1805.                                                     {% endfor %}
  1806.                                                 </ul>
  1807.                                                 <div class="tab-container">
  1808.                                                     {# Magazzini tecnico #}
  1809.                                                     {% for wt in warehousesTransfers %}
  1810.                                                         <div class="tab-content clearfix" id="wt_{{ wt[0] }}">
  1811.                                                             <div class="row">
  1812.                                                                 <div class="col-12">
  1813.                                                                     <h4 class="form_title">{{ wt[1] }}</h4>
  1814.                                                                     <hr class="m_t_none">
  1815.                                                                 </div>
  1816.                                                                 <div class="col-12 col-lg-4 m_b_20p">
  1817.                                                                     <h5 class="form_title">Trasferimenti in entrata non completati</h5>
  1818.                                                                     <hr class="m_t_none">
  1819.                                                                     {% if wt[2]|length > 0 %}
  1820.                                                                         <table class="table table-sm font_12">
  1821.                                                                             <thead>
  1822.                                                                                 <tr>
  1823.                                                                                     <th class="txt_a_c">Fase</th>
  1824.                                                                                     <th>Magazzino provenienza</th>
  1825.                                                                                     <th>Fornitore</th>
  1826.                                                                                     <th>Data creazione</th>
  1827.                                                                                     <th>Data invio</th>
  1828.                                                                                     <th>Data completamento</th>
  1829.                                                                                     <th></th>
  1830.                                                                                 </tr>
  1831.                                                                             </thead>
  1832.                                                                             <tbody>
  1833.                                                                                 {% for pt in wt[2] %}
  1834.                                                                                     <tr>
  1835.                                                                                         <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  1836.                                                                                         <td>{{ pt.warehouseFrom }}</td>
  1837.                                                                                         <td>{{ pt.supplier }}</td>
  1838.                                                                                         <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  1839.                                                                                         <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  1840.                                                                                         <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  1841.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':wt[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1842.                                                                                     </tr>
  1843.                                                                                 {% endfor %}
  1844.                                                                             </tbody>
  1845.                                                                         </table>
  1846.                                                                     {% else %}
  1847.                                                                         <div class="style-msg successmsg m_b_none">
  1848.                                                                             <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in entrata non completato!</div>
  1849.                                                                         </div>
  1850.                                                                     {% endif %}
  1851.                                                                 </div>
  1852.                                                                 <div class="col-12 col-lg-4 m_b_20p">
  1853.                                                                     <h5 class="form_title">Trasferimenti in uscita non completati</h5>
  1854.                                                                     <hr class="m_t_none">
  1855.                                                                     {% if wt[3]|length > 0 %}
  1856.                                                                         <table class="table table-sm font_12">
  1857.                                                                             <thead>
  1858.                                                                                 <tr>
  1859.                                                                                     <th class="txt_a_c">Fase</th>
  1860.                                                                                     <th>Magazzino destinazione</th>
  1861.                                                                                     <th>Fornitore</th>
  1862.                                                                                     <th>Data creazione</th>
  1863.                                                                                     <th>Data invio</th>
  1864.                                                                                     <th>Data completamento</th>
  1865.                                                                                     <th></th>
  1866.                                                                                 </tr>
  1867.                                                                             </thead>
  1868.                                                                             <tbody>
  1869.                                                                                 {% for pt in wt[3] %}
  1870.                                                                                     <tr>
  1871.                                                                                         <td class="txt_a_c">{{ pt.displayPhase('icon')|raw }}</td>
  1872.                                                                                         <td>{{ pt.warehouseTo }}</td>
  1873.                                                                                         <td>{{ pt.supplier }}</td>
  1874.                                                                                         <td>{{ pt.datetimeCreation|date('d-m-Y H:i') }}</td>
  1875.                                                                                         <td>{{ pt.datetimeSend|date('d-m-Y H:i') }}</td>
  1876.                                                                                         <td>{{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td>
  1877.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':wt[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1878.                                                                                     </tr>
  1879.                                                                                 {% endfor %}
  1880.                                                                             </tbody>
  1881.                                                                         </table>
  1882.                                                                     {% else %}
  1883.                                                                         <div class="style-msg successmsg m_b_none">
  1884.                                                                             <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in uscita non completato!</div>
  1885.                                                                         </div>
  1886.                                                                     {% endif %}
  1887.                                                                 </div>
  1888.                                                                 <div class="col-12 col-lg-4">
  1889.                                                                     <h5 class="form_title">Trasferimenti senza DDT firmato</h5>
  1890.                                                                     <hr class="m_t_none m_b_5p">
  1891.                                                                     {% if wt[4]|length > 0 %}
  1892.                                                                         <table class="table table-sm font_12">
  1893.                                                                             <tbody>
  1894.                                                                                 {% for pt in wt[4] %}
  1895.                                                                                     <tr>
  1896.                                                                                         <td>
  1897.                                                                                             <table class="table table_no_padding m_b_none b_none font_12">
  1898.                                                                                                 <tr><td><b>Fase</b>: {{ pt.displayPhase('string')|raw }}</td></tr>
  1899.                                                                                                 <tr><td><b>Fase DDT</b>: {{ pt.displayPhaseDdt('string')|raw }}</td></tr>
  1900.                                                                                                 <tr><td><b>Magazzino provenienza</b>: {{ pt.warehouseFrom }}</td></tr>
  1901.                                                                                                 <tr><td><b>Magazzino destinazione</b>: {{ pt.warehouseTo }}</td></tr>
  1902.                                                                                                 <tr><td><b>Fornitore</b>: {{ pt.supplier }}</td></tr>
  1903.                                                                                                 <tr><td><b>Data creazione</b>: {{ pt.datetimeCreation|date('d-m-Y H:i') }}</td></tr>
  1904.                                                                                                 <tr><td><b>Data invio</b>: {{ pt.datetimeSend|date('d-m-Y H:i') }}</td></tr>
  1905.                                                                                                 <tr><td><b>Data completamento</b>: {{ pt.datetimeCompletion|date('d-m-Y H:i') }}</td></tr>
  1906.                                                                                             </table>
  1907.                                                                                         </td>
  1908.                                                                                         <td class="td_action"><a href="{{ path ('user_warehouse_transfer_sheet', {'warehouseId':wt[0], 'transferId':pt.id}) }}" data-bs-toggle="tooltip" title="Vai alla scheda trasferimento"><img class="icon_pr" src="{{ asset(icon_sheet) }}"></a></td>
  1909.                                                                                     </tr>
  1910.                                                                                 {% endfor %}
  1911.                                                                             </tbody>
  1912.                                                                         </table>
  1913.                                                                     {% else %}
  1914.                                                                         <div class="style-msg successmsg m_b_none">
  1915.                                                                             <div class="sb-msg font_12"><i class="icon-thumbs-up"></i><strong>Complimenti!</strong> Nessun trasferimento in uscita!</div>
  1916.                                                                         </div>
  1917.                                                                     {% endif %}
  1918.                                                                 </div>
  1919.                                                             </div>
  1920.                                                             </div>
  1921.                                                         </div>
  1922.                                                     {% endfor %}
  1923.                                                 </div>
  1924.                                             </div>
  1925.                                         {% endif %}
  1926.                                     </div>
  1927.                                 </div>
  1928.                             </div>
  1929.                             {# Cerca #}
  1930.                             {% if app.user.canRead('desk_search') %}
  1931.                                 <div class="tab-content clearfix" id="search">
  1932.                                     <form action="{{ path ('user_search_redirect') }}" method="post" id="form_search">
  1933.                                         <div class="row">
  1934.                                             <div class="col-12 col-md-6 m_b_20p">
  1935.                                                 <h4 class="form_title">Ricerca cliente</h4>
  1936.                                                 <hr class="m_t_none">
  1937.                                                 <div class="form-group">
  1938.                                                     <label class="form_label m_b_none">Insegna</label>
  1939.                                                     <input type="text" class="form-control" name="clientNickname">
  1940.                                                 </div>
  1941.                                                 <div class="form-group">
  1942.                                                     <label class="form_label m_b_none">Numero di telefono</label>
  1943.                                                     <input type="text" class="form-control" name="clientPhone">
  1944.                                                 </div>
  1945.                                                 <div class="txt_a_c">
  1946.                                                     <a href="javascript: submitTechnicianSearch('client')" class="button button-3d button-small button-rounded button-green">Cerca</a>
  1947.                                                 </div>
  1948.                                             </div>
  1949.                                             <div class="col-12 col-md-6 m_b_20p">
  1950.                                                 <h4 class="form_title">Ricerca ticket</h4>
  1951.                                                 <hr class="m_t_none">
  1952.                                                 <div class="form-group">
  1953.                                                     <label class="form_label m_b_none">Numero ticket o termid</label>
  1954.                                                     <input type="text" class="form-control" name="number">
  1955.                                                 </div>
  1956.                                                 <div class="txt_a_c">
  1957.                                                     <a href="javascript: submitTechnicianSearch('ticket')" class="button button-3d button-small button-rounded button-green">Cerca</a>
  1958.                                                 </div>
  1959.                                             </div>
  1960.                                             <div class="col-12 col-md-6">
  1961.                                                 <h4 class="form_title">Ricerca prodotto</h4>
  1962.                                                 <hr class="m_t_none">
  1963.                                                 <div class="form-group">
  1964.                                                     <label class="form_label m_b_none">Matricola produttore</label>
  1965.                                                     <input type="text" class="form-control" name="codeProducer">
  1966.                                                 </div>
  1967.                                                 <div class="form-group">
  1968.                                                     <label class="form_label m_b_none">Matricola fornitore</label>
  1969.                                                     <input type="text" class="form-control" name="codeSupplier">
  1970.                                                 </div>
  1971.                                                 <div class="txt_a_c">
  1972.                                                     <a href="javascript: submitTechnicianSearch('product')" class="button button-3d button-small button-rounded button-green">Cerca</a>
  1973.                                                 </div>
  1974.                                             </div>
  1975.                                         </div>
  1976.                                         <input type="hidden" id="search_type" name="type">
  1977.                                     </form>
  1978.                                 </div>
  1979.                             {% endif %}
  1980.                         </div>
  1981.                     </div>
  1982.                 </div>
  1983.             </div>
  1984.         {% endif %}
  1985.     </section>
  1986.     {% if app.user.getAccountTypology == 'agency' or app.user.getAccountTypology == 'technician' %}
  1987.         <form action="{{ path ('user_ticket_list_tab') }}" method="post" id="formGoToTickets">
  1988.             <input type="hidden" id="ticketTabOpen" name="ticketTabOpen">
  1989.             <input type="hidden" id="ticketOperationGroup" name="ticketOperationGroup">
  1990.             <input type="hidden" id="ticketTechnician" name="ticketTechnician">
  1991.         </form>
  1992.     {% endif %}
  1993.     
  1994.     {# Modale notifiche #}
  1995.     <div id="modalAlerts" class="modal fade" tabindex="-1" role="dialog">
  1996.         <div class="modal-dialog" role="document" style="max-width:98%">
  1997.             <div class="modal-content">
  1998.                 <div class="modal-header"><h3 class="modal-title">Notifiche</h3></div>
  1999.                 <div class="modal-body">
  2000.                 </div>
  2001.                 <div class="modal-footer txt_a_c">
  2002.                     <a href="javascript:void(0)" class="button button-3d button-mini button-pr" data-bs-dismiss="modal">Chiudi</a>
  2003.                 </div>
  2004.             </div>
  2005.         </div>
  2006.     </div>
  2007.     {% if app.user.getAccountTypology != 'technician' and app.user.canWrite('ticket') %}
  2008.         <div id="modalTicketUnlockSuspension" class="modal fade" tabindex="-1" role="dialog">
  2009.             <div class="modal-dialog" role="document">
  2010.                 <div class="modal-content">
  2011.                     <div class="modal-header"><h3 class="modal-title">Ticket - Sblocca sospensione materiale</h3></div>
  2012.                     <div class="modal-body">
  2013.                         <input type="hidden" id="ticketUnlockId">
  2014.                         <div class="row">
  2015.                             <div class="col-12 txt_a_c">
  2016.                                 <label class="modal_subtitle">Attenzione!</label>
  2017.                                 <p class="modal_paragraph">Cliccando sul bottone <a class='button button-3d button-mini button-green' href='javascript:void(0)'>conferma</a> sbloccherai il ticket.<br>Si è sicuri di voler proseguire?</p>
  2018.                             </div>
  2019.                         </div>
  2020.                     </div>
  2021.                     <div class="modal-footer">
  2022.                         <a href="javascript:void(0)" class="button button-3d button-mini button-red f_left" data-bs-dismiss="modal">Annulla</a>
  2023.                         <a href="javascript:ticketUnlockSuspensionSubmit()" class="button button-3d button-mini button-green f_right">Conferma</a>
  2024.                     </div>
  2025.                 </div>
  2026.             </div>
  2027.         </div>
  2028.     {% endif %}
  2029.     {% if app.user.getAccountTypology == 'technician' %}    
  2030.         <div id="takeChargeModal" class="modal fade" tabindex="-1" role="dialog">
  2031.             <div class="modal-dialog" role="document">
  2032.                 <div class="modal-content">
  2033.                     <form action="{{ path ('user_ticket_take_charge') }}" method="post">
  2034.                         <div class="modal-header"><h3 class="modal-title">Ticket - Prendi in carico</h3></div>
  2035.                         <div class="modal-body">
  2036.                             <div class="row">
  2037.                                 <div class="col-12 txt_a_c">
  2038.                                     <label class="modal_subtitle">Attenzione!</label>
  2039.                                     <p class="modal_paragraph">Cliccando sul bottone <a class='button button-3d button-mini button-green' href='javascript:void(0)'>conferma</a> prenderai in carico tutti i ticket che ti sono stati assegnati.<br>Si è sicuri di voler proseguire?</p>
  2040.                                 </div>
  2041.                             </div>
  2042.                         </div>
  2043.                         <div class="modal-footer">
  2044.                             <a href="javascript:void(0)" class="button button-3d button-mini button-red f_left" data-bs-dismiss="modal">Annulla</a>
  2045.                             <button type="submit" class="button button-3d button-mini button-green f_right">Conferma</button>
  2046.                         </div>
  2047.                     </form>
  2048.                 </div>
  2049.             </div>
  2050.         </div>
  2051.     {% endif %}
  2052. {% endblock %}
  2053. {% block javascripts %}
  2054. {{ parent() }}
  2055. <script>
  2056.     {# Agenzia #}
  2057.     {% if app.user.getAccountTypology == 'agency' or app.user.getAccountTypology == 'technician' %}
  2058.         function goToTicketList(tab, operationGroup){
  2059.             document.getElementById('ticketTabOpen').value = tab;
  2060.             document.getElementById('ticketOperationGroup').value = operationGroup;
  2061.             triggerLoading();
  2062.             $('#formGoToTickets').submit();
  2063.         }
  2064.     {% endif %}
  2065.     
  2066.     {% if app.user.getAccountTypology == 'agency' %}
  2067.         function goToTechTicketList(operationGroup, technician){
  2068.             document.getElementById('ticketTabOpen').value = 'taken_charge';
  2069.             document.getElementById('ticketOperationGroup').value = operationGroup;
  2070.             document.getElementById('ticketTechnician').value = technician;
  2071.             triggerLoading();
  2072.             $('#formGoToTickets').submit();
  2073.         }
  2074.     {% endif %}
  2075.     {% if app.user.getAccountTypology != 'technician' and app.user.canWrite('ticket') %}
  2076.         function unlockSuspension(id){
  2077.             document.getElementById('ticketUnlockId').value = id;
  2078.             $('#modalTicketUnlockSuspension').modal({backdrop: 'static', keyboard: false}).modal("show");
  2079.         }
  2080.         function ticketUnlockSuspensionSubmit(){
  2081.             triggerLoadingInElement('table_ticket_waiting_for_material');
  2082.             var id = document.getElementById('ticketUnlockId').value;
  2083.             $.post('{{ path ("user_ticket_unlock_waiting_material") }}', {ticketId: id}, function(response){ 
  2084.                 if(response.code == 200 && response.success){
  2085.                     $.get("{{ path ('user_index_ticket_unlock_refresh') }}", function(data) { $("#table_ticket_waiting_for_material").html(data); });
  2086.                     $.get("{{ path ('user_index_ticket_tab_refresh', {'tab':'waiting_for_material'}) }}", function(data) { $("#btn_tab_waiting_for_material").html(data); });
  2087.                     $('#modalTicketUnlockSuspension').modal("hide");
  2088.                 }
  2089.             }, "json");
  2090.             $('[data-bs-toggle="tooltip"]').tooltip();
  2091.         }
  2092.     {% endif %}
  2093.     
  2094.     function openModalAlerts(){
  2095.         $('#modalAlerts').modal({backdrop: 'static', keyboard: false}).modal("show");
  2096.     }
  2097.     {% if app.user.getAccountTypology == 'technician' %}
  2098.         function ticketsTakeCharge(){
  2099.             $('#takeChargeModal').modal({backdrop: 'static', keyboard: false}).modal("show");
  2100.         }
  2101.         function submitTechnicianSearch(type){
  2102.             document.getElementById('search_type').value = type;
  2103.             triggerLoading();
  2104.             $('#form_search').submit();
  2105.         }
  2106.     {% endif %}
  2107. </script>
  2108. {% endblock %}