diff --git a/ci4/app/Controllers/Configuracion/ConfigErrores.php b/ci4/app/Controllers/Configuracion/ConfigErrores.php new file mode 100644 index 00000000..4c727ef7 --- /dev/null +++ b/ci4/app/Controllers/Configuracion/ConfigErrores.php @@ -0,0 +1,81 @@ +errorPresupuestoModel = model(ErrorPresupuestoModel::class); + } + + + public function index() + { + $this->viewData['breadcrumb'] = [ + ['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false], + ['title' => lang("App.menu_error_presupuesto"), 'route' => site_url('configuracion/errores-presupuesto'), 'active' => true] + ]; + return view(static::$viewPath . $this->indexRoute, $this->viewData); + } + public function viewForm(int $error_presupuesto_id) + { + $this->viewData['breadcrumb'] = [ + ['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false], + ['title' => lang("App.menu_error_presupuesto"), 'route' => site_url('configuracion/errores-presupuesto'), 'active' => true] + ]; + $this->viewData["error_presupuesto_id"] = $error_presupuesto_id; + $this->errorPresupuestoModel->update($error_presupuesto_id, [ + "last_user_id" => auth()->user()->id, + "visto" => true, + ]); + return view(static::$viewPath . 'viewErrorPresupuestoForm', $this->viewData); + } + public function store() + { + $data = []; + $variableCreated = $this->errorPresupuestoModel->store($data); + return $this->response->setJSON($variableCreated); + } + public function get_error_presupuesto(int $error_presupuesto_id) + { + $data = $this->errorPresupuestoModel->getErrorPresupuestoForm($error_presupuesto_id); + if (isset($data[0])) { + return $this->response->setJSON(["data" => $data[0]]); + } else { + return $this->response->setJSON(["data" => []]); + } + } + public function update_error_presupuesto(int $error_presupuesto_id) + { + $bodyData = $this->request->getPost(); + $this->errorPresupuestoModel->updateComment($error_presupuesto_id, $bodyData["comments"]); + return $this->response->setJSON(["message" => "Comentario actualizado", "status" => true]); + } + + public function datatable() + { + $query = $this->errorPresupuestoModel->getQueryDatatable()->orderBy("created_at", "DESC"); + return DataTable::of($query) + ->add("action", fn($q) => $q->id) + ->toJson(true); + } +} \ No newline at end of file diff --git a/ci4/app/Controllers/Tarifas/Tarifasencuadernacion.php b/ci4/app/Controllers/Tarifas/Tarifasencuadernacion.php index 12e77c70..4fea5fe3 100755 --- a/ci4/app/Controllers/Tarifas/Tarifasencuadernacion.php +++ b/ci4/app/Controllers/Tarifas/Tarifasencuadernacion.php @@ -1,4 +1,6 @@ -request->getPost('servicio_encuadernacion') == null) { $sanitizedData['servicio_encuadernacion'] = false; } - + if ($this->request->getPost('por_horas') == null) { $sanitizedData['por_horas'] = false; } @@ -146,7 +148,7 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController $this->viewData['tarifaEncuadernacionEntity'] = isset($sanitizedData) ? new TarifaEncuadernacionEntity($sanitizedData) : new TarifaEncuadernacionEntity(); - $this->viewData['formAction'] = site_url('tarifas/tarifasencuadernacion/add');//route_to('createTarifaEncuadernacion'); + $this->viewData['formAction'] = site_url('tarifas/tarifasencuadernacion/add'); //route_to('createTarifaEncuadernacion'); $this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Tarifaencuadernacion.moduleTitle') . ' ' . lang('Basic.global.addNewSuffix'); @@ -171,7 +173,7 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController return $this->redirect2listView('sweet-error', $message); endif; - + if ($this->request->getPost()) : @@ -188,7 +190,7 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController if ($this->request->getPost('mostrar_en_presupuesto') == null) { $sanitizedData['mostrar_en_presupuesto'] = false; } - + if ($this->request->getPost('tipo_encuadernacion') == null) { $sanitizedData['tipo_encuadernacion'] = false; } @@ -335,7 +337,8 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController } } - private function getProveedores(){ + private function getProveedores() + { $provTipoModel = new ProveedorTipoModel(); $provModel = new ProveedorModel(); @@ -343,12 +346,13 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController return $provModel->getProvList($tipoId); } - private function getDimensiones(){ + private function getDimensiones() + { $dimensionModel = new TarifaEncuadernacionDimensionesModel(); $dimensiones = $dimensionModel->getDimensiones(); - foreach($dimensiones as $dim){ - $dim->label= lang("TarifaEncuadernacionLineas." . $dim->label); + foreach ($dimensiones as $dim) { + $dim->label = lang("TarifaEncuadernacionLineas." . $dim->label); } return $dimensiones; } diff --git a/ci4/app/Language/es/ErrorPresupuesto.php b/ci4/app/Language/es/ErrorPresupuesto.php new file mode 100644 index 00000000..d2b8d972 --- /dev/null +++ b/ci4/app/Language/es/ErrorPresupuesto.php @@ -0,0 +1,21 @@ + "Errores presupuesto", + + "datatable" => + [ + "columns" => [ + "usuario" => "Usuario presupuesto", + "last_user_id" => "Último accesso", + "visto" => "Visto", + "created_at" => "Creado" + ] + ], + "form" => + [ + "name" => "Nombre", + "value" => "Valor", + "description" => "Descripción", + ] +]; \ No newline at end of file diff --git a/ci4/app/Language/es/TarifaEncuadernacionLineas.php b/ci4/app/Language/es/TarifaEncuadernacionLineas.php index 4cdd7f69..5cec8f5a 100755 --- a/ci4/app/Language/es/TarifaEncuadernacionLineas.php +++ b/ci4/app/Language/es/TarifaEncuadernacionLineas.php @@ -20,6 +20,10 @@ return [ 'menor_a5' =>'Hasta A5', 'entre_a5_a4' =>'Entre A5 y A4', 'mayor_a4' =>'Desde A4', + 'menor_a5_apaisado' =>'Hasta A5 apaisado', + 'entre_a5_a4_apaisado' =>'Entre A5 y A4 apaisado', + 'mayor_a4_apaisado' =>'Desde A4 apaisado', + '210x210' =>'210x210', 'por_defecto' =>'Genérico', 'moduleExplanation' => 'El número de páginas reflejado en este apartado se refiere por ejemplar, no al total del pedido', 'margen' => 'Margen', diff --git a/ci4/app/Models/Presupuestos/ErrorPresupuesto.php b/ci4/app/Models/Presupuestos/ErrorPresupuesto.php new file mode 100644 index 00000000..308d868e --- /dev/null +++ b/ci4/app/Models/Presupuestos/ErrorPresupuesto.php @@ -0,0 +1,115 @@ +insert([ + "presupuesto_id" => $presupuesto_id, + "presupuesto_user_id" => $presupuesto_user_id, + "error" => $error, + "datos_presupuesto" => json_encode($datos) + ]); + } + public function updateComment(int $error_presupuesto_id, string $comment): bool + { + $updated = $this->update($error_presupuesto_id, [ + "comment" => $comment + ]); + return $updated; + } + public function getErrorPresupuestoForm(int $error_presupuesto_id) : array + { + $query = $this->builder() + ->select([ + "presupuesto_errores.id", + "CONCAT(t1.first_name,' ',t1.last_name) as presupuestoUser", + "CONCAT(t2.first_name,' ',t2.last_name) as lastUser", + "presupuesto_errores.created_at", + "presupuesto_errores.datos_presupuesto", + "presupuesto_errores.error", + "presupuesto_errores.visto", + "presupuesto_errores.comment" + ]) + ->join("users t1", "t1.id = presupuesto_errores.presupuesto_user_id", "left") + ->join("users t2", "t2.id = presupuesto_errores.last_user_id", "left") + ->where("presupuesto_errores.deleted_at", null) + ->where("presupuesto_errores.id",$error_presupuesto_id); + return $query->get()->getResultObject(); + } + public function getQueryDatatable(): BaseBuilder + { + $query = $this->builder() + ->select([ + "presupuesto_errores.id", + "presupuestos.id as presupuestoId", + "CONCAT(t1.first_name,' ',t1.last_name) as presupuestoUser", + "CONCAT(t2.first_name,' ',t2.last_name) as lastUser", + "presupuesto_errores.created_at", + "presupuesto_errores.datos_presupuesto", + "presupuesto_errores.error", + "presupuesto_errores.visto", + "presupuesto_errores.comment", + + ]) + ->join("users t1", "t1.id = presupuesto_errores.presupuesto_user_id", "left") + ->join("users t2", "t2.id = presupuesto_errores.last_user_id", "left") + ->join("presupuestos", "presupuestos.id = presupuesto_errores.presupuesto_id", "left") + ->where("presupuesto_errores.deleted_at", null); + return $query; + } +} \ No newline at end of file diff --git a/ci4/app/Models/Tarifas/TarifaEncuadernacionDimensionesModel.php b/ci4/app/Models/Tarifas/TarifaEncuadernacionDimensionesModel.php index 9f1a6c91..5e8acbc0 100755 --- a/ci4/app/Models/Tarifas/TarifaEncuadernacionDimensionesModel.php +++ b/ci4/app/Models/Tarifas/TarifaEncuadernacionDimensionesModel.php @@ -1,4 +1,5 @@ db - ->table($this->table . " t1") - ->select("t1.id AS value, t1.keyword AS label") - ->orderBy('t1.id', 'asc'); + ->table($this->table . " t1") + ->select("t1.id AS value, t1.keyword AS label") + ->orderBy('t1.id', 'asc'); - return $builder->get()->getResultObject(); + $result = $builder->get()->getResultObject(); + + // Convertir el resultado en un array + $resultArray = json_decode(json_encode($result), true); + + // Buscar y mover el objeto con value == 3 al principio + foreach ($resultArray as $key => $item) { + if ($item['value'] == 4) { + $generico = $item; + unset($resultArray[$key]); + array_unshift($resultArray, $generico); + break; + } + } + + // Convertir de nuevo a objetos + $result = json_decode(json_encode($resultArray)); + + return $result; } } diff --git a/ci4/app/Views/themes/_commonPartialsBs/_modalInput.php b/ci4/app/Views/themes/_commonPartialsBs/_modalInput.php new file mode 100644 index 00000000..159ccba8 --- /dev/null +++ b/ci4/app/Views/themes/_commonPartialsBs/_modalInput.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalDireccion.php b/ci4/app/Views/themes/vuexy/components/modals/modalDireccion.php new file mode 100644 index 00000000..b85c7ef7 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/components/modals/modalDireccion.php @@ -0,0 +1,114 @@ + diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php new file mode 100644 index 00000000..dfb2abfc --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php @@ -0,0 +1,89 @@ +include('themes/_commonPartialsBs/select2bs5') ?> +include('themes/_commonPartialsBs/datatables') ?> +include('themes/_commonPartialsBs/_confirm2delete') ?> +extend('themes/vuexy/main/defaultlayout') ?> + +section('content'); ?> +
+
+ +
+
+

