From 405afd0cf12194073dea85227e1ad4e5154ceb2f Mon Sep 17 00:00:00 2001 From: imnavajas Date: Thu, 13 Jun 2024 21:00:33 +0200 Subject: [PATCH] Terminada exposicion de tablas ubicacion y series --- .../Configuracion/SeriesFacturas.php | 26 ++++---- ci4/app/Language/es/App.php | 2 +- ci4/app/Language/es/SeriesFacturas.php | 29 +++++---- .../_seriesFacturasFormItems.php | 65 ++++++++++++++++--- .../viewSeriesFacturasForm.php | 6 +- .../viewSeriesFacturasList.php | 10 ++- 6 files changed, 96 insertions(+), 42 deletions(-) diff --git a/ci4/app/Controllers/Configuracion/SeriesFacturas.php b/ci4/app/Controllers/Configuracion/SeriesFacturas.php index 7df5e275..b5e0faef 100644 --- a/ci4/app/Controllers/Configuracion/SeriesFacturas.php +++ b/ci4/app/Controllers/Configuracion/SeriesFacturas.php @@ -2,13 +2,13 @@ use App\Controllers\BaseResourceController; use App\Models\Collection; -use App\Entities\Configuracion\UbicacionesEntity; -use App\Models\Configuracion\UbicacionesModel; +use App\Entities\Configuracion\SeriesFacturasEntity; +use App\Models\Configuracion\SeriesFacturasModel; class SeriesFacturas extends BaseResourceController { - protected $modelName = UbicacionesModel::class; + protected $modelName = SeriesFacturasModel::class; protected $format = 'json'; protected static $singularObjectName = 'Series Facturas'; @@ -31,7 +31,7 @@ class SeriesFacturas extends BaseResourceController // Breadcrumbs (IMN) $this->viewData['breadcrumb'] = [ ['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false], - ['title' => lang("App.menu_ubicaciones"), 'route' => route_to('seriesFacturasList'), 'active' => true] + ['title' => lang("App.menu_series_facturas"), 'route' => route_to('seriesFacturasList'), 'active' => true] ]; parent::initController($request, $response, $logger); @@ -44,14 +44,14 @@ class SeriesFacturas extends BaseResourceController $viewData = [ 'currentModule' => static::$controllerSlug, 'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('SeriesFacturas.moduleTitle')]), - 'ubicacionesEntity' => new UbicacionesEntity(), + 'seriesFacturasEntity' => new SeriesFacturasEntity(), 'usingServerSideDataTable' => true, ]; $viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class - return view(static::$viewPath . 'viewUbicacionesList', $viewData); + return view(static::$viewPath . 'viewSeriesFacturasList', $viewData); } @@ -101,7 +101,7 @@ class SeriesFacturas extends BaseResourceController endif; // ($requestMethod === 'post') - $this->viewData['ubicacionesEntity'] = isset($sanitizedData) ? new UbicacionesEntity($sanitizedData) : new UbicacionesEntity(); + $this->viewData['seriesFacturasEntity'] = isset($sanitizedData) ? new SeriesFacturasEntity($sanitizedData) : new SeriesFacturasEntity(); $this->viewData['formAction'] = route_to('seriesFacturasAdd'); $this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('SeriesFacturas.moduleTitle') . ' ' . lang('Basic.global.addNewSuffix'); @@ -116,9 +116,9 @@ class SeriesFacturas extends BaseResourceController return $this->redirect2listView(); endif; $id = filter_var($requestedId, FILTER_SANITIZE_URL); - $ubicacionesEntity = $this->model->find($id); + $seriesFacturasEntity = $this->model->find($id); - if ($ubicacionesEntity == false) : + if ($seriesFacturasEntity == false) : $message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('SeriesFacturas.moduleTitle')), $id]); return $this->redirect2listView('sweet-error', $message); endif; @@ -148,11 +148,11 @@ class SeriesFacturas extends BaseResourceController endif; - $ubicacionesEntity->fill($sanitizedData); + $seriesFacturasEntity->fill($sanitizedData); $thenRedirect = false; endif; if ($noException && $successfulResult) : - $id = $ubicacionesEntity->id ?? $id; + $id = $seriesFacturasEntity->id ?? $id; $message = lang('Basic.global.updateSuccess', [lang('Basic.global.record')]) . '.'; if ($thenRedirect) : @@ -168,7 +168,7 @@ class SeriesFacturas extends BaseResourceController endif; // $noException && $successfulResult endif; // ($requestMethod === 'post') - $this->viewData['ubicacionesEntity'] = $ubicacionesEntity; + $this->viewData['seriesFacturasEntity'] = $seriesFacturasEntity; $this->viewData['formAction'] = route_to('seriesFacturasEdit', $id); $this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('SeriesFacturas.moduleTitle') . ' ' . lang('Basic.global.edit3'); @@ -189,7 +189,7 @@ class SeriesFacturas extends BaseResourceController $length = $reqData['length'] ?? 5; $search = $reqData['search']['value']; $requestedOrder = $reqData['order']['0']['column'] ?? 1; - $order = UbicacionesModel::SORTABLE[$requestedOrder > 0 ? $requestedOrder : 1]; + $order = SeriesFacturasModel::SORTABLE[$requestedOrder > 0 ? $requestedOrder : 1]; $dir = $reqData['order']['0']['dir'] ?? 'asc'; $resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject(); diff --git a/ci4/app/Language/es/App.php b/ci4/app/Language/es/App.php index 1a2186ae..3806b8cb 100755 --- a/ci4/app/Language/es/App.php +++ b/ci4/app/Language/es/App.php @@ -688,7 +688,7 @@ return [ "menu_maquina_defecto" => "Maquinas por defecto", "menu_papelgenerico" => "Papel generico", "menu_papelimpresion" => "Papel impresión", - "menu_series_factura" => "Series facturas", + "menu_series_facturas" => "Series facturas", "menu_ubicaciones" => "Ubicaciones", "menu_serviciocliente" => "Servicio cliente", "menu_tamanioformatos" => "Tamaño formatos", diff --git a/ci4/app/Language/es/SeriesFacturas.php b/ci4/app/Language/es/SeriesFacturas.php index b0240b49..3169eaaf 100644 --- a/ci4/app/Language/es/SeriesFacturas.php +++ b/ci4/app/Language/es/SeriesFacturas.php @@ -1,21 +1,24 @@ 'ID', - 'moduleTitle' => 'Series Facturas', - 'nombre' => 'Nombre', - 'validation' => [ - 'id' => [ - 'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.', - ], + 'id' => 'ID', + 'moduleTitle' => 'Series Facturas', + 'nombre' => 'Nombre', + 'tipo' => 'Tipo', + 'formato' => 'Formato', + 'next' => 'Próxima', + 'grupo' => 'Grupo', + 'validation' => [ + 'id' => [ + 'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.', + ], - 'nombre' => [ - '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.', + ], - ], + ], ]; \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/_seriesFacturasFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/_seriesFacturasFormItems.php index 1f6af855..fcb274de 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/_seriesFacturasFormItems.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/_seriesFacturasFormItems.php @@ -1,12 +1,57 @@ -
-
-
- - -
+
+
+
+ + +
-
+
+ + +
-
\ No newline at end of file +
+ + +
+ +
+ + +
+ +
+ +
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasForm.php index 820d2be6..cd4eaf81 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasForm.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasForm.php @@ -10,18 +10,18 @@

-
+ getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?> - +
" /> - "btn btn-secondary float-start",]) ?> + "btn btn-secondary float-start",]) ?>
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasList.php b/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasList.php index 60026648..85ca4f23 100644 --- a/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasList.php +++ b/ci4/app/Views/themes/vuexy/form/configuracion/series-facturas/viewSeriesFacturasList.php @@ -9,7 +9,7 @@

- 'btn btn-primary float-end']); ?> + 'btn btn-primary float-end']); ?>
@@ -18,7 +18,10 @@ - + + + + @@ -87,6 +90,9 @@ columns : [ { 'data': 'nombre' }, { 'data': 'tipo' }, + { 'data': 'formato' }, + { 'data': 'next' }, + { 'data': 'grupo' }, { 'data': actionBtns } ] });