From efceab14d4f19974e5cd21e65a80dba9b4202f24 Mon Sep 17 00:00:00 2001 From: imnavajas Date: Thu, 11 May 2023 15:18:10 +0200 Subject: [PATCH] Arreglos UI --- .idea/workspace.xml | 26 +- ci4/.env | 8 +- ci4/app/Config/Basics.php | 2 +- ci4/app/Controllers/GoBaseController.php | 13 +- ci4/app/Controllers/Home.php | 2 +- ci4/app/Controllers/Tarifas/Tarifaacabado.php | 1 + ci4/app/Controllers/Test.php | 116 +-- ci4/app/Language/en/App.php | 1 + .../Language/{es => es-ES}/Tarifaaacabado.php | 0 ci4/app/Language/es/App.php | 1 + ci4/app/Language/es/Tarifaacabado.php | 114 +++ .../themes/_commonPartialsBs/datatables.php | 2 +- .../themes/backend/vuexy/login/header.php | 3 +- .../Views/themes/backend/vuexy/main/all.php | 2 +- .../themes/backend/vuexy/main/all_selects.php | 774 ++++++++++++++++++ .../themes/backend/vuexy/main/crud_layout.php | 2 +- .../backend/vuexy/main/defaultlayout.php | 5 +- .../themes/backend/vuexy/main/header.php | 2 +- 18 files changed, 927 insertions(+), 147 deletions(-) rename ci4/app/Language/{es => es-ES}/Tarifaaacabado.php (100%) create mode 100644 ci4/app/Language/es/Tarifaacabado.php create mode 100644 ci4/app/Views/themes/backend/vuexy/main/all_selects.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index eaa05b94..9483ae00 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,26 +5,22 @@ - - - - + + + - + - - - - - - + + + - + - + + @@ -88,6 +85,7 @@ + 1682339938559 diff --git a/ci4/.env b/ci4/.env index f5a58fed..d00689e2 100644 --- a/ci4/.env +++ b/ci4/.env @@ -23,7 +23,7 @@ CI_ENVIRONMENT = development #-------------------------------------------------------------------- # app.baseURL = 'https://sk-imn.imnavajas.es' -app.baseURL = 'https://sk-jjo.imnavajas.es' +app.baseURL = 'https://sk-imn.imnavajas.es' # app.forceGlobalSecureRequests = false # app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler' @@ -41,9 +41,9 @@ app.baseURL = 'https://sk-jjo.imnavajas.es' #-------------------------------------------------------------------- database.default.hostname = localhost -database.default.database = sk_jjo -database.default.username = sk_jjo -database.default.password = 61tv&G1Zf^XY +database.default.database = sk_imn +database.default.username = sk_imn +database.default.password = Uyia19_87 database.default.DBDriver = MySQLi database.default.DBPrefix = database.default.dump = diff --git a/ci4/app/Config/Basics.php b/ci4/app/Config/Basics.php index e7686d06..02535dfc 100644 --- a/ci4/app/Config/Basics.php +++ b/ci4/app/Config/Basics.php @@ -28,7 +28,7 @@ class Basics extends BaseConfig { public $appName = 'Safekat'; - public $i18n = 'Spanish'; + public $i18n = 'es-ES'; public $languages = [ 'en' => 'English', diff --git a/ci4/app/Controllers/GoBaseController.php b/ci4/app/Controllers/GoBaseController.php index 04a9709c..fae7f602 100644 --- a/ci4/app/Controllers/GoBaseController.php +++ b/ci4/app/Controllers/GoBaseController.php @@ -137,6 +137,11 @@ 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)) { @@ -169,10 +174,7 @@ 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'))){ @@ -194,8 +196,7 @@ abstract class GoBaseController extends Controller { $this->session->set('notification', []); $this->session->set('pulse', 0); } - - $this->viewData['currentLocale'] = $this->request->getLocale(); + } diff --git a/ci4/app/Controllers/Home.php b/ci4/app/Controllers/Home.php index 16980da4..093d13a3 100644 --- a/ci4/app/Controllers/Home.php +++ b/ci4/app/Controllers/Home.php @@ -32,7 +32,7 @@ class Home extends BaseController else $salutation = lang("App.dashboard_good_night"); - echo view(getenv('theme.path').'main/all'); + echo view(getenv('theme.path').'main/all_selects'); /* //echo view(getenv('theme.path').'main/header'); diff --git a/ci4/app/Controllers/Tarifas/Tarifaacabado.php b/ci4/app/Controllers/Tarifas/Tarifaacabado.php index 86dcb41b..815f4638 100644 --- a/ci4/app/Controllers/Tarifas/Tarifaacabado.php +++ b/ci4/app/Controllers/Tarifas/Tarifaacabado.php @@ -30,6 +30,7 @@ class Tarifaacabado extends \App\Controllers\GoBaseController { $this->viewData['usingClientSideDataTable'] = true; $this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('Tarifaacabado.tarifaacabado')]); + parent::index(); } diff --git a/ci4/app/Controllers/Test.php b/ci4/app/Controllers/Test.php index e8c30101..4e96bad0 100644 --- a/ci4/app/Controllers/Test.php +++ b/ci4/app/Controllers/Test.php @@ -16,119 +16,11 @@ class Test extends BaseController public function index() { - - $user_model = new UserModel(); - echo '
';
-        var_dump($user_model->getGroupsTitles('c0bf18621f78cb2ffc4a67cf8d5173c7'));
-        echo '
'; + + echo lang('Tarifaacabado.tarifaacabado'); + + } - 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', - ]; - } } \ No newline at end of file diff --git a/ci4/app/Language/en/App.php b/ci4/app/Language/en/App.php index aa4f8ac4..27ce5837 100644 --- a/ci4/app/Language/en/App.php +++ b/ci4/app/Language/en/App.php @@ -31,6 +31,7 @@ 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", diff --git a/ci4/app/Language/es/Tarifaaacabado.php b/ci4/app/Language/es-ES/Tarifaaacabado.php similarity index 100% rename from ci4/app/Language/es/Tarifaaacabado.php rename to ci4/app/Language/es-ES/Tarifaaacabado.php diff --git a/ci4/app/Language/es/App.php b/ci4/app/Language/es/App.php index 23d69f82..c7c9ca12 100644 --- a/ci4/app/Language/es/App.php +++ b/ci4/app/Language/es/App.php @@ -31,6 +31,7 @@ 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", diff --git a/ci4/app/Language/es/Tarifaacabado.php b/ci4/app/Language/es/Tarifaacabado.php new file mode 100644 index 00000000..35bb5601 --- /dev/null +++ b/ci4/app/Language/es/Tarifaacabado.php @@ -0,0 +1,114 @@ + 'Ajuste', + 'createdAt' => 'Creado en', + 'deletedAt' => 'Borrado en', + 'formulaPrice' => 'Fórmula precio', + 'id' => 'ID', + 'moduleTitle' => 'Tarifas Acabado', + 'nombre' => 'Nombre', + 'precioMax' => 'Precio Max', + 'precioMin' => 'Precio Min', + 'tarifaacabado' => 'Tarifas Acabado', + 'tarifaacabadoList' => 'Lista Tarifas Acabado', + 'tarifasacabado' => 'Tarifas Acabado', + 'tiradaMax' => 'Tirada Max', + 'tiradaMin' => 'Tirada Min', + 'updatedAt' => 'Actualizado en', + 'userCreatedId' => 'ID Usuario "Creado en"', + 'userUpdateId' => 'ID Usuario "Actualizado en"', + 'validation' => [ + 'formula_price' => [ + 'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'nombre' => [ + 'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'precio_max' => [ + 'decimal' => 'El campo {field} debe contener un número decimal.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'precio_min' => [ + 'decimal' => 'El campo {field} debe contener un número decimal.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'tirada_max' => [ + 'integer' => 'El campo {field} debe contener un número entero.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'tirada_min' => [ + 'integer' => 'El campo {field} debe contener un número entero.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'user_created_id' => [ + 'integer' => 'El campo {field} debe contener un número entero.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'user_update_id' => [ + 'integer' => 'El campo {field} debe contener un número entero.', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + 'validation' => [ + 'ajuste' => [ + 'decimal' => 'El campo {field} debe contener un número decimal', + 'required' => 'El campo {field} es obligatorio.', + + ], + + + ], + + +]; \ No newline at end of file diff --git a/ci4/app/Views/themes/_commonPartialsBs/datatables.php b/ci4/app/Views/themes/_commonPartialsBs/datatables.php index fee4d44b..f36b6b6d 100644 --- a/ci4/app/Views/themes/_commonPartialsBs/datatables.php +++ b/ci4/app/Views/themes/_commonPartialsBs/datatables.php @@ -160,7 +160,7 @@ "scrollX": true, "stateSave": true, "language": { - //url: "//cdn.datatables.net/plug-ins/1.10.25/i18n/languages[$currentLocale] ?? config('Basics')->i18n ?>.json" + url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/i18n ?>.json" }, "columnDefs": [ { diff --git a/ci4/app/Views/themes/backend/vuexy/login/header.php b/ci4/app/Views/themes/backend/vuexy/login/header.php index cb484cb1..df656979 100644 --- a/ci4/app/Views/themes/backend/vuexy/login/header.php +++ b/ci4/app/Views/themes/backend/vuexy/login/header.php @@ -10,8 +10,7 @@ if (!empty($token) && $tfa == false) { get('token') ?? ''; +$tfa = $session->get('tfa') ?? false; +$settings = $session->get('settings'); + +$picture = session()->get('picture'); +$pulse = session()->get('pulse'); +$notification = session()->get('notification'); + +if (!empty($token) && $tfa == false) { + //echo ""; +} +?> + + + + + + + + + <?= lang("App.dashboard_title") ?> - <?= $settings['title'] ?? '' ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ + + + + + +
+ + +
+

Page 1

+
+ +
+
+
Select2
+
+
+ +
+ + +
+ +
+ + +
+ +
+
+
+
+ + + +
+ +
+ + + + + + +
+
+ +
+ +
+ + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ci4/app/Views/themes/backend/vuexy/main/crud_layout.php b/ci4/app/Views/themes/backend/vuexy/main/crud_layout.php index 34b1c2f4..c9665f40 100644 --- a/ci4/app/Views/themes/backend/vuexy/main/crud_layout.php +++ b/ci4/app/Views/themes/backend/vuexy/main/crud_layout.php @@ -15,7 +15,7 @@ if (!empty($token) && $tfa == false) {