From f0a4f1908998ac456972ad1365b7e1ed82121647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Sun, 13 Apr 2025 20:28:05 +0200 Subject: [PATCH] vista creada de envios --- ci4/app/Config/Routes.php | 2 + .../Logistica/LogisticaController.php | 40 +++++++++ ci4/app/Language/es/Logistica.php | 17 ++++ .../logistica/viewLogisticaSelectEnvios.php | 83 +++++++++++++++++++ .../form/logistica/viewPanelLogistica.php | 16 ++-- 5 files changed, 151 insertions(+), 7 deletions(-) create mode 100644 ci4/app/Views/themes/vuexy/form/logistica/viewLogisticaSelectEnvios.php diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php index 8b6335a4..6adc2c7b 100644 --- a/ci4/app/Config/Routes.php +++ b/ci4/app/Config/Routes.php @@ -768,6 +768,8 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func $routes->group('logistica', ['namespace' => 'App\Controllers\Logistica'], function ($routes) { $routes->get('print/label/test', 'LogisticaController::print_test_label'); + $routes->get('panel', 'LogisticaController::panel', ['as' => 'LogisticaPanel']); + $routes->get('selectEnvios/(:any)', 'LogisticaController::selectorEnvios/$1', ['as' => 'selectEnvios']); }); diff --git a/ci4/app/Controllers/Logistica/LogisticaController.php b/ci4/app/Controllers/Logistica/LogisticaController.php index 25f5819d..f59a0788 100644 --- a/ci4/app/Controllers/Logistica/LogisticaController.php +++ b/ci4/app/Controllers/Logistica/LogisticaController.php @@ -15,11 +15,22 @@ class LogisticaController extends BaseController protected string $locale; protected array $viewData; + protected static $controllerSlug = 'logistica'; + protected static $viewPath = 'themes/vuexy/form/logistica/'; + public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { $this->impresoraEtiquetaService = service('impresora_etiqueta'); $this->locale = session()->get('lang'); + $this->viewData['pageTitle'] = lang('Logistica.logistica'); + + // Breadcrumbs + $this->viewData['breadcrumb'] = [ + ['title' => lang("App.menu_logistica"), 'route' => "javascript:void(0);", 'active' => false], + ]; + + parent::initController($request, $response, $logger); } public function print_test_label() @@ -28,4 +39,33 @@ class LogisticaController extends BaseController $responseMessage = $etiquetaData["status"] ? "OK" : "ERROR"; return $this->response->setJSON(["message" => $responseMessage, "data" => $etiquetaData, "status" => $etiquetaData["status"]]); } + + public function panel() + { + $viewData = [ + 'currentModule' => static::$controllerSlug, + 'boxTitle' => lang('Logistica.panel'), + 'pageSubTitle' => 'Panel', + 'usingServerSideDataTable' => true, + ]; + + $viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class + + return view(static::$viewPath . 'viewPanelLogistica', $viewData); + } + + public function selectorEnvios($tipoEnvio = null) + { + $viewData = [ + 'currentModule' => static::$controllerSlug, + 'boxTitle' => lang('Logistica.envioSimpleMultiple'), + 'usingServerSideDataTable' => true, + 'tipoEnvio' => $tipoEnvio, + ]; + + $viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class + + return view(static::$viewPath . 'viewLogisticaSelectEnvios', $viewData); + } + } diff --git a/ci4/app/Language/es/Logistica.php b/ci4/app/Language/es/Logistica.php index 3885004a..f7799770 100644 --- a/ci4/app/Language/es/Logistica.php +++ b/ci4/app/Language/es/Logistica.php @@ -9,4 +9,21 @@ return [ 'etiquetasEnvio' => 'Etiquetas de envío', 'envioFerros' => 'Envío de ferros', 'cerrarOTauto' => 'Cerrar OT automáticamente', + 'envioSimpleMultiple' => 'Envío simple/múltiple', + 'nuevoEnvio' => 'Nuevo envío', + 'buscadorPedidosTitle' => 'Código Pedido o ISBN', + 'listadoEnvios' => 'Listado de envíos', + 'idEnvio' => 'ID Envío', + 'numeroPedidos' => 'Nº Pedidos', + 'numeroLineas' => 'Nº Líneas', + 'att' => 'Att', + 'direccion' => 'Dirección', + 'ciudad' => 'Ciudad', + 'pais' => 'País', + 'cp' => 'CP', + 'email' => 'Email', + 'telefono' => 'Teléfono', + 'finalizado' => 'Finalizado', + 'acciones' => 'Acciones', + 'backToPanel' => 'Volver al panel', ]; \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/logistica/viewLogisticaSelectEnvios.php b/ci4/app/Views/themes/vuexy/form/logistica/viewLogisticaSelectEnvios.php new file mode 100644 index 00000000..5dedb86f --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/logistica/viewLogisticaSelectEnvios.php @@ -0,0 +1,83 @@ +include("themes/_commonPartialsBs/sweetalert") ?> +include('themes/_commonPartialsBs/datatables') ?> +extend('themes/vuexy/main/defaultlayout') ?> + +section('content'); ?> +
+
+
+
+

+
+
+ +
+

+ +

+ +
+
+ +
+ +
+ + +
+ +
+
+
+
+ + +
+

+ +

+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+
+ +
+
+ endSection() ?> \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/logistica/viewPanelLogistica.php b/ci4/app/Views/themes/vuexy/form/logistica/viewPanelLogistica.php index 419584a2..4ba6b66c 100644 --- a/ci4/app/Views/themes/vuexy/form/logistica/viewPanelLogistica.php +++ b/ci4/app/Views/themes/vuexy/form/logistica/viewPanelLogistica.php @@ -14,41 +14,43 @@
-
-
-
-
-
-
-