mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
imposiciones
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modalNewImposicion" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalTitleNew"><?= lang('Imposiciones.btnNewImposicion') ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form class="mb-3 section-block" id="form-imposicion" method="post">
|
||||
<div class="modal-body">
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-label-secondary" data-bs-dismiss="modal"><?= lang('App.global_come_back') ?></button>
|
||||
<button type="button" id="btnSubmitNewImposicion" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,12 @@
|
||||
<table id="imposicion-esquema-table" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Imposiciones.id') ?></th>
|
||||
<th><?= lang('Imposiciones.esquema.name') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@ -0,0 +1,64 @@
|
||||
<div class="row">
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.esquema.name') ?>
|
||||
</label>
|
||||
<input type="text" name="name" maxlength="255" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="orientacion" class="form-label">
|
||||
<?= lang('Imposiciones.orientacion') ?>
|
||||
</label>
|
||||
<select id="esquema-orientacion" class="form-control" name="orientacion" data-input>
|
||||
<option value="H" default><?= lang("Imposiciones.H") ?></option>
|
||||
<option value="V"><?= lang("Imposiciones.V") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="esquema-rows"class="form-label">
|
||||
<?= lang('Imposiciones.esquema.rows') ?>
|
||||
</label>
|
||||
<input type="number" id="esquema-rows" name="rows" max="5" value="1" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="esquema-columns" class="form-label">
|
||||
<?= lang('Imposiciones.esquema.columns') ?>
|
||||
</label>
|
||||
<input type="number" id="esquema-columns" name="columns" max="5" class="form-control" value="1" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-2 col-md-2 col-xs-12 mb-3">
|
||||
<div class="d-flex flex-column gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input" id="esquema-rotativa" name="rotativa" data-input/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
</span>
|
||||
<span class="switch-off">
|
||||
<i class="ti ti-x"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="switch-label">Rotativa</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input" id="esquema-cosido" name="cosido" data-input/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
</span>
|
||||
<span class="switch-off">
|
||||
<i class="ti ti-x"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="switch-label">Cosido/Grapado</span>
|
||||
</label>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-md-12 mt-3">
|
||||
<div class="d-flex justify-content-center w-100 h-100 text-center">
|
||||
<div id="imposicion-esquema-drawing" class="px-2 py-2"></div>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -1,64 +1,64 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="ancho" class="form-label">
|
||||
<?=lang('Imposiciones.ancho') ?>*
|
||||
</label>
|
||||
<input type="number" id="ancho" name="ancho" required maxLength="11" class="form-control" value="<?=old('ancho', $imposicion->ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="ancho" class="form-label">
|
||||
<?= lang('Imposiciones.ancho') ?>
|
||||
</label>
|
||||
<input type="number" name="ancho" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="alto" class="form-label">
|
||||
<?=lang('Imposiciones.alto') ?>*
|
||||
</label>
|
||||
<input type="number" id="alto" name="alto" required maxLength="11" class="form-control" value="<?=old('alto', $imposicion->alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="alto" class="form-label">
|
||||
<?= lang('Imposiciones.alto') ?>
|
||||
</label>
|
||||
<input type="number" name="alto" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?=lang('Imposiciones.unidades') ?>
|
||||
</label>
|
||||
<input type="number" id="unidades" name="unidades" maxLength="11" class="form-control" value="<?=old('unidades', $imposicion->unidades) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.unidades') ?>
|
||||
</label>
|
||||
<input type="number" id="unidades" name="unidades" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.etiqueta') ?>
|
||||
</label>
|
||||
<input type="text" name="etiqueta" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.maquina') ?>
|
||||
</label>
|
||||
<input type="text" name="maquina" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="orientacion" class="form-label">
|
||||
<?=lang('Imposiciones.orientacion') ?>
|
||||
</label>
|
||||
|
||||
<div class="form-check">
|
||||
<label for="h" class="form-check-label">
|
||||
<input type="radio" id="h" name="orientacion" value="H" class="form-check-input" <?= $imposicion->orientacion == 'H' ? 'checked' : '' ?>>
|
||||
<?= lang('Imposiciones.H') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
|
||||
|
||||
<div class="form-check">
|
||||
<label for="v" class="form-check-label">
|
||||
<input type="radio" id="v" name="orientacion" value="V" class="form-check-input" <?= $imposicion->orientacion == 'V' ? 'checked' : '' ?>>
|
||||
<?= lang('Imposiciones.V') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="maquina" class="form-label">
|
||||
<?=lang('Imposiciones.maquina') ?>
|
||||
</label>
|
||||
<input type="text" id="maquina" name="maquina" maxLength="100" class="form-control" value="<?=old('maquina', $imposicion->maquina) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="etiqueta" class="form-label">
|
||||
<?=lang('Imposiciones.etiqueta') ?>
|
||||
</label>
|
||||
<input type="text" id="etiqueta" name="etiqueta" maxLength="100" class="form-control" value="<?=old('etiqueta', $imposicion->etiqueta) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.orientacion') ?>
|
||||
</label>
|
||||
<select name="orientacion" class="form-control" data-input>
|
||||
<option value="H" default><?= lang("Imposiciones.H") ?></option>
|
||||
<option value="V"><?= lang("Imposiciones.V") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.imposicion_esquema') ?>
|
||||
</label>
|
||||
<select name="imposicion_esquema_id" class="form-control" id="imposicion-esquema-select" data-input>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3 section-block-esquema">
|
||||
<div class="d-flex flex-row justify-content-between">
|
||||
|
||||
<label for="imposicion-esquema-render" class="form-label">
|
||||
<?= lang('Imposiciones.imposicion_esquema_drawing') ?>
|
||||
</label>
|
||||
<a href="" target="_blank" class="btn btn-primary btn-sm imposicion-esquema-link" disabled><?= lang("Imposiciones.imposicion_esquema_link") ?></a>
|
||||
</div>
|
||||
<div id="imposicion-esquema-render">
|
||||
<svg width="100%" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,41 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('Imposiciones.imposicion') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form class="mb-3 section-block" id="form-imposicion-esquema" method="post" data-id="<?= $imposicion_esquema?->id ?>">
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionEsquemaFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer mb-3 py-2">
|
||||
<div class="col-md-12">
|
||||
<?= anchor(route_to("imposicionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<button type="button" id="btnSubmitUpdateImposicionEsquema" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.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') ?>" />
|
||||
<?= $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/two/two.js') ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/edit_esquema.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,26 +1,40 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?=$this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
<h3 class="card-title"><?= lang('Imposiciones.imposicion') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="imposicionForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("imposicionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
<form class="mb-3 section-block" id="form-imposicion" method="post" data-id="<?= $imposicion->id ?>">
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer mb-3 py-2">
|
||||
<div class="col-md-12">
|
||||
<?= anchor(route_to("imposicionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<button type="button" id="btnSubmitUpdateImposicion" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.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') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/notiflix/notiflix.js") ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/edit.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,168 +1,83 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?=$this->section('content'); ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section('content'); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-shadow nav-align-top">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<button type="button" class="nav-link active" role="tab" id="navs-top-align-imposicion-tab" data-bs-toggle="tab" data-bs-target="#navs-top-align-imposicion-table"><?= lang("Imposiciones.imposicionList") ?></button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button type="button" class="nav-link" role="tab" id="navs-top-align-esquema-tab" data-bs-toggle="tab" data-bs-target="#navs-top-align-esquema-table"><?= lang("Imposiciones.imposicion_esquemas") ?></button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="navs-top-align-imposicion-table">
|
||||
<div class="col-md-12 d-flex justify-content-end">
|
||||
<?= anchor(route_to('newImposicion'), lang('Imposiciones.btnNewImposicion'), ['class' => 'btn btn-primary float-end', "id" => "btnNewImposicion"]); ?>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<table id="tableOfImposiciones" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Imposiciones.id') ?></th>
|
||||
<th><?= lang('Imposiciones.ancho') ?></th>
|
||||
<th><?= lang('Imposiciones.alto') ?></th>
|
||||
<th><?= lang('Imposiciones.unidades') ?></th>
|
||||
<th><?= lang('Imposiciones.orientacion') ?></th>
|
||||
<th><?= lang('Imposiciones.maquina') ?></th>
|
||||
<th><?= lang('Imposiciones.etiqueta') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Imposiciones.imposicionList') ?></h3>
|
||||
<?=anchor(route_to('newImposicion'), lang('Basic.global.addNew').' '.lang('Imposiciones.imposicion'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="tableOfImposiciones" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php // <th class="text-nowrap"><?= lang('Basic.global.Action') ?></th> ?>
|
||||
<th><?=lang('Imposiciones.id')?></th>
|
||||
<th><?= lang('Imposiciones.ancho') ?></th>
|
||||
<th><?= lang('Imposiciones.alto') ?></th>
|
||||
<th><?= lang('Imposiciones.unidades') ?></th>
|
||||
<th><?= lang('Imposiciones.orientacion') ?></th>
|
||||
<th><?= lang('Imposiciones.maquina') ?></th>
|
||||
<th><?= lang('Imposiciones.etiqueta') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade show" id="navs-top-align-esquema-table">
|
||||
<div class="col-md-12 d-flex justify-content-end">
|
||||
<?= anchor(route_to('newImposicionEsquema'), lang('Imposiciones.btnNewImposicionEsquema'), ['class' => 'btn btn-primary float-end', "id" => "btnNewImposicionEsquema"]); ?>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?= view("/themes/vuexy/components/tables/imposicion_esquema_table.php") ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfImposiciones').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfImposiciones').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfImposiciones') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
//{ 'data': actionBtns },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'ancho' },
|
||||
{ 'data': 'alto' },
|
||||
{ 'data': 'unidades' },
|
||||
{ 'data': 'orientacion' },
|
||||
{ 'data': 'maquina' },
|
||||
{ 'data': 'etiqueta' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('imposicionList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Imposiciones.imposicion'))]) ?>',
|
||||
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
confirmButtonText: '<?= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
|
||||
cancelButtonText: '<?= lang('Basic.global.Cancel') ?>',
|
||||
cancelButtonColor: '#d33'
|
||||
})
|
||||
.then((result) => {
|
||||
const dataId = $(this).data('id');
|
||||
const row = $(this).closest('tr');
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: `<?= route_to('imposicionList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
}).done((data, textStatus, jqXHR) => {
|
||||
Toast.fire({
|
||||
icon: 'success',
|
||||
title: data.msg ?? jqXHR.statusText,
|
||||
});
|
||||
|
||||
theTable.clearPipeline();
|
||||
theTable.row($(row)).invalidate().draw();
|
||||
}).fail((jqXHR, textStatus, errorThrown) => {
|
||||
Toast.fire({
|
||||
icon: 'error',
|
||||
title: jqXHR.responseJSON.messages.error,
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.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/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<?=$this->endSection() ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
||||
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/jszip/jszip.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/two/two.js') ?>"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/view.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,40 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('Imposiciones.imposicion') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form class="mb-3 section-block" id="form-imposicion" method="post">
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer mb-3 py-2">
|
||||
<div class="col-md-12">
|
||||
<?= anchor(route_to("imposicionList"), lang("App.global_come_back"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<button type="button" id="btnSubmitNewImposicion" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.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') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/notiflix/notiflix.js") ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/new.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -70,6 +70,13 @@ if (
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("imposicionList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_imposiciones") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('usuarios.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('userList') ?>" class="menu-link">
|
||||
|
||||
@ -33,7 +33,7 @@ $settings = $session->get('settings');
|
||||
|
||||
<body>
|
||||
|
||||
<div class="col-md-12 pdf-wrapper" data-id="<?= $ot->id."_"."_".$presupuesto->id."_".$presupuesto->titulo ?>">
|
||||
<div class="col-md-12 pdf-wrapper" data-id="<?= $ot->id . "_" . "_" . $presupuesto->id . "_" . $presupuesto->titulo ?>">
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex justify-content-between align-items-center">
|
||||
<h5><?= $presupuesto->titulo ?></h5>
|
||||
@ -180,32 +180,10 @@ $settings = $session->get('settings');
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-12 mb-2">
|
||||
<div class="esquema-imposicion-wrapper">
|
||||
<div class="esquema">
|
||||
<div class="pagina-imposicion-outer-start">
|
||||
<div class="pagina-imposicion-inner">
|
||||
A
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagina-imposicion-outer">
|
||||
<div class="pagina-imposicion-inner">
|
||||
A
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagina-imposicion-outer">
|
||||
<div class="pagina-imposicion-inner">
|
||||
A
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagina-imposicion-outer-end">
|
||||
<div class="pagina-imposicion-inner">
|
||||
A
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex justify-content-center" style="width: 100%">
|
||||
<?php if ($imposicion->imposicion_esquema()): ?>
|
||||
<?= $imposicion->imposicion_esquema()->svg_schema ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="imposicion">
|
||||
|
||||
Reference in New Issue
Block a user