<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Fluxo de Aprovação</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.264.14.1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.264.14.1">
  <!--e1Google Font: Source Sans Pro -->
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.264.14.1">
  <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.264.14.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.264.14.1" />
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.264.14.1">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.264.14.1">
  <link rel="stylesheet" href="https://cdn.datatables.net/select/1.6.0/css/select.dataTables.min.css">
  <link rel="stylesheet" href="../dist/css/PesquisaVariosSelect2.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../plugins/select2/css/select2.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.264.14.1">

  <style>
    .table.dataTable tbody td,
    .table.dataTable thead {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .content-wrapper {
      margin-left: 0px !important;
    }

    .main-header,
    .main-sidebar {
      display: none;
    }

    .table.dataTable tr td,
    .table.dataTable tr td,
    .table.dataTable th {
      padding: 4px 12px;
    }

    .pagination {
      justify-content: end !important;
    }

    .dataTables_wrapper .row {
      margin-right: 0 !important;
      margin-left: 0 !important;
    }

    .placeholder-lowercase::placeholder {
      text-transform: none;
    }

    #progressbar {
      box-sizing: border-box;
    }

    #progressbar li {
      list-style-type: none;
      font-size: 12px;
      width: 100%;
      float: left;
      position: relative
    }

    .main-container {
      display: block;
      text-align: center;
      position: relative;
      margin-top: 20px;
      unicode-bidi: isolate;


      fieldset:not(:first-of-type) {
        display: none;
      }
    }

    .step-container {
      text-align: left;
      padding: 20px 10px 30px 10px;
      width: 100%;
      margin-bottom: 20px;
      position: relative;
      color: var(--font-color);
      z-index: 2;
      background: var(--card-color);
      border-radius: 8px;
    }

    .card {
      box-shadow: none !important;
      border-radius: 0 !important;
      margin-bottom: 0 !important;
    }

    .card-header {
      box-shadow: 0px 1px rgb(0 0 0 / 20%) !important;
    }

    .card-header {
      border-bottom: 1px dashed #ddd;
      box-shadow: none !important;
    }

    .fa-angle-right,
    .fa-angle-down {
      color: #343a40;
    }

    .dataTables_wrapper .col-sm-12 {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    .border-field .textoBorda {
      font-size: 1.1em !important;
      text-align: left !important;
      width: auto;
      padding: 10px;
      border-bottom: none;
    }

    .border-field {
      border: 1px solid var(--font-color) !important;
      padding: 1rem !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
      border-radius: 3px !important;
    }

    .separator {
      border-left: 1px solid #dee2e6;
    }
  </style>

</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <main class="wrapper">
    <?php
    include_once('../../../menu.php');
    ?>
    <div class="wrapper">


      <div id="myModal" class="modal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 id="myModalLabel" class="modal-title"></h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <p id="myModalText"></p>
            </div>
            <div class="modal-footer">
              <button id="btnYes" type="button" class="btn btn-primary">Sim</button>
              <button id="btnNo" type="button" class="btn btn-secondary" data-dismiss="modal">Não</button>
            </div>
          </div>
        </div>
      </div>

      <div class="content-wrapper">
        <section class="content">
          <div class="content-header p-0">
            <div class="container-fluid">
              <div class="row mb-2">
                <div class="col-sm-6 flex">
                </div>
                <div class="col-sm-6">
                </div>
              </div>
            </div>
            <div class="row mt-0">
              <div class="col-12 p-0 mt-3 mb-2">
                <div class="card p-0 mb-0">
                  <div class="card-header d-flex p-0 ml-4 align-items-start" style="border: none!important;box-shadow:none!important; gap: 10px;">
                    <div class="flex flex-column">
                      <div class="flex my-2">
                        <h2 class="mb-0 text-center flex align-items-center">
                          <span class="ml-2">Formação de Kit</span>
                          <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>
                        </h2>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="row mx-0 px-0">
                  <div class="col-12 mx-0 px-4">
                    <div id="msform">
                      <ul id="progressbar">
                        <li class="active" id="account"><strong>Geral</strong></li>
                      </ul>
                      <p>Preencha os dados e clique em gravar</p>
                      <fieldset id="fieldset1">
                        <div class="step-container">
                          <div class="flex flex-wrap">
                            <div class="flex flex-wrap col-5 align-content-start">
                              <div class="col-xl-3 col-3 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtNumero">Número:</label>
                                <input type="text" class="input-default focus form-control" id="txtNumero" name="numero" placeholder="Número" disabled>
                              </div>
                              <div class="col-xl-7 col-9 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDescricao">Descrição:</label>
                                <input type="text" class="input-default focus form-control" id="txtDescricao" name="descricao" placeholder="Descrição">
                              </div>
                              <div class="icheck-primary form-group form-check flex align-items-center ml-1">
                                <input type="checkbox" class="form-check-input" id="cbKitAtivo">
                                <label class="form-check-label" for="cbKitAtivo">Ativo</label>
                              </div>
                            </div>
                            <div class="flex flex-wrap col-7 separator align-content-start">
                              <div class="col-6 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtProduto">Produto:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtProduto" name="produto" placeholder="Produto">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnProduto" name="btnProduto" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnLimpaProduto" name="btnLimpaProduto" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-12">
                                <h4 class="text-md">Grade</h4>
                                <div class="table-responsive">
                                  <table id="tabelaGrade" class="table table-select table-hover" width="100%">
                                    <thead>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                  </table>
                                </div>
                              </div>
                            </div>
                            <div class="col-12">
                              <div class="flex flex-wrap col-12 justify-content-end" style="gap: 15px;">
                                <button type="button" class="btn btn-secondary btn-sisp" id="btnVoltar" style="max-height: 38px">Voltar</button>
                                <button type="submit" form="formPrincipal" class="btn btn-danger btn-sisp" id="btnGravar" style="max-height: 38px">Gravar</button>
                              </div>
                            </div>
                          </div>
                        </div>
                      </fieldset>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </section>
      </div>
    </div>
  </main>

  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  <script src="../plugins/jquery/jquery.min.js?versao=3.264.14.1"></script>
  <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.264.14.1"></script>
  <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.264.14.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.264.14.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.264.14.1"></script>
  <script src="../dist/js/adminlte.min.js?versao=3.264.14.1"></script>
  <script src="../dist/js/requisicoes.js?versao=3.264.14.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.264.14.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.264.14.1"></script>
  <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.264.14.1"></script>
  <script src="../dist/js/dataTables.keyTable.js?versao=3.264.14.1"></script>
  <script src="../utils/funcoes.js?versao=3.264.14.1"></script>
  <script src="../utils/cookies.js?versao=3.264.14.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.264.14.1"></script>
  <script src="../dist/js/jquery.mask.min.js?versao=3.264.14.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.264.14.1"></script>
  <script src="https://cdn.datatables.net/select/1.6.0/js/dataTables.select.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.16/jquery.mask.min.js"></script>
  <script src="../plugins/select2/js/select2.full.min.js?versao=3.264.14.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('FORMACAO_KIT');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/formacao_kit/cadastro_formacao_kit/formacao_kit.js?versao=3.264.14.1`;
      const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');

      await insereJavaScriptPagina(sArquivo);

      habilitaCamposObrigatoriosTela(nomeTela);
    });
  </script>

</body>

</html>