src/Application/Internit/LeadBundle/Resources/views/Product/edit.html.twig line 1

Open in your IDE?
  1. {% extends "@ApplicationInternit/ContentBundle/Resources/views/template/standard_layout.html.twig" %}
  2. {% block javascripts %}
  3.     {{ parent() }}
  4.     <script href="{{ asset('/bundles/applicationinternitcontent/js/multiple-select.min.js') }}"></script>
  5.     <script src="{{ asset('/bundles/applicationinternitcontent/js/canonical.js') }}"></script>
  6.     <style>
  7.         @keyframes spin {
  8.             0% {
  9.                 transform: translate(-50%, -50%) rotate(0deg);
  10.             }
  11.             100% {
  12.                 transform: translate(-50%, -50%) rotate(360deg);
  13.             }
  14.         }
  15.         .kpz-control {
  16.             display: flex;
  17.             justify-content: center;
  18.         }
  19.         .kpz-open-selector {
  20.             border: 0;
  21.             background: transparent;
  22.         }
  23.         .formulario .fieldset {
  24.             display: flex;
  25.             flex-direction: column;
  26.         }
  27.         .kpz-broker-header {
  28.             padding-left: 50px;
  29.             padding-right: 14px;
  30.             display: grid;
  31.             gap: 1rem;
  32.             grid-template-columns: 2.5fr 1fr 1fr;
  33.         }
  34.         .kpz-broker-header p{
  35.             font-size: 14px;
  36.             font-weight: bold;
  37.         }
  38.         .kpz-broker-select {
  39.             flex: 1;
  40.             position: relative;
  41.             padding-left: 50px;
  42.         }
  43.         .kpz-broker-select .loading {
  44.             position: absolute;
  45.             top: 50%;
  46.             left: 50%;
  47.             transform: translate(-50%, -50%);
  48.             animation: spin 1s linear infinite;
  49.         }
  50.         .kpz-broker-select-content {
  51.             overflow: auto;
  52.             max-height: 400px;
  53.         }
  54.         .kpz-broker-select-item-real-state-container {
  55.             display: grid;
  56.             gap: 1rem;
  57.             height: 70px;
  58.             align-items: center;
  59.             grid-template-columns: 2.5fr 1fr 1fr;
  60.             border-top: 2px solid #ffffff;
  61.         }
  62.         .kpz-broker-select-item-real-state {
  63.             display:flex;
  64.             gap: 1rem; 
  65.             align-items: center;
  66.         }
  67.         
  68.         .kpz-broker-select-item-real-state i {
  69.             font-size: 17px;
  70.         }
  71.         .kpz-broker-select-item-real-state span {
  72.             font-size: 13px;
  73.         }
  74.         .kpz-realstate-percent {
  75.             font-size: 13px;
  76.             margin-left: auto;
  77.         }
  78.         .kpz-broker-select-item {
  79.             overflow: hidden;
  80.             max-height: 70px;
  81.         }
  82.         .kpz-broker-select-item.active {
  83.             max-height: 100%;
  84.         }
  85.         .kpz-open-selector:disabled {
  86.             cursor: not-allowed;
  87.         }
  88.         .kpz-open-selector svg {
  89.             transition: all .6s
  90.         }
  91.         .kpz-broker-select-item.active .kpz-open-selector svg {
  92.             transform: rotate(180deg);
  93.         }
  94.         .kpz-broker-select-item-brokers-item {
  95.             display: grid;
  96.             gap: 1rem;
  97.             height: 50px;
  98.             align-items: center;
  99.             grid-template-columns: 2.5fr 1fr 1fr;
  100.             border-top: 2px solid #ffffff;
  101.         }
  102.         .kpz-broker-select-item-broker {
  103.             display:flex;
  104.             gap: 1rem; 
  105.             align-items: center;
  106.         }
  107.         .kpz-broker-select-item-brokers-item i {
  108.             font-size: 17px;
  109.             color: #9a4e22;
  110.         }
  111.         .kpz-broker-select-item-brokers-item span {
  112.             font-size: 13px;
  113.         }
  114.         
  115.     </style>
  116.     <script type="text/javascript">
  117.     function copyToken() {
  118.         /* Get the text field */
  119.         copyText = document.getElementById("tokenIntegration");
  120.         /* Select the text field */
  121.         copyText.select();
  122.         copyText.setSelectionRange(0, 99999); /*For mobile devices*/
  123.         /* Copy the text inside the text field */
  124.         document.execCommand("copy");
  125.     }
  126.     $(document).ready(function() {
  127.         const activeBrokers = [];
  128.         {% for corretor in obj.productUsers %}
  129.             activeBrokers.push('{{ corretor.realEstate.id }}:{{ corretor.user.id }}');
  130.         {% endfor %}
  131.         const multipleSelect = document.querySelector(".broker-select");
  132.         function buildContent(realStates) {
  133.             const realStatePercents = {{ obj.realStatePercentByName|json_encode|raw }};
  134.             return `
  135.                 <div class="kpz-broker-select-content">
  136.                     ${realStates.reduce((realStatesHTML, currentRealState) => realStatesHTML + `
  137.                         <div class="kpz-broker-select-item">
  138.                             <div class="kpz-broker-select-item-real-state-container">
  139.                                 <div class="kpz-broker-select-item-real-state">
  140.                                     <i class="fa fa-building"></i>
  141.                                     <span>${currentRealState.name}</span>
  142.                                     <div class="kpz-realstate-percent">
  143.                                         <input type="number" name="{{ form.vars.name }}[realStatePercents][${convertToCanonical(currentRealState.name)}][percent]" id="realStatePercent-${convertToCanonical(currentRealState.name)}" value="${realStatePercents[currentRealState.name]}" min="0" max="100" />
  144.                                         %
  145.                                     </div>
  146.                                 </div>
  147.                                 <div class="kpz-control">
  148.                                     <input type="checkbox" class="kpz-select-all" />
  149.                                 </div>
  150.                                 <div class="kpz-control">
  151.                                     <button type="button" class="kpz-open-selector"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="#000000" viewBox="0 0 256 256"><path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path></svg></button>
  152.                                 </div>
  153.                             </div>
  154.                             <div class="kpz-broker-select-item-brokers">
  155.                                 ${currentRealState.brokers.reduce((brokerHTML, currentBroker) => brokerHTML + `
  156.                                     <div class="kpz-broker-select-item-brokers-item">
  157.                                         <div class="kpz-broker-select-item-broker">
  158.                                             <i class="far fa-user"></i>
  159.                                             <span>${currentBroker.label}</span>
  160.                                         </div>
  161.                                         <div></div>
  162.                                         <div class="kpz-control">
  163.                                             <input data-value="${currentBroker.value}" type="checkbox" class="kpz-select-one"/>
  164.                                         </div>
  165.                                     </div>
  166.                                 `, "")}
  167.                             </div>
  168.                         </div>
  169.                     `, "")}
  170.                 </div>
  171.             `
  172.         }
  173.         function toggleSelector() {
  174.             const container = this.parentElement.parentElement.parentElement;
  175.             container.classList.toggle("active");
  176.         }
  177.         function verifyAllMarked(target) {
  178.             const container = target.parentElement.parentElement.parentElement.parentElement;
  179.             const selector = container.querySelector(".kpz-select-all");
  180.             const isAllActive = [...container.querySelectorAll(".kpz-select-one")].every(item => item.checked);
  181.             if(isAllActive) {
  182.                 selector.checked = true;
  183.                 container.querySelector(".kpz-open-selector").disabled = true;
  184.                 container.classList.remove("active");
  185.             }
  186.         }
  187.         function selectOne() {
  188.             const value = this.dataset.value;
  189.             multipleSelect.querySelector(`option[value='${value}']`).selected = this.checked;
  190.             verifyAllMarked(this);
  191.             console.log("LOG: ", this.dataset.value, this.checked ? "Marcado": "Desmarcado");
  192.         }
  193.         function selectAll() {
  194.             const container = this.parentElement.parentElement.parentElement;
  195.             container.querySelectorAll(".kpz-select-one").forEach(item => {
  196.                 item.checked = this.checked;
  197.                 item.dispatchEvent(new Event('change', { bubbles: true }));
  198.             })
  199.             container.querySelector(".kpz-open-selector").disabled = this.checked;
  200.             if(this.checked) {
  201.                 container.classList.remove("active");
  202.             }
  203.         }
  204.         function initActions() {
  205.             // Adicionar Eventos
  206.             document.querySelectorAll(".kpz-broker-select-item").forEach((item) => {
  207.                 item.querySelector(".kpz-open-selector").addEventListener("click", toggleSelector);
  208.                 item.querySelector(".kpz-select-all").addEventListener("change", selectAll);
  209.                 item.querySelectorAll(".kpz-select-one").forEach(item => item.addEventListener("change", selectOne));
  210.             })
  211.             // Iniciar Dados
  212.             activeBrokers.forEach(item => {
  213.                 const broker = document.querySelector(`.kpz-broker-select-item .kpz-select-one[data-value='${item}']`)
  214.                 broker.checked = true;
  215.                 broker.dispatchEvent(new Event('change', { bubbles: true }));
  216.             })
  217.         }
  218.         if(multipleSelect) {
  219.             multipleSelect.classList.add("hidden");
  220.             
  221.             const contentContainer = document.querySelector(".kpz-broker-select");
  222.             const realStates = [...multipleSelect.querySelectorAll("optgroup")].map(realEstate => ({
  223.                 name: realEstate.label,
  224.                 brokers: [...realEstate.querySelectorAll("option")].map(broker => ({
  225.                     label: broker.textContent,
  226.                     value: broker.value
  227.                 }))
  228.             }));
  229.             const html = buildContent(realStates);
  230.             contentContainer.innerHTML = html;
  231.             initActions();
  232.         }
  233.         $('#js-submit-form').click(function(e){
  234.             var error = 0;
  235.             var msg = 'Campos obrigatórios não preenchidos:\n';
  236.             $(':input[required]').each(function(){            
  237.                 $(this).css('border','2px solid green');
  238.                 if($(this).val() == ''){
  239.                     msg += '\n' + $(this).next().text();
  240.                     $(this).css('border','2px solid red');
  241.                     if(error == 0)
  242.                         { 
  243.                             $(this).focus(); 
  244.                         }
  245.                     error = 1;
  246.                     
  247.                 }
  248.             });
  249.             if(error == 1) {
  250.                 alert('Campos obrigatórios não foram preenchidos.');        
  251.                 return false;
  252.             }
  253.         });
  254.     });
  255.     </script>    
  256.     {# <script type="text/javascript" src="{{ asset('bundles/applicationinternitlead/js/product-edit.js') }}"></script> #}
  257. {% endblock %}
  258. {% block stylesheets %}
  259.     {{ parent() }}
  260.     <link rel="stylesheet" href="{{ asset('/bundles/applicationinternitcontent/css/formularios.css') }}"/>
  261.     <link rel="stylesheet" href="{{ asset('/bundles/applicationinternitcontent/css/productBundle.css') }}"/>
  262.     <link rel="stylesheet" href="{{ asset('/bundles/applicationinternitcontent/css/multiple-select.min.css') }}"/>
  263. {% endblock %}
  264. {% block sonata_admin_actions %}
  265. sdfsdfsdfsdfsdf
  266. {% endblock %}
  267. {% block title %}
  268.     Edição de campanha
  269. {% endblock %}
  270. {% block sonata_admin_content %}
  271.     <div class="meusDados">
  272.         {% for flashMessage in app.session.flashbag.get('flash_create_success') %}
  273.             <div class="caixa-resposta">
  274.                 <div class="resposta active" id="r-sucess">
  275.                     <i class="far fa-check-circle"></i>
  276.                     <p>Salvo com sucesso</p>
  277.                 </div>
  278.             </div>
  279.         {% endfor %}
  280.         {% for flashMessage in app.session.flashbag.get('flash_create_error') %}
  281.             <div class="caixa-resposta">
  282.                 <div class="resposta active" id="r-error">
  283.                     <i class="far fa-times-circle"></i>
  284.                     <p>{{ flashMessage|raw }}</p>
  285.                 </div>
  286.             </div>
  287.         {% endfor %}
  288.         <div class="titleDefault">
  289.             <div class="group">
  290.                 <h3>Editar Campanha</h3>
  291.                 <a class="btn-voltar" href="{{ path('admin_internit_lead_product_list')}}"><i class="fas fa-arrow-left"></i>Voltar</a>
  292.             </div>
  293.         </div>
  294.         
  295.         <div class="contentProductCreate edit">
  296.                 {{ form_start(form) }}
  297.                     <div class="boxDefault">
  298.                         <div class="my-custom-class-for-errors">
  299.                             {{ form_errors(form) }}
  300.                         </div>
  301.                         <div class="formulario">
  302.                             <div class="fieldset">
  303.                                 <div class="flex">
  304.                                     <div class="col inputBox">
  305.                                         {{ form_widget(form.name) }}
  306.                                         {{ form_label(form.name) }}
  307.                                     </div>
  308.                                 </div>
  309.                                 <div class="flex">
  310.                                     <div class="col inputBox">
  311.                                         {{ form_widget(form.email) }}
  312.                                         {{ form_label(form.email) }}
  313.                                     </div>
  314.                                 </div>
  315.                                 <div class="flex">
  316.                                     <div class="col inputBox">
  317.                                         {{ form_widget(form.description) }}
  318.                                         {{ form_label(form.description) }}
  319.                                     </div>
  320.                                 </div>
  321.                                 <div class="flex">
  322.                                     <div class="col inputBox">
  323.                                         <input readonly id="tokenIntegration" type="text" value="{{ obj.token }}">
  324.                                         <label for="token">Código para implementação:</label>
  325.                                     </div>
  326.                                 </div>
  327.                                 <div class="row row-space">
  328.                                     <div class="col-md-3">
  329.                                         <div class="col inputBox">
  330.                                             {{ form_widget(form.fidelityDays) }}
  331.                                             {{ form_label(form.fidelityDays) }}
  332.                                             
  333.                                         </div>
  334.                                     </div>
  335.                                     <div class="col-md-3">
  336.                                         <div class="col inputBox">
  337.                                             {{ form_widget(form.vivaReal) }}
  338.                                             {{ form_label(form.vivaReal) }}
  339.                                         </div>
  340.                                     </div>
  341.                                     <div class="col-md-3">
  342.                                         <div class="col inputBox">
  343.                                             {{ form_widget(form.zap) }}
  344.                                             {{ form_label(form.zap) }}
  345.                                         </div>
  346.                                     </div>
  347.                                     <div class="col-md-3">
  348.                                         <div class="col inputBox">
  349.                                             {{ form_widget(form.olx) }}
  350.                                             {{ form_label(form.olx) }}
  351.                                         </div>
  352.                                     </div>
  353.                                 </div>
  354.                                 <br>
  355.                                 <div class="flex btns-create">
  356.                                     <div class="flex buttons-create" id="" onclick="copyToken()">
  357.                                         <i class="far fa-copy"></i>
  358.                                         <input type="button" class="" value="Copiar Código">
  359.                                     </div>
  360.                                     <button class="flex buttons-create" type="submit" id="js-submit-form">
  361.                                         <i class="far fa-save"></i>
  362.                                         <span>Salvar</span>
  363.                                     </button>
  364.                                 </div>
  365.                             </div>
  366.                         </div>    
  367.                     </div>
  368.                     <div class="boxDefault">
  369.                         <div class="formulario h-100">
  370.                             <div class="fieldset h-100">
  371.                                 <p class="text-imob">Selecioner a imobiliaria/corretor para recebimento dos leads em rodizio.</p>
  372.                                 {{ form_label(form.productUsers) }}
  373.                                 {{ form_widget(form.productUsers) }}
  374.                                 <div class="kpz-broker-header">
  375.                                     <p>Imobiliária</p>
  376.                                     <p class="text-center">Enviar Todos</p>
  377.                                     <p class="text-center">Escolher Corretor</p>
  378.                                 </div>
  379.                                 <div class="kpz-broker-select">
  380.                                     <svg class="loading" xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#757575" viewBox="0 0 256 256"><path d="M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"></path></svg>
  381.                                 </div>
  382.                             </div>
  383.                         </div>    
  384.                     </div>
  385.                     <div style="display:none;">{{ form_widget(form.realStatePercents) }}</div>
  386.                 {{ form_end(form) }}
  387.             </div>
  388.         </div>
  389.     <div class="meusDados" style="margin-top: 20px;">
  390.         <div class="titleDefault col-12">
  391.             <div class="row">
  392.                 <div class="col-8">
  393.                     <h3>Imobiliárias Ativas </h3>
  394.                     <span class="" style="font-size: 15px">Listagem de Imobiliárias regularmente ativas na campanha e suas estatísticas.</span>
  395.                 </div>
  396.                 <div class="col-4 text-right">
  397.                     <h3>Próximo a receber:</h3>
  398.                     <h5><b>{{ next['imob'] }}</b></h5>
  399.                 </div>
  400.                 <div class="col-12">
  401.                     <table class="table table-striped table-bordered">
  402.                         <thead class="thead-dark">
  403.                         <tr style="font-size: 16px">
  404.                             <th scope="col">#</th>
  405.                             <th scope="col">id</th>
  406.                             <th scope="col">Imobiliária</th>
  407.                             <th scope="col">Porcentagem %</th>
  408.                             <th scope="col">Leads Recebidos</th>
  409.                             <th scope="col">Leads Recebidos + Extra Leads</th>
  410.                             <th scope="col">Extra Leads</th>
  411.                             <th scope="col">Ver Corretores</th>
  412.                             <th scope="col">Primeiro recebido:</th>
  413.                             <th scope="col">Ultimo recebido</th>
  414.                         </tr>
  415.                         </thead>
  416.                         <tbody>
  417.                         {% set totalLeads = 0 %}
  418.                         {% set totalLeadsExtra = 0 %}
  419.                         {% for index,realState in obj.getRealStateProductInfo %}
  420.                             {% if realState['percent'] != 0 %}
  421.                             {% set totalLeads = totalLeads + realState['qtdLeads'] %}
  422.                             {% set totalLeadsExtra = totalLeadsExtra + realState['extraLeads'] %}
  423.                             <tr style="font-size: 16px">
  424.                                 <th scope="row">{{ index+1 }}</th>
  425.                                 <th scope="row">{{ realState['id'] }}</th>
  426.                                 <td>{{ realState['name'] }}</td>
  427.                                 <td><b>{{ realState['percent'] }}</b>%</td>
  428.                                 <td><b>{{ realState['qtdLeads'] }}</b> Leads</td>
  429.                                 <td><b>{{ realState['qtdLeads'] + realState['extraLeads'] }}</b> Leads</td>
  430.                                 <td>
  431.                                     <b>{{ realState['extraLeads'] }}</b> Leads
  432.                                     <a type="button" data-toggle="modal" data-target="#modalExtraLead-{{ realState['id'] }}">
  433.                                          <i class="fas fa-edit"></i>
  434.                                     </a>
  435.                                 </td>
  436.                                 <td class="text-center">
  437.                                     <a href="javascript:void(0)" onclick="openCorretorList({{ realState['id'] }})">
  438.                                         <b>Corretores ({{ realState['corretores']|length }})</b>
  439.                                     </a>
  440.                                 </td>
  441.                                 <td><b>{{ realState['firstLead']|date('d/m/Y H:i:s') }}</b> </td>
  442.                                 <td><b>{{ realState['lastLead']|date('d/m/Y H:i:s') }}</b> </td>
  443.                             </tr>
  444.                             <div class="modal fade" id="modalExtraLead-{{ realState['id'] }}" tabindex="-1" role="dialog">
  445.                                 <div class="modal-dialog" role="document">
  446.                                     <div class="modal-content">
  447.                                         <div class="modal-header">
  448.                                             <h5 class="modal-title">{{ realState['name'] }} - Leads Extra</h5>
  449.                                         </div>
  450.                                         <div class="modal-body">
  451.                                             <br>
  452.                                             <form action="{{ path('admin_internit_lead_product_saveExtraLeads') }}" method="get">
  453.                                                 <input type="hidden" name="realStateId" value="{{ realState['id'] }}">
  454.                                                 <input type="hidden" name="product" value="{{ obj.id }}">
  455.                                                 <div class="form-group">
  456.                                                     <label style="font-size: 12px">Extra Leads</label>
  457.                                                     <input type="number" class="form-control" name="extraLeads" value="{{ realState['extraLeads'] }}">
  458.                                                     <small class="form-text text-muted" style="font-size: 10px">Quantidade de leads a serem adicionados a imobiliária de modo a auxiliar na contabilidade das informações</small>
  459.                                                 </div>
  460.                                                 <br><br>
  461.                                                 <div class="float-right">
  462.                                                     <button type="button" class="btn btn-secondary" data-dismiss="modal">Sair</button>
  463.                                                     <button type="submit" class="btn btn-primary">Atualizar</button>
  464.                                                 </div>
  465.                                             </form>
  466.                                         </div>
  467.                                     </div>
  468.                                 </div>
  469.                             </div>
  470.                             {% endif %}
  471.                         {% endfor %}
  472.                         </tbody>
  473.                     </table>
  474.                 </div>
  475.                 <div class="col-10">
  476.                     <h3>Total de Leads Recebidos: <b>{{ totalLeads }}</b></h3>
  477.                     <h3>Total de Leads + Extra Recebidos: <b>{{ totalLeads+totalLeadsExtra }}</b></h3>
  478.                 </div>
  479.                 <div class="col-2">
  480.                     <a href="{{ path('admin_internit_lead_product_exportLog', {'id': obj.id} )}}" class="btn-export"><i class="fas fa-arrow-down"></i>Exportar Logs</a>                    
  481.                     <a href="{{ path('admin_internit_lead_product_exportLogSended', {'id': obj.id} )}}" class="btn-export"><i class="fas fa-arrow-down"></i>Exportar Logs Distribuição</a>
  482.                 </div>
  483.                 {% for index,realState in obj.getRealStateProductInfo %}
  484.                 <div class="col-12 allCorretoresList" id="corretor-list-{{ realState['id'] }}" style="display: none">
  485.                     <hr>
  486.                     <br>
  487.                     <div class="row">
  488.                         <div class="col-6">
  489.                             <h3> Corretores Ativos - <b>{{ realState['name'] }}</b></h3>
  490.                         </div>
  491.                         {% set lastPosition = 0 %}
  492.                         {% for index,corretor in realState['corretores'] %}
  493.                             {% set lastPosition = index  %}
  494.                         {% endfor %}
  495.                         {% set nextPosition = realState['turn']  %}
  496.                         {% if nextPosition > lastPosition %}
  497.                             {% set nextPosition = 0 %}
  498.                         {% endif %}
  499.                         <div class="col-6 text-right" >
  500.                             <h3> Próximo da fila - (<b>{{ nextPosition + 1 }}</b>)</h3>
  501.                         </div>
  502.                     </div>
  503.                     <table class="table table-striped table-bordered">
  504.                         <thead class="thead-dark">
  505.                         <tr style="font-size: 16px">
  506.                             <th scope="col">Posição na fila</th>
  507.                             <th scope="col">Nome</th>
  508.                             <th scope="col">Email</th>
  509.                             <th scope="col">Qtd Leads Recebidos</th>
  510.                         </tr>
  511.                         </thead>
  512.                         <tbody>
  513.                             {% for index,corretor in realState['corretores'] %}
  514.                                 <tr style="font-size: 16px">
  515.                                     <th scope="row">{{ index + 1 }}</th>
  516.                                     <th scope="row">{{ corretor['name'] }}</th>
  517.                                     <th scope="row">{{ corretor['email'] }}</th>
  518.                                     <th scope="row">{{ corretor['qtdLeads'] }}</th>
  519.                                 </tr>
  520.                             {% endfor %}
  521.                         </tbody>
  522.                     </table>
  523.                 </div>
  524.                 {% endfor %}
  525.             </div>
  526.         </div>
  527.     </div>
  528.     <script>
  529.         let openCorretorList = (realStateId)=>{
  530.             let div = $(`#corretor-list-${realStateId}`)
  531.             let allCorretores = $(`.allCorretoresList`)
  532.             if(div.css('display') === 'none') {
  533.                 allCorretores.css('display', 'none')
  534.                 div.css('display', 'block')
  535.             }else{
  536.                 allCorretores.css('display', 'none')
  537.             }
  538.             const scrollingElement = (document.scrollingElement || document.body);
  539.             scrollingElement.scrollTop = scrollingElement.scrollHeight;
  540.         }
  541.     </script>
  542. {% endblock %}