<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
<?= $this->include('themes/_commonPartialsBs/sweetalert') ?>
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
<?= $this->section('content'); ?>
<!--Content Body-->
<div class="row" id="viewMaquinistaTareaScan" data-id="<?= $maquinaEntity->id ?>">
    <div class="col-md-12">
        <div class="d-flex flex-row justify-content-end align-items-stretch mb-2 gap-2">
            <a type="button" id="tarea-list-link" class="btn btn-primary" href="<?= route_to('viewProduccionMaquinaTareasList', $maquinaEntity->id) ?>"><span class="icon-base ti ti-list ti-xs me-1"></span> <?= lang('Produccion.maquinista.tarea_list') ?></a>
        </div>
        <div class="card section-block">
            <div class="card-body">
                <h4 class="alert-heading d-flex align-items-center gap-1"><span style="color:red">ESCANEAR: </span><span class="fs-bold"><?= $maquinaEntity->nombre ?></span></h4>
                <?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
                <div class="row ot-scan-wrapper">
                    <div class="col-md-4">
                        <button type="button" class="btn btn-danger" id="btn-reset-ots">
                            <span class="icon-base ti ti-trash me-1"></span>
                            <?= lang('Produccion.maquinista.reset') ?>
                        </button>
                    </div>
                </div>
                <div class="row mb-2 ot-scan-wrapper">
                    <div class="col-md-8 mb-2">

                        <div class="table-responsive">
                            <table id="table-scanned-ots" class="table-maquinista table table-hover table-sm">
                                <thead>
                                    <tr>
                                        <th><?= lang('Produccion.datatable.ot_id') ?></th>
                                        <th><?= lang('Produccion.datatable.titulo') ?></th>
                                    </tr>
                                </thead>
                                <tbody>

                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="col-md-4">

                        <div class="col-md-12 mb-2">
                            <label for="ot-id" class="form-label"><strong><?= lang('Produccion.maquinista.next_ot') ?></strong></label>
                            <input type="text" class="form-control h-50 fs-large" id="ot-id" name="orden_trabajo_id" placeholder="<?= lang('Produccion.maquinista.placeholder_ot_id') ?>">
                            <div class="fs-medium fs-bold mt-2"><?= lang('Produccion.maquinista.scan_ot_input_form_text') ?></div>
                        </div>
                        <div class="col-md-12 mb-2">
                            <button type="button" class="maquina-btn btn btn-primary w-100" id="btn-save-maquina-ots" disabled>
                                <span class="icon-base ti ti-arrow-big-right me-1"></span>
                                <?= lang('Produccion.maquinista.next_scan_ot') ?>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="col-md-12 d-none" id="ot-maquina-tareas-link">
                    <a class="maquina-btn btn btn-primary w-100" href="<?= route_to('viewProduccionMaquinistaOtTareasView', $maquinaEntity->id) ?>">
                        <span class="icon-base ti ti-arrow-big-right me-1"></span>
                        <?= lang('Produccion.maquinista.next_scan_ot') ?>
                    </a>
                </div>
            </div>
        </div>
    </div>

</div>
<?= $this->endSection() ?>

<?= $this->section('css') ?>
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/maquinista.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/notiflix/notiflix.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.css') ?>" />

<?= $this->endSection() ?>

<?= $this->section("additionalExternalJs") ?>
<script src="<?= site_url("themes/vuexy/vendor/libs/notiflix/notiflix.js") ?>"></script>
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.js") ?>"></script>
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js") ?>"></script>
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js") ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
<script type="module" src="<?= site_url("/assets/js/safekat/pages/configuracion/maquinista/viewMaquinistaScan.js") ?>"></script>

<?= $this->endSection() ?>