diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php index 85099761..57dc996b 100644 --- a/ci4/app/Config/Routes.php +++ b/ci4/app/Config/Routes.php @@ -123,22 +123,33 @@ $routes->group('', [], function($routes) { $routes->post('menuitems', 'Tipologias::menuItems', ['as' => 'menuItemsOfTipologiasLibros']); }); - $routes->group('papel-generico', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) { - $routes->get('', 'PapelGenerico::index', ['as' => 'papelGenericoList']); - $routes->get('add', 'PapelGenerico::add', ['as' => 'newPapelGenerico']); - $routes->post('add', 'PapelGenerico::add', ['as' => 'createPapelGenerico']); - $routes->post('create', 'PapelGenerico::create', ['as' => 'ajaxCreatePapelGenerico']); - $routes->put('(:num)/update', 'PapelGenerico::update/$1', ['as' => 'ajaxUpdatePapelGenerico']); - $routes->post('(:num)/edit', 'PapelGenerico::edit/$1', ['as' => 'updatePapelGenerico']); - $routes->post('datatable', 'PapelGenerico::datatable', ['as' => 'dataTableOfPapelesGenericos']); - $routes->post('allmenuitems', 'PapelGenerico::allItemsSelect', ['as' => 'select2ItemsOfPapelesGenericos']); - $routes->post('menuitems', 'PapelGenerico::menuItems', ['as' => 'menuItemsOfPapelesGenericos']); + $routes->group('imposiciones', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) { + $routes->get('', 'Imposiciones::index', ['as' => 'imposicionList']); + $routes->get('add', 'Imposiciones::add', ['as' => 'newImposicion']); + $routes->post('add', 'Imposiciones::add', ['as' => 'createImposicion']); + $routes->post('create', 'Imposiciones::create', ['as' => 'ajaxCreateImposicion']); + $routes->put('(:num)/update', 'Imposiciones::update/$1', ['as' => 'ajaxUpdateImposicion']); + $routes->post('(:num)/edit', 'Imposiciones::edit/$1', ['as' => 'updateImposicion']); + $routes->post('datatable', 'Imposiciones::datatable', ['as' => 'dataTableOfImposiciones']); + $routes->post('allmenuitems', 'Imposiciones::allItemsSelect', ['as' => 'select2ItemsOfImposiciones']); + $routes->post('menuitems', 'Imposiciones::menuItems', ['as' => 'menuItemsOfImposiciones']); }); - $routes->resource('papel-generico', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'PapelGenerico', 'except' => 'show,new,create,update']); - + $routes->resource('imposiciones', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Imposiciones', 'except' => 'show,new,create,update']); + $routes->group('papelesgenericos', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) { + $routes->get('', 'PapelesGenericos::index', ['as' => 'papelGenericoList']); + $routes->get('add', 'PapelesGenericos::add', ['as' => 'newPapelGenerico']); + $routes->post('add', 'PapelesGenericos::add', ['as' => 'createPapelGenerico']); + $routes->post('create', 'PapelesGenericos::create', ['as' => 'ajaxCreatePapelGenerico']); + $routes->put('(:num)/update', 'PapelesGenericos::update/$1', ['as' => 'ajaxUpdatePapelGenerico']); + $routes->post('(:num)/edit', 'PapelesGenericos::edit/$1', ['as' => 'updatePapelGenerico']); + $routes->post('datatable', 'PapelesGenericos::datatable', ['as' => 'dataTableOfPapelesGenericos']); + $routes->post('allmenuitems', 'PapelesGenericos::allItemsSelect', ['as' => 'select2ItemsOfPapelesGenericos']); + $routes->post('menuitems', 'PapelesGenericos::menuItems', ['as' => 'menuItemsOfPapelesGenericos']); + }); + $routes->resource('papelesgenericos', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'PapelesGenericos', 'except' => 'show,new,create,update']); }); - + //WEB ROUTER ------------------------------------------------------ //------------------------------------------------------------------ diff --git a/ci4/app/Controllers/Configuracion/Imposiciones.php b/ci4/app/Controllers/Configuracion/Imposiciones.php index eb621786..c684a39d 100644 --- a/ci4/app/Controllers/Configuracion/Imposiciones.php +++ b/ci4/app/Controllers/Configuracion/Imposiciones.php @@ -1,35 +1,284 @@ -viewData['pageTitle'] = lang('Imposiciones.moduleTitle'); + $this->viewData['usingSweetAlert'] = true; + parent::initController($request, $response, $logger); + } + + + public function index() { + + $viewData = [ + 'currentModule' => static::$controllerSlug, + 'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Imposiciones.imposicion')]), + 'imposicion' => new Imposicion(), + 'usingServerSideDataTable' => true, + + ]; + + $viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class + + return view(static::$viewPath.'viewImposicionList', $viewData); + } + + + 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('Imposiciones.imposicion'))]); + $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('Imposiciones.imposicion'))]).'.'; + $message .= anchor( "admin/imposiciones/{$id}/edit" , lang('Basic.global.continueEditing').'?'); + $message = ucfirst(str_replace("'", "\'", $message)); + + if ($thenRedirect) : + if (!empty($this->indexRoute)) : + return redirect()->to(route_to( $this->indexRoute ) )->with('sweet-success', $message); + else: + return $this->redirect2listView('sweet-success', $message); + endif; + else: + $this->session->setFlashData('sweet-success', $message); + endif; + + endif; // $noException && $successfulResult + + endif; // ($requestMethod === 'post') + + $this->viewData['imposicion'] = isset($sanitizedData) ? new Imposicion($sanitizedData) : new Imposicion(); + $this->viewData['orientacionList'] = $this->getOrientacionOptions(); + + $this->viewData['formAction'] = route_to('createImposicion'); + + $this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('Imposiciones.moduleTitle').' '.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); + $imposicion = $this->model->find($id); + + if ($imposicion == false) : + $message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Imposiciones.imposicion')), $id]); + return $this->redirect2listView('sweet-error', $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('Imposiciones.imposicion'))]); + $this->session->setFlashdata('formErrors', $this->model->errors()); + + endif; + + $imposicion->fill($sanitizedData); + + $thenRedirect = true; + endif; + if ($noException && $successfulResult) : + $id = $imposicion->id ?? $id; + $message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Imposiciones.imposicion'))]).'.'; + $message .= anchor( "admin/imposiciones/{$id}/edit" , lang('Basic.global.continueEditing').'?'); + $message = ucfirst(str_replace("'", "\'", $message)); + + if ($thenRedirect) : + if (!empty($this->indexRoute)) : + return redirect()->to(route_to( $this->indexRoute ) )->with('sweet-success', $message); + else: + return $this->redirect2listView('sweet-success', $message); + endif; + else: + $this->session->setFlashData('sweet-success', $message); + endif; + + endif; // $noException && $successfulResult + endif; // ($requestMethod === 'post') + + $this->viewData['imposicion'] = $imposicion; + $this->viewData['orientacionList'] = $this->getOrientacionOptions(); + + $this->viewData['formAction'] = route_to('updateImposicion', $id); + + $this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('Imposiciones.moduleTitle').' '.lang('Basic.global.edit3'); + + + return $this->displayForm(__METHOD__, $id); + } // end function edit(...) + + + + public function datatable() { + if ($this->request->isAJAX()) { + $reqData = $this->request->getPost(); + if (!isset($reqData['draw']) || !isset($reqData['columns']) ) { + $errstr = 'No data available in response to this specific request.'; + $response = $this->respond(Collection::datatable( [], 0, 0, $errstr ), 400, $errstr); + return $response; + } + $start = $reqData['start'] ?? 0; + $length = $reqData['length'] ?? 5; + $search = $reqData['search']['value']; + $requestedOrder = $reqData['order']['0']['column'] ?? 1; + $order = ImposicionModel::SORTABLE[$requestedOrder > 0 ? $requestedOrder : 1]; + $dir = $reqData['order']['0']['dir'] ?? 'asc'; + + $resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject(); + + return $this->respond(Collection::datatable( + $resourceData, + $this->model->getResource()->countAllResults(), + $this->model->getResource($search)->countAllResults() + )); + } else { + return $this->failUnauthorized('Invalid request', 403); + } + } + + public function allItemsSelect() { + if ($this->request->isAJAX()) { + $onlyActiveOnes = true; + $reqVal = $this->request->getPost('val') ?? 'id'; + $menu = $this->model->getAllForMenu($reqVal.', ancho', 'ancho', $onlyActiveOnes, false); + $nonItem = new \stdClass; + $nonItem->id = ''; + $nonItem->ancho = '- '.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 ?? 'ancho']; + $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); + } + } + + + protected function getOrientacionOptions() { + $orientacionOptions = [ + '' => lang('Basic.global.pleaseSelect'), + 'H' => 'H', + 'V' => 'V', + ]; + return $orientacionOptions; + } + + } - \ No newline at end of file diff --git a/ci4/app/Controllers/Configuracion/Papelgenerico.php b/ci4/app/Controllers/Configuracion/Papelgenerico.php deleted file mode 100644 index 6cb6c95c..00000000 --- a/ci4/app/Controllers/Configuracion/Papelgenerico.php +++ /dev/null @@ -1,274 +0,0 @@ -viewData['pageTitle'] = lang('PapelGenerico.moduleTitle'); - $this->viewData['usingSweetAlert'] = true; - parent::initController($request, $response, $logger); - } - - - public function index() { - - $viewData = [ - 'currentModule' => static::$controllerSlug, - 'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('PapelGenerico.papelGenerico')]), - 'papelGenericoEntity' => new PapelGenericoEntity(), - 'usingServerSideDataTable' => true, - - ]; - - $viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class - - return view(static::$viewPath.'viewPapelGenericoList', $viewData); - } - - - 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('PapelGenerico.papelGenerico'))]); - $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('PapelGenerico.papelGenerico'))]).'.'; - $message .= anchor( "admin/papel-generico/{$id}/edit" , lang('Basic.global.continueEditing').'?'); - $message = ucfirst(str_replace("'", "\'", $message)); - - if ($thenRedirect) : - if (!empty($this->indexRoute)) : - return redirect()->to(route_to( $this->indexRoute ) )->with('sweet-success', $message); - else: - return $this->redirect2listView('sweet-success', $message); - endif; - else: - $this->session->setFlashData('sweet-success', $message); - endif; - - endif; // $noException && $successfulResult - - endif; // ($requestMethod === 'post') - - $this->viewData['papelGenericoEntity'] = isset($sanitizedData) ? new PapelGenericoEntity($sanitizedData) : new PapelGenericoEntity(); - - $this->viewData['formAction'] = route_to('createPapelGenerico'); - - $this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('PapelGenerico.moduleTitle').' '.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); - $papelGenericoEntity = $this->model->find($id); - - if ($papelGenericoEntity == false) : - $message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('PapelGenerico.papelGenerico')), $id]); - return $this->redirect2listView('sweet-error', $message); - endif; - - $requestMethod = $this->request->getMethod(); - - if ($requestMethod === 'post') : - - $nullIfEmpty = true; // !(phpversion() >= '8.1'); - - $postData = $this->request->getPost(); - - $sanitizedData = $this->sanitized($postData, $nullIfEmpty); -if ($this->request->getPost('show_in_client') == null ) { - $sanitizedData['show_in_client'] = false; - } - - - - $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('PapelGenerico.papelGenerico'))]); - $this->session->setFlashdata('formErrors', $this->model->errors()); - - endif; - - $papelGenericoEntity->fill($sanitizedData); - - $thenRedirect = true; - endif; - if ($noException && $successfulResult) : - $id = $papelGenericoEntity->id ?? $id; - $message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('PapelGenerico.papelGenerico'))]).'.'; - $message .= anchor( "admin/papel-generico/{$id}/edit" , lang('Basic.global.continueEditing').'?'); - $message = ucfirst(str_replace("'", "\'", $message)); - - if ($thenRedirect) : - if (!empty($this->indexRoute)) : - return redirect()->to(route_to( $this->indexRoute ) )->with('sweet-success', $message); - else: - return $this->redirect2listView('sweet-success', $message); - endif; - else: - $this->session->setFlashData('sweet-success', $message); - endif; - - endif; // $noException && $successfulResult - endif; // ($requestMethod === 'post') - - $this->viewData['papelGenericoEntity'] = $papelGenericoEntity; - - $this->viewData['formAction'] = route_to('updatePapelGenerico', $id); - - $this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('PapelGenerico.moduleTitle').' '.lang('Basic.global.edit3'); - - - return $this->displayForm(__METHOD__, $id); - } // end function edit(...) - - - - public function datatable() { - if ($this->request->isAJAX()) { - $reqData = $this->request->getPost(); - if (!isset($reqData['draw']) || !isset($reqData['columns']) ) { - $errstr = 'No data available in response to this specific request.'; - $response = $this->respond(Collection::datatable( [], 0, 0, $errstr ), 400, $errstr); - return $response; - } - $start = $reqData['start'] ?? 0; - $length = $reqData['length'] ?? 5; - $search = $reqData['search']['value']; - $requestedOrder = $reqData['order']['0']['column'] ?? 1; - $order = PapelGenericoModel::SORTABLE[$requestedOrder > 0 ? $requestedOrder : 1]; - $dir = $reqData['order']['0']['dir'] ?? 'asc'; - - $resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject(); - - return $this->respond(Collection::datatable( - $resourceData, - $this->model->getResource()->countAllResults(), - $this->model->getResource($search)->countAllResults() - )); - } else { - return $this->failUnauthorized('Invalid request', 403); - } - } - - 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); - } - } - -} diff --git a/ci4/app/Entities/Configuracion/PapelGenericoEntity.php b/ci4/app/Entities/Configuracion/PapelGenericoEntity.php deleted file mode 100644 index 4d3534c2..00000000 --- a/ci4/app/Entities/Configuracion/PapelGenericoEntity.php +++ /dev/null @@ -1,22 +0,0 @@ - null, - "nombre" => null, - "code" => null, - "code_ot" => null, - "show_in_client" => true, - "is_deleted" => 0, - "created_at" => null, - "updated_at" => null, - ]; - protected $casts = [ - "show_in_client" => "boolean", - "is_deleted" => "int", - ]; -} diff --git a/ci4/app/Filters/LoginAuthFilter.php b/ci4/app/Filters/LoginAuthFilter.php index 8343f613..dea70867 100644 --- a/ci4/app/Filters/LoginAuthFilter.php +++ b/ci4/app/Filters/LoginAuthFilter.php @@ -176,6 +176,7 @@ class LoginAuthFilter implements FilterInterface 'whiteListMethod', 'allItemsSelect', 'menuItems', + 'datatable', 'collect', 'cast', ]; diff --git a/ci4/app/Models/Configuracion/PapelGenericoModel.php b/ci4/app/Models/Configuracion/PapelGenericoModel.php index a9af532e..026ada40 100644 --- a/ci4/app/Models/Configuracion/PapelGenericoModel.php +++ b/ci4/app/Models/Configuracion/PapelGenericoModel.php @@ -21,7 +21,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel ]; protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client"]; - protected $returnType = "App\Entities\Configuracion\PapelGenericoEntity"; + protected $returnType = "App\Entities\Configuracion\PapelGenerico"; protected $useTimestamps = true; protected $useSoftDeletes = false; @@ -34,29 +34,29 @@ class PapelGenericoModel extends \App\Models\GoBaseModel protected $validationRules = [ "code" => [ - "label" => "PapelGenericoes.code", + "label" => "PapelGenerico.code", "rules" => "trim|max_length[5]", ], "code_ot" => [ - "label" => "PapelGenericoes.codeOt", + "label" => "PapelGenerico.codeOt", "rules" => "trim|max_length[5]", ], "nombre" => [ - "label" => "PapelGenericoes.nombre", + "label" => "PapelGenerico.nombre", "rules" => "trim|required|max_length[255]", ], ]; protected $validationMessages = [ "code" => [ - "max_length" => "PapelGenericoes.validation.code.max_length", + "max_length" => "PapelGenerico.validation.code.max_length", ], "code_ot" => [ - "max_length" => "PapelGenericoes.validation.code_ot.max_length", + "max_length" => "PapelGenerico.validation.code_ot.max_length", ], "nombre" => [ - "max_length" => "PapelGenericoes.validation.nombre.max_length", - "required" => "PapelGenericoes.validation.nombre.required", + "max_length" => "PapelGenerico.validation.nombre.max_length", + "required" => "PapelGenerico.validation.nombre.required", ], ]; diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisForm.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisForm.php index a8f2a01f..d5ebbd04 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisForm.php +++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisForm.php @@ -1,5 +1,5 @@ include("themes/_commonPartialsBs/select2bs5") ?> -extend('themes/backend/focus2/main/defaultlayout') ?> +extend('themes/backend/vuexy/main/defaultlayout') ?> section("content") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisList.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisList.php index d2a24027..5d3e41a5 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisList.php +++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/paises/viewPaisList.php @@ -1,5 +1,5 @@ include('themes/_commonPartialsBs/datatables') ?> -extend('themes/backend/focus2/main/defaultlayout') ?> +extend('themes/backend/vuexy/main/defaultlayout') ?> section('content'); ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelGenericoFormItems.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelGenericoFormItems.php index ecc95b5d..6b1141e9 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelGenericoFormItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/_papelGenericoFormItems.php @@ -4,28 +4,28 @@ - +
- +
- +
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php index 53f16d45..f7fb7658 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php +++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php @@ -8,7 +8,7 @@

- 'btn btn-primary float-end']); ?> + 'btn btn-primary float-end']); ?>
@@ -16,6 +16,7 @@ + @@ -71,7 +72,7 @@ stateSave: true, order: [[1, 'asc']], language: { - url: "/assets/dt/languages[$currentLocale] ?? config('Basics')->i18n ?>.json" + url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/i18n ?>.json" }, ajax : $.fn.dataTable.pipeline( { url: '', @@ -87,7 +88,8 @@ } ], columns : [ - { 'data': 'id' }, + { 'data': actionBtns }, + { 'data': 'id' }, { 'data': 'nombre' }, { 'data': 'code' }, { 'data': 'code_ot' }, @@ -154,13 +156,13 @@ $(document).on('click', '.btn-delete', function(e) { section('css') ?> - + endSection() ?> section('additionalExternalJs') ?> - +