src/ApplicationBundle/Resources/views/voucherTemplate/shared_components.html.twig line 1

Open in your IDE?
  1. {% verbatim %}
  2. <script id="tpl-drawer-header" type="text/template">
  3.     <div class="hb-doc-card hb-doc-card-header-card">
  4.         <div class="hb-doc-card-topline">
  5.             <span class="hb-doc-card-title">{{entityAlias}}</span>
  6.             <span class="hb-doc-card-status">{{statusBadge}}</span>
  7.         </div>
  8.         <div class="hb-doc-card-document">{{documentHash}}</div>
  9.         <div class="hb-doc-card-meta-line">{{createdDate}} <span class="hb-doc-card-meta-dot">-</span> {{createdTime}}</div>
  10.     </div>
  11. </script>
  12. <script id="tpl-drawer-footer" type="text/template">
  13.     <div class="hb-doc-card hb-doc-card-stack">
  14.         <div class="hb-doc-person">
  15.             <div class="hb-doc-avatar" style="{{avatarStyle}}">{{avatarContent}}</div>
  16.             <div class="hb-doc-person-body">
  17.                 <div class="hb-doc-person-name">{{createdBy}}</div>
  18.                 <div class="hb-doc-person-label">Created by</div>
  19.             </div>
  20.         </div>
  21.         <div class="hb-doc-priority-row">
  22.             <span class="hb-doc-priority-label">Priority</span>
  23.             {{priorityBadge}}
  24.         </div>
  25.         <div class="hb-doc-note">
  26.             {{noteHtml}}
  27.         </div>
  28.     </div>
  29. </script>
  30. <script id="tpl-drawer-action-bar" type="text/template">
  31.     <div class="hb-doc-action-bar">
  32.         <button type="button" class="btn btn-success trigger_approval_btn hb-doc-action-primary"
  33.              data-entity="{{entity}}"
  34.              data-entity-id="{{entityId}}"
  35.              data-approval-id="{{approvalId}}">&#10003; Approve</button>
  36.         {{attachmentBtn}}
  37.         <a href="{{url}}" target="_blank" class="hb-doc-action-secondary">Full page &#8599;</a>
  38.     </div>
  39. </script>
  40. <script id="tpl-drawer-kv-table" type="text/template">
  41.     <div class="hb-doc-card hb-doc-kv-card">
  42.         <table class="hb-doc-kv-table">
  43.             <thead>
  44.                 <tr>
  45.                     <th>Field</th>
  46.                     <th>Value</th>
  47.                 </tr>
  48.             </thead>
  49.             <tbody>{{rows}}</tbody>
  50.         </table>
  51.     </div>
  52. </script>
  53. <script id="tpl-drawer-kv-row" type="text/template">
  54.     <tr>
  55.         <td class="hb-doc-kv-key">{{key}}</td>
  56.         <td class="hb-doc-kv-value">{{value}}</td>
  57.     </tr>
  58. </script>
  59. <script id="tpl-drawer-amount-card" type="text/template">
  60.     <div class="hb-doc-card hb-doc-card-summary">
  61.         <div class="hb-doc-card-label">{{label}}</div>
  62.         <div class="hb-doc-card-value" style="color:{{color}};">{{amount}}</div>
  63.     </div>
  64. </script>
  65. <style>
  66.     .hb-doc-card {
  67.         background: #fff;
  68.         border: 1px solid #e5e5e5;
  69.         border-radius: 12px;
  70.         overflow: hidden;
  71.         margin-bottom: 16px;
  72.     }
  73.     .hb-doc-card-header-card {
  74.         padding: 14px 16px;
  75.         background: linear-gradient(180deg, #fbfbfa 0%, #ffffff 100%);
  76.     }
  77.     .hb-doc-card-topline {
  78.         display: flex;
  79.         align-items: center;
  80.         justify-content: space-between;
  81.         gap: 12px;
  82.         margin-bottom: 6px;
  83.     }
  84.     .hb-doc-card-title {
  85.         font-size: 10px;
  86.         font-weight: 700;
  87.         letter-spacing: 0.09em;
  88.         text-transform: uppercase;
  89.         color: #6a6a6a;
  90.     }
  91.     .hb-doc-card-status {
  92.         display: inline-flex;
  93.         align-items: center;
  94.         justify-content: flex-end;
  95.     }
  96.     .hb-doc-card-document {
  97.         font-size: 18px;
  98.         font-weight: 700;
  99.         line-height: 1.2;
  100.         color: #1a1a1a;
  101.         word-break: break-word;
  102.     }
  103.     .hb-doc-card-meta-line {
  104.         margin-top: 3px;
  105.         font-size: 11px;
  106.         color: #9a9a9a;
  107.     }
  108.     .hb-doc-card-meta-dot {
  109.         margin: 0 4px;
  110.     }
  111.     .hb-doc-card-stack {
  112.         padding: 0;
  113.     }
  114.     .hb-doc-person {
  115.         display: flex;
  116.         align-items: center;
  117.         gap: 12px;
  118.         padding: 14px 16px 12px;
  119.         border-bottom: 1px solid #f0f0ee;
  120.     }
  121.     .hb-doc-avatar {
  122.         width: 36px;
  123.         height: 36px;
  124.         border-radius: 50%;
  125.         flex-shrink: 0;
  126.         display: flex;
  127.         align-items: center;
  128.         justify-content: center;
  129.         font-size: 12px;
  130.         font-weight: 700;
  131.         color: #2f6f96;
  132.         background: #eaf4fb;
  133.         background-size: cover;
  134.         background-position: center;
  135.     }
  136.     .hb-doc-person-body {
  137.         min-width: 0;
  138.     }
  139.     .hb-doc-person-name {
  140.         font-size: 13px;
  141.         font-weight: 700;
  142.         color: #222;
  143.         line-height: 1.2;
  144.     }
  145.     .hb-doc-person-label {
  146.         font-size: 11px;
  147.         color: #9a9a9a;
  148.         margin-top: 2px;
  149.     }
  150.     .hb-doc-priority-row {
  151.         padding: 12px 16px;
  152.         border-bottom: 1px solid #f0f0ee;
  153.         display: flex;
  154.         justify-content: space-between;
  155.         align-items: center;
  156.         gap: 12px;
  157.     }
  158.     .hb-doc-priority-label {
  159.         font-size: 12px;
  160.         color: #6a6a6a;
  161.     }
  162.     .hb-doc-note {
  163.         padding: 12px 16px;
  164.         display: flex;
  165.         align-items: flex-start;
  166.         gap: 12px;
  167.     }
  168.     .hb-doc-action-bar {
  169.         display: flex;
  170.         gap: 8px;
  171.         padding-top: 4px;
  172.     }
  173.     .hb-doc-action-primary {
  174.         flex: 1;
  175.         padding: 9px 12px;
  176.         font-size: 13px;
  177.         border-radius: 10px;
  178.         border: none;
  179.     }
  180.     .hb-doc-action-secondary {
  181.         flex: 1;
  182.         padding: 9px 12px;
  183.         font-size: 13px;
  184.         text-align: center;
  185.         border-radius: 10px;
  186.         border: 1px solid #e5e5e5;
  187.         color: #3a3a3a;
  188.         text-decoration: none;
  189.         display: flex;
  190.         align-items: center;
  191.         justify-content: center;
  192.         background: #fff;
  193.     }
  194.     .hb-doc-kv-card {
  195.         padding: 0;
  196.     }
  197.     .hb-doc-kv-table {
  198.         width: 100%;
  199.         border-collapse: collapse;
  200.     }
  201.     .hb-doc-kv-table thead th {
  202.         padding: 10px 16px;
  203.         font-size: 10px;
  204.         font-weight: 700;
  205.         letter-spacing: 0.08em;
  206.         text-transform: uppercase;
  207.         color: #9a9a9a;
  208.         background: #fafaf8;
  209.         border-bottom: 1px solid #f0f0ee;
  210.     }
  211.     .hb-doc-kv-table tbody td {
  212.         border-bottom: 1px solid #f5f5f5;
  213.     }
  214.     .hb-doc-kv-table tbody tr:last-child td {
  215.         border-bottom: none;
  216.     }
  217.     .hb-doc-kv-key {
  218.         padding: 10px 16px;
  219.         font-size: 12px;
  220.         color: #6a6a6a;
  221.         white-space: nowrap;
  222.         width: 34%;
  223.     }
  224.     .hb-doc-kv-value {
  225.         padding: 10px 16px;
  226.         font-size: 12px;
  227.         color: #222;
  228.         word-break: break-word;
  229.     }
  230.     .hb-doc-card-summary {
  231.         padding: 14px 16px;
  232.     }
  233.     .hb-doc-card-label {
  234.         font-size: 10px;
  235.         font-weight: 700;
  236.         letter-spacing: 0.08em;
  237.         text-transform: uppercase;
  238.         color: #9a9a9a;
  239.         margin-bottom: 4px;
  240.     }
  241.     .hb-doc-card-value {
  242.         font-size: 22px;
  243.         font-weight: 700;
  244.         line-height: 1.1;
  245.         color: #1a1a1a;
  246.     }
  247.     .hb-doc-card-value-positive {
  248.         color: #4baa6b;
  249.     }
  250.     .hb-doc-card-value-negative {
  251.         color: #c05350;
  252.     }
  253.     .hb-doc-metric-grid {
  254.         display: grid;
  255.         grid-template-columns: repeat(2, minmax(0, 1fr));
  256.         gap: 8px;
  257.         margin-bottom: 16px;
  258.     }
  259.     .hb-doc-metric-card {
  260.         background: #fafaf8;
  261.         border: 1px solid #f0f0ee;
  262.         border-radius: 10px;
  263.         padding: 10px 12px;
  264.     }
  265.     .hb-doc-metric-label {
  266.         font-size: 10px;
  267.         font-weight: 700;
  268.         letter-spacing: 0.08em;
  269.         text-transform: uppercase;
  270.         color: #9a9a9a;
  271.         margin-bottom: 3px;
  272.     }
  273.     .hb-doc-metric-value {
  274.         font-size: 14px;
  275.         font-weight: 700;
  276.         color: #1a1a1a;
  277.         line-height: 1.2;
  278.         word-break: break-word;
  279.     }
  280.     .hb-doc-section-header {
  281.         padding: 10px 16px;
  282.         background: #fafaf8;
  283.         border-bottom: 1px solid #f0f0ee;
  284.         font-size: 10px;
  285.         font-weight: 700;
  286.         letter-spacing: 0.08em;
  287.         text-transform: uppercase;
  288.         color: #6a6a6a;
  289.     }
  290.     .hb-doc-table-wrap {
  291.         overflow: auto;
  292.     }
  293.     .hb-doc-table {
  294.         width: 100%;
  295.         border-collapse: collapse;
  296.     }
  297.     .hb-doc-table thead th {
  298.         padding: 10px 16px;
  299.         font-size: 10px;
  300.         font-weight: 700;
  301.         letter-spacing: 0.08em;
  302.         text-transform: uppercase;
  303.         color: #9a9a9a;
  304.         background: #fafaf8;
  305.         border-bottom: 1px solid #f0f0ee;
  306.         white-space: nowrap;
  307.     }
  308.     .hb-doc-table tbody td {
  309.         padding: 10px 16px;
  310.         border-bottom: 1px solid #f5f5f5;
  311.         font-size: 12px;
  312.         color: #3a3a3a;
  313.         vertical-align: middle;
  314.     }
  315.     .hb-doc-table tbody tr:last-child td {
  316.         border-bottom: none;
  317.     }
  318.     .hb-doc-table .text-right {
  319.         text-align: right;
  320.         white-space: nowrap;
  321.     }
  322. </style>
  323. {% endverbatim %}