mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'newmerge' into 'main'
Newmerge See merge request jjimenez/safekat!13
This commit is contained in:
8
ci4/.env
8
ci4/.env
@ -23,7 +23,7 @@ CI_ENVIRONMENT = development
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||
# app.forceGlobalSecureRequests = false
|
||||
|
||||
# app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'
|
||||
@ -41,9 +41,9 @@ app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
database.default.hostname = localhost
|
||||
database.default.database = sk_imn
|
||||
database.default.username = sk_imn
|
||||
database.default.password = Uyia19_87
|
||||
database.default.database = sk_jjo
|
||||
database.default.username = sk_jjo
|
||||
database.default.password = 61tv&G1Zf^XY
|
||||
database.default.DBDriver = MySQLi
|
||||
database.default.DBPrefix =
|
||||
database.default.dump =
|
||||
|
||||
@ -97,7 +97,7 @@ class App extends BaseConfig
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $supportedLocales = ['en','es','pt'];
|
||||
public $supportedLocales = ['en','es'];
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
@ -28,7 +28,7 @@ class Basics extends BaseConfig {
|
||||
|
||||
public $appName = 'Safekat';
|
||||
|
||||
public $i18n = 'es-ES';
|
||||
public $i18n = 'Spanish';
|
||||
|
||||
public $languages = [
|
||||
'en' => 'English',
|
||||
|
||||
@ -29,4 +29,4 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
|
||||
| the system. This will control whether Kint is loaded, and a few other
|
||||
| items. It can always be used within your own application too.
|
||||
*/
|
||||
defined('CI_DEBUG') || define('CI_DEBUG', false); // IMN Changed for deleting DEBUG VIEW MSGs
|
||||
defined('CI_DEBUG') || define('CI_DEBUG', true);
|
||||
|
||||
@ -32,58 +32,101 @@ $routes->setAutoRoute(true);
|
||||
// We get a performance increase by specifying the default
|
||||
// route since we don't have to scan directories.
|
||||
|
||||
$routes->group('', [], function ($routes) {
|
||||
$routes->group('', [], function($routes) {
|
||||
|
||||
$routes->group('paises', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Paises::index', ['as' => 'paisList']);
|
||||
$routes->get('index', 'Paises::index', ['as' => 'paisIndex']);
|
||||
$routes->get('add', 'Paises::add', ['as' => 'newPais']);
|
||||
$routes->post('add', 'Paises::add', ['as' => 'createPais']);
|
||||
$routes->get('edit/(:num)', 'Paises::edit/$1', ['as' => 'editPais']);
|
||||
$routes->post('edit/(:num)', 'Paises::edit/$1', ['as' => 'updatePais']);
|
||||
$routes->get('delete/(:num)', 'Paises::delete/$1', ['as' => 'deletePais']);
|
||||
$routes->post('allmenuitems', 'Paises::allItemsSelect', ['as' => 'select2ItemsOfPaises']);
|
||||
$routes->post('menuitems', 'Paises::menuItems', ['as' => 'menuItemsOfPaises']);
|
||||
});
|
||||
|
||||
$routes->group('tarifaacabado', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->get('', 'Tarifaacabado::index', ['as' => 'tarifaacabadoList']);
|
||||
$routes->get('index', 'Tarifaacabado::index', ['as' => 'tarifaacabadoIndex']);
|
||||
$routes->get('list', 'Tarifaacabado::index', ['as' => 'tarifaacabadoList2']);
|
||||
$routes->get('add', 'Tarifaacabado::add', ['as' => 'newTarifaacabado']);
|
||||
$routes->post('add', 'Tarifaacabado::add', ['as' => 'createTarifaacabado']);
|
||||
$routes->get('edit/(:num)', 'Tarifaacabado::edit/$1', ['as' => 'editTarifaacabado']);
|
||||
$routes->post('edit/(:num)', 'Tarifaacabado::edit/$1', ['as' => 'updateTarifaacabado']);
|
||||
$routes->get('delete/(:num)', 'Tarifaacabado::delete/$1', ['as' => 'deleteTarifaacabado']);
|
||||
$routes->post('allmenuitems', 'Tarifaacabado::allItemsSelect', ['as' => 'select2ItemsOfTarifasacabado']);
|
||||
$routes->post('menuitems', 'Tarifaacabado::menuItems', ['as' => 'menuItemsOfTarifasacabado']);
|
||||
});
|
||||
|
||||
$routes->group('paises', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Paises::index', ['as' => 'paisList']);
|
||||
$routes->get('index', 'Paises::index', ['as' => 'paisIndex']);
|
||||
$routes->get('add', 'Paises::add', ['as' => 'newPais']);
|
||||
$routes->post('add', 'Paises::add', ['as' => 'createPais']);
|
||||
$routes->get('edit/(:num)', 'Paises::edit/$1', ['as' => 'editPais']);
|
||||
$routes->post('edit/(:num)', 'Paises::edit/$1', ['as' => 'updatePais']);
|
||||
$routes->get('delete/(:num)', 'Paises::delete/$1', ['as' => 'deletePais']);
|
||||
$routes->post('allmenuitems', 'Paises::allItemsSelect', ['as' => 'select2ItemsOfPaises']);
|
||||
$routes->post('menuitems', 'Paises::menuItems', ['as' => 'menuItemsOfPaises']);
|
||||
$routes->group('users', ['namespace' => 'App\Controllers\Usuarios'], function ($routes) {
|
||||
$routes->get('', 'Users::index', ['as' => 'userList']);
|
||||
$routes->get('index', 'Users::index', ['as' => 'userIndex']);
|
||||
$routes->get('list', 'Users::index', ['as' => 'userList2']);
|
||||
$routes->get('add', 'Users::add', ['as' => 'newUser']);
|
||||
$routes->post('add', 'Users::add', ['as' => 'createUser']);
|
||||
$routes->get('edit/(:num)', 'Users::edit/$1', ['as' => 'editUser']);
|
||||
$routes->post('edit/(:num)', 'Users::edit/$1', ['as' => 'updateUser']);
|
||||
$routes->get('delete/(:num)', 'Users::delete/$1', ['as' => 'deleteUser']);
|
||||
$routes->post('allmenuitems', 'Users::allItemsSelect', ['as' => 'select2ItemsOfUsers']);
|
||||
$routes->post('menuitems', 'Users::menuItems', ['as' => 'menuItemsOfUsers']);
|
||||
});
|
||||
|
||||
$routes->group('group', ['namespace' => 'App\Controllers\Usuarios'], function ($routes) {
|
||||
$routes->get('', 'Group::index', ['as' => 'userGroupList']);
|
||||
$routes->get('index', 'Group::index', ['as' => 'groupIndex']);
|
||||
$routes->post('edit/(:num)', 'Group::edit/$1', ['as' => 'updateGroup']);
|
||||
$routes->get('edit/(:num)', 'Group::edit/$1', ['as' => 'editGroup']);
|
||||
$routes->get('delete/(:num)', 'Group::delete/$1', ['as' => 'deleteGroup']);
|
||||
$routes->get('add', 'Group::add', ['as' => 'newGroup']);
|
||||
$routes->post('add', 'Group::add', ['as' => 'createGroup']);
|
||||
});
|
||||
|
||||
$routes->group('tarifapreimpresion', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->get('', 'Tarifapreimpresion::index', ['as' => 'tarifapreimpresionList']);
|
||||
$routes->get('index', 'Tarifapreimpresion::index', ['as' => 'tarifapreimpresionIndex']);
|
||||
$routes->get('list', 'Tarifapreimpresion::index', ['as' => 'tarifapreimpresionList2']);
|
||||
$routes->get('add', 'Tarifapreimpresion::add', ['as' => 'newTarifapreimpresion']);
|
||||
$routes->post('add', 'Tarifapreimpresion::add', ['as' => 'createTarifapreimpresion']);
|
||||
$routes->get('edit/(:num)', 'Tarifapreimpresion::edit/$1', ['as' => 'editTarifapreimpresion']);
|
||||
$routes->post('edit/(:num)', 'Tarifapreimpresion::edit/$1', ['as' => 'updateTarifapreimpresion']);
|
||||
$routes->get('delete/(:num)', 'Tarifapreimpresion::delete/$1', ['as' => 'deleteTarifapreimpresion']);
|
||||
$routes->post('allmenuitems', 'Tarifapreimpresion::allItemsSelect', ['as' => 'select2ItemsOfTarifaspreimpresion']);
|
||||
$routes->post('menuitems', 'Tarifapreimpresion::menuItems', ['as' => 'menuItemsOfTarifaspreimpresion']);
|
||||
});
|
||||
|
||||
|
||||
$routes->group('tarifamanipulado', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->get('', 'Tarifamanipulado::index', ['as' => 'tarifamanipuladoList']);
|
||||
$routes->get('index', 'Tarifamanipulado::index', ['as' => 'tarifamanipuladoIndex']);
|
||||
$routes->get('list', 'Tarifamanipulado::index', ['as' => 'tarifamanipuladoList2']);
|
||||
$routes->get('add', 'Tarifamanipulado::add', ['as' => 'newTarifamanipulado']);
|
||||
$routes->post('add', 'Tarifamanipulado::add', ['as' => 'createTarifamanipulado']);
|
||||
$routes->get('edit/(:num)', 'Tarifamanipulado::edit/$1', ['as' => 'editTarifamanipulado']);
|
||||
$routes->post('edit/(:num)', 'Tarifamanipulado::edit/$1', ['as' => 'updateTarifamanipulado']);
|
||||
$routes->get('delete/(:num)', 'Tarifamanipulado::delete/$1', ['as' => 'deleteTarifamanipulado']);
|
||||
$routes->post('allmenuitems', 'Tarifamanipulado::allItemsSelect', ['as' => 'select2ItemsOfTarifasmanipulado']);
|
||||
$routes->post('menuitems', 'Tarifamanipulado::menuItems', ['as' => 'menuItemsOfTarifasmanipulado']);
|
||||
});
|
||||
|
||||
|
||||
$routes->group('tipologiaslibros', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Tipologias::index', ['as' => 'tipologiaLibrosList']);
|
||||
$routes->get('index', 'Tipologias::index', ['as' => 'tipologiaLibrosIndex']);
|
||||
$routes->get('list', 'Tipologias::index', ['as' => 'tipologiaLibrosList2']);
|
||||
$routes->get('add', 'Tipologias::add', ['as' => 'newTipologiaLibros']);
|
||||
$routes->post('add', 'Tipologias::add', ['as' => 'createTipologiaLibros']);
|
||||
$routes->get('edit/(:num)', 'Tipologias::edit/$1', ['as' => 'editTipologiaLibros']);
|
||||
$routes->post('edit/(:num)', 'Tipologias::edit/$1', ['as' => 'updateTipologiaLibros']);
|
||||
$routes->get('delete/(:num)', 'Tipologias::delete/$1', ['as' => 'deleteTipologiaLibros']);
|
||||
$routes->post('allmenuitems', 'Tipologias::allItemsSelect', ['as' => 'select2ItemsOfTipologiasLibros']);
|
||||
$routes->post('menuitems', 'Tipologias::menuItems', ['as' => 'menuItemsOfTipologiasLibros']);
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$routes->group('tarifaacabado', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->get('', 'Tarifaacabado::index', ['as' => 'tarifaacabadoList']);
|
||||
$routes->get('index', 'Tarifaacabado::index', ['as' => 'tarifaacabadoIndex']);
|
||||
$routes->get('list', 'Tarifaacabado::index', ['as' => 'tarifaacabadoList2']);
|
||||
$routes->get('add', 'Tarifaacabado::add', ['as' => 'newTarifaacabado']);
|
||||
$routes->post('add', 'Tarifaacabado::add', ['as' => 'createTarifaacabado']);
|
||||
$routes->get('edit/(:num)', 'Tarifaacabado::edit/$1', ['as' => 'editTarifaacabado']);
|
||||
$routes->post('edit/(:num)', 'Tarifaacabado::edit/$1', ['as' => 'updateTarifaacabado']);
|
||||
$routes->get('delete/(:num)', 'Tarifaacabado::delete/$1', ['as' => 'deleteTarifaacabado']);
|
||||
$routes->post('allmenuitems', 'Tarifaacabado::allItemsSelect', ['as' => 'select2ItemsOfTarifasacabado']);
|
||||
$routes->post('menuitems', 'Tarifaacabado::menuItems', ['as' => 'menuItemsOfTarifasacabado']);
|
||||
});
|
||||
|
||||
$routes->group('users', ['namespace' => 'App\Controllers\Usuarios'], function ($routes) {
|
||||
$routes->get('', 'Users::index', ['as' => 'userList']);
|
||||
$routes->get('index', 'Users::index', ['as' => 'userIndex']);
|
||||
$routes->get('list', 'Users::index', ['as' => 'userList2']);
|
||||
$routes->get('add', 'Users::add', ['as' => 'newUser']);
|
||||
$routes->post('add', 'Users::add', ['as' => 'createUser']);
|
||||
$routes->get('edit/(:num)', 'Users::edit/$1', ['as' => 'editUser']);
|
||||
$routes->post('edit/(:num)', 'Users::edit/$1', ['as' => 'updateUser']);
|
||||
$routes->get('delete/(:num)', 'Users::delete/$1', ['as' => 'deleteUser']);
|
||||
$routes->post('allmenuitems', 'Users::allItemsSelect', ['as' => 'select2ItemsOfUsers']);
|
||||
$routes->post('menuitems', 'Users::menuItems', ['as' => 'menuItemsOfUsers']);
|
||||
});
|
||||
|
||||
$routes->group('group', ['namespace' => 'App\Controllers\Usuarios'], function ($routes) {
|
||||
$routes->get('', 'Group::index', ['as' => 'userGroupList']);
|
||||
$routes->get('index', 'Group::index', ['as' => 'groupIndex']);
|
||||
$routes->post('edit/(:num)', 'Group::edit/$1', ['as' => 'updateGroup']);
|
||||
$routes->get('edit/(:num)', 'Group::edit/$1', ['as' => 'editGroup']);
|
||||
$routes->get('delete/(:num)', 'Group::delete/$1', ['as' => 'deleteGroup']);
|
||||
$routes->get('add', 'Group::add', ['as' => 'newGroup']);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//WEB ROUTER ------------------------------------------------------
|
||||
//------------------------------------------------------------------
|
||||
@ -92,17 +135,17 @@ $routes->get('lang/{locale}', 'Language::index');
|
||||
|
||||
//API ROUTER ------------------------------------------------------
|
||||
//------------------------------------------------------------------
|
||||
$routes->get('api/', 'Api::index');
|
||||
$routes->get('api/status', 'Api::status');
|
||||
$routes->post('api/signIn', 'Api::signIn');
|
||||
$routes->get('api/','Api::index');
|
||||
$routes->get('api/status','Api::status');
|
||||
$routes->post('api/signIn','Api::signIn');
|
||||
|
||||
//API ROUTER USER ------------------------------------------------------
|
||||
//------------------------------------------------------------------
|
||||
$routes->get('api/user/', 'Api::user/all');
|
||||
$routes->get('api/user/(:segment)', 'Api::user/id/$1');
|
||||
$routes->post('api/user/', 'Api::user/add');
|
||||
$routes->put('api/user/(:segment)', 'Api::user/edit/$1');
|
||||
$routes->delete('api/user/(:segment)', 'Api::user/delete/$1');
|
||||
$routes->get('api/user/','Api::user/all');
|
||||
$routes->get('api/user/(:segment)','Api::user/id/$1');
|
||||
$routes->post('api/user/','Api::user/add');
|
||||
$routes->put('api/user/(:segment)','Api::user/edit/$1');
|
||||
$routes->delete('api/user/(:segment)','Api::user/delete/$1');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
227
ci4/app/Controllers/Configuracion/Tipologias.php
Normal file
227
ci4/app/Controllers/Configuracion/Tipologias.php
Normal file
@ -0,0 +1,227 @@
|
||||
<?php namespace App\Controllers\Configuracion;
|
||||
|
||||
|
||||
use App\Entities\Configuracion\TipologiasEntity;
|
||||
|
||||
class Tipologias extends \App\Controllers\GoBaseController {
|
||||
|
||||
use \CodeIgniter\API\ResponseTrait;
|
||||
|
||||
protected static $primaryModelName = 'App\Models\Configuracion\TipologiasLibroModel';
|
||||
|
||||
protected static $singularObjectNameCc = 'tipologiaLibros';
|
||||
protected static $singularObjectName = 'Tipologia Libros';
|
||||
protected static $pluralObjectName = 'Tipologias Libros';
|
||||
protected static $controllerSlug = 'tipologiaslibros';
|
||||
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/configuracion/tipologias/';
|
||||
|
||||
protected $indexRoute = 'tipologiaLibrosList';
|
||||
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
|
||||
$this->viewData['pageTitle'] = lang('TipologiasLibros.moduleTitle');
|
||||
parent::initController($request, $response, $logger);
|
||||
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$this->viewData['usingClientSideDataTable'] = true;
|
||||
|
||||
$this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('TipologiasLibros.tipologiaLibros')]);
|
||||
parent::index();
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->save($sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('TipologiasLibros.tipologiaLibros'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
endif;
|
||||
|
||||
$thenRedirect = true; // Change this to false if you want your user to stay on the form after submission
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [mb_strtolower(lang('TipologiasLibros.tipologiaLibros'))]).'.';
|
||||
$message .= anchor(route_to('editTipologiaLibros', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->viewData['successMessage'] = $message;
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['tipologiasEntity'] = isset($sanitizedData) ? new TipologiasEntity($sanitizedData) : new TipologiasEntity();
|
||||
|
||||
$this->viewData['formAction'] = route_to('createTipologiaLibros');
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('TipologiasLibros.tipologiaLibros').' '.lang('Basic.global.addNewSuffix');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
} // end function add()
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$tipologiasEntity = $this->model->find($id);
|
||||
|
||||
if ($tipologiasEntity == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('TipologiasLibros.tipologiaLibros')), $id]);
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('TipologiasLibros.tipologiaLibros'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$tipologiasEntity->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = true;
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
$id = $tipologiasEntity->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('TipologiasLibros.tipologiaLibros'))]).'.';
|
||||
$message .= anchor(route_to('editTipologiaLibros', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->viewData['successMessage'] = $message;
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['tipologiasEntity'] = $tipologiasEntity;
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateTipologiaLibros', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('TipologiasLibros.tipologiaLibros').' '.lang('Basic.global.edit3');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
} // end function edit(...)
|
||||
|
||||
|
||||
|
||||
public function allItemsSelect() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$onlyActiveOnes = true;
|
||||
$reqVal = $this->request->getPost('val') ?? 'id';
|
||||
$menu = $this->model->getAllForMenu($reqVal.', nombre', 'nombre', $onlyActiveOnes, false);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->nombre = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function menuItems() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
|
||||
$reqId = goSanitize($this->request->getPost('id'))[0];
|
||||
$reqText = goSanitize($this->request->getPost('text'))[0];
|
||||
$onlyActiveOnes = false;
|
||||
$columns2select = [$reqId ?? 'id', $reqText ?? 'nombre'];
|
||||
$onlyActiveOnes = false;
|
||||
$menu = $this->model->getSelect2MenuItems($columns2select, $columns2select[1], $onlyActiveOnes, $searchStr);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->text = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -137,11 +137,6 @@ abstract class GoBaseController extends Controller {
|
||||
//--------------------------------------------------------------------
|
||||
// E.g.:
|
||||
$this->session = \Config\Services::session();
|
||||
|
||||
// Language Validate
|
||||
$language = \Config\Services::language();
|
||||
$language->setLocale($this->session->lang);
|
||||
$this->viewData['currentLocale'] = $this->request->getLocale();
|
||||
|
||||
|
||||
if ((!isset($this->viewData['pageTitle']) || empty($this->viewData['pageTitle']) ) && isset(static::$pluralObjectName) && !empty(static::$pluralObjectName)) {
|
||||
@ -174,7 +169,10 @@ abstract class GoBaseController extends Controller {
|
||||
|
||||
// Preload any models, libraries, etc, here.
|
||||
|
||||
|
||||
|
||||
// Language Validate
|
||||
$language = \Config\Services::language();
|
||||
$language->setLocale($this->session->lang);
|
||||
|
||||
// Set TimeZone
|
||||
if(empty($this->session->get('settings'))){
|
||||
@ -196,7 +194,8 @@ abstract class GoBaseController extends Controller {
|
||||
$this->session->set('notification', []);
|
||||
$this->session->set('pulse', 0);
|
||||
}
|
||||
|
||||
|
||||
$this->viewData['currentLocale'] = $this->request->getLocale();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class Home extends BaseController
|
||||
else
|
||||
$salutation = lang("App.dashboard_good_night");
|
||||
|
||||
echo view(getenv('theme.path').'main/all_selects');
|
||||
echo view(getenv('theme.path').'main/all');
|
||||
|
||||
/*
|
||||
//echo view(getenv('theme.path').'main/header');
|
||||
|
||||
@ -131,23 +131,23 @@ class Integration extends BaseController
|
||||
|
||||
foreach (keywordEmail()??[] as $item){
|
||||
$field = str_replace(['[','user_',']'],'',$item);
|
||||
$template = str_replace('['.$item.']',$user->$field ?? "",$template);
|
||||
$template = str_replace('['.$item.']',$user[$field],$template);
|
||||
}
|
||||
|
||||
$token = random_string("alnum", 50);
|
||||
$url = base_url().'login/recovery/'.$token;
|
||||
$url = base_url().'/login/recovery/'.$token;
|
||||
|
||||
$this->pass_recovery_model->save([
|
||||
'user' => $user->token,
|
||||
'user' => $user['token'],
|
||||
'token' => $token
|
||||
]);
|
||||
|
||||
$title = $template['subject']??'';
|
||||
$msg = $template['body']??'';
|
||||
$msg = str_replace('[recovery_password]',$url,$msg);
|
||||
$email = $user->email;
|
||||
$email = $user['email'];
|
||||
|
||||
$this->setLog('recovery','recovery-password',$user->token);
|
||||
$this->setLog('recovery','recovery-password',$user['token']);
|
||||
$send = $this->sendMail($title,$msg,$email);
|
||||
if($send){
|
||||
$session->setFlashdata('toast', ['success',lang("App.login_alert_send"),lang("App.login_alert_send_pass")]);
|
||||
|
||||
@ -72,6 +72,7 @@ class login extends BaseController
|
||||
|
||||
public function authenticate()
|
||||
{
|
||||
|
||||
$session = session();
|
||||
$settings = $session->get('settings');
|
||||
|
||||
@ -185,6 +186,7 @@ class login extends BaseController
|
||||
if(!$login->status){
|
||||
$session->setFlashdata('toast', ['error',lang("App.login_alert"),lang("App.login_alert_disabled_access")]);
|
||||
return redirect()->to('/login');
|
||||
|
||||
}
|
||||
|
||||
// Get access rules
|
||||
@ -194,29 +196,44 @@ class login extends BaseController
|
||||
->where('token_user',$login->token)->findAll();
|
||||
|
||||
if (sizeof($groups)>1){
|
||||
|
||||
$rules = $this->group_model->select('rules')->where('token',$groups[0])->first()->rules;
|
||||
$rules = json_decode(html_entity_decode($rules), true);
|
||||
if($rules==null){
|
||||
// group doesn't exists now -> then delete from group-user
|
||||
$groups = $this->group_user_model
|
||||
->where('token_group',$groups[0])
|
||||
->delete();
|
||||
}
|
||||
for ($i=1; $i<sizeof($groups); $i++){
|
||||
$temp_rules = $this->group_model->select('rules')->where('token',$groups[$i])->first()->rules;
|
||||
foreach ($rules as $key => $value){
|
||||
if (array_key_exists($key, json_decode(html_entity_decode($temp_rules), true))){
|
||||
$value2 = json_decode(html_entity_decode($temp_rules), true)[$key];
|
||||
$rules[$key] = array_unique(array_merge($value, $value2));
|
||||
$temp_rules = $this->group_model->select('rules')->where('token',$groups[$i])->first();
|
||||
if($temp_rules==null){
|
||||
// group doesn't exists now -> then delete from group-user
|
||||
$groups = $this->group_user_model
|
||||
->where('token_group',$groups[$i])
|
||||
->delete();
|
||||
}
|
||||
else{
|
||||
$temp_rules=$temp_rules->rules;
|
||||
foreach ($rules as $key => $value){
|
||||
if (array_key_exists($key, json_decode(html_entity_decode($temp_rules), true))){
|
||||
$value2 = json_decode(html_entity_decode($temp_rules), true)[$key];
|
||||
$rules[$key] = array_unique(array_merge($value, $value2));
|
||||
}
|
||||
else{
|
||||
$rules[$key]= $value;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$rules[$key]= $value;
|
||||
}
|
||||
}
|
||||
foreach (json_decode(html_entity_decode($temp_rules), true) as $key2 => $value2){
|
||||
if (!array_key_exists($key2, $rules)){
|
||||
$rules[$key2] = $value2;
|
||||
foreach (json_decode(html_entity_decode($temp_rules), true) as $key2 => $value2){
|
||||
if (!array_key_exists($key2, $rules)){
|
||||
$rules[$key2] = $value2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$rules = $this->group_model->select('rules')->where('token',$groups[0])->first();
|
||||
$rules = json_decode($this->group_model->select('rules')->where('token',$groups[0])->first()->rules);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -509,7 +526,6 @@ class login extends BaseController
|
||||
$session = session();
|
||||
if(!empty($token) && $session->get('settings')['forgot_password']??false){
|
||||
$pass_recovery = $this->pass_recovery_model->where('token',$token)->where('changed',false)->first();
|
||||
|
||||
if($pass_recovery != null){
|
||||
$data['token'] = $token;
|
||||
$data['user'] = $pass_recovery['user'];
|
||||
@ -552,7 +568,7 @@ class login extends BaseController
|
||||
if($user != null){
|
||||
$phpass = new PasswordHash(8, true);
|
||||
$this->user_model->save([
|
||||
'id_user' => $user->id_user,
|
||||
'id_user' => $user['id_user'],
|
||||
'password' => $phpass->HashPassword($listPost['password'])
|
||||
]);
|
||||
$this->pass_recovery_model->save([
|
||||
|
||||
@ -30,14 +30,13 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
|
||||
$this->viewData['usingClientSideDataTable'] = true;
|
||||
|
||||
$this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('Tarifaacabado.tarifaacabado')]);
|
||||
|
||||
parent::index();
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
|
||||
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
@ -46,8 +45,9 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_update_id'] = $session->id_user;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -100,6 +100,8 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
|
||||
} // end function add()
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -119,9 +121,9 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
$sanitizedData['user_update_id'] = $session->id_user;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -223,5 +225,80 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete($requestedId, bool $deletePermanently = false) {
|
||||
|
||||
if (is_string($requestedId)) :
|
||||
if (is_numeric($requestedId)) :
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_NUMBER_INT);
|
||||
else:
|
||||
$onlyAlphaNumeric = true;
|
||||
$fromGetRequest = true;
|
||||
$idSanitization = goSanitize($requestedId, $onlyAlphaNumeric, $fromGetRequest); // filter_var(trim($requestedId), FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$id = $idSanitization[0];
|
||||
endif;
|
||||
else:
|
||||
$id = intval($requestedId);
|
||||
endif;
|
||||
|
||||
if (empty($id) || $id === 0) :
|
||||
$error = 'Invalid identifier provided to delete the object.';
|
||||
endif;
|
||||
|
||||
$rawResult = null;
|
||||
|
||||
if (!isset($error)) :
|
||||
try {
|
||||
if ($deletePermanently) :
|
||||
if (is_numeric($id)) :
|
||||
$rawResult = $this->primaryModel->delete($id);
|
||||
else:
|
||||
$rawResult = $this->primaryModel->where($this->primaryModel->getPrimaryKeyName(), $id)->delete();
|
||||
endif;
|
||||
else:
|
||||
$datetime = (new \CodeIgniter\I18n\Time("now"));
|
||||
$rawResult = $this->primaryModel->where('id',$id)
|
||||
->set(['deleted_at' => $datetime->format('Y-m-d H:i:s')])
|
||||
->update();
|
||||
endif;
|
||||
} catch (\Exception $e) {
|
||||
log_message('error', "Exception: Error deleting object named '".(static::$singularObjectName ?? 'unknown')."' with $id :\r\n".$e->getMessage());
|
||||
}
|
||||
endif;
|
||||
|
||||
$ar = $this->primaryModel->db->affectedRows();
|
||||
|
||||
try {
|
||||
$dbError = $this->primaryModel->db->error();
|
||||
} catch (\Exception $e2) {
|
||||
if ($e2->getMessage() != "Trying to get property 'errno' of non-object") {
|
||||
log_message('error', $e2->getCode() . ' : ' . $e2->getMessage()) ;
|
||||
}
|
||||
}
|
||||
if (isset($dbError['code']) && isset($dbError['message'])) {
|
||||
log_message('error', $dbError['code'].' '.$dbError['message']);
|
||||
} else {
|
||||
$dbError = ['code' => '', 'message'=>''];
|
||||
}
|
||||
|
||||
$result = ['persisted'=>$ar>0, 'ar'=>$ar, 'persistedId'=>null, 'affectedRows'=>$ar, 'errorCode'=>$dbError['code'], 'error'=>$dbError['message']];
|
||||
|
||||
$nameOfDeletedObject = static::$singularObjectNameCc;
|
||||
|
||||
if ($ar < 1) :
|
||||
$errorMessage = lang('Basic.global.deleteError', [$nameOfDeletedObject]); // 'No ' . static::$singularObjectName . ' was deleted now, because it probably had already been deleted.';
|
||||
$fdKey = isset($this->viewData['usingSweetAlert'] ) && $this->viewData['usingSweetAlert'] ? 'sweet-error' : 'errorMessage';
|
||||
$errorMessage = str_replace("'", "\'", $errorMessage);
|
||||
return $this->redirect2listView($fdKey, str_replace("'", '', $errorMessage));
|
||||
else:
|
||||
$message = lang('Basic.global.deleteSuccess', [$nameOfDeletedObject]); // 'The ' . static::$singularObjectName . ' was successfully deleted.';
|
||||
$fdKey = isset($this->viewData['usingSweetAlert'] ) && $this->viewData['usingSweetAlert'] ? 'sweet-success' : 'successMessage';
|
||||
if ($result['affectedRows']>1) :
|
||||
log_message('warning', "More than one row has been deleted in attempt to delete row for object named '".(static::$singularObjectName ?? 'unknown')."' with id: $id");
|
||||
endif;
|
||||
$message = str_replace("'", "\'", $message);
|
||||
return $this->redirect2listView($fdKey, $message);
|
||||
endif;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,35 +1,227 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Tarifas;
|
||||
use App\Controllers\BaseController;
|
||||
<?php namespace App\Controllers\Tarifas;
|
||||
|
||||
|
||||
class Tarifamanipulado extends BaseController
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
use App\Entities\Tarifas\TarifamanipuladoEntity;
|
||||
|
||||
class Tarifamanipulado extends \App\Controllers\GoBaseController {
|
||||
|
||||
use \CodeIgniter\API\ResponseTrait;
|
||||
|
||||
protected static $primaryModelName = 'App\Models\Tarifas\TarifamanipuladoModel';
|
||||
|
||||
protected static $singularObjectNameCc = 'tarifamanipulado';
|
||||
protected static $singularObjectName = 'Tarifamanipulado';
|
||||
protected static $pluralObjectName = 'Tarifasmanipulado';
|
||||
protected static $controllerSlug = 'tarifamanipulado';
|
||||
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/tarifas/manipulado/';
|
||||
|
||||
protected $indexRoute = 'tarifamanipuladoList';
|
||||
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
|
||||
$this->viewData['pageTitle'] = lang('Tarifamanipulado.moduleTitle');
|
||||
parent::initController($request, $response, $logger);
|
||||
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$this->viewData['usingClientSideDataTable'] = true;
|
||||
|
||||
$this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('Tarifamanipulado.tarifamanipulado')]);
|
||||
parent::index();
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->save($sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Tarifamanipulado.tarifamanipulado'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
endif;
|
||||
|
||||
$thenRedirect = true; // Change this to false if you want your user to stay on the form after submission
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [mb_strtolower(lang('Tarifamanipulado.tarifamanipulado'))]).'.';
|
||||
$message .= anchor(route_to('editTarifamanipulado', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->viewData['successMessage'] = $message;
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['tarifamanipuladoEntity'] = isset($sanitizedData) ? new TarifamanipuladoEntity($sanitizedData) : new TarifamanipuladoEntity();
|
||||
|
||||
$this->viewData['formAction'] = route_to('createTarifamanipulado');
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('Tarifamanipulado.tarifamanipulado').' '.lang('Basic.global.addNewSuffix');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
} // end function add()
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$tarifamanipuladoEntity = $this->model->find($id);
|
||||
|
||||
if ($tarifamanipuladoEntity == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Tarifamanipulado.tarifamanipulado')), $id]);
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Tarifamanipulado.tarifamanipulado'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$tarifamanipuladoEntity->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = true;
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
$id = $tarifamanipuladoEntity->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Tarifamanipulado.tarifamanipulado'))]).'.';
|
||||
$message .= anchor(route_to('editTarifamanipulado', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->viewData['successMessage'] = $message;
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['tarifamanipuladoEntity'] = $tarifamanipuladoEntity;
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateTarifamanipulado', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('Tarifamanipulado.tarifamanipulado').' '.lang('Basic.global.edit3');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
} // end function edit(...)
|
||||
|
||||
|
||||
|
||||
public function allItemsSelect() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$onlyActiveOnes = true;
|
||||
$reqVal = $this->request->getPost('val') ?? 'id';
|
||||
$menu = $this->model->getAllForMenu($reqVal.', nombre', 'nombre', $onlyActiveOnes, false);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->nombre = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function menuItems() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
|
||||
$reqId = goSanitize($this->request->getPost('id'))[0];
|
||||
$reqText = goSanitize($this->request->getPost('text'))[0];
|
||||
$onlyActiveOnes = false;
|
||||
$columns2select = [$reqId ?? 'id', $reqText ?? 'nombre'];
|
||||
$onlyActiveOnes = false;
|
||||
$menu = $this->model->getSelect2MenuItems($columns2select, $columns2select[1], $onlyActiveOnes, $searchStr);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->text = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
public function index()
|
||||
{
|
||||
echo 'Tarifa manipulado';
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,35 +1,227 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Tarifas;
|
||||
use App\Controllers\BaseController;
|
||||
<?php namespace App\Controllers\Tarifas;
|
||||
|
||||
|
||||
class Tarifapreimpresion extends BaseController
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
use App\Entities\Tarifas\TarifapreimpresionEntity;
|
||||
|
||||
class Tarifapreimpresion extends \App\Controllers\GoBaseController {
|
||||
|
||||
use \CodeIgniter\API\ResponseTrait;
|
||||
|
||||
protected static $primaryModelName = 'App\Models\Tarifas\TarifapreimpresionModel';
|
||||
|
||||
protected static $singularObjectNameCc = 'tarifapreimpresion';
|
||||
protected static $singularObjectName = 'Tarifapreimpresion';
|
||||
protected static $pluralObjectName = 'Tarifaspreimpresion';
|
||||
protected static $controllerSlug = 'tarifapreimpresion';
|
||||
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/tarifas/preimpresion/';
|
||||
|
||||
protected $indexRoute = 'tarifapreimpresionList';
|
||||
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
|
||||
$this->viewData['pageTitle'] = lang('Preimpresions.moduleTitle');
|
||||
parent::initController($request, $response, $logger);
|
||||
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$this->viewData['usingClientSideDataTable'] = true;
|
||||
|
||||
$this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('Preimpresions.tarifapreimpresion')]);
|
||||
parent::index();
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->save($sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Preimpresions.tarifapreimpresion'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
endif;
|
||||
|
||||
$thenRedirect = true; // Change this to false if you want your user to stay on the form after submission
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [mb_strtolower(lang('Preimpresions.tarifapreimpresion'))]).'.';
|
||||
$message .= anchor(route_to('editTarifapreimpresion', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->viewData['successMessage'] = $message;
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['tarifapreimpresionEntity'] = isset($sanitizedData) ? new TarifapreimpresionEntity($sanitizedData) : new TarifapreimpresionEntity();
|
||||
|
||||
$this->viewData['formAction'] = route_to('createTarifapreimpresion');
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('Preimpresions.tarifapreimpresion').' '.lang('Basic.global.addNewSuffix');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
} // end function add()
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$tarifapreimpresionEntity = $this->model->find($id);
|
||||
|
||||
if ($tarifapreimpresionEntity == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Preimpresions.tarifapreimpresion')), $id]);
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Preimpresions.tarifapreimpresion'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$tarifapreimpresionEntity->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = true;
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
$id = $tarifapreimpresionEntity->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Preimpresions.tarifapreimpresion'))]).'.';
|
||||
$message .= anchor(route_to('editTarifapreimpresion', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->viewData['successMessage'] = $message;
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['tarifapreimpresionEntity'] = $tarifapreimpresionEntity;
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateTarifapreimpresion', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('Preimpresions.tarifapreimpresion').' '.lang('Basic.global.edit3');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
} // end function edit(...)
|
||||
|
||||
|
||||
|
||||
public function allItemsSelect() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$onlyActiveOnes = true;
|
||||
$reqVal = $this->request->getPost('val') ?? 'id';
|
||||
$menu = $this->model->getAllForMenu($reqVal.', nombre', 'nombre', $onlyActiveOnes, false);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->nombre = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function menuItems() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
|
||||
$reqId = goSanitize($this->request->getPost('id'))[0];
|
||||
$reqText = goSanitize($this->request->getPost('text'))[0];
|
||||
$onlyActiveOnes = false;
|
||||
$columns2select = [$reqId ?? 'id', $reqText ?? 'nombre'];
|
||||
$onlyActiveOnes = false;
|
||||
$menu = $this->model->getSelect2MenuItems($columns2select, $columns2select[1], $onlyActiveOnes, $searchStr);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->text = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
public function index()
|
||||
{
|
||||
echo 'Tarifa papel impresion';
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
|
||||
use App\Models\Usuarios\UserModel;
|
||||
use App\Models\Usuarios\UserGroupModel;
|
||||
use App\Entities\Usuarios\UserGroupEntity;
|
||||
|
||||
class Test extends BaseController
|
||||
{
|
||||
@ -16,11 +17,122 @@ class Test extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
helper('general');
|
||||
|
||||
echo lang('Tarifaacabado.tarifaacabado');
|
||||
|
||||
|
||||
|
||||
echo '<pre>';
|
||||
var_dump(getMenuControl());
|
||||
var_dump(json_decode(session()->get('rules')??'[]'));
|
||||
|
||||
echo '</pre>';
|
||||
|
||||
}
|
||||
|
||||
public function validateControllerAccess(){
|
||||
$request = \Config\Services::request();
|
||||
$uri = $uri = new \CodeIgniter\HTTP\URI('https://sk-jjo.imnavajas.es/envioslogistica/logistica');
|
||||
$language = \Config\Services::language();
|
||||
$language->setLocale(session()->lang);
|
||||
|
||||
$getWhiteList = $this->whiteListController();
|
||||
|
||||
foreach ($getWhiteList as $item){
|
||||
if(strtolower($item) == $uri->getSegment(1)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$getRules = json_decode(session()->get('rules')??'[]');
|
||||
|
||||
foreach ($this->whiteListMethod() as $item){
|
||||
if(strtolower($item) == $uri->getSegment(2)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($getRules as $key=>$value){
|
||||
if($key=='Digitalizacion') {
|
||||
echo 'Hola';
|
||||
}
|
||||
if(strtolower($key) == $uri->getSegment(1)){
|
||||
if($uri->getTotalSegments() <= 1){
|
||||
return true;
|
||||
}
|
||||
foreach ($value as $item){
|
||||
if(strtolower($item) == $uri->getSegment(2)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
foreach($this->controllerFolderWhiteList() as $folder){
|
||||
|
||||
if(strtolower($folder) == $uri->getSegment(1)){
|
||||
|
||||
if(strtolower($key) == $uri->getSegment(2)){
|
||||
if($uri->getTotalSegments() <= 2){
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach ($value as $item){
|
||||
if(strtolower($item) == $uri->getSegment(3)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function whiteListController(){
|
||||
return [
|
||||
'',
|
||||
'BaseController',
|
||||
'Home',
|
||||
'Login',
|
||||
'Oauth',
|
||||
'Language',
|
||||
'Api',
|
||||
'Cron',
|
||||
'lang',
|
||||
'Ajax',
|
||||
'Integration',
|
||||
'Migrate',
|
||||
'Test',
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
public function whiteListMethod(){
|
||||
return [
|
||||
'initController',
|
||||
'__construct',
|
||||
'validateControllerAccess',
|
||||
'whiteListController',
|
||||
'whiteListMethod'
|
||||
];
|
||||
}
|
||||
|
||||
public function controllerFolderWhiteList(){
|
||||
return [
|
||||
'Catalogo',
|
||||
'Clientes',
|
||||
'Configuracion',
|
||||
'Digitalizacion',
|
||||
'Facturacion',
|
||||
'Informes',
|
||||
'EnviosLogistica',
|
||||
'Pedidos',
|
||||
'Presupuestos',
|
||||
'Produccion',
|
||||
'Proveedores',
|
||||
'Tarifas',
|
||||
'Usuarios',
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -19,7 +19,7 @@ class Group extends \App\Controllers\GoBaseController
|
||||
|
||||
static $viewPath = '';
|
||||
|
||||
protected $indexRoute = 'groupList';
|
||||
protected $indexRoute = 'userGroupList';
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
|
||||
$this->viewData['pageTitle'] = lang('Group.moduleTitle');
|
||||
@ -39,6 +39,7 @@ class Group extends \App\Controllers\GoBaseController
|
||||
|
||||
public function add()
|
||||
{
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
@ -46,10 +47,46 @@ class Group extends \App\Controllers\GoBaseController
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
|
||||
$title = $postData['title'];
|
||||
$dashboard = $postData['dashboard'];
|
||||
unset($postData['title']);
|
||||
unset($postData['dashboard']);
|
||||
unset($postData['id_group']);
|
||||
unset($postData['save']);
|
||||
|
||||
$controller = null;
|
||||
$rules_access = null;
|
||||
|
||||
foreach ($postData as $key=>$value){
|
||||
$exp = explode('_',$key);
|
||||
$controller[] = $exp[0];
|
||||
}
|
||||
|
||||
if($controller != null){
|
||||
foreach (array_unique($controller) as $item){
|
||||
$rules_access[$item] = [];
|
||||
|
||||
foreach ($postData as $key=>$value){
|
||||
$exp = explode('_',$key);
|
||||
if($exp[0] == $item){
|
||||
array_push($rules_access[$item],str_replace($exp[0].'_','',$key)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$temp_data['rules'] = json_encode($rules_access??'{}');
|
||||
$temp_data['token'] = md5(uniqid(rand(), true));;
|
||||
$temp_data['title'] = $title;
|
||||
$temp_data['dashboard'] = $dashboard;
|
||||
|
||||
$sanitizedData = $this->sanitized($temp_data, $nullIfEmpty);
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -91,8 +128,8 @@ class Group extends \App\Controllers\GoBaseController
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['group'] = isset($sanitizedData) ? new UserGroupModel($sanitizedData) : new UserGroupModel();
|
||||
|
||||
$this->viewData['formAction'] = route_to('createUserGroup');
|
||||
|
||||
$this->viewData['formAction'] = route_to('createGroup');
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('Group.moduleTitle').' '.lang('Basic.global.addNewSuffix');
|
||||
|
||||
@ -100,18 +137,20 @@ class Group extends \App\Controllers\GoBaseController
|
||||
return $this->displayForm(__METHOD__);
|
||||
}
|
||||
|
||||
//public function edit($id)
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
helper('general');
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$group = $this->model->find($id);
|
||||
$groupEntity = $this->model->find($id);
|
||||
|
||||
if ($group == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Paises.pais')), $id]);
|
||||
if ($groupEntity == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Group.userGroup')), $id]);
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
@ -122,7 +161,44 @@ class Group extends \App\Controllers\GoBaseController
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
$id_group = $groupEntity->id_group;
|
||||
$token = $groupEntity->token;
|
||||
$title = $postData['title'];
|
||||
$dashboard = $postData['dashboard'];
|
||||
|
||||
unset($postData['id_group']);
|
||||
unset($postData['title']);
|
||||
unset($postData['dashboard']);
|
||||
|
||||
$controller = null;
|
||||
$rules_access = null;
|
||||
|
||||
foreach ($postData as $key=>$value){
|
||||
$exp = explode('_',$key);
|
||||
$controller[] = $exp[0];
|
||||
}
|
||||
|
||||
if($controller != null){
|
||||
foreach (array_unique($controller) as $item){
|
||||
$rules_access[$item] = [];
|
||||
|
||||
foreach ($postData as $key=>$value){
|
||||
$exp = explode('_',$key);
|
||||
if($exp[0] == $item){
|
||||
array_push($rules_access[$item],str_replace($exp[0].'_','',$key)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$temp_data['id_group'] = $id_group;
|
||||
$temp_data['rules'] = json_encode($rules_access??'{}');
|
||||
$temp_data['token'] = $token;
|
||||
$temp_data['title'] = $title;
|
||||
$temp_data['dashboard'] = $dashboard;
|
||||
|
||||
$sanitizedData = $this->sanitized($temp_data, $nullIfEmpty);
|
||||
|
||||
|
||||
$noException = true;
|
||||
@ -138,21 +214,24 @@ class Group extends \App\Controllers\GoBaseController
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Paises.pais'))]);
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Group.userGroup'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$group->fill($sanitizedData);
|
||||
$groupEntity->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = true;
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
$id = $group->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Group.group'))]).'.';
|
||||
$id = $groupEntity->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Group.userGroup'))]).'.';
|
||||
$message .= anchor(route_to('editGroup', $id), lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if($session->get('group') == $this->request->getPost('token')){
|
||||
$session->set('rules', $temp_data['rules']);
|
||||
}
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
@ -166,154 +245,63 @@ class Group extends \App\Controllers\GoBaseController
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['group'] = $group;
|
||||
$this->viewData['group'] = $groupEntity;
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateGroup', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('Paises.pais').' '.lang('Basic.global.edit3');
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('Group.userGroup').' '.lang('Basic.global.edit3');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
/*
|
||||
helper('form');
|
||||
} // end function edit(...)
|
||||
|
||||
|
||||
|
||||
$data['title'] = [
|
||||
'module' => lang("App.group_edit_title"),
|
||||
'page' => lang("App.group_edit_subtitle"),
|
||||
'icon' => 'fas fa-edit'
|
||||
];
|
||||
public function allItemsSelect() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$onlyActiveOnes = true;
|
||||
$reqVal = $this->request->getPost('val') ?? 'id';
|
||||
$menu = $this->model->getAllForMenu($reqVal.', nombre', 'nombre', $onlyActiveOnes, false);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->nombre = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
$data['breadcrumb'] = [
|
||||
['title' => lang("App.menu_dashboard"), 'route' => "/home", 'active' => false],
|
||||
['title' => lang("App.group_title"), 'route' => "/group", 'active' => false],
|
||||
['title' => lang("App.group_edit_title"), 'route' => "", 'active' => true]
|
||||
];
|
||||
|
||||
$data['btn_return'] = [
|
||||
'title' => lang("App.global_come_back"),
|
||||
'route' => 'usuarios/group',
|
||||
'class' => 'btn btn-dark mr-1',
|
||||
'icon' => 'fas fa-angle-left'
|
||||
];
|
||||
|
||||
$data['btn_submit'] = [
|
||||
'title' => lang("App.global_save"),
|
||||
'route' => '',
|
||||
'class' => 'btn btn-primary mr-1',
|
||||
'icon' => 'fas fa-save'
|
||||
];
|
||||
|
||||
$data['obj'] = $this->group_model->where('token', $id)->first();
|
||||
if($data['obj']==null){
|
||||
return redirect()->to('/usuarios/group');
|
||||
}
|
||||
|
||||
echo view(getenv('theme.path').'main/header');
|
||||
echo view(getenv('theme.path').'form/group/form',$data);
|
||||
echo view(getenv('theme.path').'main/footer');
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
public function store()
|
||||
{
|
||||
//Demo Mode
|
||||
if(env('demo.mode')??false){
|
||||
session()->setFlashdata('sweet', ['warning',lang("App.general_demo_mode")]);
|
||||
return redirect()->to('/usuarios/group');
|
||||
}
|
||||
|
||||
$session = session();
|
||||
helper('form');
|
||||
|
||||
$rules = [
|
||||
'title' => 'required',
|
||||
'dashboard' => 'required'
|
||||
];
|
||||
$rules_error = [
|
||||
'title' => [
|
||||
'required' => lang("App.group_rules_title_r")
|
||||
],
|
||||
'dashboard' => [
|
||||
'required' => lang("App.group_rules_dashboard_r")
|
||||
],
|
||||
];
|
||||
|
||||
if ($this->validate($rules,$rules_error)){
|
||||
if($listPost = $this->request->getPost()){
|
||||
|
||||
$getChecked = $this->request->getPost();
|
||||
|
||||
unset($getChecked['id_group']);
|
||||
unset($getChecked['title']);
|
||||
unset($getChecked['dashboard']);
|
||||
|
||||
$controller = null;
|
||||
$rules_access = null;
|
||||
|
||||
foreach ($getChecked as $key=>$value){
|
||||
$exp = explode('_',$key);
|
||||
$controller[] = $exp[0];
|
||||
}
|
||||
|
||||
if($controller != null){
|
||||
foreach (array_unique($controller) as $item){
|
||||
$rules_access[$item] = [];
|
||||
|
||||
foreach ($getChecked as $key=>$value){
|
||||
$exp = explode('_',$key);
|
||||
if($exp[0] == $item){
|
||||
array_push($rules_access[$item],str_replace($exp[0].'_','',$key)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$listPost['rules'] = json_encode($rules_access??'{}');
|
||||
|
||||
if(empty($listPost['id_group'])){
|
||||
$listPost['token'] = md5(uniqid(rand(), true));
|
||||
}
|
||||
|
||||
$this->group_model->save($listPost);
|
||||
|
||||
if(empty($listPost['id_group'])){
|
||||
$session->setFlashdata('sweet', ['success',lang("App.group_alert_add")]);
|
||||
return redirect()->to('/usuarios/group');
|
||||
}else{
|
||||
if($session->get('group') == $this->request->getPost('token')){
|
||||
$session->set('rules', $listPost['rules']);
|
||||
}
|
||||
$session->setFlashdata('sweet', ['success',lang("App.group_alert_edit")]);
|
||||
return redirect()->to('/usuarios/group');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$session->setFlashdata('error','error');
|
||||
$this->add();
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function menuItems() {
|
||||
if ($this->request->isAJAX()) {
|
||||
$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
|
||||
$reqId = goSanitize($this->request->getPost('id'))[0];
|
||||
$reqText = goSanitize($this->request->getPost('text'))[0];
|
||||
$onlyActiveOnes = false;
|
||||
$columns2select = [$reqId ?? 'id', $reqText ?? 'nombre'];
|
||||
$onlyActiveOnes = false;
|
||||
$menu = $this->model->getSelect2MenuItems($columns2select, $columns2select[1], $onlyActiveOnes, $searchStr);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->text = '- '.lang('Basic.global.None').' -';
|
||||
array_unshift($menu , $nonItem);
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
//Demo Mode
|
||||
if(env('demo.mode')??false){
|
||||
session()->setFlashdata('sweet', ['warning',lang("App.general_demo_mode")]);
|
||||
return redirect()->to('/usuarios/group');
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
|
||||
$session = session();
|
||||
if($this->user_model->where('group', $id)->countAllResults() == 0){
|
||||
$this->group_model->where('token', $id)->delete();
|
||||
$session->setFlashdata('sweet', ['success',lang("App.group_alert_delete")]);
|
||||
}else{
|
||||
$session->setFlashdata('sweet', ['error',lang("App.group_alert_error")]);
|
||||
}
|
||||
return redirect()->to('/usuarios/group');
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@ -54,10 +54,8 @@ class Users extends \App\Controllers\GoBaseController {
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
public function add() {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
@ -70,6 +68,7 @@ class Users extends \App\Controllers\GoBaseController {
|
||||
$phpass = new PasswordHash(8, true);
|
||||
$postData['password'] = $phpass->HashPassword($this->request->getPost('password'));
|
||||
}
|
||||
|
||||
$currentGroups = $postData['group'];
|
||||
unset($postData['group']);
|
||||
|
||||
@ -163,6 +162,11 @@ class Users extends \App\Controllers\GoBaseController {
|
||||
$currentGroups = $postData['group'];
|
||||
unset($postData['group']);
|
||||
|
||||
if(!empty($postData['password'])){
|
||||
$phpass = new PasswordHash(8, true);
|
||||
$postData['password'] = $phpass->HashPassword($this->request->getPost('password'));
|
||||
}
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
if ($this->request->getPost('tfa') == null ) {
|
||||
$sanitizedData['tfa'] = false;
|
||||
|
||||
14
ci4/app/Entities/Configuracion/TipologiasEntity.php
Normal file
14
ci4/app/Entities/Configuracion/TipologiasEntity.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace App\Entities\Configuracion;
|
||||
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class TipologiasEntity extends \CodeIgniter\Entity\Entity
|
||||
{
|
||||
protected $attributes = [
|
||||
"id" => null,
|
||||
"nombre" => null,
|
||||
"code" => null,
|
||||
];
|
||||
protected $casts = [];
|
||||
}
|
||||
33
ci4/app/Entities/Tarifas/TarifamanipuladoEntity.php
Normal file
33
ci4/app/Entities/Tarifas/TarifamanipuladoEntity.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace App\Entities\Tarifas;
|
||||
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class TarifamanipuladoEntity extends \CodeIgniter\Entity\Entity
|
||||
{
|
||||
protected $attributes = [
|
||||
"id" => null,
|
||||
"nombre" => null,
|
||||
"tirada_min" => 0,
|
||||
"precio_min" => 0,
|
||||
"tirada_max" => 0,
|
||||
"precio_max" => null,
|
||||
"ajuste" => 0,
|
||||
"ajuste_total_pedido" => 0,
|
||||
"formula_price" => null,
|
||||
"user_created_id" => 1,
|
||||
"user_update_id" => 1,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"tirada_min" => "int",
|
||||
"precio_min" => "float",
|
||||
"tirada_max" => "int",
|
||||
"precio_max" => "float",
|
||||
"ajuste" => "float",
|
||||
"ajuste_total_pedido" => "float",
|
||||
"user_created_id" => "int",
|
||||
"user_update_id" => "int",
|
||||
];
|
||||
}
|
||||
22
ci4/app/Entities/Tarifas/TarifapreimpresionEntity.php
Normal file
22
ci4/app/Entities/Tarifas/TarifapreimpresionEntity.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace App\Entities\Tarifas;
|
||||
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
||||
{
|
||||
protected $attributes = [
|
||||
"id" => null,
|
||||
"nombre" => null,
|
||||
"precio" => null,
|
||||
"user_created_id" => 1,
|
||||
"user_update_id" => 1,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"precio" => "float",
|
||||
"user_created_id" => "int",
|
||||
"user_update_id" => "int",
|
||||
];
|
||||
}
|
||||
@ -139,7 +139,8 @@ class LoginAuthFilter implements FilterInterface
|
||||
'Integration',
|
||||
'Migrate',
|
||||
'Test',
|
||||
'GoBaseController'
|
||||
'GoBaseController',
|
||||
'GoBaseResourceController',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,31 @@
|
||||
/// Control Rules and Menus
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
//JJO
|
||||
function ruleIsChecked($rules, $section, $method){
|
||||
if ($rules==null){
|
||||
return false;
|
||||
}
|
||||
$json = json_decode($rules);
|
||||
foreach($json as $key=>$value){
|
||||
if($key==$section){
|
||||
foreach($value as $item){
|
||||
if($item==$method){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
/*var_dump($key. ' '. $value[0]);
|
||||
|
||||
echo '<pre>';
|
||||
$rules =
|
||||
echo '</pre>';
|
||||
dd();*/
|
||||
}
|
||||
|
||||
function getAllClass($controller = null){
|
||||
try {
|
||||
helper('filesystem');
|
||||
@ -191,6 +216,7 @@ function getDictionary($word=''){
|
||||
'Calendario' => lang("App.permisos_calendario"),
|
||||
'Correo' => lang("App.permisos_correo"),
|
||||
'Paises' => lang("App.permisos_paises"),
|
||||
'Tipologias' => lang("App.permisos_tipologias"),
|
||||
|
||||
'Presupuestos' => lang("App.permisos_presupuestos"),
|
||||
'Presupuesto' => lang("App.permisos_presupuestos"),
|
||||
@ -298,28 +324,16 @@ function getArrayItem(array $array, $key, $word, $isArray=false)
|
||||
/// Notification Messages
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// IMN Modified
|
||||
function formAlert()
|
||||
{
|
||||
$session = session();
|
||||
$alert = $session->getFlashdata('error');
|
||||
|
||||
$validation = \Config\Services::validation()->listErrors();
|
||||
if (!empty($alert)){
|
||||
|
||||
$validations = \Config\Services::validation()->getErrors();
|
||||
$alerts = "";
|
||||
|
||||
foreach ($validations as $key => $value){
|
||||
|
||||
$alerts .= '<div class="alert alert-danger alert-dismissible" role="alert">'.
|
||||
' ' . $value .
|
||||
' <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">'.
|
||||
' </button>'.
|
||||
'</div>';
|
||||
|
||||
}
|
||||
|
||||
return $alerts;
|
||||
return '<div class="alert alert-danger alert-dismissible alert-alt solid fade show">'.
|
||||
' <button type="button" class="close h-100" data-dismiss="alert" aria-label="Close"><span><i class="mdi mdi-close"></i></span>'.
|
||||
' </button>'. $validation .
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@ return [
|
||||
|
||||
// LOGIN - Index
|
||||
"login_title" => "Sign in to your account",
|
||||
"login_subtitle" => "Subtitle?",
|
||||
"login_email" => "Email",
|
||||
"login_email_ph" => "Type your email",
|
||||
"login_password" => "Password",
|
||||
@ -640,6 +639,7 @@ return [
|
||||
"permisos_calendario" => "Calendar",
|
||||
"permisos_correo" => "Mail",
|
||||
"permisos_paises" => "Countries",
|
||||
"permisos_tipologias" => "Tipologies",
|
||||
|
||||
"permisos_presupuestos" => "Budgets",
|
||||
"permisos_presupuestomaquetacion" => "Layout",
|
||||
@ -689,6 +689,7 @@ return [
|
||||
"menu_tareasservicio" => "Service tasks",
|
||||
"menu_tiposimpresion" => "Printing types",
|
||||
"menu_trabajo" => "Works",
|
||||
"menu_trabajo" => "Tipologies",
|
||||
|
||||
"menu_digitalizacion" => "Digitalisation",
|
||||
|
||||
|
||||
56
ci4/app/Language/en/Group.php
Normal file
56
ci4/app/Language/en/Group.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'createdAt' => 'Created At',
|
||||
'dashboard' => 'Dashboard',
|
||||
'group_grid_dashboard' => 'Dashboard',
|
||||
'idGroup' => 'ID Role',
|
||||
'moduleTitle' => 'Roles and permissions',
|
||||
'rules' => 'Rules',
|
||||
'title' => 'Title',
|
||||
'group_grid_title' => 'Title',
|
||||
'token' => 'Token',
|
||||
'updatedAt' => 'Updated At',
|
||||
'groups' => 'Rolees and permissions',
|
||||
'Group' => 'Role and permissions',
|
||||
'group' => 'Role and permissions',
|
||||
'userGroup' => 'Role and permissions',
|
||||
'grouplist' => 'Roles and permissions List',
|
||||
'Groups' => 'Roles and permissions',
|
||||
'validation' => [
|
||||
'id_group' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
|
||||
],
|
||||
|
||||
'dashboard' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'rules' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'title' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'token' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
89
ci4/app/Language/en/Tarifamanipulado.php
Normal file
89
ci4/app/Language/en/Tarifamanipulado.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'ajuste' => 'Adjustment',
|
||||
'ajusteTotalPedido' => 'Order Total Adjustment',
|
||||
'createdAt' => 'Created At',
|
||||
'deletedAt' => 'Deleted At',
|
||||
'formulaPrice' => 'Formula Price',
|
||||
'id' => 'ID',
|
||||
'moduleTitle' => 'Handling rates',
|
||||
'nombre' => 'Name',
|
||||
'precioMax' => 'Price Max',
|
||||
'precioMin' => 'Price Min',
|
||||
'tarifamanipulado' => 'Handling rate',
|
||||
'tarifamanipuladoList' => 'Handling rates List',
|
||||
'tarifasmanipulado' => 'Handling rates',
|
||||
'tiradaMax' => 'Print Max',
|
||||
'tiradaMin' => 'Print Min',
|
||||
'updatedAt' => 'Updated At',
|
||||
'userCreatedId' => 'User Created ID',
|
||||
'userUpdateId' => 'User Update ID',
|
||||
'validation' => [
|
||||
'ajuste' => [
|
||||
'decimal' => 'The {field} field must contain a decimal number.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'ajuste_total_pedido' => [
|
||||
'decimal' => 'The {field} field must contain a decimal number.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'formula_price' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'nombre' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'precio_max' => [
|
||||
'decimal' => 'The {field} field must contain a decimal number.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'precio_min' => [
|
||||
'decimal' => 'The {field} field must contain a decimal number.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'tirada_max' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'tirada_min' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'user_created_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
47
ci4/app/Language/en/Tarifapreimpresion.php
Normal file
47
ci4/app/Language/en/Tarifapreimpresion.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'createdAt' => 'Created At',
|
||||
'deletedAt' => 'Deleted At',
|
||||
'id' => 'ID',
|
||||
'moduleTitle' => 'Preprinting rates',
|
||||
'nombre' => 'Name',
|
||||
'precio' => 'Price',
|
||||
'tarifapreimpresion' => 'Preprinting rate',
|
||||
'tarifapreimpresionList' => 'Preprinting rates List',
|
||||
'tarifaspreimpresion' => 'Preprinting rates',
|
||||
'updatedAt' => 'Updated At',
|
||||
'userCreatedId' => 'User Created ID',
|
||||
'userUpdateId' => 'User Update ID',
|
||||
'validation' => [
|
||||
'nombre' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'precio' => [
|
||||
'decimal' => 'The {field} field must contain a decimal number.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'user_created_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
157
ci4/app/Language/en/Users.php
Normal file
157
ci4/app/Language/en/Users.php
Normal file
@ -0,0 +1,157 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'address' => 'Address',
|
||||
'blocked' => 'Blocked',
|
||||
'city' => 'City',
|
||||
'country' => 'Country',
|
||||
'createdAt' => 'Created At',
|
||||
'dateBirth' => 'Date Birth',
|
||||
'email' => 'Email',
|
||||
'emailConfirmed' => 'Email Confirmed',
|
||||
'firstName' => 'First Name',
|
||||
'group' => 'Group',
|
||||
'idUser' => 'ID User',
|
||||
'language' => 'Language',
|
||||
'lastAccess' => 'Last Access',
|
||||
'lastIp' => 'Last IP',
|
||||
'lastName' => 'Last Name',
|
||||
'mobile' => 'Mobile',
|
||||
'moduleTitle' => 'Users',
|
||||
'password' => 'Password',
|
||||
'picture' => 'Picture',
|
||||
'state' => 'State',
|
||||
'status' => 'Status',
|
||||
'tfa' => 'Tfa',
|
||||
'tfaCode' => 'Tfa Code',
|
||||
'tfaSecret' => 'Tfa Secret',
|
||||
'token' => 'Token',
|
||||
'updatedAt' => 'Updated At',
|
||||
'user' => 'User',
|
||||
'userList' => 'User List',
|
||||
'users' => 'Users',
|
||||
'zipCode' => 'Zip Code',
|
||||
'validation' => [
|
||||
'address' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
|
||||
],
|
||||
|
||||
'blocked' => [
|
||||
'valid_date' => 'The {field} field must contain a valid date.',
|
||||
|
||||
],
|
||||
|
||||
'city' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
|
||||
],
|
||||
|
||||
'date_birth' => [
|
||||
'valid_date' => 'The {field} field must contain a valid date.',
|
||||
|
||||
],
|
||||
|
||||
'zip_code' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
|
||||
],
|
||||
|
||||
'country' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'email_confirmed' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'first_name' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'group' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'language' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'last_access' => [
|
||||
'required' => 'The {field} field is required.',
|
||||
'valid_date' => 'The {field} field must contain a valid date.',
|
||||
|
||||
],
|
||||
|
||||
'last_ip' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'last_name' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'mobile' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'password' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'picture' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'state' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'tfa_code' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'tfa_secret' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
],
|
||||
|
||||
'email' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
'valid_email' => 'The {field} field must contain a valid email address.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
@ -31,15 +31,14 @@ return [
|
||||
|
||||
// LOGIN - Index
|
||||
"login_title" => "Iniciar sesión en su cuenta",
|
||||
"login_subtitle" => "Subtitulo?",
|
||||
"login_email" => "Correo Electrónico",
|
||||
"login_email_ph" => "Escriba su correo electrónico",
|
||||
"login_password" => "Contraseña",
|
||||
"login_password_ph" => "Escribe tu contraseña",
|
||||
"login_remember_me" => "Recuérdame",
|
||||
"login_forgot_password" => "Olvidé la contraseña",
|
||||
"login_access" => "Acceder",
|
||||
"login_signup" => "Registrar",
|
||||
"login_access" => "Registrarse",
|
||||
"login_signup" => "Inscribirse",
|
||||
"login_signup_desc" => "¿Aún no tienes una cuenta?",
|
||||
|
||||
// LOGIN - forgot_password
|
||||
@ -69,7 +68,7 @@ return [
|
||||
"login_terms_use" => "Condiciones de uso",
|
||||
"login_accept" => "Aceptada",
|
||||
"login_closed" => "Cerrada",
|
||||
"login_register" => "Acceder",
|
||||
"login_register" => "Registrarse",
|
||||
|
||||
// LOGIN - notification
|
||||
"login_alert" => "¡Atención!",
|
||||
@ -640,6 +639,7 @@ return [
|
||||
"permisos_calendario" => "Calendario",
|
||||
"permisos_correo" => "Correo",
|
||||
"permisos_paises" => "Paises",
|
||||
"permisos_tipologias" => "Tipologías",
|
||||
|
||||
"permisos_presupuestos" => "Presupuestos",
|
||||
"permisos_presupuestomaquetacion" => "Maquetación",
|
||||
@ -689,6 +689,7 @@ return [
|
||||
"menu_tareasservicio" => "Tareas Servicio",
|
||||
"menu_tiposimpresion" => "Tipos de impresion",
|
||||
"menu_trabajo" => "Trabajos",
|
||||
"menu_tipologias" => "Tipologías",
|
||||
|
||||
"menu_digitalizacion" => "Digitalización",
|
||||
|
||||
|
||||
56
ci4/app/Language/es/Group.php
Normal file
56
ci4/app/Language/es/Group.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'createdAt' => 'Creado en',
|
||||
'dashboard' => 'Panel',
|
||||
'group_grid_dashboard' => 'Panel',
|
||||
'idGroup' => 'ID Rol',
|
||||
'moduleTitle' => 'Roles y permisos',
|
||||
'rules' => 'Reglas',
|
||||
'title' => 'Nombre',
|
||||
'group_grid_title' => 'Nombre',
|
||||
'token' => 'Token',
|
||||
'updatedAt' => 'Actualizado en',
|
||||
'groups' => 'Roles y permisos',
|
||||
'Group' => 'Rol y permisos',
|
||||
'userGroup' => 'Rol y permisos',
|
||||
'group' => 'Rol y permisos',
|
||||
'grouplist' => 'Lista roles y permisos',
|
||||
'Groups' => 'Roles y permisos',
|
||||
'validation' => [
|
||||
'id_group' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'dashboard' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'rules' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'title' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'token' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
@ -18,41 +18,41 @@ return [
|
||||
'userErp' => 'User Erp',
|
||||
'validation' => [
|
||||
'code3' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'key_erp' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'url_erp' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'user_erp' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'moneda' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'nombre' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'code' => [
|
||||
'is_unique' => 'The {field} field must contain a unique value',
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'required' => 'The {field} field is required.',
|
||||
'is_unique' => 'El campo {field} debe contener un valor único',
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
89
ci4/app/Language/es/Tarifamanipulado.php
Normal file
89
ci4/app/Language/es/Tarifamanipulado.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'ajuste' => 'Ajuste',
|
||||
'ajusteTotalPedido' => 'Ajuste Total Pedido',
|
||||
'createdAt' => 'Creado en',
|
||||
'deletedAt' => 'Borrado en',
|
||||
'formulaPrice' => 'Fórmula precio',
|
||||
'id' => 'ID',
|
||||
'moduleTitle' => 'Tarifas manipulado',
|
||||
'nombre' => 'Nombre',
|
||||
'precioMax' => 'Precio Max',
|
||||
'precioMin' => 'Precio Min',
|
||||
'tarifamanipulado' => 'Tarifas manipulado',
|
||||
'tarifamanipuladoList' => 'Lista Tarifas manipulado',
|
||||
'tarifasmanipulado' => 'Tarifas manipulado',
|
||||
'tiradaMax' => 'Tirada Max',
|
||||
'tiradaMin' => 'Tirada Min',
|
||||
'updatedAt' => 'Actualizado en',
|
||||
'userCreatedId' => 'ID Usuario \"Creado en\"',
|
||||
'userUpdateId' => 'ID Usuario \"Actualizado en\"',
|
||||
'validation' => [
|
||||
'ajuste' => [
|
||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'ajuste_total_pedido' => [
|
||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'formula_price' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'nombre' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'precio_max' => [
|
||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'precio_min' => [
|
||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'tirada_max' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'tirada_min' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'user_created_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
47
ci4/app/Language/es/Tarifapreimpresion.php
Normal file
47
ci4/app/Language/es/Tarifapreimpresion.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'createdAt' => 'Creado en',
|
||||
'deletedAt' => 'Borrado en',
|
||||
'id' => 'ID',
|
||||
'moduleTitle' => 'Tarifas preimpresion',
|
||||
'nombre' => 'Nombre',
|
||||
'precio' => 'Precio',
|
||||
'tarifapreimpresion' => 'Tarifa preimpresion',
|
||||
'tarifapreimpresionList' => 'Lista tarifas preimpresion',
|
||||
'tarifaspreimpresion' => 'Tarifas preimpresion',
|
||||
'updatedAt' => 'Actualizado en',
|
||||
'userCreatedId' => 'ID Usuario \"Creado en\"',
|
||||
'userUpdateId' => 'ID Usuario \"Actualizado en\"',
|
||||
'validation' => [
|
||||
'nombre' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'precio' => [
|
||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'user_created_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
157
ci4/app/Language/es/Users.php
Normal file
157
ci4/app/Language/es/Users.php
Normal file
@ -0,0 +1,157 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'address' => 'Dirección',
|
||||
'blocked' => 'Bloqueado',
|
||||
'city' => 'Ciudad',
|
||||
'country' => 'País',
|
||||
'createdAt' => 'Creado en',
|
||||
'dateBirth' => 'Fecha nacimiento',
|
||||
'email' => 'Email',
|
||||
'emailConfirmed' => 'Email Confirmado',
|
||||
'firstName' => 'Nombre',
|
||||
'group' => 'Rol',
|
||||
'idUser' => 'ID Usuario',
|
||||
'language' => 'Idioma',
|
||||
'lastAccess' => 'Último acceso',
|
||||
'lastIp' => 'Última IP',
|
||||
'lastName' => 'Apellidos',
|
||||
'mobile' => 'Móvil',
|
||||
'moduleTitle' => 'Usuarios',
|
||||
'password' => 'Contraseña',
|
||||
'picture' => 'Imagen',
|
||||
'state' => 'Población',
|
||||
'status' => 'Estado',
|
||||
'tfa' => 'Tfa',
|
||||
'tfaCode' => 'Tfa Code',
|
||||
'tfaSecret' => 'Tfa Secret',
|
||||
'token' => 'Token',
|
||||
'updatedAt' => 'Actualizado en',
|
||||
'user' => 'Usuario',
|
||||
'userList' => 'Lista de usuarios',
|
||||
'users' => 'Usuarios',
|
||||
'zipCode' => 'Código postal',
|
||||
'validation' => [
|
||||
'address' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'blocked' => [
|
||||
'valid_date' => 'El campo {field} debe de contener una fecha válida.',
|
||||
|
||||
],
|
||||
|
||||
'city' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'date_birth' => [
|
||||
'valid_date' => 'The {field} field must contain a valid date.',
|
||||
|
||||
],
|
||||
|
||||
'zip_code' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
],
|
||||
|
||||
'country' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'email_confirmed' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'first_name' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'group' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'language' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'last_access' => [
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
'valid_date' => 'The {field} field must contain a valid date.',
|
||||
|
||||
],
|
||||
|
||||
'last_ip' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'last_name' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'mobile' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'password' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'picture' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'state' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'tfa_code' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'tfa_secret' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
],
|
||||
|
||||
'email' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
'valid_email' => 'El campo {field} debe de contener una cuenta de correo válida.',
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
42
ci4/app/Models/Configuracion/TipologiasLibroModel.php
Normal file
42
ci4/app/Models/Configuracion/TipologiasLibroModel.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace App\Models\Configuracion;
|
||||
|
||||
class TipologiasLibroModel extends \App\Models\GoBaseModel
|
||||
{
|
||||
protected $table = "lg_tipologias_libros";
|
||||
|
||||
/**
|
||||
* Whether primary key uses auto increment.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $useAutoIncrement = true;
|
||||
|
||||
protected $allowedFields = ["nombre", "code"];
|
||||
protected $returnType = "App\Entities\Configuracion\TipologiasEntity";
|
||||
|
||||
public static $labelField = "nombre";
|
||||
|
||||
protected $validationRules = [
|
||||
"code" => [
|
||||
"label" => "TipologiasLibros.code",
|
||||
"rules" => "trim|required|max_length[5]|is_unique[lg_tipologias_libros.code,id,{id}]",
|
||||
],
|
||||
"nombre" => [
|
||||
"label" => "TipologiasLibros.nombre",
|
||||
"rules" => "trim|required|max_length[255]",
|
||||
],
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
"code" => [
|
||||
"is_unique" => "TipologiasLibros.validation.code.is_unique",
|
||||
"max_length" => "TipologiasLibros.validation.code.max_length",
|
||||
"required" => "TipologiasLibros.validation.code.required",
|
||||
],
|
||||
"nombre" => [
|
||||
"max_length" => "TipologiasLibros.validation.nombre.max_length",
|
||||
"required" => "TipologiasLibros.validation.nombre.required",
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -25,6 +25,7 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
"precio_max",
|
||||
"ajuste",
|
||||
"formula_price",
|
||||
"deleted_at",
|
||||
"user_created_id",
|
||||
"user_update_id",
|
||||
];
|
||||
@ -60,15 +61,7 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
"tirada_min" => [
|
||||
"label" => "Acabadoes.tiradaMin",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"user_created_id" => [
|
||||
"label" => "Acabadoes.userCreatedId",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"user_update_id" => [
|
||||
"label" => "Acabadoes.userUpdateId",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
@ -99,14 +92,6 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
"tirada_min" => [
|
||||
"integer" => "Acabadoes.validation.tirada_min.integer",
|
||||
"required" => "Acabadoes.validation.tirada_min.required",
|
||||
],
|
||||
"user_created_id" => [
|
||||
"integer" => "Acabadoes.validation.user_created_id.integer",
|
||||
"required" => "Acabadoes.validation.user_created_id.required",
|
||||
],
|
||||
"user_update_id" => [
|
||||
"integer" => "Acabadoes.validation.user_update_id.integer",
|
||||
"required" => "Acabadoes.validation.user_update_id.required",
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
123
ci4/app/Models/Tarifas/TarifamanipuladoModel.php
Normal file
123
ci4/app/Models/Tarifas/TarifamanipuladoModel.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?php
|
||||
namespace App\Models\Tarifas;
|
||||
|
||||
class TarifamanipuladoModel extends \App\Models\GoBaseModel
|
||||
{
|
||||
protected $table = "lg_tarifa_manipulado";
|
||||
|
||||
/**
|
||||
* Whether primary key uses auto increment.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $useAutoIncrement = true;
|
||||
|
||||
protected $allowedFields = [
|
||||
"nombre",
|
||||
"tirada_min",
|
||||
"precio_min",
|
||||
"tirada_max",
|
||||
"precio_max",
|
||||
"ajuste",
|
||||
"ajuste_total_pedido",
|
||||
"formula_price",
|
||||
"user_created_id",
|
||||
"user_update_id",
|
||||
];
|
||||
protected $returnType = "App\Entities\Tarifas\TarifamanipuladoEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $useSoftDeletes = false;
|
||||
|
||||
protected $createdField = "created_at";
|
||||
|
||||
protected $updatedField = "updated_at";
|
||||
|
||||
public static $labelField = "nombre";
|
||||
|
||||
protected $validationRules = [
|
||||
"ajuste" => [
|
||||
"label" => "Manipuladoes.ajuste",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"ajuste_total_pedido" => [
|
||||
"label" => "Manipuladoes.ajusteTotalPedido",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"formula_price" => [
|
||||
"label" => "Manipuladoes.formulaPrice",
|
||||
"rules" => "trim|required|max_length[1073241]",
|
||||
],
|
||||
"nombre" => [
|
||||
"label" => "Manipuladoes.nombre",
|
||||
"rules" => "trim|required|max_length[255]",
|
||||
],
|
||||
"precio_max" => [
|
||||
"label" => "Manipuladoes.precioMax",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"precio_min" => [
|
||||
"label" => "Manipuladoes.precioMin",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"tirada_max" => [
|
||||
"label" => "Manipuladoes.tiradaMax",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"tirada_min" => [
|
||||
"label" => "Manipuladoes.tiradaMin",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"user_created_id" => [
|
||||
"label" => "Manipuladoes.userCreatedId",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"user_update_id" => [
|
||||
"label" => "Manipuladoes.userUpdateId",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
"ajuste" => [
|
||||
"decimal" => "Manipuladoes.validation.ajuste.decimal",
|
||||
"required" => "Manipuladoes.validation.ajuste.required",
|
||||
],
|
||||
"ajuste_total_pedido" => [
|
||||
"decimal" => "Manipuladoes.validation.ajuste_total_pedido.decimal",
|
||||
"required" => "Manipuladoes.validation.ajuste_total_pedido.required",
|
||||
],
|
||||
"formula_price" => [
|
||||
"max_length" => "Manipuladoes.validation.formula_price.max_length",
|
||||
"required" => "Manipuladoes.validation.formula_price.required",
|
||||
],
|
||||
"nombre" => [
|
||||
"max_length" => "Manipuladoes.validation.nombre.max_length",
|
||||
"required" => "Manipuladoes.validation.nombre.required",
|
||||
],
|
||||
"precio_max" => [
|
||||
"decimal" => "Manipuladoes.validation.precio_max.decimal",
|
||||
"required" => "Manipuladoes.validation.precio_max.required",
|
||||
],
|
||||
"precio_min" => [
|
||||
"decimal" => "Manipuladoes.validation.precio_min.decimal",
|
||||
"required" => "Manipuladoes.validation.precio_min.required",
|
||||
],
|
||||
"tirada_max" => [
|
||||
"integer" => "Manipuladoes.validation.tirada_max.integer",
|
||||
"required" => "Manipuladoes.validation.tirada_max.required",
|
||||
],
|
||||
"tirada_min" => [
|
||||
"integer" => "Manipuladoes.validation.tirada_min.integer",
|
||||
"required" => "Manipuladoes.validation.tirada_min.required",
|
||||
],
|
||||
"user_created_id" => [
|
||||
"integer" => "Manipuladoes.validation.user_created_id.integer",
|
||||
"required" => "Manipuladoes.validation.user_created_id.required",
|
||||
],
|
||||
"user_update_id" => [
|
||||
"integer" => "Manipuladoes.validation.user_update_id.integer",
|
||||
"required" => "Manipuladoes.validation.user_update_id.required",
|
||||
],
|
||||
];
|
||||
}
|
||||
64
ci4/app/Models/Tarifas/TarifapreimpresionModel.php
Normal file
64
ci4/app/Models/Tarifas/TarifapreimpresionModel.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
namespace App\Models\Tarifas;
|
||||
|
||||
class TarifapreimpresionModel extends \App\Models\GoBaseModel
|
||||
{
|
||||
protected $table = "lg_tarifa_preimpresion";
|
||||
|
||||
/**
|
||||
* Whether primary key uses auto increment.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $useAutoIncrement = true;
|
||||
|
||||
protected $allowedFields = ["nombre", "precio", "user_created_id", "user_update_id"];
|
||||
protected $returnType = "App\Entities\Tarifas\TarifapreimpresionEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $useSoftDeletes = false;
|
||||
|
||||
protected $createdField = "created_at";
|
||||
|
||||
protected $updatedField = "updated_at";
|
||||
|
||||
public static $labelField = "nombre";
|
||||
|
||||
protected $validationRules = [
|
||||
"nombre" => [
|
||||
"label" => "Tarifapreimpresion.nombre",
|
||||
"rules" => "trim|required|max_length[255]",
|
||||
],
|
||||
"precio" => [
|
||||
"label" => "Tarifapreimpresion.precio",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"user_created_id" => [
|
||||
"label" => "Tarifapreimpresion.userCreatedId",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"user_update_id" => [
|
||||
"label" => "Tarifapreimpresion.userUpdateId",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
"nombre" => [
|
||||
"max_length" => "Tarifapreimpresion.validation.nombre.max_length",
|
||||
"required" => "Tarifapreimpresion.validation.nombre.required",
|
||||
],
|
||||
"precio" => [
|
||||
"decimal" => "Tarifapreimpresion.validation.precio.decimal",
|
||||
"required" => "Tarifapreimpresion.validation.precio.required",
|
||||
],
|
||||
"user_created_id" => [
|
||||
"integer" => "Tarifapreimpresion.validation.user_created_id.integer",
|
||||
"required" => "Tarifapreimpresion.validation.user_created_id.required",
|
||||
],
|
||||
"user_update_id" => [
|
||||
"integer" => "Tarifapreimpresion.validation.user_update_id.integer",
|
||||
"required" => "Tarifapreimpresion.validation.user_update_id.required",
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -37,24 +37,13 @@ class UserGroupModel extends \App\Models\GoBaseModel
|
||||
protected $validationRules = [
|
||||
"dashboard" => [
|
||||
"label" => "UserGroups.dashboard",
|
||||
"rules" => "trim|required|max_length[50]",
|
||||
],
|
||||
"id_group" => [
|
||||
"label" => "UserGroups.idGroup",
|
||||
"rules" => "max_length[31]",
|
||||
],
|
||||
"rules" => [
|
||||
"label" => "UserGroups.rules",
|
||||
"rules" => "trim|required|max_length[4194192]",
|
||||
"rules" => "required|max_length[50]",
|
||||
],
|
||||
"title" => [
|
||||
"label" => "UserGroups.title",
|
||||
"rules" => "trim|required|max_length[150]",
|
||||
],
|
||||
"token" => [
|
||||
"label" => "UserGroups.token",
|
||||
"rules" => "trim|required|max_length[35]",
|
||||
"rules" => "required|max_length[150]",
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
@ -62,21 +51,11 @@ class UserGroupModel extends \App\Models\GoBaseModel
|
||||
"max_length" => "UserGroups.validation.dashboard.max_length",
|
||||
"required" => "UserGroups.validation.dashboard.required",
|
||||
],
|
||||
"id_group" => [
|
||||
"max_length" => "UserGroups.validation.id_group.max_length",
|
||||
],
|
||||
"rules" => [
|
||||
"max_length" => "UserGroups.validation.rules.max_length",
|
||||
"required" => "UserGroups.validation.rules.required",
|
||||
],
|
||||
"title" => [
|
||||
"max_length" => "UserGroups.validation.title.max_length",
|
||||
"required" => "UserGroups.validation.title.required",
|
||||
],
|
||||
"token" => [
|
||||
"max_length" => "UserGroups.validation.token.max_length",
|
||||
"required" => "UserGroups.validation.token.required",
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -160,7 +160,7 @@
|
||||
"scrollX": true,
|
||||
"stateSave": true,
|
||||
"language": {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
//url: "//cdn.datatables.net/plug-ins/1.10.25/i18n/languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
"columnDefs": [
|
||||
{
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('TipologiasLibros.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tipologiasEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="code" class="form-label">
|
||||
<?=lang('TipologiasLibros.code') ?>*
|
||||
</label>
|
||||
<input type="text" id="code" name="code" required maxLength="5" class="form-control" value="<?=old('code', $tipologiasEntity->code) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,27 @@
|
||||
<?= $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="tipologiaLibrosForm" 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/tipologias/_tipologiaLibrosFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("tipologiaLibrosList2"), 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,109 @@
|
||||
<?=$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('TipologiasLibros.tipologiaLibrosList') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfTipologiaslibros" 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('TipologiasLibros.nombre') ?></th>
|
||||
<th><?= lang('TipologiasLibros.code') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tipologiaLibrosList as $item ) : ?>
|
||||
<tr>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editTipologiaLibros', $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('deleteTipologiaLibros', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
</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->code) ?>
|
||||
</td>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editTipologiaLibros', $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('deleteTipologiaLibros', $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('newTipologiaLibros'), lang('Basic.global.addNew').' '.lang('TipologiasLibros.tipologiaLibros'), ['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() ?>
|
||||
@ -56,7 +56,7 @@
|
||||
<?php foreach($item['methods'] as $subitem): ?>
|
||||
<?php if(!getIgnoreMethod($subitem)): ?>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" id="<?=$item['name'].'_'.$subitem?>" name="<?=$item['name'].'_'.$subitem?>" class="custom-control-input">
|
||||
<input type="checkbox" id="<?=$item['name'].'_'.$subitem?>" name="<?=$item['name'].'_'.$subitem?>" class="custom-control-input" <?=ruleIsChecked($group->rules, $item['name'], $subitem)?'checked':''?> >
|
||||
<label for="<?=$item['name'].'_'.$subitem?>" class="custom-control-label"><?=getDictionary($subitem)?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -81,7 +81,7 @@
|
||||
<?php foreach($item['methods'] as $subitem): ?>
|
||||
<?php if(!getIgnoreMethod($subitem)): ?>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" id="<?=$item['name'].'_'.$subitem?>" name="<?=$item['name'].'_'.$subitem?>" class="custom-control-input">
|
||||
<input type="checkbox" id="<?=$item['name'].'_'.$subitem?>" name="<?=$item['name'].'_'.$subitem?>" class="custom-control-input" <?=ruleIsChecked($group->rules, $item['name'], $subitem)?'checked':''?> >
|
||||
<label for="<?=$item['name'].'_'.$subitem?>" class="custom-control-label"><?=getDictionary($subitem)?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -15,27 +15,32 @@
|
||||
<table id="tableOfGroups" class="table table-striped table-hover using-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=lang("Group.id")?></th>
|
||||
<th><?=lang("Group.group_grid_title")?></th>
|
||||
<?php /* <th><?=//lang("Group.id")?></th> */ ?>
|
||||
<th><?=lang("Group.group_grid_title")?></th>
|
||||
<th><?=lang("Group.group_grid_dashboard")?></th>
|
||||
<th><?= lang('UserGroups.token') ?></th>
|
||||
<?php /*
|
||||
<th><?= lang('UserGroups.token') ?></th>
|
||||
<th><?= lang('UserGroups.createdAt') ?></th>
|
||||
<th><?= lang('UserGroups.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
*/ ?>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($userGroupList as $item ) : ?>
|
||||
<tr>
|
||||
<?php /*
|
||||
<td class="align-middle text-center">
|
||||
<?=$item->id_group ?>
|
||||
</td>
|
||||
*/ ?>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->title) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->dashboard) ?>
|
||||
</td>
|
||||
<?php /*
|
||||
<td class="align-middle">
|
||||
<?= esc($item->token) ?>
|
||||
</td>
|
||||
@ -46,6 +51,7 @@
|
||||
<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('editGroup', $item->id_group), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id_group,]); ?>
|
||||
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteGroup', $item->id_group), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
|
||||
@ -51,20 +51,6 @@
|
||||
<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 -->
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfTarifasacabado" class="table table-striped table-hover using-data-table" style="width: 100%;">
|
||||
<table id="tableOfTarifasacabado" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Tarifaacabado.id') ?></th>
|
||||
@ -34,52 +34,53 @@
|
||||
</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 if(empty($item->deleted_at)): ?>
|
||||
<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 endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -91,3 +92,59 @@
|
||||
</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": 'lfBrtip', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
"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() ?>
|
||||
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('Tarifamanipulado.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tarifamanipuladoEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMin" class="form-label">
|
||||
<?=lang('Tarifamanipulado.tiradaMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMin" name="tirada_min" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_min', $tarifamanipuladoEntity->tirada_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="precioMin" class="form-label">
|
||||
<?=lang('Tarifamanipulado.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', $tarifamanipuladoEntity->precio_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMax" class="form-label">
|
||||
<?=lang('Tarifamanipulado.tiradaMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMax" name="tirada_max" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_max', $tarifamanipuladoEntity->tirada_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="precioMax" class="form-label">
|
||||
<?=lang('Tarifamanipulado.precioMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="precioMax" name="precio_max" required maxLength="31" step="0.01" class="form-control" value="<?=old('precio_max', $tarifamanipuladoEntity->precio_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="ajuste" class="form-label">
|
||||
<?=lang('Tarifamanipulado.ajuste') ?>*
|
||||
</label>
|
||||
<input type="number" id="ajuste" name="ajuste" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('ajuste', $tarifamanipuladoEntity->ajuste) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="ajusteTotalPedido" class="form-label">
|
||||
<?=lang('Tarifamanipulado.ajusteTotalPedido') ?>*
|
||||
</label>
|
||||
<input type="number" id="ajusteTotalPedido" name="ajuste_total_pedido" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('ajuste_total_pedido', $tarifamanipuladoEntity->ajuste_total_pedido) ?>">
|
||||
</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('Tarifamanipulado.formulaPrice') ?>*
|
||||
</label>
|
||||
<textarea rows="3" id="formulaPrice" name="formula_price" required style="height: 10em;" class="form-control"><?=old('formula_price', $tarifamanipuladoEntity->formula_price) ?></textarea>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userCreatedId" class="form-label">
|
||||
<?=lang('Tarifamanipulado.userCreatedId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userCreatedId" name="user_created_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_created_id', $tarifamanipuladoEntity->user_created_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userUpdateId" class="form-label">
|
||||
<?=lang('Tarifamanipulado.userUpdateId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userUpdateId" name="user_update_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_update_id', $tarifamanipuladoEntity->user_update_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,27 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/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="tarifamanipuladoForm" 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/tarifas/manipulado/_tarifamanipuladoFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("tarifamanipuladoIndex"), 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,149 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->extend('themes/backend/vuexy/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('Tarifamanipulado.tarifamanipuladoList') ?></h3>
|
||||
<?=anchor(route_to('newTarifamanipulado'), lang('Basic.global.addNew').' '.lang('Tarifamanipulado.tarifamanipulado'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfTarifasmanipulado" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Tarifamanipulado.id') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.nombre') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.tiradaMin') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.precioMin') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.tiradaMax') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.precioMax') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.ajuste') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.ajusteTotalPedido') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.formulaPrice') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.userCreatedId') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.userUpdateId') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.createdAt') ?></th>
|
||||
<th><?= lang('Tarifamanipulado.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tarifamanipuladoList 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">
|
||||
<?= esc($item->ajuste_total_pedido) ?>
|
||||
</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->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('editTarifamanipulado', $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('deleteTarifamanipulado', $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() ?>
|
||||
|
||||
|
||||
<?=$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": 'lfBrtip', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
"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() ?>
|
||||
@ -0,0 +1,33 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('Tarifapreimpresion.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tarifapreimpresionEntity->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="precio" class="form-label">
|
||||
<?=lang('Tarifapreimpresion.precio') ?>*
|
||||
</label>
|
||||
<input type="number" id="precio" name="precio" required maxLength="31" step="0.01" class="form-control" value="<?=old('precio', $tarifapreimpresionEntity->precio) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userCreatedId" class="form-label">
|
||||
<?=lang('Tarifapreimpresion.userCreatedId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userCreatedId" name="user_created_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_created_id', $tarifapreimpresionEntity->user_created_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="userUpdateId" class="form-label">
|
||||
<?=lang('Tarifapreimpresion.userUpdateId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userUpdateId" name="user_update_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_update_id', $tarifapreimpresionEntity->user_update_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,27 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/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="tarifapreimpresionForm" 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/tarifas/preimpresion/_tarifapreimpresionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("tarifapreimpresionList"), 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,124 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->extend('themes/backend/vuexy/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('Tarifapreimpresion.tarifapreimpresionList') ?></h3>
|
||||
<?=anchor(route_to('newTarifapreimpresion'), lang('Basic.global.addNew').' '.lang('Tarifapreimpresion.tarifapreimpresion'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfTarifaspreimpresion" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Tarifapreimpresion.id') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.nombre') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.precio') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.userCreatedId') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.userUpdateId') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.createdAt') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tarifapreimpresionList 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->precio) ?>
|
||||
</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->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('editTarifapreimpresion', $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('deleteTarifapreimpresion', $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() ?>
|
||||
|
||||
<?=$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": 'lfBrtip', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
"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() ?>
|
||||
@ -15,7 +15,7 @@
|
||||
<table id="tableOfUsers" class="table table-striped table-hover using-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Users.idUser') ?></th>
|
||||
<?php /*<th><?= lang('Users.idUser') ?></th> */?>
|
||||
<th><?= lang('Users.firstName') ?></th>
|
||||
<th><?= lang('Users.lastName') ?></th>
|
||||
<th><?= lang('Users.group') ?></th>
|
||||
@ -32,19 +32,23 @@
|
||||
<th><?= lang('Users.language') ?></th>
|
||||
<th><?= lang('Users.blocked') ?></th>
|
||||
<th><?= lang('Users.emailConfirmed') ?></th>
|
||||
<?php /*
|
||||
<th><?= lang('Users.token') ?></th>
|
||||
<th><?= lang('Users.status') ?></th>
|
||||
<th><?= lang('Users.createdAt') ?></th>
|
||||
<th><?= lang('Users.updatedAt') ?></th>
|
||||
*/?>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($userList as $item ) : ?>
|
||||
<tr>
|
||||
<?php /*
|
||||
<td class="align-middle text-center">
|
||||
<?=$item->id_user ?>
|
||||
</td>
|
||||
*/?>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->first_name) || strlen($item->first_name) < 51 ? esc($item->first_name) : character_limiter(esc($item->first_name), 50) ?>
|
||||
</td>
|
||||
@ -97,6 +101,7 @@
|
||||
<td class="align-middle">
|
||||
<?= esc($item->email_confirmed) ?>
|
||||
</td>
|
||||
<?php /*
|
||||
<td class="align-middle">
|
||||
<?= esc($item->token) ?>
|
||||
</td>
|
||||
@ -115,6 +120,7 @@
|
||||
<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('editUser', $item->id_user), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id_user,]); ?>
|
||||
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteUser', $item->id_user), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
|
||||
@ -10,7 +10,8 @@ if (!empty($token) && $tfa == false) {
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html
|
||||
lang="<?= $settings['default_language'] ?? 'es' ?>"
|
||||
lang="<?= $settings['default_language'] ?? 'es' == 'pt' ? 'pt-br' : $settings['default_language'] ?? 'es' ?>"
|
||||
class="h-100"
|
||||
class="dark-style customizer-hide"
|
||||
dir="ltr"
|
||||
data-theme="theme-default"
|
||||
|
||||
@ -15,7 +15,7 @@ if (!empty($token) && $tfa == false) {
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html
|
||||
lang="<?= $session->get('lang') ?>"
|
||||
lang="<?= $settings['default_language'] ?? 'es' == 'pt' ? 'pt-br' : $settings['default_language'] ?? 'es' ?>"
|
||||
class="h-100"
|
||||
class="semi-dark-style customizer-hide"
|
||||
dir="ltr"
|
||||
|
||||
@ -15,7 +15,7 @@ if (!empty($token) && $tfa == false) {
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html
|
||||
lang="<?= $settings['default_language'] ?? 'es' ?>"
|
||||
lang="<?= $settings['default_language'] ?? 'es' == 'pt' ? 'pt-br' : $settings['default_language'] ?? 'es' ?>"
|
||||
class="h-100"
|
||||
class="semi-dark-style customizer-hide"
|
||||
dir="ltr"
|
||||
|
||||
@ -15,8 +15,9 @@ if (!empty($token) && $tfa == false) {
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html
|
||||
lang="<?= $session->get('lang') ?>"
|
||||
class="h-100 light-style layout-navbar-fixed layout-menu-fixed"
|
||||
lang="<?= $settings['default_language'] ?? 'es' == 'pt' ? 'pt-br' : $settings['default_language'] ?? 'es' ?>"
|
||||
class="h-100"
|
||||
class="semi-dark-style customizer-hide"
|
||||
dir="ltr"
|
||||
data-theme="theme-default"
|
||||
data-assets-path="<?= site_url('themes/vuexy/') ?>"
|
||||
|
||||
@ -17,7 +17,7 @@ if (!empty($token) && $tfa == false) {
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html
|
||||
lang="<?= $session->get('lang') ?>"
|
||||
lang="<?= $settings['default_language'] ?? 'es' == 'pt' ? 'pt-br' : $settings['default_language'] ?? 'es' ?>"
|
||||
class="h-100"
|
||||
class="dark-style customizer-hide"
|
||||
dir="ltr"
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (allowMenuSection($menus,
|
||||
['Calendario', 'Correo', 'Formaspago', 'Imposiciones',
|
||||
['Calendario', 'Correo', 'Formaspago', 'Imposiciones', 'Tipologias',
|
||||
'Maquina', 'Papelgenerico', 'Seriefactura', 'Serviciocliente',
|
||||
'Tamanioformatos', 'Tamaniolibros', 'Tareaservicio', 'Tiposimpresion', 'Trabajo'
|
||||
],
|
||||
@ -103,6 +103,15 @@
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tipologias')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/tipologias") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tipologias") ?>"><?= lang("App.menu_tipologias") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Maquina')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
|
||||
Reference in New Issue
Block a user