<div class=""><!---Dashboard Incorporadora--->
    <div class="">
        <!--Cabeçalho-->
        <div class="col-md-12">
            <div class="d-flex">
                <label class="my-auto text-value-lg text-primary">Dashboard de Interesses</label>
            </div>
            <hr>
        </div>
        
        <!--<div class="col-md-12">
            <div class="card">
                <div class="card-header d-flex justify-content-between align-items-center">
                    <h5 class="mb-0">Lista de Bairros</h5>
                </div>
                <div class="card-body">
                    <div class="row">
                        <?php for($i=1;$i<=10;$i++){ ?>
                        <div class="col-md-4 col-lg-3">
                            <ul class="list-group mb-4">
                                <li class="list-group-item list-group-item-light">
                                    <h6 class="mb-0">Lago Norte</h5>
                                </li>
                                <li class="list-group-item d-flex justify-content-between align-items-center">
                                    <span class="text-primary">Interesse Compra</span>
                                    <span class="badge badge-primary badge-pill">14</span>
                                </li>
                                <li class="list-group-item d-flex justify-content-between align-items-center">
                                    <span class="text-success">Imóveis Comdono</span>
                                    <span class="badge badge-success badge-pill">2</span>
                                </li>
                            </ul>
                        </div>
                        <?php } ?>
                    </div> 
                </div>
            </div>
        </div>-->
        
        <div class="col-md-12">
            <div class="card">
                <div class="card-header d-flex justify-content-between align-items-center">
                    <h5 class="mb-0">Lista de Interessados</h5>
                    <div class="card-header-actions">
                        <button class="btn btn-block btn-primary btn_open_interesse" type="button">
                            Adicionar novo interesse <i class="fa fa-add" aria-hidden="true"></i>
                        </button>
                    </div>
                </div>
                  
                <div class="card-body">
                    <!--Filtro-->
                    <form id="formFiltrar" class="form-inline">
                        <label class="font-weight-normal" for="inputEmpreendimento">Interesse em:</label>
                        <div class="btn-toolbar d-none d-md-block" role="toolbar" aria-label="Toolbar with buttons">
                            <div class="btn-group btn-group-toggle mx-3" data-toggle="buttons">
                                <label class="btn btn-outline-secondary">
                                    <input class="atualizaFiltro" id="option1" type="radio" name="tipo_interesse" value="compra" autocomplete="off"> Comprar
                                </label>
                                <label class="btn btn-outline-secondary">
                                    <input class="atualizaFiltro" id="option2" type="radio" name="tipo_interesse" value="venda"autocomplete="off" > Vender
                                </label>
                                <label class="btn btn-outline-secondary active">
                                    <input class="atualizaFiltro" id="option3" type="radio" name="tipo_interesse" value="todos" autocomplete="off" checked=""> Todos
                                </label>
                            </div>
                        </div>
                        
                        <label class="font-weight-normal mr-2" for="inputEmpreendimento">Por Bairro:</label>
                        <div class="form-group mr-2">
                            <?php $bairros_select = HBairros::getSelect2()->items;  ?>
                            <select class="form-control atualizaFiltro" style="min-width: 120px;" id="inputEmpreendimento" name="bairro">
                                <option value="">Todos</option>
                                <?php
                                    foreach($bairros_select as $b){
                                        ?><option value="<?php e($b->id) ?>"><?php e($b->text) ?></option> <?php
                                    }
                                  ?>
                            </select>
                        </div>
                        

                        <label class="font-weight-normal mr-2" for="origem">Origem:</label>
                        <div class="form-group mr-2">
                            <select class="form-control atualizaFiltro" style="min-width: 120px;" id="origem" name="origem">
                                <option value="">Todos</option>
                                <option value="painel">Painel CS</option>
                                <option value="externo">Externo</option>
                            </select>
                         </div>
                        
                        <label class="font-weight-normal mr-2" for="inputEmpreendimento">Por Data e Hora:</label>
                        <div class="input-group date dateTimeAgenda mr-2" style="min-width: 120px;">
                            <div class="input-group-prepend">
                                <div class="input-group-text input-group-addon">
                                  <i class="fa fa-calendar" aria-hidden="true"></i>
                                </div>
                            </div>
                            <input type="text" class="form-control atualizaFiltro" id="dataHistorico" name="daterange">
                        </div>
                        <button type="button" class="btn btn-primary my-auto btnFiltar d-none">Filtrar</button>
                        <button type="button" class="btn btn-danger my-auto btn-limpar-filtros d-none">Limpar Filtros</button>
                    </form>
                    
                    <hr>
                    <!--LISTAS-->
                    <table id="tbInteresse" class="display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Nome</th>
                                <th>E-mail</th>
                                <th>Interesse em</th>
                                <th>Bairros</th>
                                <th>Data do interesse</th>
                                <th>Ações</th>
                            </tr>
                        </thead>
                        <tbody>
                            <td><span class="sr-only">Loading...</span></td>
                            <td><span class="sr-only">Loading...</span></td>
                            <td><span class="sr-only">Loading...</span></td>
                            <td><span class="sr-only">Loading...</span></td>
                            <td><span class="sr-only">Loading...</span></td>
                            <td><span class="sr-only">Loading...</span></td>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- Modal --> 
