<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Relatório de Funcionários</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.258.28.1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.258.28.1">
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.258.28.1" />
  <link href='dist/css/bootstrap.min.css?versao=3.258.28.1'>
  <link rel="stylesheet" href="dist/css/custom.css?versao=3.258.28.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.258.28.1">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.258.28.1">
  <link rel="stylesheet" type="text/css" href="dist/css/responsive.bootstrap.min.css?versao=3.258.28.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="dist/css/cadastro.css?versao=3.258.28.1">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.258.28.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.258.28.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.258.28.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.258.28.1">
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.258.28.1">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <div class="wrapper">

  <div class="content-wrapper">
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6 flex">
              <h1 class="m-0 text-dark">Relatório de Funcionários</h1>
              <button type="button" class="btn btn-info btn-sm ml-2" title="Tutorial" style="color: white;" id="tutorial">
                <i class="fas fa-question-circle"></i></button>
            </div>
            <div class="col-sm-6">
 
            </div>
          </div>
          <div class="row">
            <div class="col-12">
              <fieldset>
                <div class="row">
                  <div class="col-12">
                    <div class="buttons">
                      <button class="btn btn-success btn-sisp" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
                      <button id="btnImprimir" class="btn-sisp btn btn-danger"><i class="fas fa-print"></i> Imprimir</button>
                    </div>
                  </div>
                </div>
                <div class="card-body">
                  <div class="card">
                    <div class="col-sm-12 table-responsive card-body">
                      <table id="tabelaRelFuncionario" class="table table-sm table-select table-hover" width="100%"></table>
                      <thead>
                        <tr></tr>
                      </thead>
                      <tbody>
                        <tr></tr>
                      </tbody>
                    </div>
                  </div>
                </div>
              </fieldset>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div id="modal-filtros" class="modal" tabindex="-1" role="dialog">
      <div class="modal-dialog modal-xl" role="document">
        <div class="modal-content" id="modalBody">
          <div class="modal-header">
            <h4 class="modal-title">Filtros
            </h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body py-1 px-0">
            <div class="card-body pt-0 pb-0">
              <div class="row">
                <div class="col-lg-12 row mb-3">

                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                    <div class="relative">
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnClienteConsulta" name="btnClienteConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnlimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .8rem;" data-error="wrong" data-success="right" for="situacao">Situação: </label>
                    <div class="relative d-flex justify-content-between">
                      <label class="container pl-0 mb-2">
                        <input type="radio" id="rgTodos" name='rgSituacao' checked>
                        <span class="checkmark"></span>Todos</label>

                      <label class="container pl-0 mb-2">
                        <input type="radio" id="rgAtivos" name='rgSituacao'>
                        <span class="checkmark"></span>Ativos</label>

                      <label class="container pl-0 mb-2">
                        <input type="radio" id="rgInativos" name='rgSituacao'>
                        <span class="checkmark"></span>Inativos</label>
                    </div>
                  </div>

                  <div class="col-md-2 col-sm-12 col-lg-2 mt-3 pt-4 p-1 ml-2 pl-2">
                    <button class="btn btn-danger btn-sisp" type='button' id="btnSelecionarEmpresas">Selecionar Empresas</button>
                  </div>

                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="dtCadastroDe">Data de Cadastro De/Até: </label>
                    <div class="relative">
                      <div class="input-group px-0 col-12">
                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="1200-01-01" id="dtCadastroDe" name="dtCadastroDe" class="form-control">
                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="2500-12-31" id="dtCadastroAte" name="dtCadastroAte" class="form-control">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right">Data de Demissão De/Até: </label>
                    <div class="relative">
                      <div class="input-group px-0 col-12">
                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="" id="dtDemissaoDe" name="dtDemissaoDe" class="form-control">
                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="" id="dtDemissaoAte" name="dtDemissaoAte" class="form-control">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right">Cadastro de Salário De/Até: </label>
                    <div class="relative">
                      <div class="input-group px-0 col-12">
                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="" id="dtCadSalDe" name="dtCadSalDe" class="form-control">
                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="" id="dtCadSalAte" name="dtCadSalAte" class="form-control">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="txtFornecedor">Fornecedor: </label>
                    <div class="relative">
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtFornecedor" name="txtFornecedor" class="form-control" placeholder="Fornecedor">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnConsultaFornecedor" name="btn-pais" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaFornecedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="txtObra">Obra: </label>
                    <div class="relative">
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtObra" name="txtObra" class="form-control" placeholder="Obras">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnConsultaObra" name="btn-cidade" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaObra" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="txtCargo">Cargo:</label>
                    <div class="relative">
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtCargo" name="txtCargo" class="form-control" placeholder="Cargo">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnConsultaCargo" name="btnConsultaCargo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaCargo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="txtTurnoDe">Turno de:</label>
                    <div class="relative">
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtTurnoDe" name="txtTurnoDe" class="form-control" placeholder="De:">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnConsultaTurnoDe" name="btnConsultaTurnoDe" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTurnoDe" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label style="margin-bottom: .5rem;" data-error="wrong" data-success="right" for="txtTurnoAte">Até:</label>
                    <div class="relative">
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtTurnoAte" name="txtTurnoAte" class="form-control" placeholder="Até:">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnConsultaTurnoAte" name="btnConsultaTurnoAte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTurnoAte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="col-md-12 col-sm-12 col-lg-4" style="margin-top: 15px;">
                    <label>Mês de Aniversário </label>
                    <select class="form-control select2 select2-danger" id="slMesAniversario" name="slMesAniversario" data-dropdown-css-class="select2-danger" style="width: 100%;">
                      <option value="">TODOS</option>
                      <option value="1">JANEIRO</option>
                      <option value="2">FEVEREIRO</option>
                      <option value="3">MARÇO</option>
                      <option value="4">ABRIL</option>
                      <option value="5">MAIO</option>
                      <option value="6">JUNHO</option>
                      <option value="7">JULHO</option>
                      <option value="8">AGOSTO</option>
                      <option value="9">SETEMBRO</option>
                      <option value="10">OUTUBRO</option>
                      <option value="11">NOVEMBRO</option>
                      <option value="12">DEZEMBRO</option>
                    </select>
                  </div>

                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <div class="row">
              <button class="btn btn-primary btn-sisp" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar Filtros</button>   
              <button id="btnConsultar" class='btn btn-primary btn-sisp' type='button'><span class="fas fa-search"></span> Consultar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>

  <?php
  include_once('../../modais.php');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  </div>
  <script src="plugins/jquery/jquery.min.js?versao=3.258.28.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.258.28.1"></script>
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.258.28.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.258.28.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.258.28.1"></script>
  <script src="dist/js/cliente/entidade.js?versao=3.258.28.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/valida_cpf_cnpj.js"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/sisplan.js?versao=3.258.28.1"></script>
  <script src="utils/funcoes.js?versao=3.258.28.1"></script>
  <script src="utils/cookies.js?versao=3.258.28.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/driver.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/dataTables.keyTable2.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="config.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/jszip/jszip.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/pdfmake/pdfmake.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/pdfmake/vfs_fonts.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/dataTables.buttons.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/buttons.html5.min.js?versao=3.258.28.1"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.258.28.1"></script>
  <script>
    $(document).ready(async function() {
      if (getCookie('usuario') == "") {
        window.location.href = `${BASE_URI}/login`;
        return;
      }

      let usuario = getCookie('usuario');
      let empresa = getCookie('empresa');

      ipInterno = IP_INTERNO;
      ipExterno = IP_EXTERNO;
      basicAuth = BASIC_AUTH;

      const temAcesso = await temAcessoTela('RELFUNCIONARIO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/relfuncionario/relfuncionario.js?versao=3.258.28.1`;
      insereJavaScriptPagina(sArquivo);

      const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');
      habilitaCamposObrigatoriosTela(nomeTela);
    });
  </script>
</body>

</html>