Cambiadas rutas de maquinas, papel generico, papel impresion, perfil y paises

This commit is contained in:
unknown
2025-04-08 14:45:14 +02:00
parent ae9af197ac
commit c0de7ec238
14 changed files with 186 additions and 169 deletions

View File

@ -85,6 +85,73 @@ $routes->group('tarifas', ['namespace' => 'App\Controllers\Tarifas'], function (
/* Rutas para configuraciones */
$routes->group('configuracion', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
/* Paises */
$routes->group('paises', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Paises::index', ['as' => 'paisList']);
$routes->get('add', 'Paises::add', ['as' => 'newPais']);
$routes->post('add', 'Paises::add', ['as' => 'createPais']);
$routes->post('create', 'Paises::create', ['as' => 'ajaxCreatePais']);
$routes->put('update/(:num)', 'Paises::update/$1', ['as' => 'ajaxUpdatePais']);
$routes->match(['get', 'post'], 'edit/(:num)', 'Paises::edit/$1', ['as' => 'updatePais']);
$routes->post('datatable', 'Paises::datatable', ['as' => 'dataTableOfPaises']);
$routes->post('allmenuitems', 'Paises::allItemsSelect', ['as' => 'select2ItemsOfPaises']);
$routes->post('menuitems', 'Paises::menuItems', ['as' => 'menuItemsOfPaises']);
$routes->get('menuitems2', 'Paises::menuItems2', ['as' => 'menuItemsOfPaises2']);
});
/* Papeles genericos */
$routes->group('papelesgenericos', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Papelesgenericos::index', ['as' => 'papelGenericoList']);
$routes->delete('', 'Papelesgenericos::index', ['as' => 'papelGenericoList2']);
$routes->get('add', 'Papelesgenericos::add', ['as' => 'newPapelGenerico']);
$routes->post('add', 'Papelesgenericos::add', ['as' => 'createPapelGenerico']);
$routes->post('create', 'Papelesgenericos::create', ['as' => 'ajaxCreatePapelGenerico']);
$routes->put('(:num)/update', 'Papelesgenericos::update/$1', ['as' => 'ajaxUpdatePapelGenerico']);
$routes->match(['get', 'post'], 'edit/(:num)', 'Papelesgenericos::edit/$1', ['as' => 'updatePapelGenerico']);
$routes->post('datatable', 'Papelesgenericos::datatable', ['as' => 'dataTableOfPapelesGenericos']);
$routes->post('allmenuitems', 'Papelesgenericos::allItemsSelect', ['as' => 'select2ItemsOfPapelesGenericos']);
$routes->post('menuitems', 'Papelesgenericos::menuItems', ['as' => 'menuItemsOfPapelesGenericos']);
$routes->get('getpapelcliente', 'Papelesgenericos::getPapelCliente', ['as' => 'getPapelCliente']);
$routes->get('selectpapelespecial', 'Papelesgenericos::selectPapelEspecial', ['as' => 'selectPapelEspecial']);
});
/* Papeles impresion */
$routes->group('papelesimpresion', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Papelesimpresion::index', ['as' => 'papelImpresionList']);
$routes->get('add', 'Papelesimpresion::add', ['as' => 'newPapelImpresion']);
$routes->post('add', 'Papelesimpresion::add', ['as' => 'createPapelImpresion']);
$routes->post('create', 'Papelesimpresion::create', ['as' => 'ajaxCreatePapelImpresion']);
$routes->put('(:num)/update', 'Papelesimpresion::update/$1', ['as' => 'ajaxUpdatePapelImpresion']);
$routes->match(['get', 'post'], 'edit/(:num)', 'Papelesimpresion::edit/$1', ['as' => 'updatePapelImpresion']);
$routes->post('datatable', 'Papelesimpresion::datatable', ['as' => 'dataTableOfPapelesImpresion']);
$routes->post('allmenuitems', 'Papelesimpresion::allItemsSelect', ['as' => 'select2ItemsOfPapelesImpresion']);
$routes->post('menuitems', 'Papelesimpresion::menuItems', ['as' => 'menuItemsOfPapelesImpresion']);
$routes->post('duplicate/(:num)', 'Papelesimpresion::duplicate/$1', ['as' => 'duplicatePapelImpresion']);
$routes->get('select', 'Papelesimpresion::papel_impresion_select', ['as' => 'papelImpresionSelect']);
$routes->get('show/(:num)', 'Papelesimpresion::papel_impresion_find/$1', ['as' => 'showPapelImpresion']);
});
/* Maquinas */
$routes->group('maquinas', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Maquinas::index', ['as' => 'maquinaList']);
$routes->get('add', 'Maquinas::add', ['as' => 'newMaquina']);
$routes->get('edit/(:num)', 'Maquinas::edit/$1');
$routes->get('delete/(:num)', 'Maquinas::delete/$1');
$routes->post('add', 'Maquinas::add', ['as' => 'createMaquina']);
$routes->post('create', 'Maquinas::create', ['as' => 'ajaxCreateMaquina']);
$routes->put('update/(:num)', 'Maquinas::update/$1', ['as' => 'ajaxUpdateMaquina']);
$routes->match(['get', 'post'], 'edit/(:num)', 'Maquinas::edit/$1', ['as' => 'updateMaquina']);
$routes->post('datatable', 'Maquinas::datatable', ['as' => 'dataTableOfMaquinas']);
$routes->post('allmenuitems', 'Maquinas::allItemsSelect', ['as' => 'select2ItemsOfMaquinas']);
$routes->post('menuitems', 'Maquinas::menuItems', ['as' => 'menuItemsOfMaquinas']);
$routes->post('duplicate/(:num)', 'Maquinas::duplicate/$1', ['as' => 'duplicateMaquina']);
$routes->get('(:num)', 'Maquinas::find_maquina/$1', ['as' => 'findMaquina']);
$routes->get('select', 'Maquinas::select', ['as' => 'selectMaquinas']);
});
/* Ubicaciones */
$routes->group('ubicaciones', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
@ -267,39 +334,9 @@ $routes->group('imposiciones', ['namespace' => 'App\Controllers\Configuracion'],
});
$routes->resource('imposiciones', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Imposiciones', 'except' => 'show,new,create,update']);
$routes->group('papelesgenericos', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Papelesgenericos::index', ['as' => 'papelGenericoList']);
$routes->delete('', 'Papelesgenericos::index', ['as' => 'papelGenericoList2']);
$routes->get('add', 'Papelesgenericos::add', ['as' => 'newPapelGenerico']);
$routes->post('add', 'Papelesgenericos::add', ['as' => 'createPapelGenerico']);
$routes->post('create', 'Papelesgenericos::create', ['as' => 'ajaxCreatePapelGenerico']);
$routes->put('(:num)/update', 'Papelesgenericos::update/$1', ['as' => 'ajaxUpdatePapelGenerico']);
$routes->post('edit/(:num)', 'Papelesgenericos::edit/$1', ['as' => 'updatePapelGenerico']);
$routes->post('datatable', 'Papelesgenericos::datatable', ['as' => 'dataTableOfPapelesGenericos']);
$routes->post('allmenuitems', 'Papelesgenericos::allItemsSelect', ['as' => 'select2ItemsOfPapelesGenericos']);
$routes->post('menuitems', 'Papelesgenericos::menuItems', ['as' => 'menuItemsOfPapelesGenericos']);
$routes->get('getpapelcliente', 'Papelesgenericos::getPapelCliente', ['as' => 'getPapelCliente']);
$routes->get('selectpapelespecial', 'Papelesgenericos::selectPapelEspecial', ['as' => 'selectPapelEspecial']);
});
$routes->resource('papelesgenericos', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelesgenericos', 'except' => 'show,new,create,update']);
$routes->group('papelesimpresion', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Papelesimpresion::index', ['as' => 'papelImpresionList']);
$routes->get('add', 'Papelesimpresion::add', ['as' => 'newPapelImpresion']);
$routes->post('add', 'Papelesimpresion::add', ['as' => 'createPapelImpresion']);
$routes->post('create', 'Papelesimpresion::create', ['as' => 'ajaxCreatePapelImpresion']);
$routes->put('(:num)/update', 'Papelesimpresion::update/$1', ['as' => 'ajaxUpdatePapelImpresion']);
$routes->post('edit/(:num)', 'Papelesimpresion::edit/$1', ['as' => 'updatePapelImpresion']);
$routes->post('datatable', 'Papelesimpresion::datatable', ['as' => 'dataTableOfPapelesImpresion']);
$routes->post('allmenuitems', 'Papelesimpresion::allItemsSelect', ['as' => 'select2ItemsOfPapelesImpresion']);
$routes->post('menuitems', 'Papelesimpresion::menuItems', ['as' => 'menuItemsOfPapelesImpresion']);
$routes->post('duplicate/(:num)', 'Papelesimpresion::duplicate/$1', ['as' => 'duplicatePapelImpresion']);
$routes->get('select', 'Papelesimpresion::papel_impresion_select', ['as' => 'papelImpresionSelect']);
$routes->get('show/(:num)', 'Papelesimpresion::papel_impresion_find/$1', ['as' => 'showPapelImpresion']);
});
$routes->resource('papelesimpresion', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelesimpresion', 'except' => 'show,new,create,update']);
//$routes->resource('papelesimpresion', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelesimpresion', 'except' => 'show,new,create,update']);
$routes->group('papelimpresiontipologias', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('add', 'Papelimpresiontipologias::add', ['as' => 'newPapelImpresionTipologia']);
@ -318,23 +355,7 @@ $routes->group('papelesimpresionmargenes', ['namespace' => 'App\Controllers\Conf
});
$routes->resource('papelesimpresionmargenes', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelimpresionmargenes', 'except' => 'show,new,create,update']);
$routes->group('maquinas', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Maquinas::index', ['as' => 'maquinaList']);
$routes->get('add', 'Maquinas::add', ['as' => 'newMaquina']);
$routes->get('edit/(:num)', 'Maquinas::edit/$1');
$routes->get('delete/(:num)', 'Maquinas::delete/$1');
$routes->post('add', 'Maquinas::add', ['as' => 'createMaquina']);
$routes->post('create', 'Maquinas::create', ['as' => 'ajaxCreateMaquina']);
$routes->put('update/(:num)', 'Maquinas::update/$1', ['as' => 'ajaxUpdateMaquina']);
$routes->post('edit/(:num)', 'Maquinas::edit/$1', ['as' => 'updateMaquina']);
$routes->post('datatable', 'Maquinas::datatable', ['as' => 'dataTableOfMaquinas']);
$routes->post('allmenuitems', 'Maquinas::allItemsSelect', ['as' => 'select2ItemsOfMaquinas']);
$routes->post('menuitems', 'Maquinas::menuItems', ['as' => 'menuItemsOfMaquinas']);
$routes->post('duplicate/(:num)', 'Maquinas::duplicate/$1', ['as' => 'duplicateMaquina']);
$routes->get('(:num)', 'Maquinas::find_maquina/$1', ['as' => 'findMaquina']);
$routes->get('select', 'Maquinas::select', ['as' => 'selectMaquinas']);
});
$routes->resource('maquinas', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Maquinas', 'except' => 'show,new,create,update']);
//$routes->resource('maquinas', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Maquinas', 'except' => 'show,new,create,update']);
$routes->group('maquinastarifasimpresion', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
@ -388,6 +409,7 @@ $routes->group('profile', ['namespace' => 'App\Controllers'], function ($routes)
$routes->get('', 'Profile::index', ['as' => 'profileList']);
$routes->get('index', 'Profile::index', ['as' => 'profileIndex']);
$routes->get('list', 'Profile::index', ['as' => 'profileList2']);
$routes->match(['get', 'post'], 'store', 'Profile::store', ['as' => 'profileStore']);
});
@ -417,19 +439,7 @@ $routes->group('formas-pago', ['namespace' => 'App\Controllers\Configuracion'],
$routes->resource('formas-pago', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'FormasPago', 'except' => 'show,new,create,update']);
$routes->group('paises', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
$routes->get('', 'Paises::index', ['as' => 'paisList']);
$routes->get('add', 'Paises::add', ['as' => 'newPais']);
$routes->post('add', 'Paises::add', ['as' => 'createPais']);
$routes->post('create', 'Paises::create', ['as' => 'ajaxCreatePais']);
$routes->put('(:num)/update', 'Paises::update/$1', ['as' => 'ajaxUpdatePais']);
$routes->post('(:num)/edit', 'Paises::edit/$1', ['as' => 'updatePais']);
$routes->post('datatable', 'Paises::datatable', ['as' => 'dataTableOfPaises']);
$routes->post('allmenuitems', 'Paises::allItemsSelect', ['as' => 'select2ItemsOfPaises']);
$routes->post('menuitems', 'Paises::menuItems', ['as' => 'menuItemsOfPaises']);
$routes->get('menuitems2', 'Paises::menuItems2', ['as' => 'menuItemsOfPaises2']);
});
$routes->resource('paises', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Paises', 'except' => 'show,new,create,update']);
//$routes->resource('paises', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Paises', 'except' => 'show,new,create,update']);
$routes->group('provincias', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
@ -592,7 +602,7 @@ $routes->group('tarifasenvioszonas', ['namespace' => 'App\Controllers\Tarifas'],
});
$routes->resource('tarifasenvioszonas', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenvioszonas', 'except' => 'show,new,create,update']);
/* Compras */
/* Compras */
$routes->group('compras', ['namespace' => 'App\Controllers\Compras'], function ($routes) {
$routes->group('proveedores', ['namespace' => 'App\Controllers\Compras'], function ($routes) {
$routes->get('', 'Proveedores::index', ['as' => 'proveedorList']);

View File

@ -88,7 +88,7 @@ class Routing extends BaseRouting
*
* If FALSE, will stop searching and do NO automatic routing.
*/
public bool $autoRoute = false;
public bool $autoRoute = false;
/**
* If TRUE, will enable the use of the 'prioritize' option
@ -96,7 +96,7 @@ class Routing extends BaseRouting
*
* Default: false
*/
public bool $prioritize = false;
public bool $prioritize = true;
/**
* Map of URI segments and namespaces. For Auto Routing (Improved).

View File

@ -46,7 +46,7 @@ class Maquinas extends \App\Controllers\BaseResourceController
// Breadcrumbs (IMN)
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
['title' => lang("App.menu_maquina"), 'route' => site_url('configuracion/maquinas'), 'active' => true]
['title' => lang("App.menu_maquina"), 'route' => route_to('maquinaList'), 'active' => true]
];
parent::initController($request, $response, $logger);

View File

@ -43,7 +43,7 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
// Breadcrumbs (IMN)
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
['title' => lang("App.menu_papelgenerico"), 'route' => site_url('configuracion/papelesgenericos'), 'active' => true]
['title' => lang("App.menu_papelgenerico"), 'route' => route_to('papelGenericoList'), 'active' => true]
];
parent::initController($request, $response, $logger);

View File

@ -72,7 +72,7 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
// Breadcrumbs
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
['title' => lang("App.menu_papelimpresion"), 'route' => site_url('configuracion/papelesimpresion'), 'active' => true]
['title' => lang("App.menu_papelimpresion"), 'route' => route_to('papelImpresionList'), 'active' => true]
];
parent::initController($request, $response, $logger);

View File

@ -1,66 +1,74 @@
<div class="row">
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Paises.nombre') ?>*
</label>
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $paisEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="row">
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="nombre" class="form-label">
<?= lang('Paises.nombre') ?>*
</label>
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control"
value="<?= old('nombre', $paisEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code" class="form-label">
<?=lang('Paises.code') ?>*
</label>
<input type="text" id="code" name="code" required maxLength="2" class="form-control" value="<?=old('code', $paisEntity->code) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code" class="form-label">
<?= lang('Paises.code') ?>*
</label>
<input type="text" id="code" name="code" required maxLength="2" class="form-control"
value="<?= old('code', $paisEntity->code) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code3" class="form-label">
<?=lang('Paises.code3') ?>
</label>
<input type="text" id="code3" name="code3" maxLength="3" class="form-control" value="<?=old('code3', $paisEntity->code3) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code3" class="form-label">
<?= lang('Paises.code3') ?>
</label>
<input type="text" id="code3" name="code3" maxLength="3" class="form-control"
value="<?= old('code3', $paisEntity->code3) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="moneda" class="form-label">
<?=lang('Paises.moneda') ?>*
</label>
<input type="text" id="moneda" name="moneda" required maxLength="3" class="form-control" value="<?=old('moneda', $paisEntity->moneda) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="moneda" class="form-label">
<?= lang('Paises.moneda') ?>*
</label>
<input type="text" id="moneda" name="moneda" required maxLength="3" class="form-control"
value="<?= old('moneda', $paisEntity->moneda) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="urlErp" class="form-label">
<?=lang('Paises.urlErp') ?>
</label>
<input type="url" id="urlErp" name="url_erp" maxLength="255" class="form-control" value="<?=old('url_erp', $paisEntity->url_erp) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="urlErp" class="form-label">
<?= lang('Paises.urlErp') ?>
</label>
<input type="url" id="urlErp" name="url_erp" maxLength="255" class="form-control"
value="<?= old('url_erp', $paisEntity->url_erp) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="userErp" class="form-label">
<?=lang('Paises.userErp') ?>
</label>
<input type="text" id="userErp" name="user_erp" maxLength="255" class="form-control" value="<?=old('user_erp', $paisEntity->user_erp) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="userErp" class="form-label">
<?= lang('Paises.userErp') ?>
</label>
<input type="text" id="userErp" name="user_erp" maxLength="255" class="form-control"
value="<?= old('user_erp', $paisEntity->user_erp) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="keyErp" class="form-label">
<?=lang('Paises.keyErp') ?>
</label>
<input type="text" id="keyErp" name="key_erp" maxLength="255" class="form-control" value="<?=old('key_erp', $paisEntity->key_erp) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="keyErp" class="form-label">
<?= lang('Paises.keyErp') ?>
</label>
<input type="text" id="keyErp" name="key_erp" maxLength="255" class="form-control"
value="<?= old('key_erp', $paisEntity->key_erp) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">
<div class="mb-3">
<div class="form-check">
<label for="showErp" class="form-check-label">
<input type="checkbox" id="showErp" name="show_erp" value="1" class="form-check-input"<?=$paisEntity->show_erp== true ? 'checked' : ''; ?>>
<?=lang('Paises.showErp') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
<label for="showErp" class="form-check-label">
<input type="checkbox" id="showErp" name="show_erp" value="1" class="form-check-input"
<?= $paisEntity->show_erp == true ? 'checked' : ''; ?>>
<?= lang('Paises.showErp') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
</div><!--//.col -->
</div><!-- //.row -->
</div><!-- //.row -->

View File

@ -112,7 +112,7 @@
});
$(document).on('click', '.btn-edit', function(e) {
window.location.href = `<?= route_to('paisList') ?>/${$(this).attr('data-id')}/edit`;
window.location.href = `<?= route_to('paisList') ?>/edit/${$(this).attr('data-id')}`;
});
$(document).on('click', '.btn-delete', function(e) {

View File

@ -155,7 +155,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_bn_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_bn_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -164,7 +164,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_bn_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_bn_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -173,7 +173,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_bn_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_bn_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -237,7 +237,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_bnhq_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_bnhq_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -246,7 +246,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_bnhq_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_bnhq_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -255,7 +255,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_bnhq_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_bnhq_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -319,7 +319,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_color_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_color_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -328,7 +328,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_color_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_color_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -337,7 +337,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_color_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_color_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -401,7 +401,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_colorhq_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_colorhq_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -410,7 +410,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_colorhq_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_colorhq_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -419,7 +419,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_colorhq_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_colorhq_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -485,7 +485,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_rot_bn_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_rot_bn_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -494,7 +494,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_rot_bn_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_rot_bn_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -503,7 +503,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_rot_bn_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_rot_bn_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -565,7 +565,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_rot_color_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_rot_color_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -574,7 +574,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_rot_color_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_rot_color_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -583,7 +583,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_rot_color_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_rot_color_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button"
class="btn btn-label-primary">
@ -646,7 +646,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_guardas_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_guardas_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -655,7 +655,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_guardas_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_guardas_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -664,7 +664,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_guardas_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_guardas_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -728,7 +728,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_cubierta_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_cubierta_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -737,7 +737,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_cubierta_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_cubierta_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -746,7 +746,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_cubierta_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_cubierta_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -813,7 +813,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_ec_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_ec_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -822,7 +822,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_ec_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_ec_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -831,7 +831,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_ec_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_ec_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -882,7 +882,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_sobrecubierta_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_sobrecubierta_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -891,7 +891,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_sobrecubierta_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_sobrecubierta_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -900,7 +900,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_sobrecubierta_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_sobrecubierta_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>
@ -963,7 +963,7 @@
<!-- Configuraciones -->
<div class="row g-3 mb-3">
<div class="col-12">
<a id="pv_faja_pg" href="#" sk-url="<?= site_url('configuracion/papelesgenericos/edit/'); ?>" target="_blank">
<a id="pv_faja_pg" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelGenerico', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelGenerico") ?>
@ -972,7 +972,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_faja_pi" href="#" sk-url="<?= site_url('configuracion/papelesimpresion/edit/'); ?>" target="_blank">
<a id="pv_faja_pi" href="#" sk-url="<?= str_replace('/0', '', route_to('updatePapelImpresion', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewPapelCompra") ?>
@ -981,7 +981,7 @@
</a>
</div>
<div class="col-12">
<a id="pv_faja_mi" href="#" sk-url="<?= site_url('configuracion/maquinas/edit/'); ?>" target="_blank">
<a id="pv_faja_mi" href="#" sk-url="<?= str_replace('/0', '', route_to('updateMaquina', 0)); ?>" target="_blank">
<div class="d-grid">
<button type="button" class="btn btn-label-primary">
<?= lang("Presupuestos.previewAreaImpresion") ?>

View File

@ -8,7 +8,7 @@
<h5 class="card-header">Perfil de Usuario</h5>
<!-- Account -->
<div class="card-body">
<form id="formAccountSettings" method="POST" action="<?= site_url("profile/store") ?>">
<form id="formAccountSettings" method="post" action="<?= route_to("profileStore") ?>">
<?= csrf_field() ?>
<div class="row">
<div class="mb-3 col-md-4">
@ -81,13 +81,12 @@
</div>
<!-- /Account -->
</div>
</div>
<?php $settings = session()->get('settings'); ?>
</div>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -256,7 +256,7 @@
<?php if (count($temp = getArrayItem($menus, 'name', 'Paises')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">
<a href="<?= site_url("configuracion/paises") ?>" class="menu-link">
<a href="<?= route_to('paisesList') ?>" class="menu-link">
<div data-i18n="<?= lang("App.menu_paises") ?>"><?= lang("App.menu_paises") ?></div>
</a>
</li>

View File

@ -299,7 +299,7 @@
<?php if (count($temp = getArrayItem($menus, 'name', 'Paises')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">
<a href="<?= site_url("configuracion/paises") ?>" class="menu-link">
<a href="<?= route_to('paisesList') ?>" class="menu-link">
<div data-i18n="<?= lang("App.menu_paises") ?>"><?= lang("App.menu_paises") ?></div>
</a>
</li>

View File

@ -37,21 +37,21 @@ if (
<?php } ?>
<?php if (auth()->user()->can('papel-generico.menu')) { ?>
<li class="menu-item">
<a href="<?= site_url("configuracion/papelesgenericos") ?>" class="menu-link">
<a href="<?= route_to('papelGenericoList') ?>" class="menu-link">
<?= lang("App.menu_papelgenerico") ?>
</a>
</li>
<?php } ?>
<?php if (auth()->user()->can('papel-impresion.menu')) { ?>
<li class="menu-item">
<a href="<?= site_url("configuracion/papelesimpresion") ?>" class="menu-link">
<a href="<?= route_to('papelImpresionList') ?>" class="menu-link">
<?= lang("App.menu_papelimpresion") ?>
</a>
</li>
<?php } ?>
<?php if (auth()->user()->can('maquinas.menu')) { ?>
<li class="menu-item">
<a href="<?= site_url("configuracion/maquinas") ?>" class="menu-link">
<a href="<?= route_to('maquinaList') ?>" class="menu-link">
<?= lang("App.menu_maquina") ?>
</a>
</li>

View File

@ -17,7 +17,7 @@ $(() => {
$("#btn-new-maquina-duplicate").off();
$("#duplicated_name").addClass("is-valid").removeClass('d-none');
$("#duplicated_name").val("")
window.open('/maquinas/edit/' + response.data.id)
window.open('/configuracion/maquinas/edit/' + response.data.id)
},
(error) => {

View File

@ -35,7 +35,7 @@ class MaquinasList {
e.preventDefault(); // Previene cualquier comportamiento por defecto del enlace
const dataId = $(this).closest('tr').find('[data-id]').data('id'); // Obtén el ID dinámico
const dynamicUrl = '/maquinas/edit/' + dataId;
const dynamicUrl = '/configuracion/maquinas/edit/' + dataId;
if (!Number.isNaN(Number(dataId))) {
if (e.ctrlKey || e.metaKey) {
@ -102,7 +102,7 @@ class MaquinasList {
this.tableMaquinas = new Table(
$('#tableOfMaquinas'),
'maquinasList',
'/maquinas/datatable',
'/configuracion/maquinas/datatable',
columns,
[]
);