templates/index/qualidade.html.twig line 1

  1. {% extends '@EasyAdmin/layout.html.twig' %}
  2. {% block title %}ArquivosGED{% endblock %}
  3. {% block header %}
  4. {% endblock header %}
  5. {% block content_header %}
  6. <link rel="stylesheet" type="text/css" href="{{ asset('./css/index.css') }}">
  7. <link rel="shortcut icon" href="{{ asset('./img/icon.png') }}">
  8. <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
  9. {% endblock content_header %}
  10. {% block main %}
  11. <style>
  12.  /* Estilo básico para ocultar as opções não filtradas */
  13. .hidden {
  14.     
  15.     display: none;
  16. }
  17. .table {
  18.     width: 100%; /* Ajusta a largura da tabela */
  19.     border-collapse: collapse; /* Remove espaços entre as bordas */
  20. }
  21. .table thead {
  22.     position: sticky; /* Mantém o cabeçalho fixo no topo */
  23.     top: 0;
  24.     background: white; /* Fundo para visibilidade */
  25.     z-index: 2;
  26. }
  27. .table tbody {
  28.     display: block; /* Torna o tbody um bloco */
  29.     max-height: 300px; /* Define a altura máxima com scroll */
  30.     overflow-y: auto; /* Ativa o scroll vertical */
  31.     width: 100%; /* Garante alinhamento com o thead */
  32.     max-height: 300px;
  33. }
  34. .table tbody tr {
  35.     display: table; /* Garante que os elementos mantenham o estilo de tabela */
  36.     width: 100%; /* Alinha as colunas */
  37.     table-layout: fixed; /* Mantém as larguras das colunas */
  38. }
  39. .table thead tr {
  40.     display: table; /* Garante alinhamento entre thead e tbody */
  41.     width: 100%;
  42.     table-layout: fixed; /* Mantém as larguras das colunas */
  43. }
  44. </style>
  45. {% if xy == 1 %}
  46.     
  47. <form method='post' id="formPdf">> 
  48.     <div class="index">
  49.         <div class = 'iframe'>
  50.             <input type="hidden" value="{{pdf.id}}" name="id_pdf">
  51.              <input type="hidden" value="{{pdf.id}}" name="id_pdf">
  52.             <iframe class = "ifr"  
  53.                 
  54.                 {% if pdf.cliente.extraFields == 'local' %}
  55.                     src="{{link}}"
  56.                 {% endif %}
  57.                 {% if pdf.cliente.extraFields != 'local' %}
  58.                     src="{{all_Url}}"
  59.                 
  60.                 {% endif %}
  61.                 
  62.                 
  63.                 ></iframe>
  64.         </div>
  65.         <div class= 'form'>
  66.                
  67.             {% if erro == 'erro'%}
  68.                     {{p}}
  69.                 {% endif %}
  70.                 {% if erro == 'ok'%}
  71.                     {{p}}
  72.                 {% endif %}
  73.                 <div class="doc">
  74.                                     
  75.                 <button  onclick="showDiv()" id="Login" type="submit" name ='botao_volta' class="btn btn-primary" id='back'>
  76.                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-circle-fill" viewBox="0 0 16 16">
  77.                 <path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0m3.5 7.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5z"/>
  78.                 </svg>
  79.             </button>
  80.                 <h4 class='titulo'>{{ pdf.tipo.nome }}</h4>
  81.                     
  82.                         <label>Descrição(OCR):</label>
  83.                         <div class="form-group">
  84.                         
  85.                         <textarea class="form-control" id="exampleTextarea" rows="3"name= "desc">{{pdf.extraFields}}</textarea>
  86.                     </div>
  87.                     <hr>
  88.                         <label>Nome:</label>
  89.                         <input type="text" class="form-control" name= "nome" value ="{{pdf.nome}}" required>
  90.                     <hr>
  91.                     <label>Assunto:</label>
  92.                         <input type="text" class="form-control" name= "assunto" value ="{{pdf.assunto}}" required>
  93.                     <hr>
  94.                     <label>Palavra-Chave:</label>
  95.                         <input type="text" class="form-control" name= "chave" value ="{{pdf.keywords}}">
  96.                     
  97.                     <hr>    
  98.                     <label>Data Documento:</label>
  99.                         <input type="date" class="form-control" name= "data" {% if pdf.dataDocumento != null %}value ="{{pdf.dataDocumento | date('Y-m-d') }}"{% endif %}>
  100.                     <hr>
  101.             
  102.                     <label>Classificação:</label>
  103.                         <select  id="meuSelect" placeholder="Pesquise" name="classifica" class="form-control">
  104.                                 {% if pdf.classificacao != null %}
  105.                                 <option value="{{pdf.classificacao.id}}" data-texto="{{ pdf.classificacao.faseIntermediaria }}" selected>{{pdf.classificacao.nome}}</option>
  106.                                 {% endif %}
  107.                                 {% if pdf.classificacao == null %}
  108.                                     <option value=""  data-texto=""  selected>Selecione</option>
  109.                                 {% endif %}
  110.                                 {% for classi in class %}
  111.                                     <option value="{{ classi.id }}" data-texto="{{ classi.faseIntermediaria }}">{{ classi.nome }}</option>
  112.                                 {% endfor %}              
  113.                         </select>
  114.                     <hr>
  115.                     <label>Fase Intermediária:</label>
  116.                     <input type="text" id="resultado" name="fase" class="form-control" readonly>
  117.                     <hr>
  118.                     <label>Container:</label>
  119.                         <input type="text" class="form-control" name= "conteiner" value ="{{pdf.conteiner}}">
  120.                     <hr> 
  121.                     <div class='dados_pesq'>
  122.                         <div style="text-align:center">
  123.                             <button type="submit" onclick="showDiv()" id="Login"  class="btn btn-primary" name ='botao_doc'>Salvar</button>&nbsp;&nbsp;
  124.                         </div>
  125.                     </div>
  126.         </div>                    
  127.     </div>    
  128. </form>  
  129.     {% if erro == 'ok' %}
  130.     
  131.     <a href="{{ path('qualidade') }}"><div class="avisos"><img  src="{{ asset('./img/check.gif') }}"><br><y>{{p}}</y></div></a>
  132.     
  133.     {% endif %}
  134.     <script type="text/javascript" src="{{ asset('./js/jquery-2.2.4.min.js') }}"></script>
  135.    </div>     
  136. {% endif %}
  137. {% if xy == 0 %}
  138.     <div>
  139.         <h5 class='titulo'>Controle de Qualidade</h5>
  140.     </div>
  141.     <div>  
  142.             <div>
  143.                 <table class="table table-bordered table-striped">
  144.                     <thead>
  145.                         <tr>
  146.                             <th>Repositor</th>
  147.                             <th>Nome</th>
  148.                             <th>Assunto</th>
  149.                             <th>Data do Envio</th>
  150.                             <th>Data do Indexação</th>
  151.                             <th>Imagen(s)</th>
  152.                             <th>Ação</th>
  153.                         </tr>
  154.                     </thead>    
  155.                     <tbody id="tableBody">
  156.                     {% set doc_null = 0 %}
  157.                     {% for documento in documentos %}
  158.                         
  159.                     
  160.                             {% set doc_null = doc_null + 1  %}
  161.                             <tr>
  162.                                 <td>{{documento.caixa.nome}}</td>
  163.                                 <td>{{documento.nome}}</td>
  164.                                 <td>{{documento.assunto}}</td>
  165.                                 <td>{{documento.createdAt | date('d/m/Y H:i:s') }}</td>
  166.                                 <td>{{documento.indexAt | date('d/m/Y H:i:s') }}</td>
  167.                                 <td>{{documento.qtd}}</td>
  168.                                 
  169.                                 <td>
  170.                             
  171.                                     <form method='post'>
  172.                                         <input type="hidden" name="id" value="{{documento.id}}" /> 
  173.                                         
  174.                                             <button  type="submit" name ='botao_index' class="btn btn-primary" onclick="showDiv()" id="Login"><b>Indexar</b>
  175.                                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-indent-left" viewBox="0 0 16 16">
  176.                                                     <path d="M2 3.5a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m.646 2.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L4.293 8 2.646 6.354a.5.5 0 0 1 0-.708M7 6.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5m0 3a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5m-5 3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/>
  177.                                                 </svg>
  178.                                             </button>
  179.                                     </form>
  180.                                 </td>
  181.                             </tr>
  182.                         
  183.                     {% endfor %}
  184.                     </tbody>
  185.                     <thead>
  186.                         <tr>
  187.                             <th>Total</th>
  188.                         
  189.                         </tr>
  190.                     </thead>
  191.                     <thead>
  192.                         <tr>
  193.                             <th>{{doc_null}}</th>
  194.                         </tr>
  195.                     </thead>
  196.                     </tbody>
  197.                 
  198.                 </table>
  199.             </div>
  200.         
  201.         
  202.         
  203.         
  204.     {% if erro == 'erro'%}
  205.         {{p}}
  206.     {% endif %}
  207.     {% if erro == 'ok' %}
  208.     
  209.     <a href="https://index.arquivosdoc.com.br/index/indexacao/{{id}}" onclick="showDiv()" id="Login"><div class="avisos"><img  src="{{ asset('./img/check.gif') }}"><br><y>{{p}}</y></div></a>
  210.     
  211.     {% endif %}
  212.     <script>
  213.         function confirmSubmission(event) {
  214.             let confirmAction = confirm("Você tem certeza que deseja enviar o conteúdo preenchido? Por favor, revise antes de prosseguir.");
  215.             if (!confirmAction) {
  216.                 event.preventDefault();  // Impede o envio do formulário
  217.             } else {
  218.                 // Se necessário, envie o formulário ou execute outras ações aqui
  219.                 document.querySelector('form').submit();  // Exemplo, caso haja um formulário
  220.             }
  221.         }
  222.     </script>    
  223.     <div id="loadingGif"  style="display:none;">
  224.         <div class ="espera">
  225.             <img  src="{{ asset('./img/carrega.gif') }}">
  226.         </div>  
  227.     </div>    
  228. {% endif %}
  229.  
  230.    
  231.     <!-- Include Select2 JS -->
  232.     <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
  233.     <script>
  234.         $(document).ready(function() {
  235.             $('#searchable-select').select2({
  236.                 placeholder: 'Pesquise',
  237.                 allowClear: true
  238.             });
  239.         });
  240.         $(document).ready(function() {
  241.             $('#searchable-select2').select2({
  242.                 placeholder: 'Pesquise',
  243.                 allowClear: true
  244.             });
  245.         });
  246.     </script> 
  247.     
  248.     <script>
  249.         function atualizarValores() {
  250.             // Obtém o elemento select
  251.             const selectElement = document.getElementById('meuSelect');
  252.             
  253.             // Obtém o valor e o texto personalizados da opção selecionada
  254.             const textoExibido = selectElement.options[selectElement.selectedIndex].getAttribute('data-texto');
  255.             const valor = selectElement.value;
  256.             // Atualiza o valor do input com o texto exibido e valor selecionado
  257.             const resultadoInput = document.getElementById('resultado');
  258.             resultadoInput.value = `${textoExibido}`;
  259.         }
  260.         // Adiciona o evento para que a função seja chamada quando o select mudar
  261.         window.onload = function() {
  262.             const selectElement = document.getElementById('meuSelect');
  263.             selectElement.addEventListener('change', atualizarValores);
  264.             // Atualiza o input inicialmente para o valor padrão
  265.             atualizarValores();
  266.         };
  267.     </script>  
  268. <script>
  269.    function showDiv() {
  270.      document.getElementById('Login').style.display = "none";
  271.      document.getElementById('loadingGif').style.display = "block";
  272.      setTimeout(function() {
  273.        document.getElementById('loadingGif').style.display = "none";
  274.        document.getElementById('Login').style.display = "block";
  275.      },4000);
  276.       
  277.    }
  278.    function showDivshow() {
  279.      document.getElementById('botao').style.display = "none";
  280.      document.getElementById('img').style.display = "none";
  281.      document.getElementById('loading').style.display = "block";
  282.      setTimeout(function() {
  283.        document.getElementById('botao').style.display = "block";
  284.        document.getElementById('loading').style.display = "none";
  285.        document.getElementById('img').style.display = "block";
  286.      },4000);
  287.       
  288.    }
  289.    </script>    
  290.    <script>
  291.     document.getElementById("formPdf").addEventListener("keydown", function(e) {
  292.         if (e.key === "Enter" && e.target.tagName !== "TEXTAREA") {
  293.             e.preventDefault();
  294.             this.submit();
  295.         }
  296.     });
  297.     </script>
  298. {% endblock main %}
  299. {% block content_footer %}
  300. {% endblock content_footer %}