Error presupuesto

+
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+
+
+ + +
+
+ + +
+
+ + + +
+ +
+
+ +
+ +
+ + + +
+ + + + +endSection() ?> +section("additionalExternalJs") ?> + +endSection() ?> \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoList.php b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoList.php new file mode 100644 index 00000000..08069a3b --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoList.php @@ -0,0 +1,50 @@ +include('themes/_commonPartialsBs/select2bs5') ?> +include('themes/_commonPartialsBs/datatables') ?> +include('themes/_commonPartialsBs/_confirm2delete') ?> +extend('themes/vuexy/main/defaultlayout') ?> + +section('content'); ?> +
+
+ +
+
+

+
+ +
+ + + + + + + + + + + + + + + + + +
ID Presupuesto
+
+ + + +
+ +
+ +
+ +endSection() ?> +section("additionalExternalJs") ?> + +endSection() ?> \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_buttons.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_buttons.php new file mode 100644 index 00000000..aad9101e --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_buttons.php @@ -0,0 +1,36 @@ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ +
+
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php new file mode 100644 index 00000000..d3e013f8 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_datosGenerales.php @@ -0,0 +1,306 @@ +
+ +
+

Datos del libro

+
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+ user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))? " hidden" : "" ?> + class="calcular-presupuesto form-check-input" type="checkbox" id="excluirRotativa" + name="excluir_rotativa" value="1"> + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+ + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ + +
+
+ +
+ + +
+ +
+
+ + + +
+ Siempre deben ser pares +
+ +
+ +
+ + + +
+ Siempre deben ser pares +
+ +
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ +
+ + +
+ +
+ + +
+ Intruzca la posición separada por comas. Ej: 3,5,7 ó 4-10,20,155 +
+
+ +
+ +
+
+ + +
+
+
+ + + +
+ +
+ " + alt="Fresado"> +
+ Fresado (a partir de 32 páginas) +
+
+
+ " + alt="Grapado"> +
+ Grapado (entre 12 y 40 páginas) +
+
+
+ " + alt="Espiral"> +
+ Espiral +
+
+
+ " + alt="Cosido"> +
+ Cosido (a partir de 32 páginas) +
+
+
+ +
+