<div class="modal fade" id="editInteresseModal" tabindex="-1" role="dialog" aria-labelledby="editInteresseModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" style="max-width: 800px;" role="document">
<div class="modal-content">
  <div class="modal-header">
    <h4 class="modal-title" id="exampleModalLabel">Editar Interesse</h4>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
  <div class="modal-body">
    <div class="row">
        <div class="col">
            <form class="text-dark form-edit-interesse">
                
                <input class="edit_interesse_id_captura" type="hidden" name="id_captura">
                <input class="edit_interesse_id_interesse" type="hidden" name="id_interesse">
                <input class="edit_interesse_id_cadastro" type="hidden" name="id_cadastro">
                <input class="edit_id_responsavel" type="hidden" name="id_responsavel">
                
                <div class="form-group row">
                    <div class="col-6">
                       <label for="interessadoEM">Interessado em:</label>
                        <select name="tipo_interesse" class="form-control interForm edit_interesse_tipo_interesse" id="interessado10">
                          <option value="compra">Comprar</option>
                          <option value="venda">Vender</option>
                          <option value="comprar e vender">Comprar e vender</option>
                        </select> 
                    </div>
                  <div class="col-6">
                        <label for="interesse0">Tipo de imóvel</label>
                        <select name="tipo_imovel" id="tipo_imovel" class="form-control edit_interesse_tipo_imovel">
                            <option value="">Todos</option>
                            <optgroup label="Apartamento">
                                <option value="Apartamento Padrão">Padrão</option>
                                <option value="Kitnet">Kitnet</option>
                                <option value="Studio">Studio</option>
                                <option value="Loft">Loft</option>
                                <option value="Flat">Flat</option>
                                <option value="Cobertura">Cobertura</option>
                                <option value="Duplex">Duplex</option>
                                <option value="Triplex">Triplex</option>
                            </optgroup>
                            <optgroup label="Casa">
                                <option value="Casa Padrão">Padrão</option>
                                <option value="Casa de Condomínio">Casa de Condomínio</option>
                                <option value="Casa de Vila">Casa de Vila</option>
                            </optgroup>
                            <optgroup label="Outros">
                                <option value="Comercial">Comercial</option>
                                <option value="Rural">Rural</option>
                                <option value="Terreno">Terreno</option>
                                <option value="Vaga de Garagem">Vaga de Garagem</option>
                                </optgroup>
                        </select>
                  </div>
                  
                </div>
                <div class="form-group row">
                    <div class="col-4">
                        <label for="interesse2">Quartos</label>
                        <select name="quartos" class="form-control interForm edit_interesse_quartos" id="interesse1">
                          <option value="0">0</option>
                          <option value="1">1</option>
                          <option value="2">2</option>
                          <option value="3">3</option>
                          <option value="4">4 ou +</option>
                        </select>
                    </div>
                    <div class="col-4">
                        <label for="interesse3" class="col-form-label">Banheiros:</label>
                        <select name="banheiro" class="form-control interForm edit_interesse_banheiro" id="interesse2">
                          <option value="0">0</option>
                          <option value="1">1</option>
                          <option value="2">2</option>
                          <option value="3">3</option>
                          <option value="4">4 ou +</option>
                        </select>                                
                    </div>  
                    <div class="col-4">
                        <label for="interesse4" class="col-form-label">Vagas:</label>
                        <select name="vagas" class="form-control interForm edit_interesse_vagas" id="interesse3">
                          <option value="0">0</option>
                          <option value="1">1</option>
                          <option value="2">2</option>
                          <option value="3">3</option>
                          <option value="4">4 ou +</option>
                        </select>                                    
                    </div> 
                </div>
                <div class="form-group">
                    <label for="interesse97" class="col-form-label">Tipo de empreendimento:</label>
                    <select class="form-control interForm tipo_emp_editar_interesse" name="tipo_emp_cliente[]" multiple="multiple" id="interesse7">
                      <option value="pronto">Pronto</option>
                      <option value="lancamento">Lançamento</option>
                      <option value="Terreno">Terreno</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="interesse5" class="col-form-label">Bairro:</label>
                    <?php $bairros = HBairros::getSelect2()->items;  ?>
                    <select class="form-control interForm bairro_editar_interesse edit_interesse_bairro" name="bairro[]" multiple="multiple" id="interesse4">
                      <option value="Brasília">Brasília</option>
                      <?php
                        foreach($bairros as $b){
                            ?><option value="<?php e($b->id) ?>"><?php e($b->text) ?></option> <?php
                        }
                      ?>
                    </select>
                </div>  
                <div class="form-group">
                    <label for="interesse95" class="col-form-label">Faixa de preço:</label>
                    <div class="row">
                        <div class="col-6 d-flex align-items-center pr-2">
                            De
                            <input name="faixa_preco_inicio" type="text" class="form-control ml-2 interForm faixa_preco_anunciar_interesse edit_interesse_faixa_preco_inicio" id="interesse5">
                        </div>
                        <div class="col-6 d-flex align-items-center pl-0">
                            até
                            <input name="faixa_preco_fim" type="text" class="form-control ml-2 interForm faixa_preco_anunciar_interesse edit_interesse_faixa_preco_fim" id="interesse5">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleFormControlTextarea96">Descrição</label>
                    <textarea name="descricao" class="form-control interForm edit_interesse_descricao" style="resize: none;" id="exampleFormControlTextarea6" rows="2"></textarea>
                </div>
                <button type="button" class="btn btn-block btn-outline-success editInteresse">Salvar</button>
                
                <div class="result_edit_interesse"></div>
            </form>
        </div>
        
    </div>  
  </div>
