templates/index/metas_fluxos.html.twig line 1

  1. <!DOCTYPE html>
  2. <html lang="pt-br">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Painel de Fluxos Abertos</title>
  6.     <title>ArquivosGED</title>
  7.     <link rel="shortcut icon" href="{{ asset('./img/icon.png') }}">
  8.     <meta http-equiv="refresh" content="120">
  9.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10.     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
  11.   </head>
  12.     <style>
  13.         .topo {
  14.             position: absolute;
  15.             top: 22px;
  16.             left: 0;
  17.             width: 100%;
  18.             display: flex;
  19.             align-items: flex-start; /* frase fica acima */
  20.             padding: 0 40px;
  21.             box-sizing: border-box;
  22.             pointer-events: none;
  23.         }
  24.         /* animação de piscar suave */
  25.         @keyframes piscarSuave {
  26.             0%   { opacity: 1; }
  27.             50%  { opacity: 0.35; }
  28.             100% { opacity: 1; }
  29.         }
  30.         /* aplica no logo */
  31.         .logo-area img {
  32.             max-height: 110px;
  33.             animation: piscarSuave 5s ease-in-out infinite;
  34.         }
  35.         /* aplica na frase */
  36.         .frase {
  37.             max-width: 150vw;
  38.             font-size: clamp(5rem, 5vw, 5rem);
  39.             font-weight: bold;
  40.             letter-spacing: 0.8px;
  41.             line-height: 1.25;
  42.             text-align: center;
  43.         }
  44.         /* FRASE */
  45.         .frase-area {
  46.             flex: 1;
  47.             margin-left: 26px;
  48.         }
  49.         .frase-centro {
  50.             position: absolute;
  51.             inset: 0; /* ocupa a tela inteira */
  52.             display: flex;
  53.             align-items: center;      /* vertical */
  54.             justify-content: center;  /* horizontal */
  55.         }
  56.         /* animação elegante */
  57.         @keyframes fadeSlide {
  58.             from {
  59.                 opacity: 0;
  60.                 transform: translateY(6px);
  61.             }
  62.             to {
  63.                 opacity: 1;
  64.                 transform: translateY(0);
  65.             }
  66.         }
  67.         thead i {
  68.             font-size: 4rem;
  69.             opacity: 0.85;
  70.             stroke-width: 1.5;
  71.         }
  72.         * {
  73.             box-sizing: border-box;
  74.             font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  75.             letter-spacing: 0.02em;
  76.             line-height: 1.6;
  77.         }
  78.         @keyframes gradient {
  79.             0% { background-position: 0% 50%; }
  80.             50% { background-position: 100% 50%; }
  81.             100% { background-position: 0% 50%; }
  82.         }
  83.         body {
  84.             margin: 0;
  85.             padding: 0;
  86.             height: 100vh;
  87.             background: #f1f1f1;
  88.             background-size: 400% 400%;
  89.             animation: gradient 6s ease infinite;
  90.             color: #245DAC;
  91.         }
  92.         /* TABELA */
  93.         table {
  94.             width: 100%;
  95.             border-collapse: collapse;
  96.             margin-top: 140px;
  97.         }
  98.         
  99.         /* Mantém cabeçalho fixo no topo */
  100.         thead th {
  101.             position: sticky;
  102.             top: 0;
  103.             background: #0e84ce38; /* mesma cor que já usa */
  104.             z-index: 2;
  105.         }
  106.         /* Mantém rodapé fixo no fim */
  107.         tfoot th {
  108.             position: sticky;
  109.             bottom: 0;
  110.             background: #0e84ce38; /* mesma cor que já usa */
  111.             z-index: 2;
  112.         }
  113.         /* Faz o corpo da tabela rolar */
  114.         tbody {
  115.             display: block;
  116.             max-height: 400px;   /* altura visível, ajuste conforme necessidade */
  117.             overflow-y: auto;
  118.         }
  119.         /* Garante alinhamento das colunas */
  120.         thead, tfoot, tbody tr {
  121.             display: table;
  122.             width: 100%;
  123.             table-layout: fixed;
  124.         }
  125.         th {
  126.             padding: 26px 30px;
  127.             font-size: 1.7rem;
  128.             text-align: left;
  129.             letter-spacing: 1px;
  130.             
  131.         }
  132.         td {
  133.             padding: 10px;
  134.             font-size: 1.5rem;
  135.             text-shadow: 1px 1px 2px rgb(238, 238, 238);
  136.             
  137.         }
  138.         .centro {
  139.             text-align: center;
  140.         }
  141.         tr{
  142.            border-bottom: #a7a7a7 solid 1px;  
  143.            font-weight: bold;
  144.            box-shadow: inset
  145.         }
  146.         /* STATUS LINHA INTEIRA */
  147.         tr.ok {
  148.             
  149.         }
  150.         tr.alerta {
  151.             background: rgb(255, 204, 0);
  152.         }
  153.         tr.vencido {
  154.             background: rgb(248, 45, 22);
  155.         }
  156.     </style>
  157. </head>
  158. <body>
  159.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
  160. <div class="topo">
  161.     <div class="logo-area">
  162.         <img src="{{ asset('./img/logo_menu.png') }}" alt="Logo">
  163.     </div>
  164.     <div class="frase-centro">
  165.         <div id="frase" class="frase"></div>
  166.     </div>
  167. </div>
  168. <table>
  169.     <thead>
  170.         <tr> 
  171.             <th class="centro">
  172.                 <svg xmlns="http://www.w3.org/2000/svg" width="70" height="70" fill="currentColor" class="bi bi-clock-fill" viewBox="0 0 16 16">
  173.                     <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"/>
  174.                     </svg>
  175.             </th>  
  176.             <th class="centro">
  177.              <svg xmlns="http://www.w3.org/2000/svg" width="70" height="70" fill="currentColor" class="bi bi-stack-overflow" viewBox="0 0 16 16">
  178.                         <path d="M12.412 14.572V10.29h1.428V16H1v-5.71h1.428v4.282z"/>
  179.                         <path d="M3.857 13.145h7.137v-1.428H3.857zM10.254 0 9.108.852l4.26 5.727 1.146-.852zm-3.54 3.377 5.484 4.567.913-1.097L7.627 2.28l-.914 1.097zM4.922 6.55l6.47 3.013.603-1.294-6.47-3.013zm-.925 3.344 6.985 1.469.294-1.398-6.985-1.468z"/>
  180.                       </svg>
  181.             </th>   <!-- Fluxo -->
  182.             <th class="centro">
  183.               <svg xmlns="http://www.w3.org/2000/svg"  width="70" height="70" fill="currentColor" class="bi bi-cash-coin" viewBox="0 0 16 16">
  184.                   <path fill-rule="evenodd" d="M11 15a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm5-4a5 5 0 1 1-10 0 5 5 0 0 1 10 0z"/>
  185.                   <path d="M9.438 11.944c.047.596.518 1.06 1.363 1.116v.44h.375v-.443c.875-.061 1.386-.529 1.386-1.207 0-.618-.39-.936-1.09-1.1l-.296-.07v-1.2c.376.043.614.248.671.532h.658c-.047-.575-.54-1.024-1.329-1.073V8.5h-.375v.45c-.747.073-1.255.522-1.255 1.158 0 .562.378.92 1.007 1.066l.248.061v1.272c-.384-.058-.639-.27-.696-.563h-.668zm1.36-1.354c-.369-.085-.569-.26-.569-.522 0-.294.216-.514.572-.578v1.1h-.003zm.432.746c.449.104.655.272.655.569 0 .339-.257.571-.709.614v-1.195l.054.012z"/>
  186.                   <path d="M1 0a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4.083c.058-.344.145-.678.258-1H3a2 2 0 0 0-2-2V3a2 2 0 0 0 2-2h10a2 2 0 0 0 2 2v3.528c.38.34.717.728 1 1.154V1a1 1 0 0 0-1-1H1z"/>
  187.                   <path d="M9.998 5.083 10 5a2 2 0 1 0-3.132 1.65 5.982 5.982 0 0 1 3.13-1.567z"/>
  188.                 </svg>
  189.             </th> 
  190.             <th class="centro">
  191.                  <svg xmlns="http://www.w3.org/2000/svg" width="70" height="70" fill="currentColor" class="bi bi-image-fill" viewBox="0 0 16 16">
  192.                     <path d="M.002 3a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-12a2 2 0 0 1-2-2zm1 9v1a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062zm5-6.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"/>
  193.                 </svg>
  194.             </th>      
  195.             <th class="centro">
  196.                 <svg xmlns="http://www.w3.org/2000/svg"  width="70" height="70" fill="currentColor" class="bi bi-file-earmark-text-fill" viewBox="0 0 16 16">
  197.                     <path d="M9.293 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.707A1 1 0 0 0 13.707 4L10 .293A1 1 0 0 0 9.293 0M9.5 3.5v-2l3 3h-2a1 1 0 0 1-1-1M4.5 9a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1zM4 10.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m.5 2.5a.5.5 0 0 1 0-1h4a.5.5 0 0 1 0 1z"/>
  198.                 </svg>
  199.             </th> <!-- Docs -->
  200.             <th class="centro">
  201.                 <svg xmlns="http://www.w3.org/2000/svg"  width="70" height="70" fill="currentColor" class="bi bi-box-fill" viewBox="0 0 16 16">
  202.                     <path fill-rule="evenodd" d="M15.528 2.973a.75.75 0 0 1 .472.696v8.662a.75.75 0 0 1-.472.696l-7.25 2.9a.75.75 0 0 1-.557 0l-7.25-2.9A.75.75 0 0 1 0 12.331V3.669a.75.75 0 0 1 .471-.696L7.443.184l.004-.001.274-.11a.75.75 0 0 1 .558 0l.274.11.004.001zm-1.374.527L8 5.962 1.846 3.5 1 3.839v.4l6.5 2.6v7.922l.5.2.5-.2V6.84l6.5-2.6v-.4l-.846-.339Z"/>
  203.                     </svg>
  204.             </th>         <!-- Img -->
  205.                  <!-- Prazo -->
  206.         </tr>
  207.     </thead>
  208.     <tbody>
  209.     {% for item in data %}
  210.         {% set hoje = "now"|date("Y-m-d") %}
  211.         {% set prazo = item.prazo|date("Y-m-d") %}
  212.         {% set dias = (prazo|date("U") - hoje|date("U")) / 86400 %}
  213.         {% if dias < 0 %}
  214.             {% set status = 'vencido' %}
  215.         {% elseif dias <= 2 %}
  216.             {% set status = 'alerta' %}
  217.         {% else %}
  218.             {% set status = 'ok' %}
  219.         {% endif %}
  220.         <tr class="{{ status }}">
  221.             <td class="centro">{{ item.prazo|date("d/m/Y") }}</td>
  222.             <td class="centro">{{ item.fluxo }}</td>
  223.             <td class="centro">{{ item.cliente|upper }}</td>
  224.             <td class="centro">{{ item.imagens| number_format(0, ',', '.') }}</td>
  225.             <td class="centro">{{ item.documentos| number_format(0, ',', '.') }}</td>
  226.             <td class="centro">{{ item.caixas| number_format(0, ',', '.') }}</td>
  227.         </tr>
  228.     {% endfor %}
  229.     </tbody>
  230.     
  231.        <tfoot>
  232.     
  233.         <tr>
  234.             <th class="centro">{{ resumo.nomeMes}}</th>
  235.             <th class="centro">{{ resumo.fluxos| number_format(0, ',', '.') }}</th>
  236.             <th class="centro">{{ resumo.clientes| number_format(0, ',', '.') }}</th>
  237.             <th class="centro">{{ resumo.imagens| number_format(0, ',', '.') }}</th>
  238.             <th class="centro">{{ resumo.documentos| number_format(0, ',', '.') }}</th>
  239.             <th class="centro">{{ resumo.caixas| number_format(0, ',', '.') }}</th>
  240.             
  241.             
  242.         </tr>
  243.     </tfoot>
  244. </table>
  245. <script>
  246. document.addEventListener("DOMContentLoaded", function () {
  247.     const tbody = document.querySelector("tbody");
  248.     let velocidade = 100; // quanto menor, mais rápido
  249.     let direcao = 1;
  250.     setInterval(() => {
  251.         tbody.scrollTop += direcao;
  252.         // chegou no final
  253.         if (tbody.scrollTop + tbody.clientHeight >= tbody.scrollHeight) {
  254.             direcao = -1;
  255.         }
  256.         // voltou ao topo
  257.         if (tbody.scrollTop <= 0) {
  258.             direcao = 1;
  259.         }
  260.     }, velocidade);
  261. });
  262. </script>
  263. <script>
  264. fetch('frases.json')
  265.   .then(r => r.json())
  266.   .then(frases => {
  267.     const hoje = new Date().toISOString().split('T')[0];
  268.     let usadas = JSON.parse(localStorage.getItem('frasesUsadas')) || [];
  269.     let ultimaData = localStorage.getItem('dataFrase');
  270.     // só troca se for outro dia
  271.     if (ultimaData !== hoje) {
  272.       // reinicia se acabou
  273.       if (usadas.length >= frases.length) {
  274.         usadas = [];
  275.       }
  276.       // disponíveis
  277.       const disponiveis = frases.filter(f => !usadas.includes(f));
  278.       const fraseHoje =
  279.         disponiveis[Math.floor(Math.random() * disponiveis.length)];
  280.       usadas.push(fraseHoje);
  281.       localStorage.setItem('frasesUsadas', JSON.stringify(usadas));
  282.       localStorage.setItem('fraseHoje', fraseHoje);
  283.       localStorage.setItem('dataFrase', hoje);
  284.     }
  285.     document.getElementById('frase').innerText =
  286.       localStorage.getItem('fraseHoje');
  287.   });
  288. </script>
  289.  <script>
  290. function ajustarFonte() {
  291.   const frase = document.querySelector('.frase');
  292.   if (!frase) return;
  293.   let tamanho = 36; // px inicial
  294.   frase.style.fontSize = tamanho + 'px';
  295.   while (frase.scrollWidth > frase.clientWidth && tamanho > 14) {
  296.     tamanho--;
  297.     frase.style.fontSize = tamanho + 'px';
  298.   }
  299. }
  300. // chama ao carregar e quando trocar frase
  301. window.addEventListener('load', ajustarFonte);
  302. window.addEventListener('resize', ajustarFonte);
  303. </script>
  304. </body>
  305. </html>