<div class="col-lg-12">
	<ul class="timeline">
	    <li class="border-primary">
			<a href="#captura" class="text-primary" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-primary badge-pill"><?php e(count($pre_cadastros)); ?></span> Pré Cadastro - LP 1 
			</a>
			<div class="collapse" id="captura">
			    <div class="table-container table-responsive">
                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>Data cadastro</th>
                                <th>Atendimento Comdono</th>
                                <th>Atendimento</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($pre_cadastros as $pre_cadastro){ ?>
                            <tr>
                                <td><?php e($pre_cadastro->nome) ?></td>
                                <td><?php e(substr(converte_datahora($pre_cadastro->datetime_captura??'',1),0,-3)); ?></td>
                                <td><span class="badge badge-success">Sim</span></td>
                                <td>
                                    <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($pre_cadastro->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($pre_cadastro->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                        <i class="icon-check"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
			</div>
		</li>
		
        <li class="border-danger">
			<a href="#ativacao" class="text-danger" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-danger badge-pill"><?php e(count($prim_visita)); ?></span> Primeira Visita
			</a>
			<div class="collapse" id="ativacao">
			    <div class="table-container table-responsive">
                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>Data do agendamento</th>
                                <th>Atendimento Comdono</th>
                                <th>Corretor</th>
                                <th>Atendimento</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($prim_visita as $p_visita){ ?>
                            <tr>
                                <td><?php e($p_visita->nome); ?></td>
                                <td><?php e(substr(converte_datahora($p_visita->data_hora_agendamento??'',1),0,-3)); ?></td>
                                <td><span class="badge badge-success">Sim</span></td>
                                <td><?php e($p_visita->corretor->nome); ?></td>
                                <td>
                                    <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($p_visita->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($p_visita->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                        <i class="icon-check"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
			</div>
		</li>
		
		<li class="border-danger">
		<a href="#reagendado" class="step-title" data-toggle="collapse" aria-expanded="false">
		    <span class="badge badge-danger badge-pill"><?php e(count($reagendados)) ?></span> Reagendados
		</a>
		<div class="collapse" id="reagendado">
		    <div class="card">
                <div class="card-header">
                    Clientes agendados
                </div>
                <div class="card-body">
    			    <div class="table-container table-responsive">
                        <table class="display table table-hover" style="width:100%">
                            <thead>
                                <tr>
                                    <th>Nome</th>
                                    <th>Data do reagendamento</th>
                                    <th>Atendimento Comdono</th>
                                    <!--<th>Observação</th>-->
                                    <th>Atendimento</th>
                                    
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach($reagendados as $reagendado){ ?>
                                <tr>
                                    <td><?php e($reagendado->nome); ?></td>
                                    <td><?php e(substr(converte_datahora($reagendado->data_hora_agendamento??'',1),0,-3)); ?></td>
                                    <td><span class="badge badge-success">Sim</span></td>
                                    <!--<td></td>-->
                                    <td>
                                        <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($reagendado->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($reagendado->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                            <i class="icon-check"></i>
                                        </button>
                                    </td>
                                </tr>
                                <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
		</div>
	</li>
	
	    <li class="border-warning">
		<a href="#negociacao" class="step-title" data-toggle="collapse" aria-expanded="false">
		    <span class="badge badge-warning badge-pill"><?php e(count($negociacoes)); ?></span> Em Negociação
		</a>
		<div class="collapse" id="negociacao">
		    <div class="card">
		        <div class="card-header">
                    Clientes em negociaçao
                </div>
                <div class="card-body">
    			    <div class="table-container table-responsive">
                        <table class="display table table-hover" style="width:100%">
                            <thead>
                                <tr>
                                    <th>Nome</th>
                                    <th>Data negociação</th>
                                    <th>Unidade</th>
                                    <th>Atendimento</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach($negociacoes as $negociacao){ ?>
                                <tr>
                                    <td><?php e($negociacao->nome??''); ?></td>
                                    <td><?php e(substr(converte_datahora($negociacao->negociacao->data_reserva??'',1),0,-3));; ?></td>
                                    <td><?php e($negociacao->unidade->numero??''); ?></td>
                                    <td>
                                        <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($negociacao->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($negociacao->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                            <i class="icon-check"></i>
                                        </button>
                                    </td>
                                </tr>
                                <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
		</div>
	</li>
    
        <li class="border-warning">
    		<a href="#reserva" class="step-title" data-toggle="collapse" aria-expanded="false">
    		    <span class="badge badge-warning badge-pill"><?php e(count($reservados)) ?></span> Reservados
    		</a>
    		<div class="collapse" id="reserva">
    		    <div class="card">
    		        <div class="card-header">
                        Clientes com reservas
                    </div>
                    <div class="card-body">
        			    <div class="table-container table-responsive">
                            <table class="display table table-hover" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data da reserva</th>
                                        <th>Unidade</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($reservados as $reserva){  ?>
                                    <tr>
                                        <td><?php e($reserva->nome); ?></td>
                                        <td><?php e(substr(converte_datahora($reserva->negociacao->data_reserva??'',1),0,-3));; ?></td>
                                        <td><?php e($reserva->unidade->numero??''); ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($reserva->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($reserva->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
    		</div>
    	</li>
        
        <li class="border-warning">
    		<a href="#em_aprovacao" class="step-title" data-toggle="collapse" aria-expanded="false">
    		    <span class="badge badge-warning badge-pill"><?php e(count($em_aprovacao)); ?></span> Em aprovação
    		</a>
    		<div class="collapse" id="em_aprovacao">
    		    <div class="card">
    		        <div class="card-header">
                        Clientes em aprovação
                    </div>
                    <div class="card-body">
        			    <div class="table-container table-responsive">
                            <table class="display table table-hover" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data da negociação</th>
                                        <th>Unidade</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($em_aprovacao as $em_aprov){ ?>
                                    <tr>
                                        <td><?php e($em_aprov->nome); ?></td>
                                        <td><?php e(substr(converte_datahora($em_aprov->negociacao->data_reserva??'',1),0,-3));; ?></td>
                                        <td><?php e($em_aprov->unidade->numero??''); ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($em_aprov->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($em_aprov->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
    		</div>
    	</li>
        
        <li class="border-success">
    		<a href="#aprovados" class="step-title" data-toggle="collapse" aria-expanded="false">
    		    <span class="badge badge-success badge-pill"><?php e(count($aprovados)); ?></span> Aprovados para venda
    		</a>
    		<div class="collapse" id="aprovados">
    		    <div class="card">
    		        <div class="card-header">
                        Vendas aprovadas
                    </div>
                    <div class="card-body">
        			    <div class="table-container table-responsive">
                            <table class="display table table-hover" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data da aprovação</th>
                                        <th>Unidade</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($aprovados as $aprov){ ?>
                                    <tr>
                                        <td><?php e($aprov->nome); ?></td>
                                        <td><?php e(substr(converte_datahora($aprov->negociacao->data_reserva??'',1),0,-3));; ?></td>
                                        <td><?php e($aprov->unidade->numero??''); ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($aprov->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($aprov->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
    		</div>
    	</li>
        
        <li class="border-dark">
    		<a href="#cancelado" class="step-title" data-toggle="collapse" aria-expanded="false">
    		    <span class="badge badge-dark badge-pill"><?php e(count($cancelados)); ?></span> Cancelados
    		</a>
    		<div class="collapse" id="cancelado">
    		    <div class="card">
    		        <div class="card-header">
                        Cancelamentos
                    </div>
                    <div class="card-body">
        			    <div class="table-container table-responsive">
                            <table class="display table table-hover" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data do cancelamento</th>
                                        <th>Cancelou na Etapa</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($cancelados as $cancelado){ ?>
                                    <tr>
                                        <td><?php e($cancelado->nome); ?></td>
                                        <td><?php e(substr(converte_datahora($cancelado->negociacao->ultima_atualizacao??'',1),0,-3)); ?></td>
                                        <td><?php e($cancelado->historico[1]->status->text) ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($cancelado->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($cancelado->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
    		</div>
    	</li>
        
        <li class="border-dark">
    		<a href="#desistencia" class="step-title" data-toggle="collapse" aria-expanded="false">
    		    <span class="badge badge-dark badge-pill"><?php e(count($desistencias)) ?></span> Desistências
    		</a>
    		<div class="collapse" id="desistencia">
                <div class="card">
                    <div class="card-header">
                        Desistências
                    </div>
                    <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
                        <div class="card-body">
                            <div class="table-container table-responsive">
                                <table class="display table table-hover" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data desistência</th>
                                        <th>Motivo</th>
                                        <th>Justificativa</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($desistencias as $desistencia){ ?>
                                    <tr>
                                        <td><?php e($desistencia->nome) ?></td>
                                        <td><?php e(substr(converte_datahora($desistencia->historico[0]->datetime,1),0,-3)) ?></td>
                                        <td><?php e($desistencia->historico[0]->motivo_agenda) ?></td>
                                        <td><?php e($desistencia->historico[0]->justificativa) ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($desistencia->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($desistencia->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                
    		</div>
    	</li>
		<!--<li class="border-danger">
			<a href="#visitas" class="text-danger" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-danger badge-pill"><?php e(count($visitas)) ?></span> Visita agendada
			</a>
			<div class="collapse" id="visitas">
			    <div class="table-container table-responsive">
                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>Data visita</th>
                                <th>Corretor</th>
                                <th>Status</th>
                                <th>Atendimento</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($visitas as $visita){ ?>
                            <tr>
                                <td><?php e($visita->nome); ?></td>
                                <td><span class="d-none"><?php e($visita->data_hora_agendamento) ?></span> <?php e(substr(converte_datahora($visita->data_hora_agendamento,1),0,-3)); ?></td>
                                <td><?php e($visita->nome_corretor) ?></td>
                                <td><?php e($visita->status_agenda == '0' ? '1ª Visita' : 'Reagendamento') ?></td>
                                <td>
                                    <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($visita->id_origem) ?>" onclick="startFilaAtendimento('agendamento','<?php e($visita->id_origem) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                        <i class="icon-check"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
			</div>
		</li>-->
		<!--<li class="border-warning">
			<a href="#prereserva" class="text-warning" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-warning badge-pill"><?php e(count($pre_reservas)) ?></span> Pré-reserva
			</a>
			<div class="collapse" id="prereserva">
			    <div class="table-container table-responsive">
                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>Data pré-reserva</th>
                                <th>Data Limite</th>
                                <th>Unidade</th>
                                <th>Projeto Arquitetura</th>
                                <th>Atendimento</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($pre_reservas as $pre_reserva){ ?>
                            <tr>
                                <td><?php e($pre_reserva->nome); ?></td>
                                <td><span class="d-none"><?php e($pre_reserva->data_prereserva) ?></span> <?php e(substr(converte_datahora($pre_reserva->data_prereserva,1),0,-3)); ?></td>
                                <td><?php e($pre_reserva->data_limite == '0000-00-00' ? '' : converte_datahora($pre_reserva->data_limite,1)); ?></td>
                                <td><?php e($pre_reserva->unidade); ?></td>
                                <td>
                                    <?php 
                                    if($pre_reserva->projeto_arquitetura == 1){
                                        e($pre_reserva->detalhes_arquitetura);
                                    }else{
                                        e('<span class="badge badge-danger">Não</span>');
                                    }?>
                                </td>
                                <td>
                                    <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($pre_reserva->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($pre_reserva->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                        <i class="icon-check"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
			</div>
		</li>
		<li class="border-warning">
			<a href="#negociacao" class="text-warning" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-warning badge-pill"><?php e(count($negociacoes)); ?></span> Negociação
			</a>
			<div class="collapse" id="negociacao">
			    <div class="table-container table-responsive">
                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>Data negociação</th>
                                <th>Unidade</th>
                                <th>Valor negociação</th>
                                <th>Etapa</th>
                                <th>Atendimento</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($negociacoes as $negociacao){ ?>
                            <tr>
                                <td><?php e($negociacao->nome); ?></td>
                                <td><span class="d-none"><?php e($negociacao->data_prereserva) ?></span> <?php e(substr(converte_datahora($negociacao->data_prereserva,1),0,-3));; ?></td>
                                <td><?php e($negociacao->unidade); ?></td>
                                <td><?php e(money($negociacao->valor_total)); ?></td>
                                <td><?php e($negociacao->status_negociacao == 1 ? 'Cadastro de PF' : 'Pedido de Venda'); ?></td>
                                <td>
                                    <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($negociacao->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($negociacao->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                        <i class="icon-check"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
			</div>
		</li>
		<li class="border-success">
			<a href="#vendas" class="text-success" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-success badge-pill"><?php e(count($vendidos)); ?></span> Vendas
			</a>
			<div class="collapse" id="vendas">
			    <div class="table-container table-responsive">
                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>Data negociação</th>
                                <th>Unidade</th>
                                <th>Valor negociação</th>
                                <th>Atendimento</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach($vendidos as $vendido){ ?>
                            <tr>
                                <td><?php e($vendido->nome); ?></td>
                                <td><span class="d-none"><?php e($vendido->data_prereserva) ?></span> <?php e(substr(converte_datahora($vendido->data_prereserva,1),0,-3));; ?></td>
                                <td><?php e($vendido->unidade); ?></td>
                                <td><?php e(money($vendido->valor_total)); ?></td>
                                <td>
                                    <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($vendido->id_captura) ?>" onclick="startFilaAtendimento('agendamento','<?php e($vendido->id_captura) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                        <i class="icon-check"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
			</div>
		</li>
	    <li class="border-dark text-dark">
			<a href="#desistencia" class="text-dark" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-dark badge-pill"><?php e(count($desistencias_captura) + count($desistencias['visitacao']) + count($desistencias['negociacao'])) ?></span> Desistências
			</a>
			<div class="collapse" id="desistencia">
			    <div class="table-container table-responsive">
			        <div id="accordion">
                      <div class="card">
                        <div class="card-header" id="headingOne">
                          <h5 class="mb-0">
                            <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                             <?php e(count($desistencias_captura)); ?> - Pre Cadastro
                            </button>
                          </h5>
                        </div>
                        
                        <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
                          <div class="card-body">
                            <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data desistência</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($desistencias_captura as $desistiu){ ?>
                                    <tr>
                                        <td><?php e($desistiu->nome) ?></td>
                                        <td><span class="d-none"><?php e($desistiu->ultima_atualizacao) ?></span> <?php e(substr(converte_datahora($desistiu->ultima_atualizacao,1),0,-3)) ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($desistiu->id_origem) ?>" onclick="startFilaAtendimento('desistencia','<?php e($desistiu->id_agenda) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                      <div class="card">
                        <div class="card-header" id="headingTwo">
                          <h5 class="mb-0">
                            <button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                             <?php e(count($desistencias['visitacao'])) ?> - Visitação
                            </button>
                          </h5>
                        </div>
                        <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
                          <div class="card-body">
                            <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data desistência</th>
                                        <th>Etapa de desistência</th>
                                        <th>Motivo</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($desistencias['visitacao'] as $desistiu){ ?>
                                    <tr>
                                        <td><?php e($desistiu->nome) ?></td>
                                        <td><span class="d-none"><?php e($desistiu->ultima_etapa->datetime) ?></span> <?php e(substr(converte_datahora($desistiu->ultima_etapa->datetime,1),0,-3)) ?></td>
                                        <td><?php e($desistiu->ultima_etapa->status->text) ?></td>
                                        <td><?php e($desistiu->justificativa_negociacao == '' ? $desistiu->justificativa : $desistiu->justificativa_negociacao) ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora set_leed" data-id="<?php e($desistiu->id_origem) ?>" onclick="startFilaAtendimento('desistencia','<?php e($desistiu->id_agenda) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                      <div class="card">
                        <div class="card-header" id="headingTwo">
                          <h5 class="mb-0">
                            <button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseTree" aria-expanded="false" aria-controls="collapseTree">
                             <?php e(count($desistencias['negociacao'])) ?> - Negociação
                            </button>
                          </h5>
                        </div>
                        <div id="collapseTree" class="collapse" aria-labelledby="headingTree" data-parent="#accordion">
                          <div class="card-body">
                            <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Nome</th>
                                        <th>Data desistência</th>
                                        <th>Etapa de desistência</th>
                                        <th>Motivo</th>
                                        <th>Atendimento</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($desistencias['negociacao'] as $desistiu){ ?>
                                    <tr>
                                        <td><?php e($desistiu->nome) ?></td>
                                        <td><span class="d-none"><?php e($desistiu->ultima_atualizacao) ?></span> <?php e(converte_datahora($desistiu->ultima_etapa->datetime,1)) ?></td>
                                        <td><?php e($desistiu->ultima_etapa->status->text) ?></td>
                                        <td><?php e($desistiu->justificativa_negociacao) ?></td>
                                        <td>
                                            <button class="btn btn-sm btn-outline-success mr-1 addAtendimentoIncorporadora" data-id="<?php e($desistiu->id_captura) ?>" onclick="startFilaAtendimento('desistencia','<?php e($desistiu->id_agenda) ?>')" data-origem="cad_captura" data-toggle="tooltip" data-original-title="Atendimento completo">
                                                <i class="icon-check"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div>
                </div>
			</div>
		</li>-->
		
<!--                			<li class="border-primary">
			<a href="#cadencia-2" class="text-primary" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-primary badge-pill">14</span> Cadência da Segunda Fase
			</a>
			<div class="collapse" id="cadencia-2">
			    <div id="accordion-2" role="tablist">
			        <?php for($i=1;$i<=5;$i++){ ?>
                    <div class="card mb-0">
                        <div class="card-header" id="heading-<?php e($i) ?>" role="tab">
                            <a href="#ca-2-email-<?php e($i) ?>" class="collapsed" data-toggle="collapse" aria-expanded="false" aria-controls="email-<?php e($i) ?>">
                                E-mail #<?php e($i) ?>
                            </a>
                            <span class="badge badge-pill badge-danger float-right">42</span>
                        </div>
                        <div class="collapse" id="ca-2-email-<?php e($i) ?>" role="tabpanel" aria-labelledby="heading-<?php e($i) ?>" data-parent="#accordion-2">
                            <div class="card-body">
                                <div class="table-container table-responsive">
                                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                                        <thead>
                                            <tr>
                                                <th>Nome</th>
                                                <th>E-mail</th>
                                                <th>Telefone</th>
                                                <th>Data recebimento</th>
                                                <th>Abriu</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php for($x=1;$x<=5;$x++){ ?>
                                            <tr>
                                                <td>Renato Almeida</td>
                                                <td>renatoalmeida@email.com</td>
                                                <td>(61) 99999-99999</td>
                                                <td>26/09/2020</td>
                                                <td>Sim</td>
                                            </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
			</div>
		</li>-->
		
		<!--<li class="border-warning">
			<a href="#cadencia-1" class="text-muted" data-toggle="collapse" aria-expanded="false">
			    <span class="badge badge-warning badge-pill">14</span> Cadência da Primeira Fase
			</a>
			<div class="collapse" id="cadencia-1">
			    <div id="accordion-1" role="tablist">
			        <?php for($i=1;$i<=5;$i++){ ?>
                    <div class="card mb-0">
                        <div class="card-header" id="heading-<?php e($i) ?>" role="tab">
                            <a href="#ca-1-email-<?php e($i) ?>" class="collapsed" data-toggle="collapse" aria-expanded="false" aria-controls="email-<?php e($i) ?>">
                                E-mail #<?php e($i) ?>
                            </a>
                            <span class="badge badge-pill badge-danger float-right">42</span>
                        </div>
                        <div class="collapse" id="ca-1-email-<?php e($i) ?>" role="tabpanel" aria-labelledby="heading-<?php e($i) ?>" data-parent="#accordion-1">
                            <div class="card-body">
                                <div class="table-container table-responsive">
                                    <table class="tbTotais display table table-striped table-bordered" style="width:100%">
                                        <thead>
                                            <tr>
                                                <th>Nome</th>
                                                <th>E-mail</th>
                                                <th>Telefone</th>
                                                <th>Data recebimento</th>
                                                <th>Abriu</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php for($x=1;$x<=5;$x++){ ?>
                                            <tr>
                                                <td>Renato Almeida</td>
                                                <td>renatoalmeida@email.com</td>
                                                <td>(61) 99999-99999</td>
                                                <td>26/09/2020</td>
                                                <td>Sim</td>
                                            </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
			</div>
		</li>-->
	</ul>
</div>