</div>
</div>
</div>

<!-- Modal --> 
<div class="modal fade" id="addInteresseStep1" tabindex="-1" role="dialog" aria-labelledby="addInteresseStep1Modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" style="max-width: 800px;" role="document">
<div class="modal-content">
  <div class="modal-header">
    <div class="d-flex">
        <h4 class="my-auto mr-2">Cadastro de interesse</h4>
    </div>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
  <div class="modal-body">
    <div class="row">
        <div class="col">
            <form class="text-dark form-add-interesse">
                
                <div class="form group row">
                    <div class="col-6 result_add_interesse_step1 valida_dados_interesse">
                        <label for="nome_add_interesse_step1">Nome:</label>
                        <input name="nome" type="text" class="form-control readonly nome_add_interesse_step1" id="nome_add_interesse_step1">
                    </div>
                    
                    <div class="col-6">
                        <label for="telefone_add_interesse_step1">Telefone:</label>
                        <input name="telefone" type="text" class="form-control readonly telefone_add_interesse_step1" id="telefone_add_interesse_step1">
                    </div>
                </div>
                <div class="form group row">
                    <div class="col-6">
                        <label for="email_add_interesse_step1">E-mail:</label>
                        <input name="email" type="text" class="form-control readonly email_add_interesse_step1" id="email_add_interesse_step1">
                    </div>
                    
                    <div class="col-6 result_add_interesse_step1 valida_dados_interesse">
                        <label for="cpf_add_interesse_step1">CPF:</label>
                        <input name="cpf" type="text" class="form-control readonly cpf_add_interesse_step1" id="cpf_add_interesse_step1">
                    </div>
                </div>
                <div class="form group row result_add_interesse_step1">
                    <div class="col-6">
                        <label for="origem_lead_add_interesse_step1">Origem do lead:</label>
                        <input name="origem_lead" type="text" class="form-control readonly origem_lead_add_interesse_step1" id="origem_lead_add_interesse_step1">
                    </div>
                </div>
                <br>
                <button type="button" class="btn btn-block btn-primary btn_add_interesse_step1">Procurar lead</button>
                
                
                <div class="result_add_interesse_step1">
                    
                    <div class="form-group row">
                        <div class="col-6">
                           <label for="interessadoEM">Interessado em:</label>
                            <select name="tipo_interesse" class="form-control interForm save_interesse_tipo_interesse" id="interessado90">
                              <option value="compra">Comprar</option>
                              <option value="venda">Vender</option>
                              <option value="comprar e vender">Comprar e vender</option>
                            </select> 
                        </div>
                        <div class="col-6">
                            <label for="interesse1">Tipo de imóvel</label>
                            <select name="tipo_imovel" id="tipo_imovel" class="form-control save_interesse_tipo_imovel">
                                <option value="">Todos</option>
                                <optgroup label="Apartamento">
                                    <option value="Apartamento Padrão">Padrão</option>
                                    <option value="Kitnet">Kitnet</option>
                                    <option value="Studio">Studio</option>
                                    <option value="Loft">Loft</option>
                                    <option value="Flat">Flat</option>
                                    <option value="Cobertura">Cobertura</option>
                                    <option value="Duplex">Duplex</option>
                                    <option value="Triplex">Triplex</option>
                                </optgroup>
                                <optgroup label="Casa">
                                    <option value="Casa Padrão">Padrão</option>
                                    <option value="Casa de Condomínio">Casa de Condomínio</option>
                                    <option value="Casa de Vila">Casa de Vila</option>
                                </optgroup>
                                <optgroup label="Outros">
                                    <option value="Comercial">Comercial</option>
                                    <option value="Rural">Rural</option>
                                    <option value="Terreno">Terreno</option>
                                    <option value="Vaga de Garagem">Vaga de Garagem</option>
                                    </optgroup>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-4">
                            <label for="interesse2">Quartos</label>
                            <select name="quartos" class="form-control interForm save_interesse_quartos" id="interesse91">
                              <option value="0">0</option>
                              <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4 ou +</option>
                            </select>
                        </div>
                        <div class="col-4">
                            <label for="interesse3" class="col-form-label">Banheiros:</label>
                            <select name="banheiro" class="form-control interForm save_interesse_banheiro" id="interesse92">
                              <option value="0">0</option>
                              <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4 ou +</option>
                            </select>                                
                        </div>  
                        <div class="col-4">
                            <label for="interesse4" class="col-form-label">Vagas:</label>
                            <select name="vagas" class="form-control interForm save_interesse_vagas" id="interesse93">
                              <option value="0">0</option>
                              <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4 ou +</option>
                            </select>                                    
                        </div> 
                    </div>
                    <div class="form-group">
                        <label for="interesse97" class="col-form-label">Tipo de empreendimento:</label>
                        <select class="form-control interForm tipo_emp_save_interesse" name="tipo_emp_cliente[]" multiple="multiple" id="interesse97">
                          <option value="pronto">Pronto</option>
                          <option value="lancamento">Lançamento</option>
                          <option value="Terreno">Terreno</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="interesse5" class="col-form-label">Bairro:</label>
                        <?php $bairros = HBairros::getSelect2()->items;  ?>
                        <select class="form-control interForm bairro_save_interesse save_interesse_bairro" name="bairro[]" multiple="multiple" id="interesse94">
                          <option value="Brasília">Brasília</option>
                          <?php
                            foreach($bairros as $b){
                                ?><option value="<?php e($b->id) ?>"><?php e($b->text) ?></option> <?php
                            }
                          ?>
                        </select>
                    </div>  
                    <div class="form-group">
                        <label for="interesse95" class="col-form-label">Faixa de preço:</label>
                        <div class="row">
                            <div class="col-6 d-flex align-items-center pr-2">
                                De
                                <input name="faixa_preco_inicio" type="text" class="form-control ml-2 interForm faixa_preco_save_interesse save_interesse_faixa_preco_inicio" id="interesse95">
                            </div>
                            <div class="col-6 d-flex align-items-center pl-0">
                                até
                                <input name="faixa_preco_fim" type="text" class="form-control ml-2 interForm faixa_preco_save_interesse save_interesse_faixa_preco_fim" id="interesse95">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleFormControlTextarea96">Descrição</label>
                        <textarea name="descricao" class="form-control interForm save_interesse_descricao" style="resize: none;" id="exampleFormControlTextarea96" rows="2"></textarea>
                    </div>
                    <button type="button" class="btn btn-block btn-outline-success saveInteresse">Salvar interesse</button>
                </div>
            </form>
        </div>
        
    </div>  
  </div>
</div>
</div>
</div>