templates/egd_declaration/index.html.twig line 1

  1. {% extends 'egd_base.html.twig' %}
  2. {% block title %}Հայտարարագրերի Ցանկ{% endblock %}
  3. {% block body %}
  4.     <div class="d-flex justify-content-between align-items-center mb-4">
  5.         <h2>Հայտարարագրերի Ցանկ</h2>
  6.         <a href="{{ path('app_egd_declaration_upload') }}" class="btn btn-primary">Ստեղծել նորը</a>
  7.     </div>
  8.     <div class="card shadow-sm">
  9.         <div class="card-body p-0">
  10.             <table class="table table-hover mb-0">
  11.                 <thead class="table-light">
  12.                     <tr>
  13.                         <th>ID</th>
  14.                         <th>Courier Doc ID</th>
  15.                         <th>Message ID</th>
  16.                         <th>Status</th>
  17.                         <th>EGD Doc ID</th>
  18.                         <th>Created At</th>
  19.                         <th>Actions</th>
  20.                     </tr>
  21.                 </thead>
  22.                 <tbody>
  23.                 {% for declaration in declarations %}
  24.                     <tr>
  25.                         <td>{{ declaration.id }}</td>
  26.                         <td><small>{{ declaration.courierDocId }}</small></td>
  27.                         <td><small>{{ declaration.messageId }}</small></td>
  28.                         <td>
  29.                             {% set badge_class = 'secondary' %}
  30.                             {% if declaration.status == 'COMPLETED' or declaration.status == 'Released' %}
  31.                                 {% set badge_class = 'success' %}
  32.                             {% elseif declaration.status == 'FAILED' or declaration.status == 'VALIDATION_FAILED' %}
  33.                                 {% set badge_class = 'danger' %}
  34.                             {% elseif declaration.status == 'Stored' or declaration.status == 'SUBMITTED' %}
  35.                                 {% set badge_class = 'primary' %}
  36.                             {% endif %}
  37.                             <span class="badge bg-{{ badge_class }}">{{ declaration.status }}</span>
  38.                         </td>
  39.                         <td><small>{{ declaration.egdDocId ?? '-' }}</small></td>
  40.                         <td>{{ declaration.createdAt ? declaration.createdAt|date('Y-m-d H:i') : '' }}</td>
  41.                         <td>
  42.                             <a href="{{ path('app_egd_declaration_show', {'id': declaration.id}) }}" class="btn btn-sm btn-outline-info">Դիտել</a>
  43.                         </td>
  44.                     </tr>
  45.                 {% else %}
  46.                     <tr>
  47.                         <td colspan="7" class="text-center py-4">Դեռևս հայտարարագրեր չկան:</td>
  48.                     </tr>
  49.                 {% endfor %}
  50.                 </tbody>
  51.             </table>
  52.         </div>
  53.     </div>
  54. {% endblock %}