mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
diseño interior con selector de papeles
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 243 KiB |
@ -6,3 +6,7 @@ export function getToken()
|
||||
const paramsObject = Object.fromEntries(params.entries());
|
||||
return paramsObject.token;
|
||||
}
|
||||
|
||||
export function capitalizeFirstLetter(string) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
@ -80,6 +80,9 @@ let ClassSelect = function (domItem, url, placeholder, allowClear = false, param
|
||||
this.getText = () => {
|
||||
return this.item.find(":selected").text();
|
||||
};
|
||||
this.onChange = function(callback) {
|
||||
this.item.on('change', callback);
|
||||
};
|
||||
};
|
||||
|
||||
export default ClassSelect;
|
||||
|
||||
@ -4,7 +4,7 @@ class tarjetaDireccion {
|
||||
|
||||
this.container = container;
|
||||
this.id = id;
|
||||
this.direccionId = direccion.id;
|
||||
this.direccionId = direccion.direccionId;
|
||||
this.card = this.#generateHTML(id, direccion);
|
||||
this.deleteBtn = this.card.find('.direccion-eliminar');
|
||||
this.editBtn = this.card.find('.direccion-editar');
|
||||
|
||||
@ -806,14 +806,17 @@ class DatosGenerales {
|
||||
$(".papel-interior").removeClass('selected');
|
||||
$(".interior-color").removeClass('d-none');
|
||||
this.#handleInteriorLayout('mixto');
|
||||
|
||||
$("#divPapelInterior").empty();
|
||||
$("#divGramajeInterior").empty();
|
||||
$("#divPapelInteriorColor").empty();
|
||||
$("#divGramajeInteriorColor").empty();
|
||||
}
|
||||
else {
|
||||
$(".interior-color").addClass('d-none');
|
||||
$("#divGramajeInteriorColor").addClass('d-none');
|
||||
$(".papel-interior").removeClass('selected');
|
||||
$(".gramaje-interior").prop('checked', false);
|
||||
$(".gramaje-interior-color").prop('checked', false);
|
||||
$("#divPapelInterior").empty();
|
||||
$("#divGramajeInterior").empty();
|
||||
$("#divPapelInteriorColor").empty();
|
||||
$("#divGramajeInteriorColor").empty();
|
||||
this.#handlePaginas();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@ class PresupuestoCliente {
|
||||
this.rl_sobrecubierta = $(".rl-sobrecubierta");
|
||||
|
||||
this.datosGenerales = new DatosGenerales($("#datos-generales"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
this.disenioInterior = new DisenioInterior($("#interior-libro"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
this.disenioInterior = new DisenioInterior($("#interior-libro"), this.clientePresupuestoWizard, this.validationStepper, this);
|
||||
this.disenioCubierta = new DisenioCubierta($("#cubierta-libro"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
this.direcciones = new Direcciones($("#direcciones-libro"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
this.resumen = new Resumen($("#resumen-libro"), this.datosGenerales, this.disenioInterior, this.disenioCubierta, this.direcciones);
|
||||
@ -108,6 +108,7 @@ class PresupuestoCliente {
|
||||
this.calcularPresupuesto = true;
|
||||
}
|
||||
|
||||
|
||||
$(".calcular-presupuesto").on('change', this.checkForm.bind(this));
|
||||
}
|
||||
|
||||
@ -701,9 +702,11 @@ class PresupuestoCliente {
|
||||
this.datosGenerales.cargarDatos(response.data.datosGenerales);
|
||||
this.direcciones.handleChangeCliente();
|
||||
|
||||
this.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales);
|
||||
|
||||
this.disenioInterior.cargarDatos(response.data.interior, response.data.datosGenerales.papelInteriorDiferente);
|
||||
this.disenioCubierta.cargarDatos(response.data.cubierta, response.data.guardas, response.data.sobrecubierta);
|
||||
this.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales);
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import previewFormas from "../preview.js";
|
||||
import { capitalizeFirstLetter } from "../../common/common.js";
|
||||
|
||||
class Resumen {
|
||||
constructor(domItem, datosGenerales, disenioInterior, disenioCubierta) {
|
||||
@ -201,7 +202,7 @@ class Resumen {
|
||||
generate() {
|
||||
|
||||
this.titulo.text(this.datosGenerales.titulo.val());
|
||||
this.tipoLibro.text(this.capitalizeFirstLetter(this.datosGenerales.tiposLibro.filter('.selected').attr('id')));
|
||||
this.tipoLibro.text(capitalizeFirstLetter(this.datosGenerales.tiposLibro.filter('.selected').attr('id')));
|
||||
|
||||
let ancho = 0, alto = 0;
|
||||
if (this.datosGenerales.checkFormatoPersonalizado.is(':checked')) {
|
||||
@ -346,11 +347,6 @@ class Resumen {
|
||||
}
|
||||
|
||||
|
||||
capitalizeFirstLetter(string) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
|
||||
#changeDecimalFormat(number) {
|
||||
|
||||
let cleanedNumber = String(number).replace(/[^\d.]/g, '');
|
||||
|
||||
Reference in New Issue
Block a user