Servicios extra

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

Otros

+
+ +
+ +
+ + +
+ +

Se verificará que el pedido cumpla con los requisitos establecidos en el Artículo 91 de la Ley + 37/1992, sobre inserción de publicidad, antes de proceder con su producción, lo que garantiza la aplicación + del IVA reducido del 4%.

+
+ +
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_direcciones.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_direcciones.php new file mode 100644 index 00000000..67af53db --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_direcciones.php @@ -0,0 +1,64 @@ +
+ +
+
+
+ +
+

Direcciones de envío

+
+ +
+ +
+
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php new file mode 100644 index 00000000..2205844d --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php @@ -0,0 +1,419 @@ +
+ +
+
+
+ +
+

Diseño cubierta

+
+ +
+
Recuerde que la cubierta es el conjunto formado por la portada, contraportada, + lomo y solapas, en caso de que las lleve.
+
+ +
+ +
+ " + alt="TapaBlanda"> + +
+ +
+ " alt="TapaDura"> + +
+ +
+ " + alt="TapaDuraLomoRedondo"> + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ " + alt="Sin solapas"> + +
+ +
+ " + alt="Con solapas"> + +
+ +
+ + +
+ Entre 60 y 120 mm +
+
+ +
+ +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+

Papel cubierta

+
+ +
+ +
+ " + alt="Cartulina estucada"> + +
+ +
+ " alt="Estucado mate"> + +
+
+ + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ Recomendado +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+

