mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadidos los ficheros de Ozar para maquinas por defecto
This commit is contained in:
@ -260,6 +260,18 @@ $routes->group('maquinaspapelesimpresion', ['namespace' => 'App\Controllers\Conf
|
||||
$routes->resource('maquinastarifasimpresion', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Maquinastarifasimpresion', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
$routes->group('maquinadefecto', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Maquinadefecto::index', ['as' => 'maquinaPorDefectoList']);
|
||||
$routes->get('index', 'Maquinadefecto::index', ['as' => 'maquinaPorDefectoIndex']);
|
||||
$routes->get('list', 'Maquinadefecto::index', ['as' => 'maquinaPorDefectoList2']);
|
||||
$routes->get('add', 'Maquinadefecto::add', ['as' => 'newMaquinaPorDefecto']);
|
||||
$routes->post('add', 'Maquinadefecto::add', ['as' => 'createMaquinaPorDefecto']);
|
||||
$routes->get('edit/(:num)', 'Maquinadefecto::edit/$1', ['as' => 'editMaquinaPorDefecto']);
|
||||
$routes->post('edit/(:num)', 'Maquinadefecto::edit/$1', ['as' => 'updateMaquinaPorDefecto']);
|
||||
$routes->get('delete/(:num)', 'Maquinadefecto::delete/$1', ['as' => 'deleteMaquinaPorDefecto']);
|
||||
$routes->post('allmenuitems', 'Maquinadefecto::allItemsSelect', ['as' => 'select2ItemsOfMaquinasPorDefecto']);
|
||||
$routes->post('menuitems', 'Maquinadefecto::menuItems', ['as' => 'menuItemsOfMaquinasPorDefecto']);
|
||||
});
|
||||
|
||||
$routes->group('profile', ['namespace' => 'App\Controllers'], function ($routes) {
|
||||
$routes->get('', 'Profile::index', ['as' => 'profileList']);
|
||||
|
||||
36
ci4/app/Entities/Configuracion/MaquinaDefectoEntity.php
Normal file
36
ci4/app/Entities/Configuracion/MaquinaDefectoEntity.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace App\Entities\Configuracion;
|
||||
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class MaquinaDefectoEntity extends \CodeIgniter\Entity\Entity
|
||||
{
|
||||
protected $attributes = [
|
||||
"id" => null,
|
||||
"tipo" => null,
|
||||
"ancho_min" => 0.0,
|
||||
"ancho_max" => 0.0,
|
||||
"alto_min" => 0.0,
|
||||
"alto_max" => 0.0,
|
||||
"tirada_min" => 1,
|
||||
"tirada_max" => 10000,
|
||||
"maquina_id" => null,
|
||||
"user_created_id" => 0,
|
||||
"user_updated_id" => 0,
|
||||
"is_deleted" => 0,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"ancho_min" => "float",
|
||||
"ancho_max" => "float",
|
||||
"alto_min" => "float",
|
||||
"alto_max" => "float",
|
||||
"tirada_min" => "int",
|
||||
"tirada_max" => "int",
|
||||
"maquina_id" => "int",
|
||||
"user_created_id" => "int",
|
||||
"user_updated_id" => "int",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
}
|
||||
118
ci4/app/Models/Configuracion/MaquinaDefectoModel.php
Normal file
118
ci4/app/Models/Configuracion/MaquinaDefectoModel.php
Normal file
@ -0,0 +1,118 @@
|
||||
<?php
|
||||
namespace App\Models\Configuracion;
|
||||
|
||||
class MaquinaDefectoModel extends \App\Models\GoBaseModel
|
||||
{
|
||||
protected $table = "lg_maquina_por_defecto";
|
||||
|
||||
/**
|
||||
* Whether primary key uses auto increment.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $useAutoIncrement = true;
|
||||
|
||||
protected $allowedFields = [
|
||||
"tipo",
|
||||
"ancho_min",
|
||||
"ancho_max",
|
||||
"alto_min",
|
||||
"alto_max",
|
||||
"tirada_min",
|
||||
"tirada_max",
|
||||
"maquina_id",
|
||||
];
|
||||
protected $returnType = "App\Entities\Configuracion\MaquinaDefectoEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $useSoftDeletes = false;
|
||||
|
||||
protected $createdField = "created_at";
|
||||
|
||||
protected $updatedField = "updated_at";
|
||||
|
||||
public static $labelField = "tipo";
|
||||
|
||||
protected $validationRules = [
|
||||
"alto_max" => [
|
||||
"label" => "MaquinaPorDefectoes.altoMax",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"alto_min" => [
|
||||
"label" => "MaquinaPorDefectoes.altoMin",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"ancho_max" => [
|
||||
"label" => "MaquinaPorDefectoes.anchoMax",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"ancho_min" => [
|
||||
"label" => "MaquinaPorDefectoes.anchoMin",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"tipo" => [
|
||||
"label" => "MaquinaPorDefectoes.tipo",
|
||||
"rules" => "required|in_list[bn,bnhq,color,portada,cubierta,rotativa]",
|
||||
],
|
||||
"tirada_max" => [
|
||||
"label" => "MaquinaPorDefectoes.tiradaMax",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"tirada_min" => [
|
||||
"label" => "MaquinaPorDefectoes.tiradaMin",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
"alto_max" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.alto_max.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.alto_max.required",
|
||||
],
|
||||
"alto_min" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.alto_min.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.alto_min.required",
|
||||
],
|
||||
"ancho_max" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.ancho_max.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.ancho_max.required",
|
||||
],
|
||||
"ancho_min" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.ancho_min.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.ancho_min.required",
|
||||
],
|
||||
"tipo" => [
|
||||
"in_list" => "MaquinaPorDefectoes.validation.tipo.in_list",
|
||||
"required" => "MaquinaPorDefectoes.validation.tipo.required",
|
||||
],
|
||||
"tirada_max" => [
|
||||
"integer" => "MaquinaPorDefectoes.validation.tirada_max.integer",
|
||||
"required" => "MaquinaPorDefectoes.validation.tirada_max.required",
|
||||
],
|
||||
"tirada_min" => [
|
||||
"integer" => "MaquinaPorDefectoes.validation.tirada_min.integer",
|
||||
"required" => "MaquinaPorDefectoes.validation.tirada_min.required",
|
||||
],
|
||||
];
|
||||
|
||||
public function findAllWithMaquinas(string $selcols = "*", int $limit = null, int $offset = 0)
|
||||
{
|
||||
$sql =
|
||||
"SELECT t1." .
|
||||
$selcols .
|
||||
", t2.nombre AS maquina FROM " .
|
||||
$this->table .
|
||||
" t1 LEFT JOIN lg_maquinas t2 ON t1.maquina_id = t2.id";
|
||||
if (!is_null($limit) && intval($limit) > 0) {
|
||||
$sql .= " LIMIT " . $limit;
|
||||
}
|
||||
|
||||
if (!is_null($offset) && intval($offset) > 0) {
|
||||
$sql .= " OFFSET " . $offset;
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
$result = $query->getResultObject();
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="tipo" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.tipo') ?>*
|
||||
</label>
|
||||
<select id="tipo" name="tipo" required class="form-control select2bs" style="width: 100%;" >
|
||||
<option value="" selected="selected"><?=lang('Basic.global.pleaseSelectOne') ?></option>
|
||||
<option value="bn"<?=$maquinaDefectoEntity->tipo == 'bn' ? ' selected':'' ?>><?= lang('MaquinaPorDefectoes.bn') ?></option>
|
||||
<option value="bnhq"<?=$maquinaDefectoEntity->tipo == 'bnhq' ? ' selected':'' ?>><?= lang('MaquinaPorDefectoes.bnhq') ?></option>
|
||||
<option value="color"<?=$maquinaDefectoEntity->tipo == 'color' ? ' selected':'' ?>><?= lang('MaquinaPorDefectoes.color') ?></option>
|
||||
<option value="portada"<?=$maquinaDefectoEntity->tipo == 'portada' ? ' selected':'' ?>><?= lang('MaquinaPorDefectoes.portada') ?></option>
|
||||
<option value="cubierta"<?=$maquinaDefectoEntity->tipo == 'cubierta' ? ' selected':'' ?>><?= lang('MaquinaPorDefectoes.cubierta') ?></option>
|
||||
<option value="rotativa"<?=$maquinaDefectoEntity->tipo == 'rotativa' ? ' selected':'' ?>><?= lang('MaquinaPorDefectoes.rotativa') ?></option>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="anchoMin" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.anchoMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="anchoMin" name="ancho_min" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('ancho_min', $maquinaDefectoEntity->ancho_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="anchoMax" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.anchoMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="anchoMax" name="ancho_max" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('ancho_max', $maquinaDefectoEntity->ancho_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="altoMin" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.altoMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="altoMin" name="alto_min" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('alto_min', $maquinaDefectoEntity->alto_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="altoMax" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.altoMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="altoMax" name="alto_max" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('alto_max', $maquinaDefectoEntity->alto_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMin" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.tiradaMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMin" name="tirada_min" required placeholder="1" maxLength="11" class="form-control" value="<?=old('tirada_min', $maquinaDefectoEntity->tirada_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMax" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.tiradaMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMax" name="tirada_max" required placeholder="10000" maxLength="11" class="form-control" value="<?=old('tirada_max', $maquinaDefectoEntity->tirada_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="maquinaId" class="form-label">
|
||||
<?=lang('MaquinaPorDefectoes.maquinaId') ?>*
|
||||
</label>
|
||||
<select id="maquinaId" name="maquina_id" required class="form-control select2bs2" style="width: 100%;" >
|
||||
|
||||
<?php if ( isset($maquinaList) && is_array($maquinaList) && !empty($maquinaList) ) :
|
||||
foreach ($maquinaList as $k => $v) : ?>
|
||||
<option value="<?=$k ?>"<?=$k==$maquinaDefectoEntity->maquina_id ? ' selected':'' ?>>
|
||||
<?=$v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,64 @@
|
||||
<?= $this->include("Themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="maquinaPorDefectoForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/configuracion/maquinas/_maquinaPorDefectoFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("maquinaPorDefectoList2"), 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>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
|
||||
$('#maquinaId').select2({
|
||||
theme: 'bootstrap-5',
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfMaquinas") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,138 @@
|
||||
<?=$this->include('Themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/defaultLayout') ?>
|
||||
<?=$this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('MaquinaPorDefectoes.maquinaPorDefectoList') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfMaquinaspordefecto" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.id') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.tipo') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.anchoMin') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.anchoMax') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.altoMin') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.altoMax') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.tiradaMin') ?></th>
|
||||
<th><?= lang('MaquinaPorDefectoes.tiradaMax') ?></th>
|
||||
<th><?= lang('Maquinas.maquina') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($maquinaPorDefectoList as $item ) : ?>
|
||||
<tr>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editMaquinaPorDefecto', $item->id), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id,]); ?>
|
||||
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteMaquinaPorDefecto', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
</td>
|
||||
<td class="align-middle text-center">
|
||||
<?=$item->id ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->tipo) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->ancho_min) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->ancho_max) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->alto_min) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->alto_max) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->tirada_min) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->tirada_max) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->maquina) ?>
|
||||
</td>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editMaquinaPorDefecto', $item->id), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id,]); ?>
|
||||
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteMaquinaPorDefecto', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
<?=anchor(route_to('newMaquinaPorDefecto'), lang('Basic.global.addNew').' '.lang('MaquinaPorDefectoes.maquinaPorDefecto'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr2 = $(".using-exportable-data-table").find("tr:first th").length - 1;
|
||||
theTable = $('.using-exportable-data-table').DataTable({
|
||||
"responsive": true,
|
||||
"paging": true,
|
||||
"lengthMenu": [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
"pageLength": 10,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"dom": 'lfrtipB', // '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'
|
||||
}
|
||||
],
|
||||
"autoWidth": true,
|
||||
"scrollX": true,
|
||||
"stateSave": true,
|
||||
"language": {
|
||||
url: "/assets/dt/<?= config('Basics')->languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [0,lastColNr2]
|
||||
}
|
||||
]
|
||||
});
|
||||
<?=$this->endSection() ?>
|
||||
Reference in New Issue
Block a user