templates/backOffice/assays/index.html.twig line 1

Open in your IDE?
  1. {% extends 'backOffice/baseAuthenticated.html.twig' %}
  2. {% import 'backOffice/util/_paginationHelpers.html.twig' as paginationHelpers %}
  3. {% import 'backOffice/assays/_helpers.html.twig' as assayHelpers %}
  4. {% if customer is not null %}
  5.     {% set page_title %}
  6.         Assays for
  7.         <span class="text-black-50">{{ customer.firstName }} {{ customer.lastName }}</span>
  8.     {% endset %}
  9. {% else %}
  10.     {% set page_title = "Assays" %}
  11. {% endif %}
  12. {% if protocol is not null %}
  13.     {% set page_title %}
  14.         {{ page_title }}<br/>
  15.         <small>
  16.             Protocol <span class="text-black-50">{{ protocol.sku }}</span>
  17.         </small>
  18.     {% endset %}
  19. {% endif %}
  20. {% if qrData is not null %}
  21.     {% set page_title %}
  22.         {{ page_title }}<br/>
  23.         <small>
  24.             Assays for <span class="text-black-50">{{ qrData.email }}</span>
  25.         </small>
  26.     {% endset %}
  27. {% endif %}
  28. {#% block actions %}
  29.     <a type="button"
  30.        class="btn btn-outline-primary"
  31.        href="#"
  32.        data-toggle="collapse"
  33.        data-target="#collapseFilters">
  34.         <span class="fa fa-filter"></span>
  35.         Filter
  36.     </a>
  37. {% endblock %}
  38. {% block filters %}
  39.     <div class="row">
  40.         <div class="col-md-4">
  41.             <div class="form-group">
  42.                 <label for="SKU">Protocol SKU</label>
  43.                 <input type="text" class="form-control" id="SKU" placeholder="Search by SKU...">
  44.             </div>
  45.         </div>
  46.         <div class="col-md-4">
  47.             <div class="form-group">
  48.                 <label for="customer">Customer</label>
  49.                 <input type="text" class="form-control" id="SKU" placeholder="Search by client name...">
  50.             </div>
  51.         </div>
  52.         <div class="col-md-3">
  53.             <div class="form-group">
  54.                 <label for="date">Date</label>
  55.                 <input type="date" class="form-control" id="date" placeholder="DD/MM/YYYY">
  56.             </div>
  57.         </div>
  58.         <div class="col-md-1">
  59.             <div class="form-group">
  60.                 <label>&nbsp;</label>
  61.                 <button type="submit" class="btn btn-primary">
  62.                     <span class="fa fa-search"></span>
  63.                 </button>
  64.             </div>
  65.         </div>
  66.     </div>
  67. {% endblock %#}
  68. {% block actions %}
  69.     <a class="btn btn-primary"
  70.        href="{{ path('app_backoffice_assaydownload_index', {'_format': 'csv'})}}">
  71.         Download Assays
  72.     </a>
  73. {% endblock %}
  74. {% block body %}
  75.     {{ form_start(filterForm) }}
  76.     {{ include('backOffice/assays/_form.html.twig', {'filterForm': filterForm}) }}
  77.     <div class="row mt-3">
  78.         <div class="col-auto">
  79.             {{ form_row(filterForm.submit,{ 'label': 'Search', 'attr': {'class': 'btn btn-primary'} }) }}
  80.         </div>
  81.         <div class="col-auto">
  82.             <a class="btn btn-primary"
  83.                href="{{ path('app_backoffice_assays_index')}}">
  84.                 Clear Filters
  85.             </a>
  86.         </div>
  87.     </div>
  88.     {{ form_end(filterForm) }}
  89.     {{ paginationHelpers.showing_label(assays) }}
  90.     <hr>
  91.     <div class="card card-table">
  92.         <div class="table-responsive">
  93.             <table class="table table-striped table-borderless mb-0">
  94.                 <thead>
  95.                 <tr>
  96.                     <th>ID</th>
  97.                     <th>SKU</th>
  98.                     <th>Batch</th>
  99.                     <th>Sample ID</th>
  100.                     <th>MAC ID</th>
  101.                     <th>Date</th>
  102.                     <th>Status</th>
  103.                     <th></th>
  104.                 </tr>
  105.                 </thead>
  106.                 <tbody class="no-border-x">
  107.                 {% for assay in assays.items %}
  108.                     <tr>
  109.                         <td>{{ assay.assayId }}</td>
  110.                         <td>
  111.                             {{ assay.protocol.sku }}
  112.                             {% if protocol is not null %}
  113.                                 (v{{ assay.protocol.version }})
  114.                             {% endif %}
  115.                         </td>
  116.                         <td>{{ assay.batch }}</td>
  117.                         <td>{{ assay.sampleId }}</td>
  118.                         <td>{{ assay.hardwareVersion }}</td>
  119.                         <td>{{ assay.createdAt | date }}</td>
  120.                         <td>{{ assayHelpers.assay_status_or_result(assay) }}</td>
  121.                         <td class="text-right">
  122.                             <a
  123.                                     href="{{ path('app_backoffice_assays_get', {'assayId': assay.assayId}) }}"
  124.                                     data-toggle="tooltip"
  125.                                     data-placement="left"
  126.                                     data-title="View">
  127.                                 <span class="fa fa-eye"></span>
  128.                             </a>
  129.                         </td>
  130.                     </tr>
  131.                 {% endfor %}
  132.                 </tbody>
  133.             </table>
  134.         </div>
  135.     </div>
  136.     {{ pagination_render(assays) }}
  137. {% endblock %}