Acabados

+
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+ " + alt="Retractilado"> + +
+ +
+
+ + +
+ +
+

Extras

+
+ +
+ +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ Entre 60 y 120 mm +
+
+ +
+ + +
+ +
+
+ +
+ +
+ +
+
+ + +
+
+ +
+ + +
+ Mayor 60 mm +
+
+ +
+ + +
+ +
+ + +
+ Entre 60 y 120 mm +
+
+ +
+ + +
+ +
+
+ + +
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioInterior.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioInterior.php new file mode 100644 index 00000000..8d68314e --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioInterior.php @@ -0,0 +1,351 @@ +
+ +
+
+
+ +
+

Impresión interior

+
+ + +
+ +
+ " alt="Negro"> + +
+ +
+ " alt="NegroPremium"> + +
+ +
+ " alt="Color"> + +
+ +
+ " alt="ColorPremium"> + +
+ +
+ + +
+

Papel interior

+
+ + +
+ +
+ " alt="offsetBlanco"> + +
+ +
+ " alt="offsetAhuesado"> + +
+ +
+ " alt="offsetAhuesadoVolumen"> + +
+ +
+ " alt="estucadoMate"> + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + +
+

Impresión interior color

+
+ + +
+ +
+ " alt="Color"> + +
+ +
+ " alt="ColorPremium"> + +
+ +
+ + +
+

Papel interior color

+
+ + +
+ +
+ " alt="offsetBlanco"> + +
+ +
+ " alt="offsetAhuesado"> + +
+ +
+ " alt="offsetAhuesadoVolumen"> + +
+ +
+ " alt="estucadoMate"> + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_interior.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_interior.php new file mode 100644 index 00000000..43a5f685 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_interior.php @@ -0,0 +1,6 @@ +
+ + + + +
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_presupuestoDireccionesForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_presupuestoDireccionesForm.php new file mode 100644 index 00000000..475222d1 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_presupuestoDireccionesForm.php @@ -0,0 +1,143 @@ + + + + + +section("additionalExternalJs") ?> + +endSection() ?> \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php new file mode 100644 index 00000000..c48602eb --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_resumen.php @@ -0,0 +1,206 @@ +
+ +

Resumen del presupuesto

+
+ +
+
Precio unidad:
+

Total base: € +

Iva (%): € +

Total: € +

+ +
+
+
+ Mostrar desarrollo cubierta + +
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Datos generales
TituloAlbert Cook
Tipo libro
Formato
Páginas negro
Páginas color
Páginas en total
Tirada
Prototipo
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Interior
Impresion
Papel
Gramaje
Papel B&N
Gramaje B&N
Papel Color
Gramaje Color
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Cubierta
Tipo
Caras impresas
Papel
Gramaje
Solapas
Papel de guardas
Guardas impresas
Cabezada
Acabados
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Sobrecubierta
PapelEstucado Mate
Gramaje
Tamaño solapas
Plastificado
+
+ + + +
+

Ficheros

