mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Integracion de la lista tarifaacabado sacada del Mac.Comit antes del merge para que nacho lo coja y meta el vuexy
This commit is contained in:
81
ci4/app/Views/themes/_commonPartialsBs/_alertBoxes.php
Normal file
81
ci4/app/Views/themes/_commonPartialsBs/_alertBoxes.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
// Open-Source License Information:
|
||||
/*
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Ozar (https://www.ozar.net/)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$errorMessage = $errorMessage ?? session('errorMessage');
|
||||
$warningMessage = session('warningMessage');
|
||||
|
||||
if (session()->has('message')) {
|
||||
$successMessage = session('message');
|
||||
}
|
||||
if (session()->has('error')) {
|
||||
$errorMessage = is_array(session('error')) ? implode(session('error')) : session('error');
|
||||
} /* // Uncomment this block if you want the errors listed line by line in the alert
|
||||
elseif (session()->has('errors')) {
|
||||
$errorMessage = '<ul class="text-start">';
|
||||
foreach (session('errors') as $error) :
|
||||
$errorMessage .= '<li>' . $error . '</li>';
|
||||
endforeach;
|
||||
$errorMessage .= '</ul>';
|
||||
}
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (isset($successMessage) && $successMessage): ?>
|
||||
|
||||
<div class="alert alert-success" role="alert">
|
||||
<svg class="bi mt-1 me-3 float-start" width="24" height="24" role="img" aria-label="Success:"><use xlink:href="#check-circle-fill"/></svg>
|
||||
<button type="button" class="btn-close float-end" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<div>
|
||||
<h4><?=lang('Basic.global.Success')?>!</h4>
|
||||
<?= $successMessage; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($errorMessage) && $errorMessage): ?>
|
||||
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<svg class="bi mt-1 me-3 float-start" width="24" height="24" role="img" aria-label="Error:"><use xlink:href="#exclamation-triangle-fill"/></svg>
|
||||
<button type="button" class="btn-close float-end" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<div>
|
||||
<h4><?=lang('Basic.global.Error')?>!</h4>
|
||||
<?= $errorMessage; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<?php if (isset($warningMessage) && $warningMessage): ?>
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<svg class="bi mt-1 me-3 float-start" width="24" height="24" role="img" aria-label="Error:"><use xlink:href="#exclamation-triangle-fill"/></svg>
|
||||
<button type="button" class="btn-close float-end" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<div>
|
||||
<h4 class="text-start"><?=lang('Basic.global.Warning')?></h4>
|
||||
<?= $warningMessage ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
17
ci4/app/Views/themes/_commonPartialsBs/_confirm2delete.php
Normal file
17
ci4/app/Views/themes/_commonPartialsBs/_confirm2delete.php
Normal file
@ -0,0 +1,17 @@
|
||||
<div class="modal fade" id="confirm2delete" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="confirm2deleteLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="confirm2deleteLabel">Confirm to delete record</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Are you sure you want to delete this record?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
|
||||
<a class="btn btn-danger btn-confirm"> Yes, Delete It! </a>
|
||||
</div><!--//.modal-footer -->
|
||||
</div><!--//.modal-content -->
|
||||
</div><!--//.modal-dialog -->
|
||||
</div><!--//.modal -->
|
||||
@ -0,0 +1,35 @@
|
||||
<?php if (config('Basics')->theme['name'] == 'Bootstrap5') { ?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="exclamation-triangle-fill" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<svg class="bi mt-1 me-3 float-start" width="24" height="24" role="img" aria-label="Success:"><use xlink:href="#exclamation-triangle-fill"/></svg>
|
||||
<button type="button" class="btn-close float-end" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<div class="fdfs">
|
||||
<h4>Please correct the errors below:</h4>
|
||||
<ul>
|
||||
<?php foreach ($errors as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-dismissible alert-warning">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fas fa-exclamation-triangle"></i> Please correct the errors below:</h4>
|
||||
<ul>
|
||||
<?php foreach ($errors as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div><!--//.alert-->
|
||||
</div><!--//.col-->
|
||||
</div><!--//.row -->
|
||||
<?php } ?>
|
||||
184
ci4/app/Views/themes/_commonPartialsBs/datatables.php
Normal file
184
ci4/app/Views/themes/_commonPartialsBs/datatables.php
Normal file
@ -0,0 +1,184 @@
|
||||
<!-- Push section css -->
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css">
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('footerAdditions') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<!-- Push additional js -->
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/min/moment-with-locales.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
moment.locale('<?= $currentLocale ?? config('App')->defaultLocale ?>');
|
||||
|
||||
<?php if (isset($usingServerSideDataTable) && $usingServerSideDataTable) : ?>
|
||||
// Pipelining function for DataTables. To be used to the `ajax` option of DataTables
|
||||
$.fn.dataTable.pipeline = function (opts) {
|
||||
// Configuration options
|
||||
let conf = $.extend({
|
||||
pages: 5, // number of pages to cache
|
||||
url: '',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'}
|
||||
}, opts);
|
||||
|
||||
// Private variables for storing the cache
|
||||
let cacheLower = -1;
|
||||
let cacheUpper = null;
|
||||
let cacheLastRequest = null;
|
||||
let cacheLastJson = null;
|
||||
|
||||
return function (request, drawCallback, settings) {
|
||||
let ajax = false;
|
||||
let requestStart = request.start;
|
||||
let drawStart = request.start;
|
||||
let requestLength = request.length;
|
||||
let requestEnd = requestStart + requestLength;
|
||||
|
||||
if (settings.clearCache) {
|
||||
// API requested that the cache be cleared
|
||||
ajax = true;
|
||||
settings.clearCache = false;
|
||||
} else if (cacheLower < 0 || requestStart < cacheLower || requestEnd > cacheUpper) {
|
||||
// outside cached data - need to make a request
|
||||
ajax = true;
|
||||
} else if (JSON.stringify(request.order) !== JSON.stringify(cacheLastRequest.order) ||
|
||||
JSON.stringify(request.columns) !== JSON.stringify(cacheLastRequest.columns) ||
|
||||
JSON.stringify(request.search) !== JSON.stringify(cacheLastRequest.search)
|
||||
) {
|
||||
// properties changed (ordering, columns, searching)
|
||||
ajax = true;
|
||||
}
|
||||
|
||||
// Store the request for checking next time around
|
||||
cacheLastRequest = $.extend(true, {}, request);
|
||||
|
||||
if (ajax) {
|
||||
// Need data from the server
|
||||
if (requestStart < cacheLower) {
|
||||
requestStart = requestStart - (requestLength * (conf.pages - 1));
|
||||
|
||||
if (requestStart < 0) {
|
||||
requestStart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
cacheLower = requestStart;
|
||||
cacheUpper = requestStart + (requestLength * conf.pages);
|
||||
|
||||
request.start = requestStart;
|
||||
request.length = requestLength * conf.pages;
|
||||
|
||||
// Provide the same `data` options as DataTables.
|
||||
if (typeof conf.data === 'function') {
|
||||
// As a function it is executed with the data object as an arg
|
||||
// for manipulation. If an object is returned, it is used as the
|
||||
// data object to submit
|
||||
let d = conf.data(request);
|
||||
if (d) {
|
||||
$.extend(request, d);
|
||||
}
|
||||
} else if ($.isPlainObject(conf.data)) {
|
||||
// As an object, the data given extends the default
|
||||
$.extend(request, conf.data);
|
||||
}
|
||||
|
||||
request.<?=csrf_token()?> = <?=csrf_token()?>v;
|
||||
|
||||
return $.ajax({
|
||||
"type": conf.method,
|
||||
"url": conf.url,
|
||||
"data": request,
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function (json) {
|
||||
cacheLastJson = $.extend(true, {}, json);
|
||||
|
||||
if (cacheLower != drawStart) {
|
||||
json.data.splice(0, drawStart - cacheLower);
|
||||
}
|
||||
if (requestLength >= -1) {
|
||||
json.data.splice(requestLength, json.data.length);
|
||||
}
|
||||
|
||||
drawCallback(json);
|
||||
|
||||
yeniden(json.token);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
|
||||
$('.dataTables_processing').hide();
|
||||
const theData = jqXHR.responseJSON;
|
||||
drawCallback(theData);
|
||||
Toast.fire({
|
||||
icon: 'error',
|
||||
title: errorThrown,
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let json = $.extend(true, {}, cacheLastJson);
|
||||
json.draw = request.draw; // Update the echo for each response
|
||||
json.data.splice(0, requestStart - cacheLower);
|
||||
json.data.splice(requestLength, json.data.length);
|
||||
|
||||
drawCallback(json);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Register an API method that will empty the pipelined data, forcing an Ajax
|
||||
// fetch on the next draw (i.e. `table.clearPipeline().draw()`)
|
||||
$.fn.dataTable.Api.register('clearPipeline()', function () {
|
||||
return this.iterator('table', function (settings) {
|
||||
settings.clearCache = true;
|
||||
});
|
||||
});
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($usingClientSideDataTable) && $usingClientSideDataTable) { ?>
|
||||
let lastColNr = $(".using-data-table").find("tr:first th").length - 1;
|
||||
theTable = $('.using-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,
|
||||
"autoWidth": true,
|
||||
"scrollX": true,
|
||||
"stateSave": true,
|
||||
"language": {
|
||||
url: "//cdn.datatables.net/plug-ins/1.10.25/i18n/languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
"columnDefs": [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [0,lastColNr]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
<?php } ?>
|
||||
|
||||
$('#confirm2delete').on('show.bs.modal', function (e) {
|
||||
$(this).find('.btn-confirm').attr('href', $(e.relatedTarget).data('href'));
|
||||
});
|
||||
|
||||
|
||||
function toggleAllCheckboxes($cssClass, $io=null) {
|
||||
$('.'+$cssClass).prop('checked', $io);
|
||||
}
|
||||
<?= $this->endSection() ?>
|
||||
19
ci4/app/Views/themes/_commonPartialsBs/select2bs5.php
Normal file
19
ci4/app/Views/themes/_commonPartialsBs/select2bs5.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Push section css -->
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.1.1/dist/select2-bootstrap-5-theme.min.css" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<!-- Push additional js -->
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.full.min.js"></script>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
$('.select2bs').select2({
|
||||
theme: "bootstrap-5",
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
48
ci4/app/Views/themes/_commonPartialsBs/sweetalert.php
Normal file
48
ci4/app/Views/themes/_commonPartialsBs/sweetalert.php
Normal file
@ -0,0 +1,48 @@
|
||||
<!-- Push section css -->
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@9.7.2/dist/sweetalert2.min.css">
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
<!-- Push section js -->
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9.7.2/dist/sweetalert2.all.min.js"></script>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
var Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
timer: 6000,
|
||||
timerProgressBar: true,
|
||||
onOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
});
|
||||
|
||||
<?php if (session('sweet-success')) { ?>
|
||||
Toast.fire({
|
||||
icon: 'success',
|
||||
title: '<?= session('sweet-success.') ?>'
|
||||
});
|
||||
<?php } ?>
|
||||
<?php if (session('sweet-warning')) { ?>
|
||||
Toast.fire({
|
||||
icon: 'warning',
|
||||
title: '<?= session('sweet-warning.') ?>'
|
||||
});
|
||||
<?php } ?>
|
||||
<?php if (session('sweet-error')) { ?>
|
||||
Toast.fire({
|
||||
icon: 'error',
|
||||
title: '<?= session('sweet-error.') ?>'
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,70 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('Tarifaacabado.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tarifaacabado_->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMin" class="form-label">
|
||||
<?=lang('Tarifaacabado.tiradaMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMin" name="tirada_min" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_min', $tarifaacabado_->tirada_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="precioMin" class="form-label">
|
||||
<?=lang('Tarifaacabado.precioMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="precioMin" name="precio_min" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('precio_min', $tarifaacabado_->precio_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMax" class="form-label">
|
||||
<?=lang('Tarifaacabado.tiradaMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMax" name="tirada_max" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_max', $tarifaacabado_->tirada_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="precioMax" class="form-label">
|
||||
<?=lang('Tarifaacabado.precioMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="precioMax" name="precio_max" required maxLength="31" step="0.01" class="form-control" value="<?=old('precio_max', $tarifaacabado_->precio_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="ajuste" class="form-label">
|
||||
<?=lang('Tarifaacabado.ajuste') ?>*
|
||||
</label>
|
||||
<input type="number" id="ajuste" name="ajuste" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('ajuste', $tarifaacabado_->ajuste) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="formulaPrice" class="form-label">
|
||||
<?=lang('Tarifaacabado.formulaPrice') ?>*
|
||||
</label>
|
||||
<textarea rows="3" id="formulaPrice" name="formula_price" required style="height: 10em;" class="form-control"><?=old('formula_price', $tarifaacabado_->formula_price) ?></textarea>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userCreatedId" class="form-label">
|
||||
<?=lang('Tarifaacabado.userCreatedId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userCreatedId" name="user_created_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_created_id', $tarifaacabado_->user_created_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userUpdateId" class="form-label">
|
||||
<?=lang('Tarifaacabado.userUpdateId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userUpdateId" name="user_update_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_update_id', $tarifaacabado_->user_update_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,25 @@
|
||||
<?= $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="tarifaacabadoForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("admin/acabadoViews/_tarifaacabadoFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("tarifaacabadoList2"), 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() ?>
|
||||
@ -0,0 +1,93 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->extend('themes/backend/focus2/main/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('Tarifaacabado.tarifaacabadoList') ?></h3>
|
||||
<?=anchor(route_to('newTarifaacabado'), lang('Basic.global.addNew').' '.lang('Tarifaacabado.tarifaacabado'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfTarifasacabado" class="table table-striped table-hover using-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Tarifaacabado.id') ?></th>
|
||||
<th><?= lang('Tarifaacabado.nombre') ?></th>
|
||||
<th><?= lang('Tarifaacabado.tiradaMin') ?></th>
|
||||
<th><?= lang('Tarifaacabado.precioMin') ?></th>
|
||||
<th><?= lang('Tarifaacabado.tiradaMax') ?></th>
|
||||
<th><?= lang('Tarifaacabado.precioMax') ?></th>
|
||||
<th><?= lang('Tarifaacabado.ajuste') ?></th>
|
||||
<th><?= lang('Tarifaacabado.formulaPrice') ?></th>
|
||||
<th><?= lang('Tarifaacabado.userCreatedId') ?></th>
|
||||
<th><?= lang('Tarifaacabado.userUpdateId') ?></th>
|
||||
<th><?= lang('Tarifaacabado.deletedAt') ?></th>
|
||||
<th><?= lang('Tarifaacabado.createdAt') ?></th>
|
||||
<th><?= lang('Tarifaacabado.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tarifaacabadoList as $item ) : ?>
|
||||
<tr>
|
||||
<td class="align-middle text-center">
|
||||
<?=$item->id ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->tirada_min) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->precio_min) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->tirada_max) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->precio_max) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->ajuste) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->formula_price) || strlen($item->formula_price) < 51 ? esc($item->formula_price) : character_limiter(esc($item->formula_price), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->user_created_id) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->user_update_id) ?>
|
||||
</td>
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->deleted_at) ? '' : date('d/m/Y H:m:s', strtotime($item->deleted_at)) ?>
|
||||
</td>
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->created_at) ? '' : date('d/m/Y H:m:s', strtotime($item->created_at)) ?>
|
||||
</td>
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->updated_at) ? '' : date('d/m/Y H:m:s', strtotime($item->updated_at)) ?>
|
||||
</td>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editTarifaacabado', $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('deleteTarifaacabado', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
211
ci4/app/Views/themes/backend/focus2/main/defaultlayout.php
Normal file
211
ci4/app/Views/themes/backend/focus2/main/defaultlayout.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
$settings = session()->get('settings');
|
||||
$picture = session()->get('picture');
|
||||
$pulse = session()->get('pulse');
|
||||
$notification = session()->get('notification');
|
||||
?>
|
||||
<?php
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $settings['default_language']??'en'=='pt' ? 'pt-br' : $settings['default_language']??'en' ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title><?= lang("App.dashboard_title") ?> - <?= $settings['title']??'' ?></title>
|
||||
<!-- Favicon icon -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<?=site_url('themes/focus2/images/favicon.png')?>">
|
||||
<link href="<?=site_url('themes/focus2/vendor/owl-carousel/css/owl.carousel.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/owl-carousel/css/owl.theme.default.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/jqvmap/css/jqvmap.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/datatables/css/jquery.dataTables.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/select2/css/select2.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/sweetalert2/dist/sweetalert2.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/lou-multi-select/css/multi-select.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/nestable2/css/jquery.nestable.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/vendor/toastr/css/toastr.min.css')?>" rel="stylesheet">
|
||||
<link href="<?=site_url('themes/focus2/css/style.css')?>" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="preloader">
|
||||
<div class="sk-three-bounce">
|
||||
<div class="sk-child sk-bounce1"></div>
|
||||
<div class="sk-child sk-bounce2"></div>
|
||||
<div class="sk-child sk-bounce3"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mainWrapper">
|
||||
<!--Nav Header-->
|
||||
<div class="nav-header">
|
||||
<a href="<?=site_url('home')?>" class="brand-logo">
|
||||
|
||||
<!--- Insertar logo safekat --->
|
||||
</a>
|
||||
<div class="nav-control">
|
||||
<div class="hamburger">
|
||||
<span class="line"></span><span class="line"></span><span class="line"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Header-->
|
||||
<div class="header">
|
||||
<div class="header-content">
|
||||
<nav class="navbar navbar-expand">
|
||||
<div class="collapse navbar-collapse justify-content-between">
|
||||
<div class="header-left"></div>
|
||||
<ul class="navbar-nav header-right">
|
||||
<li class="nav-item dropdown header-profile">
|
||||
<a class="nav-link" href="#" role="button" data-toggle="dropdown">
|
||||
<i class="fas fa-globe-americas"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a href="<?= site_url('lang/en'); ?>" class="dropdown-item">
|
||||
<img src="<?=site_url('assets/flags/us_32_circle.png')?>">
|
||||
<span class="ml-2"><?= lang("App.lang_en") ?></span>
|
||||
</a>
|
||||
<a href="<?= site_url('lang/es'); ?>" class="dropdown-item">
|
||||
<img src="<?=site_url('assets/flags/es_32_circle.png')?>">
|
||||
<span class="ml-2"><?= lang("App.lang_es") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown header-profile">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<img src="<?= $picture??''?>" class="btn-circle btn-circle-sm" style="width: 50px ; height: 50px;">
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a href="<?= site_url('profile'); ?>" class="dropdown-item">
|
||||
<i class="fas fa-user"></i>
|
||||
<span class="ml-2"><?= lang("App.menu_profile") ?></span>
|
||||
</a>
|
||||
<!--- JJO
|
||||
<a href="<?= site_url('activity'); ?>" class="dropdown-item">
|
||||
<i class="fas fa-list"></i>
|
||||
<span class="ml-2"><?= lang("App.menu_activity") ?></span>
|
||||
</a>
|
||||
--->
|
||||
<a href="<?= site_url('login/logout'); ?>" class="dropdown-item">
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<span class="ml-2"><?= lang("App.menu_logout") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php include "menu.php" ?>
|
||||
|
||||
|
||||
<div class="content-body">
|
||||
<div class="container-fluid">
|
||||
<?= $this->renderSection('content') ?>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Required vendors -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/global/global.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/js/quixnav-init.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/js/custom.min.js")?>"></script>
|
||||
<!-- Datatable -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/jquery.dataTables.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/pickers/daterange/moment.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/dataTables.datetime.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/dataTables.buttons.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.bootstrap4.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/jszip.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/pdfmake.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/vfs_fonts.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.html5.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.print.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.colVis.min.js")?>"></script>
|
||||
<!-- Alert -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/sweetalert2/dist/sweetalert2.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/toastr/js/toastr.min.js")?>"></script>
|
||||
<!-- Custom -->
|
||||
<script src="<?=site_url("assets/js/main.js")?>"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
</script>
|
||||
<?= sweetAlert() ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $this->renderSection('footerAdditions') ?>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||
|
||||
<?= $this->renderSection('additionalExternalJs') ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var theTable;
|
||||
var <?=csrf_token() ?? 'token'?>v = '<?= csrf_hash() ?>';
|
||||
|
||||
function yeniden(andac = null) {
|
||||
if (andac == null) {
|
||||
andac = <?= csrf_token() ?>v;
|
||||
} else {
|
||||
<?= csrf_token() ?>v = andac;
|
||||
}
|
||||
$('input[name="<?= csrf_token() ?>"]').val(andac);
|
||||
$('meta[name="<?= config('Security')->tokenName ?>"]').attr('content', andac)
|
||||
$.ajaxSetup({ headers: {'<?= config('Security')->headerName ?>': andac, 'X-Requested-With': 'XMLHttpRequest' }, <?=csrf_token()?>: andac });
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
function adjustSidebar4ContentWrapper() {
|
||||
if ($('#sidebar').hasClass('d-none') && $(window).width() <= 768) {
|
||||
$('#contentWrapper').addClass('full-width');
|
||||
} else {
|
||||
if (!$('#sidebar').hasClass('inactive')) {
|
||||
$('#contentWrapper').removeClass('full-width');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjustSidebar4ContentWrapper();
|
||||
|
||||
$('#sidebarCollapse').on('click', function () {
|
||||
|
||||
if ($('#sidebar').hasClass('d-none') && $(window).width() <= 768 ) {
|
||||
$('#sidebar').removeClass('d-none d-sm-none d-md-block');
|
||||
|
||||
$('#contentWrapper').removeClass('full-width');
|
||||
} else {
|
||||
$('#sidebar').toggleClass('inactive');
|
||||
$('#contentWrapper').toggleClass('full-width');
|
||||
$('.collapse.in').toggleClass('in');
|
||||
$('a[aria-expanded=true]').attr('aria-expanded', 'false');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
adjustSidebar4ContentWrapper();
|
||||
});
|
||||
|
||||
<?= $this->renderSection('additionalInlineJs') ?>
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -38,9 +38,7 @@ $notification = session()->get('notification');
|
||||
<!--Nav Header-->
|
||||
<div class="nav-header">
|
||||
<a href="<?=site_url('home')?>" class="brand-logo">
|
||||
<img class="logo-abbr" src="<?=site_url('themes/focus2/images/logo.png')?>" alt="">
|
||||
<img class="logo-compact" src="<?=site_url('themes/focus2/images/logo-text.png')?>" alt="">
|
||||
<img class="brand-title" src="<?=site_url('themes/focus2/images/logo-text.png')?>" alt="">
|
||||
|
||||
</a>
|
||||
<div class="nav-control">
|
||||
<div class="hamburger">
|
||||
|
||||
@ -174,9 +174,9 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(allowMenuSection($menus, ['Tarifaacabado', 'Tarifaenvio', 'Tarifaimpresion', 'Tarifamanipulado', 'Tarifapapelcompra', 'Tarifapapeldefecto', 'Tarifapreimpresion'], 'index')): ?>
|
||||
<li><a class="has-arrow" href="Javascript:void()" aria-expanded="false"><i class="icon-arrow-down"></i><span class="nav-text"><?= lang("App.menu_produccion") ?></span></a>
|
||||
<li><a class="has-arrow" href="Javascript:void()" aria-expanded="false"><i class="icon-arrow-down"></i><span class="nav-text"><?= lang("App.menu_tarifas") ?></span></a>
|
||||
<ul aria-expanded="false">
|
||||
<?php if (count($temp=getArrayItem($menus,'name','Taricaacabado')) > 0): ?>
|
||||
<?php if (count($temp=getArrayItem($menus,'name','Tarifaacabado')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp,'methods','index',true)) > 0): ?>
|
||||
<li><a href="<?= site_url("tarifas/tarifaacabado")?>" aria-expanded="false"><i class="icon-list"></i><span class="nav-text"><?= lang("App.menu_tarifaacabado") ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user