<?php $render('header', ['loggedUser'=>$loggedUser, 'title'=>$titlePage]); ?>
<?=$render('sidebar', [
  'loggedUser'=>$loggedUser, 
  'pageActive'=>$pageActive,
  'permissions'=>$permissions
]);?>

<!-- Content System -->
<div class="content-wrapper" id="view_ready">
  <div class="pages">
    <h3>Visualizar Interação</h3>
    <div class="users">

      <div class="areas">

        <div class="interation-area">
          
          <div class="form-row" style="display:none;">
            <input type="hidden" name="conversation" value="<?= $client['info']['id']; ?>">
          </div>

          <div class="form-row" style="align-items: baseline;">
            <h4>Cliente: </h4> <h5 style="margin-left:7px"><?= $client['client']['name']; ?></h5> <h6 style="margin-left:7px"><?= $client['type_name']; ?></h6>
          </div>

          <div class="form-group">
            <textarea class="form-control" name="text_interation" rows="7" placeholder="Digite aqui..."></textarea>
          </div>

          <div class="form-group">
            <button class="btn btn-success" id="save-in-edit" >Salvar</button>
            <a href="<?= $base; ?>/crm" class="btn btn-info">Voltar</a>
          </div>
        </div>

        <div class="info-area">
          <div class="form-group">
            <label>
              Data
              <input type="text" readonly value="<?= $date; ?>" class="form-control">
            </label>
          </div>

          <div class="form-group">
            <label>
              Data Próxima Interação
              <input type="date" name="date_next" id="date_next" class="form-control">
            </label>
          </div>


          <div class="form-group">
            <label>Nº Interações</label>

            <select class="form-control" style="width:80px;" name="number_result">
              <option value="3">3</option>
              <option value="6">6</option>
              <option value="9">9</option>
              <option value="12">12</option>
              <option value="">todos</option>
            </select>            
          </div>

        </div>
      </div>


      <!-- Conteudo de ultimas interações -->
      <div class="last-interations">

        <div class="content">
          <h4>Ultimas Interações</h4>

          <ul></ul>
        </div>
        
      </div>
            
    </div>

    <!-- Modal Confirmar salvamento sem data futura -->
    <div class="modal-confirme-cancel">
      <div class="modal-content">
        <h4>Deseja salvar sem a data de nova interação?</h4>
        <hr>
        <hr>
        <div class="modal-button">
          <a href="#" id="confirm_save_edit" class="btn btn-success">Sim</a>
          <a href="#" id="cancel_save_edit" class="btn btn-info">Não</a>
        </div>
      </div>
    </div>

    <div class="message-add" id="show-msg-add"></div>

    <script src="<?= $base; ?>/assets/js/crm.js"></script>
  </div>  		
</div>
<!-- /.content-system -->

<?=$render('footer');?>