+
+
+
+ Arrastre aquí los ficheros o haga click +
+
+ +
+
+
+ +
+ + +
\ No newline at end of file diff --git a/ci4/builds:Zone.Identifier b/ci4/builds:Zone.Identifier new file mode 100644 index 00000000..76699924 --- /dev/null +++ b/ci4/builds:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=C:\Users\jjime\Downloads\safekat-dev-presu_cliente_v2.zip diff --git a/ci4/spark:Zone.Identifier b/ci4/spark:Zone.Identifier new file mode 100644 index 00000000..76699924 --- /dev/null +++ b/ci4/spark:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=C:\Users\jjime\Downloads\safekat-dev-presu_cliente_v2.zip diff --git a/httpdocs/assets/img/loader2.gif b/httpdocs/assets/img/loader2.gif new file mode 100644 index 00000000..c56e9f64 Binary files /dev/null and b/httpdocs/assets/img/loader2.gif differ diff --git a/httpdocs/assets/img/presupuestoCliente/blancoYnegro.png b/httpdocs/assets/img/presupuestoCliente/blancoYnegro.png new file mode 100644 index 00000000..459b3cb3 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/blancoYnegro.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/cartulina-grafica.png b/httpdocs/assets/img/presupuestoCliente/cartulina-grafica.png new file mode 100644 index 00000000..403b40d8 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/cartulina-grafica.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/color.png b/httpdocs/assets/img/presupuestoCliente/color.png new file mode 100644 index 00000000..cd80dd7c Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/color.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/colorFoto.png b/httpdocs/assets/img/presupuestoCliente/colorFoto.png new file mode 100644 index 00000000..86f05735 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/colorFoto.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/conSolapasCubierta.png b/httpdocs/assets/img/presupuestoCliente/conSolapasCubierta.png new file mode 100644 index 00000000..6ad3d93b Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/conSolapasCubierta.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/cosido.png b/httpdocs/assets/img/presupuestoCliente/cosido.png new file mode 100644 index 00000000..03bf99de Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/cosido.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/espiral.png b/httpdocs/assets/img/presupuestoCliente/espiral.png new file mode 100644 index 00000000..3177ab2d Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/espiral.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/estucado-mate-cubierta.png b/httpdocs/assets/img/presupuestoCliente/estucado-mate-cubierta.png new file mode 100644 index 00000000..7178e36d Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/estucado-mate-cubierta.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/estucado-mate.png b/httpdocs/assets/img/presupuestoCliente/estucado-mate.png new file mode 100644 index 00000000..77d61360 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/estucado-mate.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/fresado.png b/httpdocs/assets/img/presupuestoCliente/fresado.png new file mode 100644 index 00000000..33c40405 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/fresado.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/grapado.png b/httpdocs/assets/img/presupuestoCliente/grapado.png new file mode 100644 index 00000000..fc6c407f Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/grapado.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/negroFoto.png b/httpdocs/assets/img/presupuestoCliente/negroFoto.png new file mode 100644 index 00000000..f2bc8d81 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/negroFoto.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/offset-ahuesado-volumen.png b/httpdocs/assets/img/presupuestoCliente/offset-ahuesado-volumen.png new file mode 100644 index 00000000..297c607f Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/offset-ahuesado-volumen.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/offset-ahuesado.png b/httpdocs/assets/img/presupuestoCliente/offset-ahuesado.png new file mode 100644 index 00000000..3c0f1240 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/offset-ahuesado.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/offset-blanco.png b/httpdocs/assets/img/presupuestoCliente/offset-blanco.png new file mode 100644 index 00000000..29dc0294 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/offset-blanco.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/retractilado.png b/httpdocs/assets/img/presupuestoCliente/retractilado.png new file mode 100644 index 00000000..52814656 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/retractilado.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/sinSolapasCubierta.png b/httpdocs/assets/img/presupuestoCliente/sinSolapasCubierta.png new file mode 100644 index 00000000..c09917ce Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/sinSolapasCubierta.png differ diff --git a/httpdocs/assets/img/presupuestoCliente/tapa-blanda.jpg b/httpdocs/assets/img/presupuestoCliente/tapa-blanda.jpg new file mode 100644 index 00000000..855a1087 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/tapa-blanda.jpg differ diff --git a/httpdocs/assets/img/presupuestoCliente/tapa-dura-lomo-recto.jpg b/httpdocs/assets/img/presupuestoCliente/tapa-dura-lomo-recto.jpg new file mode 100644 index 00000000..a8728359 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/tapa-dura-lomo-recto.jpg differ diff --git a/httpdocs/assets/img/presupuestoCliente/tapa-dura-lomo-redondo.png b/httpdocs/assets/img/presupuestoCliente/tapa-dura-lomo-redondo.png new file mode 100644 index 00000000..1eeaaf68 Binary files /dev/null and b/httpdocs/assets/img/presupuestoCliente/tapa-dura-lomo-redondo.png differ diff --git a/httpdocs/assets/js/safekat/components/modalDireccion.js b/httpdocs/assets/js/safekat/components/modalDireccion.js new file mode 100644 index 00000000..0d8cd9c8 --- /dev/null +++ b/httpdocs/assets/js/safekat/components/modalDireccion.js @@ -0,0 +1,94 @@ +class Direccionmodal { + constructor(modal, saveCallback) { + this.modal = modal; + this.saveCallback = saveCallback; + + this.alias = $(this.modal.find('#add_alias')); + this.att = $(this.modal.find('#add_att')); + this.email = $(this.modal.find('#add_email')); + this.direccion = $(this.modal.find('#add_direccion')); + this.pais = $(this.modal.find('#add_pais_id')); + this.municipio = $(this.modal.find('#add_municipio')); + this.provincia = $(this.modal.find('#add_provincia')); + this.cp = $(this.modal.find('#add_cp')); + this.telefono = $(this.modal.find('#add_telefono')); + + this.btnCancel = $(this.modal.find('#cancelAdd')); + this.btnSave = $(this.modal.find('#saveAdd')); + + this.error = $(this.modal.find('.texto-error')); + } + + init() { + this.btnCancel.on('click', () => { + + this.modal.modal("hide"); + }); + + this.modal.on('hidden.bs.modal', () => { + this.error.addClass('d-none'); + this.alias.val(""); + this.att.val(""); + this.email.val(""); + this.direccion.val(""); + this.pais.val("").trigger('change'); + this.municipio.val(""); + this.provincia.val(""); + this.cp.val(""); + this.telefono.val(""); + this.btnSave.off('click'); + }); + + this.pais.on('change', () => { + var nombre_pais = $("#add_pais_id option:selected").text().trim(); + if (nombre_pais.localeCompare('España') == 0) { + $('#divPais').removeClass('col-lg-12').addClass('col-lg-6') + $('#divMunicipio').removeClass('col-lg-12').addClass('col-lg-6') + $('.spain-data').css('display', 'inline') + } + else { + $('.spain-data').css('display', 'none') + $('#divPais').removeClass('col-lg-6').addClass('col-lg-12') + $('#divMunicipio').removeClass('col-lg-6').addClass('col-lg-12') + } + }); + + this.btnSave.on('click', () => { + if (this.#validatemodal()) { + this.saveCallback(); + } + else { + $(this.modal.find('.texto-error')).removeClass('d-none'); + } + + }); + + this.modal.modal('show'); + } + + #validatemodal() { + + if(this.alias.val() == "" || this.att.val() == "" || this.direccion.val() == "" || this.municipio.val() == "" || this.cp.val() == "" ){ + return false; + } + if(this.pais.children("option:selected").val() < 1) + return false; + return true; + } + + getData() { + return { + alias: this.alias.val(), + att: this.att.val(), + email: this.email.val(), + direccion: this.direccion.val(), + pais_id: this.pais.children("option:selected").val(), + municipio: this.municipio.val(), + provincia: this.provincia.val(), + cp: this.cp.val(), + telefono: this.telefono.val() + } + } +} + +export default Direccionmodal; \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/components/tarjetaDireccionPresupuesto.js b/httpdocs/assets/js/safekat/components/tarjetaDireccionPresupuesto.js new file mode 100644 index 00000000..f7140387 --- /dev/null +++ b/httpdocs/assets/js/safekat/components/tarjetaDireccionPresupuesto.js @@ -0,0 +1,105 @@ +class tarjetaDireccion { + + constructor(container, id, direccion) { + + this.container = container; + this.id = id; + this.direccionId = direccion.id; + this.card = this.#generateHTML(id, direccion); + this.deleteBtn = this.card.find('.direccion-eliminar'); + this.editBtn = this.card.find('.direccion-editar'); + } + + + #generateHTML(id, direccion) { + + // Crear los elementos usando jQuery + var $parent = $('
', { + class: 'direccion-cliente col-sm-5 form-check custom-option custom-option-basic checked justify-content-center mb-4', + id: id + }); + + var $label = $('