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

Open in your IDE?
  1. {#
  2. {% extends "@ApplicationInternit/ContentBundle/Resources/views/template/standard_layout.html.twig" %}
  3. {% block javascripts %}
  4.     {{ parent() }}
  5.     <script>
  6.         $(document).ready(function() {
  7.             // BOTÕES DE VISUALIZAR E EXPORTAR LEADS.
  8.             // Cada botão deve ter os seguintes atributos:
  9.             // formaction: rota que será chamada.
  10.             // data-group: o grupo de leads que será alvo da operação.
  11.             $('.js-btn-export, .js-view-group').click(function(e) {
  12.                 e.preventDefault();
  13.                 let leadCount = $('.lead').length;
  14.                 let group = '';
  15.                 let showAll = $('#js-all-groups').is(':checked');
  16.                 // se a checkbox de mostrar todos os grupos foi marcada
  17.                 if (! showAll) {
  18.                     // quando há mais de um box de grupo de leads
  19.                     if (leadCount > 1) {
  20.                         group = $(this).attr('data-group');
  21.                     }
  22.                     // quando há apenas um box de grupo na tela, há apenas um botão de exportar
  23.                     else if (leadCount == 1) {
  24.                         group = $('#js-group').val();
  25.                     }
  26.                 }
  27.                 $('#js-group').val(group);
  28.                 let action = $(this).attr('formaction');
  29.                 $('#filtro-leads')
  30.                     .attr('action', action)
  31.                     .submit();
  32.             });
  33.         });
  34.     </script>
  35. {% endblock %}
  36. {% block stylesheets %}
  37.     {{ parent() }}
  38.     <link rel="stylesheet" href="{{ asset('/bundles/applicationinternitcontent/css/productBundle.css') }}"/>    
  39. {% endblock %}
  40. {% block title %}
  41.     Detalhes da campanha
  42. {% endblock %}
  43. {% block sonata_admin_content %}
  44.     <div class="product-list-container show" >
  45.         <div class="titleDefault">
  46.             <div class="group">
  47.                 <h3>Detalhes da campanha</h3>
  48.                 <p>Acompanhe seu desempenho nas campanhas ativas.</p>
  49.             </div>
  50.             <div class="filter">
  51.                 <form id="filtro-leads" method="POST" action="{{ path('admin_internit_lead_product_show',{'id': data.id})}}">
  52.                     <div class="ordenar">
  53.                         <p>De:</p>
  54.                         <input type="date" id="filter-from" name="filter[from]" class="date-filter sonata-medium-date valid" value="{{ filter.from }}">
  55.                     </div>
  56.                     <div class="ordenar">
  57.                         <p>Até:</p>
  58.                         <input type="date" id="filter-to" name="filter[to]" class="date-filter sonata-medium-date valid" value="{{ filter.to }}">
  59.                     </div>
  60.                     <div class="ordenar">
  61.                         <p>Imobiliária:</p>
  62.                         <select class="select-imobiliaria big" name="filter[imob]">
  63.                             <option value="">Selecione</option>
  64.                             {% for imob in imobFilter %}
  65.                                 {% set selected = imob.name == filter['imob'] ? 'selected' : '' %}
  66.                                 <option value="{{imob.name}}" {{ selected }}>{{ imob.name }}</option>
  67.                             {% endfor %}
  68.                         </select>
  69.                     </div>
  70.                     <div class="group">
  71.                         <input type="hidden" value="{{ filter.group }}" name="filter[group]" id="js-group">
  72.                     </div>
  73.                     {% if filter.group is not empty %}                    
  74.                         <div class="ordenar">
  75.                             <label>
  76.                                 <input type="checkbox" name="all-groups" id="js-all-groups">
  77.                                 Todos os grupos
  78.                             </label>
  79.                         </div>
  80.                     {% endif %}
  81.                     <div class="group">
  82.                         <button type="submit" class="button-geral js-view-group" 
  83.                             formaction="{{ path('admin_internit_lead_product_show', {'id': data.id}) }}">Filtrar</button>
  84.                         <button class="button-geral js-btn-export"
  85.                             formaction="{{ path('admin_internit_lead_product_exportFiltered', {'id': data.id}) }}"
  86.                             data-group="">
  87.                             <i class="fas fa-download"></i> Exportar
  88.                         </button>
  89.                     </div>
  90.                 </form>
  91.             </div>
  92.             <div class="btn-action">
  93.                 {% if app.user.hasRole(['ROLE_CONSTRUTORA']) %}
  94.                 <a class="button-geral" href="{{ path('admin_internit_lead_product_edit', {'id': data.id}) }}">
  95.                     <i class="fas fa-edit"></i> Editar Campanha</a>
  96.                 {% endif %}
  97.             </div>
  98.         </div>
  99.         {% set groupLeadsType = getLeadsGroup(data.id, filter) %}
  100.         {% if groupLeadsType|length == 1 %}
  101.             <section class="lead-list active">
  102.                 <div class="title-lead">
  103.                     <div class="title">
  104.                         <h3>Leads</h3>
  105.                         <h2>{{ data.name }} <span class="span-title">- {{ groupLeadsType|first.group }}</span></h2>
  106.                     </div>
  107.                     {% set LeadsType = getLeadsByGroup(data.id, groupLeadsType|first.group, filter) %}
  108.                     <h2><span class="span-leads">Leads Recebidos</span>{{ LeadsType|length }}</h2>
  109.                 </div>
  110.                 <div class="lead">
  111.                     <div class="lead-head">
  112.                         <div class="field big">
  113.                             <p>Nome</p>
  114.                         </div>
  115.                         <div class="field med">
  116.                             <p>E-mail</p>
  117.                         </div>
  118.                         <div class="field small">
  119.                             <p>DDD Celular</p>
  120.                         </div>
  121.                         <div class="field small">
  122.                             <p>Origem</p>
  123.                         </div>
  124.                         <div class="field med">
  125.                             <p>Grupo</p>
  126.                         </div>
  127.                         {% if userGroup == 'Construtora' %}
  128.                             <div>
  129.                                 <p> Corretor </p>
  130.                             </div>
  131.                         {% endif %}
  132.                         <div class="field med">
  133.                             {% if userGroup == 'Construtora' %}
  134.                                 <p> Imobiliária </p>
  135.                             {% else %}
  136.                                 <p>Corretor (e-mail)</p>
  137.                             {% endif %}
  138.                         </div>
  139.                         <div class="field med">
  140.                             <p>Data de Cadastro</p>
  141.                         </div>
  142.                         <div class="field med">
  143.                             <p>Utm Source</p>
  144.                         </div>
  145.                         <div class="field med">
  146.                             <p>Utm Campaign</p>
  147.                         </div>
  148.                         <div class="field med">
  149.                             <p>Utm Medium</p>
  150.                         </div>
  151.                     </div>            
  152.                     <div class="lead-fields">
  153.                         {% for lead in LeadsType %}
  154.                             <div class="lead-field">
  155.                                 <div class="field big">
  156.                                     <span class="span-resp">Nome</span>
  157.                                     <p>{{ lead.name }}</p>
  158.                                 </div>
  159.                                 <div class="field med">
  160.                                     <span class="span-resp">E-mail</span>
  161.                                     <p>{{ lead.email }}</p>
  162.                                 </div>
  163.                                 <div class="field small">
  164.                                     <span class="span-resp">DDD Celular</span>
  165.                                     <p>{{ lead.phone }}</p>
  166.                                 </div>
  167.                                 <div class="field small">
  168.                                     <span class="span-resp">Origem</span>
  169.                                     <p>{{ lead.origem }}</p>
  170.                                 </div>
  171.                                 <div class="field med">
  172.                                     <span class="span-resp">Grupo</span>
  173.                                     <p>{{ lead.group }}</p>
  174.                                 </div>
  175.                                 <div class="field med">
  176.                                     {% if userGroup == 'Construtora' %}
  177.                                         <p>{{ lead.brokerEmail }}</p>
  178.                                     {% endif %}
  179.                                 </div>
  180.                                 <div class="field med">
  181.                                     {% if userGroup == 'Construtora' %}
  182.                                         <span class="span-resp">Imobiliária</span>
  183.                                         <p>{{ lead.brokerRealState }}</p>
  184.                                     {% else %}
  185.                                         <span class="span-resp">Corretor (e-mail)</span>
  186.                                         <p>{{ lead.brokerEmail }}</p>
  187.                                     {% endif %}
  188.                                 </div>
  189.                                 <div class="field med">
  190.                                     <span class="span-resp">Data de Cadastro</span>
  191.                                     <p>{{ lead.createdAt|date('d-m-Y H:i:s') }}</p>
  192.                                 </div>
  193.                                 <div class="field med">
  194.                                     <span class="span-resp">Utm Source</span>
  195.                                     <p>{{ lead.utm_source }}</p>
  196.                                 </div>
  197.                                 <div class="field med">
  198.                                     <span class="span-resp">Utm Campaign</span>
  199.                                     <p>{{ lead.utm_campaign }}</p>
  200.                                 </div>
  201.                                 <div class="field med">
  202.                                     <span class="span-resp">Utm Medium</span>
  203.                                     <p>{{ lead.utm_medium }}</p>
  204.                                 </div>
  205.                             </div>
  206.                         {% endfor %}
  207.                     </div>
  208.                 </div>
  209.             </section>
  210.         {% elseif groupLeadsType|length > 1 %}
  211.             <section class="lead-list second-option active">
  212.                 {% for groupLead in groupLeadsType %}
  213.                 {% set LeadsType = getLeadsByGroup(data.id, groupLead.group,filter) %}
  214.                     <div class="lead">
  215.                         <div class="title-lead">
  216.                             <div class="title-1">
  217.                                 <div class="title">
  218.                                     <h3>Leads</h3>
  219.                                     <h2>{{ data.name }}</h2>
  220.                                     <span class="span-title">{{ groupLead.group }}</span>
  221.                                 </div>
  222.                                 <div class="btn-action">
  223.                                     <button class="button-geral button-add js-view-group"
  224.                                         formaction="{{ path('admin_internit_lead_product_show', {'id': data.id}) }}"
  225.                                         data-group="{{ groupLead.group }}">
  226.                                         <i class="fas fa-eye"></i> Visualizar
  227.                                     </button>
  228.                                     <button class="button-geral js-btn-export" 
  229.                                         formaction="{{ path('admin_internit_lead_product_exportFiltered', {'id': data.id}) }}"
  230.                                         data-group="{{ groupLead.group }}">
  231.                                         <i class="fas fa-download"></i> Exportar
  232.                                     </button>
  233.                                 </div>
  234.                             </div>
  235.                         </div>
  236.                         <div class="lead-body">
  237.                             <div class="lead-head">
  238.                                 <div class="field">
  239.                                     <p>Nome</p>
  240.                                 </div>
  241.                                 <div class="field">
  242.                                     <p>E-mail</p>
  243.                                 </div>
  244.                                 <div class="field">
  245.                                     <p>Grupo</p>
  246.                                 </div>
  247.                             </div>        
  248.                             <div class="lead-fields-container">    
  249.                                 <div class="lead-fields">
  250.                                     {% for lead in LeadsType %}
  251.                                     <div class="lead-field">
  252.                                         <div class="field">
  253.                                             <span class="span-resp">Nome</span>
  254.                                             <p>{{ lead.name }}</p>
  255.                                         </div>
  256.                                         <div class="field">
  257.                                             <span class="span-resp">E-mail</span>
  258.                                             <p>{{ lead.email }}</p>
  259.                                         </div>
  260.                                     </div>
  261.                                     {% endfor %}
  262.                                 </div>
  263.                             </div>
  264.                         </div>
  265.                         <div class="foot-lead">
  266.                             <h2><span class="span-leads">Leads Recebidos</span>{{ LeadsType|length }}</h2>
  267.                         </div>
  268.                     </div>
  269.                     {% endfor %}
  270.                 </section>
  271.         {% else %}
  272.             <p>Nenhum Lead encontrado</p>
  273.         {% endif %}
  274.     </div>
  275. {% endblock %}#}
  276. {% extends "@ApplicationInternit/ContentBundle/Resources/views/template/standard_layout.html.twig" %}
  277. {% block stylesheets %}
  278.     {{ parent() }}
  279.     <link rel="stylesheet" href="{{ asset('/bundles/applicationinternitcontent/css/productBundle.css') }}"/>
  280.     <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.2/css/bulma.min.css"/>
  281.     <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bm/jszip-2.5.0/dt-1.11.4/af-2.3.7/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/date-1.1.1/fc-4.0.1/fh-3.2.1/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sb-1.3.1/sp-1.4.0/sl-1.3.4/datatables.min.css"/>
  282.     <style>
  283.         table.dataTable td {
  284.             font-size: 1em;
  285.         }
  286.         th { font-size: 80%; }
  287.         tr { font-size: 90%; }
  288.     </style>
  289. {% endblock %}
  290. {% block javascripts %}
  291.     {{ parent() }}
  292.     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
  293.     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
  294.     <script type="text/javascript" src="https://cdn.datatables.net/v/bm/jszip-2.5.0/dt-1.11.4/af-2.3.7/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/date-1.1.1/fc-4.0.1/fh-3.2.1/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sb-1.3.1/sp-1.4.0/sl-1.3.4/sr-1.1.0/datatables.min.js"></script>
  295.     <script>
  296.         $(document).ready(function() {
  297.             $('.mark-beta').css('margin-top', '20px')
  298.             // BOTÕES DE VISUALIZAR E EXPORTAR LEADS.
  299.             // Cada botão deve ter os seguintes atributos:
  300.             // formaction: rota que será chamada.
  301.             // data-group: o grupo de leads que será alvo da operação.
  302.             $('.js-btn-export, .js-view-group').click(function(e) {
  303.                 e.preventDefault();
  304.                 let leadCount = $('.lead').length;
  305.                 let group = '';
  306.                 let showAll = $('#js-all-groups').is(':checked');
  307.                 // se a checkbox de mostrar todos os grupos foi marcada
  308.                 if (! showAll) {
  309.                     // quando há mais de um box de grupo de leads
  310.                     if (leadCount > 1) {
  311.                         group = $(this).attr('data-group');
  312.                     }
  313.                     // quando há apenas um box de grupo na tela, há apenas um botão de exportar
  314.                     else if (leadCount == 1) {
  315.                         group = $('#js-group').val();
  316.                     }
  317.                 }
  318.                 $('#js-group').val(group);
  319.                 let action = $(this).attr('formaction');
  320.                 $('#filtro-leads')
  321.                         .attr('action', action)
  322.                         .submit();
  323.             });
  324.             var table = $('.dataTable').DataTable({
  325.                 "scrollX": true,
  326.                 //"scrollY":        "500px",
  327.                 // "scrollCollapse": true,
  328.                 //"paging":         true,
  329.                 "order": [[ 7, "desc" ]],
  330.                 "columnDefs": [
  331.                     { "visible": false, "targets": 8 },
  332.                     { "visible": false, "targets": 9 },
  333.                     { "visible": false, "targets": 10 },
  334.                 ],
  335.                 "pageLength": 10,
  336.                 "language": {
  337.                     "lengthMenu": "Exibindo _MENU_ resultados por pagina",
  338.                     "zeroRecords": "Nenhum Resultado Encontrado",
  339.                     "info": "Exibindo pagina _PAGE_ de _PAGES_",
  340.                     "infoEmpty": "Não há registros disponíveis",
  341.                     "infoFiltered": "(filtrado de _MAX_ registros totais)",
  342.                     'search': "Buscar",
  343.                 }
  344.             });
  345.             $('#DataTables_Table_0_length').find('label').find('div').replaceWith($('#DataTables_Table_0_length').find('select'))
  346.             //$('#DataTables_Table_0_length').css('font-size', '15px')
  347.             $('div.dataTables_filter input').css('font-size', '70%');
  348.             $('.dataTables_filter').find('label').append(`
  349.             <select class="custom-select custom-select-sm form-control form-control-sm show-collums" style="width: 120px">
  350.                         <option value="-1" selected disabled>Colunas</option>
  351.                         <optgroup label="Exibindo" class="show-collums-show">
  352.                               <option value="0">Nome</option>
  353.                             <option value="1">Email</option>
  354.                             <option value="2">Telefone</option>
  355.                             <option value="3">Corretor (e-mail)</option>
  356.                             <option value="4">Imobilíaria</option>
  357.                             <option value="5">Origem</option>
  358.                             <option value="6">Grupo</option>
  359.                             <option value="7">Data de Cadastro</option>
  360.                         </optgroup>
  361.                         <optgroup label="Oculto" class="show-collums-hide">
  362.                             <option value="8">Utm Source</option>
  363.                             <option value="9">Utm Campaign</option>
  364.                             <option value="10">Utm Medium</option>
  365.                         </optgroup>
  366.                     </select>`)
  367.             $('.show-collums').on('change', function (e){
  368.                 var columnNum = $(this).val()
  369.                 var column = table.column( columnNum );
  370.                 if(column.visible()){
  371.                     column.visible( false );
  372.                     var option = $(`.show-collums-show option[value="${columnNum}"]`)
  373.                     $(`.show-collums-hide`).append(option.clone())
  374.                     option.remove()
  375.                     alphabetizeList('.show-collums-hide');
  376.                 }else{
  377.                     column.visible( true );
  378.                     var option = $(`.show-collums-hide option[value="${columnNum}"]`)
  379.                     $(`.show-collums-show`).append(option.clone())
  380.                     option.remove()
  381.                     alphabetizeList('.show-collums-show');
  382.                 }
  383.                 $(this).val('-1')
  384.             })
  385.             function alphabetizeList(listField) {
  386.                 var sel = $(listField);
  387.                 var selected = sel.val(); // cache selected value, before reordering
  388.                 var opts_list = sel.find('option');
  389.                 opts_list.sort(function (a, b) {
  390.                     return $(a).val() > $(b).val() ? 1 : -1;
  391.                 });
  392.                 sel.html('').append(opts_list);
  393.                 sel.val(selected); // set cached selected value
  394.             }
  395.         });
  396.     </script>
  397. {% endblock %}
  398. {% block title %}
  399.     Detalhes da campanha
  400. {% endblock %}
  401. {% block sonata_admin_content %}
  402.     <div class="product-list-container show" >
  403.         <div class="titleDefault">
  404.             <div class="group">
  405.                 <h3>Detalhes da campanha</h3>
  406.                 <p>Acompanhe seu desempenho nas campanhas ativas.</p>
  407.             </div>
  408.             <div class="filter">
  409.                 <form id="filtro-leads" method="POST" action="{{ path('admin_internit_lead_product_show',{'id': data.id})}}">
  410.                     <div class="ordenar">
  411.                         <p>De:</p>
  412.                         <input type="date" id="filter-from" name="filter[from]" class="date-filter sonata-medium-date valid" value="{{ filter.from }}">
  413.                     </div>
  414.                     <div class="ordenar">
  415.                         <p>Até:</p>
  416.                         <input type="date" id="filter-to" name="filter[to]" class="date-filter sonata-medium-date valid" value="{{ filter.to }}">
  417.                     </div>
  418.                     <div class="ordenar">
  419.                         <p>Imobiliária:</p>
  420.                         <select class="select-imobiliaria big" name="filter[imob]">
  421.                             <option value="">Selecione</option>
  422.                             {% for imob in imobFilter %}
  423.                                 {% set selected = imob.name == filter['imob'] ? 'selected' : '' %}
  424.                                 <option value="{{imob.name}}" {{ selected }}>{{ imob.name }}</option>
  425.                             {% endfor %}
  426.                         </select>
  427.                     </div>
  428.                     <div class="ordenar">
  429.                         <p>Usuários:</p>
  430.                         <select class="select-user big" name="filter[user]">
  431.                             <option value="">Selecione</option>
  432.                             {% for user in userFilter %}
  433.                                 {% set selected = user.name == filter['user'] ? 'selected' : '' %}
  434.                                 <option value="{{user.name}}" {{ selected }}>{{ user.name }}</option>
  435.                             {% endfor %}
  436.                         </select>
  437.                     </div>
  438.                     <div class="group">
  439.                         <input type="hidden" value="{{ filter.group }}" name="filter[group]" id="js-group">
  440.                     </div>
  441.                     {% if filter.group is not empty %}
  442.                         <div class="ordenar">
  443.                             <label>
  444.                                 <input type="checkbox" name="all-groups" id="js-all-groups">
  445.                                 Todos os grupos
  446.                             </label>
  447.                         </div>
  448.                     {% endif %}
  449.                     <div class="group">
  450.                         <button type="submit" class="button-geral js-view-group"
  451.                                 formaction="{{ path('admin_internit_lead_product_show', {'id': data.id}) }}">Filtrar</button>
  452.                         <button class="button-geral js-btn-export"
  453.                                 formaction="{{ path('admin_internit_lead_product_exportFiltered', {'id': data.id}) }}"
  454.                                 data-group="">
  455.                             <i class="fas fa-download"></i> Exportar
  456.                         </button>
  457.                         <div class="btn-action">
  458.                             {% if app.user.hasRole(['ROLE_CONSTRUTORA']) %}
  459.                                 <a class="button-geral" href="{{ path('admin_internit_lead_product_edit', {'id': data.id}) }}">
  460.                                     <i class="fas fa-edit"></i> Editar Campanha</a>
  461.                             {% endif %}
  462.                         </div>
  463.                     </div>
  464.                 </form>
  465.             </div>
  466.         </div>
  467.         {% set groupLeadsType = getLeadsGroup(data.id, filter) %}
  468.         {% if groupLeadsType|length == 1 %}
  469.             <section class="lead-list active">
  470.                 <div class="title-lead">
  471.                     <div class="title">
  472.                         <h3>Leads</h3>
  473.                         <h2>{{ data.name }} <span class="span-title">- {{ groupLeadsType|first.group }}</span></h2>
  474.                     </div>
  475.                     <div>
  476.                         {% set LeadsType = getLeadsByGroup(data.id, groupLeadsType|first.group, filter) %}
  477.                         <h2><span class="span-leads">Leads Recebidos</span>{{ LeadsType|length }}</h2>
  478.                     </div>
  479.                 </div>
  480.                 <hr>
  481.                 <br>
  482.                 <div class="lead" style="margin-right: 20px; margin-left: 20px;">
  483.                     {# nowrap #}
  484.                     <table class="display nowrap dataTable " style="width:100%">
  485.                         {# style="font-size: 80%;" #}
  486.                         <thead >
  487.                         {#<tr>
  488.                                 <th rowspan="1"></th>
  489.                                 <th colspan="7"></th>
  490.                                 <th colspan="7"></th>
  491.                             </tr>#}
  492.                         <tr>
  493.                             <th>Nome</th>
  494.                             <th>E-mail</th>
  495.                             <th>Telefone</th>
  496.                             <th>Corretor (e-mail)</th>
  497.                             {% if userGroup == 'Construtora' %}
  498.                             <th>Imobiliária</th>
  499.                             {% endif %}
  500.                             <th>Origem</th>
  501.                             <th>Grupo</th>
  502.                             <th>Data de Cadastro</th>
  503.                             <th>Utm Source</th>
  504.                             <th>Utm Campaign</th>
  505.                             <th>Utm Medium</th>
  506.                         </tr>
  507.                         </thead>
  508.                         <tbody>
  509.                         {% for lead in LeadsType %}
  510.                             {% for i in 0..0 %}
  511.                                 <tr>
  512.                                     <td>{{ lead.name }}</td>
  513.                                     <td>{{ lead.email }}</td>
  514.                                     <td>{{ lead.phone }}</td>
  515.                                     <td>{{ lead.brokerEmail }}</td>
  516.                                     {% if userGroup == 'Construtora' %}
  517.                                     <td>{{ lead.brokerRealState }}</td>
  518.                                     {% endif %}
  519.                                     <td>{{ lead.origem }}</td>
  520.                                     <td>{{ lead.group }}</td>
  521.                                     <td><span style="display: none">{{ lead.createdAt|date('YmdHis') }}</span>{{ lead.createdAt|date('d/m/Y H:i:s') }}</td>                                     <td>{{ lead.utm_source }}</td>
  522.                                     <td>{{ lead.utm_campaign }}</td>
  523.                                     <td>{{ lead.utm_medium }}</td>
  524.                                 </tr>
  525.                             {% endfor %}
  526.                         {% endfor %}
  527.                         </tbody>
  528.                         <tfoot>
  529.                         <tr>
  530.                             <th>Nome</th>
  531.                             <th>E-mail</th>
  532.                             <th>Telefone</th>
  533.                             <th>Corretor (e-mail)</th>
  534.                             {% if userGroup == 'Construtora' %}
  535.                                 <th>Imobiliária</th>
  536.                             {% endif %}
  537.                             <th>Origem</th>
  538.                             <th>Grupo</th>
  539.                             <th>Data de Cadastro</th>
  540.                             <th>Utm Source</th>
  541.                             <th>Utm Campaign</th>
  542.                             <th>Utm Medium</th>
  543.                         </tr>
  544.                         </tfoot>
  545.                     </table>
  546.                 </div>
  547.                 {#    <div class="lead">
  548.                     <div class="lead-head">
  549.                         <div class="field big">
  550.                             <p>Nome</p>
  551.                         </div>
  552.                         <div class="field med">
  553.                             <p>E-mail</p>
  554.                         </div>
  555.                         <div class="field small">
  556.                             <p>DDD Celular</p>
  557.                         </div>
  558.                         <div class="field small">
  559.                             <p>Origem</p>
  560.                         </div>
  561.                         <div class="field med">
  562.                             <p>Grupo</p>
  563.                         </div>
  564.                         <div class="field med">
  565.                             {% if userGroup == 'Construtora' %}
  566.                                 <p> Imobiliária </p>
  567.                             {% else %}
  568.                                 <p>Corretor (e-mail)</p>
  569.                             {% endif %}
  570.                         </div>
  571.                         <div class="field med">
  572.                             <p>Data de Cadastro</p>
  573.                         </div>
  574.                         <div class="field med">
  575.                             <p>Utm Source</p>
  576.                         </div>
  577.                         <div class="field med">
  578.                             <p>Utm Campaign</p>
  579.                         </div>
  580.                         <div class="field med">
  581.                             <p>Utm Medium</p>
  582.                         </div>
  583.                     </div>
  584.                     <div class="lead-fields">
  585.                         {% for lead in LeadsType %}
  586.                             <div class="lead-field">
  587.                                 <div class="field big">
  588.                                     <span class="span-resp">Nome</span>
  589.                                     <p>{{ lead.name }}</p>
  590.                                 </div>
  591.                                 <div class="field med">
  592.                                     <span class="span-resp">E-mail</span>
  593.                                     <p>{{ lead.email }}</p>
  594.                                 </div>
  595.                                 <div class="field small">
  596.                                     <span class="span-resp">DDD Celular</span>
  597.                                     <p>{{ lead.phone }}</p>
  598.                                 </div>
  599.                                 <div class="field small">
  600.                                     <span class="span-resp">Origem</span>
  601.                                     <p>{{ lead.origem }}</p>
  602.                                 </div>
  603.                                 <div class="field med">
  604.                                     <span class="span-resp">Grupo</span>
  605.                                     <p>{{ lead.group }}</p>
  606.                                 </div>
  607.                                 <div class="field med">
  608.                                     {% if userGroup == 'Construtora' %}
  609.                                         <span class="span-resp">Imobiliária</span>
  610.                                         <p>{{ lead.brokerRealState }}</p>
  611.                                     {% else %}
  612.                                         <span class="span-resp">Corretor (e-mail)</span>
  613.                                         <p>{{ lead.brokerEmail }}</p>
  614.                                     {% endif %}
  615.                                 </div>
  616.                                 <div class="field med">
  617.                                     <span class="span-resp">Data de Cadastro</span>
  618.                                     <p>{{ lead.createdAt|date('d-m-Y H:i:s') }}</p>
  619.                                 </div>
  620.                                 <div class="field med">
  621.                                     <span class="span-resp">Utm Source</span>
  622.                                     <p>{{ lead.utm_source }}</p>
  623.                                 </div>
  624.                                 <div class="field med">
  625.                                     <span class="span-resp">Utm Campaign</span>
  626.                                     <p>{{ lead.utm_campaign }}</p>
  627.                                 </div>
  628.                                 <div class="field med">
  629.                                     <span class="span-resp">Utm Medium</span>
  630.                                     <p>{{ lead.utm_medium }}</p>
  631.                                 </div>
  632.                             </div>
  633.                         {% endfor %}
  634.                     </div>
  635.                 </div>#}
  636.             </section>
  637.         {% elseif groupLeadsType|length > 1 %}
  638.             <section class="lead-list second-option active">
  639.                 {% for groupLead in groupLeadsType %}
  640.                     {% set LeadsType = getLeadsByGroup(data.id, groupLead.group,filter) %}
  641.                     <div class="lead">
  642.                         <div class="title-lead">
  643.                             <div class="title-1">
  644.                                 <div class="title">
  645.                                     <h3>Leads</h3>
  646.                                     <h2>{{ data.name }}</h2>
  647.                                     <span class="span-title">{{ groupLead.group }}</span>
  648.                                 </div>
  649.                                 <div class="btn-action">
  650.                                     <button class="button-geral button-add js-view-group"
  651.                                             formaction="{{ path('admin_internit_lead_product_show', {'id': data.id}) }}"
  652.                                             data-group="{{ groupLead.group }}">
  653.                                         <i class="fas fa-eye"></i> Visualizar
  654.                                     </button>
  655.                                     <button class="button-geral js-btn-export"
  656.                                             formaction="{{ path('admin_internit_lead_product_exportFiltered', {'id': data.id}) }}"
  657.                                             data-group="{{ groupLead.group }}">
  658.                                         <i class="fas fa-download"></i> Exportar
  659.                                     </button>
  660.                                 </div>
  661.                             </div>
  662.                         </div>
  663.                         <div class="lead-body">
  664.                             <div class="lead-head">
  665.                                 <div class="field">
  666.                                     <p>Nome</p>
  667.                                 </div>
  668.                                 <div class="field">
  669.                                     <p>E-mail</p>
  670.                                 </div>
  671.                                 <div class="field">
  672.                                     <p>Grupo</p>
  673.                                 </div>
  674.                             </div>
  675.                             <div class="lead-fields-container">
  676.                                 <div class="lead-fields">
  677.                                     {% for lead in LeadsType %}
  678.                                         <div class="lead-field">
  679.                                             <div class="field">
  680.                                                 <span class="span-resp">Nome</span>
  681.                                                 <p>{{ lead.name }}</p>
  682.                                             </div>
  683.                                             <div class="field">
  684.                                                 <span class="span-resp">E-mail</span>
  685.                                                 <p>{{ lead.email }}</p>
  686.                                             </div>
  687.                                         </div>
  688.                                     {% endfor %}
  689.                                 </div>
  690.                             </div>
  691.                         </div>
  692.                         <div class="foot-lead">
  693.                             <h2><span class="span-leads">Leads Recebidos</span>{{ LeadsType|length }}</h2>
  694.                         </div>
  695.                     </div>
  696.                 {% endfor %}
  697.             </section>
  698.         {% else %}
  699.             <p>Nenhum Lead encontrado</p>
  700.         {% endif %}
  701.     </div>
  702.     <br><br><br><br>
  703. {% endblock %}