mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-12 16:38:48 +00:00
faltan que no se reseteen los acabados de la cubierta
This commit is contained in:
@ -13,6 +13,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
@ -88,6 +89,7 @@ public class PresupuestoController {
|
||||
@PostMapping("/public/validar/cubierta")
|
||||
public ResponseEntity<?> validarCubierta(
|
||||
@Validated(PresupuestoValidationGroups.Cubierta.class) Presupuesto presupuesto,
|
||||
@RequestParam(name = "calcular", defaultValue = "true") boolean calcular,
|
||||
BindingResult result, Locale locale) {
|
||||
|
||||
Map<String, String> errores = new HashMap<>();
|
||||
@ -102,20 +104,25 @@ public class PresupuestoController {
|
||||
return ResponseEntity.badRequest().body(errores);
|
||||
}
|
||||
|
||||
HashMap<String, Object> price = new HashMap<>();
|
||||
String priceStr = apiClient.getPrice(presupuestoService.toSkApiRequest(presupuesto));
|
||||
if (calcular) {
|
||||
|
||||
try {
|
||||
price = new ObjectMapper().readValue(priceStr, new TypeReference<>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
price = new HashMap<>();
|
||||
price.put("error", messageSource.getMessage("presupuesto.error-obtener-precio", null, locale));
|
||||
HashMap<String, Object> price = new HashMap<>();
|
||||
String priceStr = apiClient.getPrice(presupuestoService.toSkApiRequest(presupuesto));
|
||||
|
||||
try {
|
||||
price = new ObjectMapper().readValue(priceStr, new TypeReference<>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
price = new HashMap<>();
|
||||
price.put("error", messageSource.getMessage("presupuesto.error-obtener-precio", null, locale));
|
||||
}
|
||||
if (!price.containsKey("data")) {
|
||||
return ResponseEntity.badRequest()
|
||||
.body(messageSource.getMessage("presupuesto.error-obtener-precio", null, locale));
|
||||
}
|
||||
return ResponseEntity.ok(price.get("data"));
|
||||
}
|
||||
if (!price.containsKey("data")) {
|
||||
return ResponseEntity.badRequest().body(messageSource.getMessage("presupuesto.error-obtener-precio", null, locale));
|
||||
}
|
||||
return ResponseEntity.ok(price.get("data"));
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping("/public/validar/seleccion-tirada")
|
||||
|
||||
@ -158,6 +158,7 @@ presupuesto.cubierta-libro=Cubierta del libro
|
||||
presupuesto.extras-libro=Extras del libro
|
||||
presupuesto.paginas=Páginas
|
||||
presupuesto.solapas=Solapas
|
||||
presupuesto.papel-gramaje=Papel y gramaje
|
||||
|
||||
# Errores
|
||||
presupuesto.errores-title=Corrija los siguientes errores:
|
||||
|
||||
@ -126,6 +126,9 @@ class PresupuestoCliente {
|
||||
|
||||
// resumen
|
||||
this.summaryTableInterior = $('#summary-interior');
|
||||
this.summaryTableCubierta = $('#summary-cubierta');
|
||||
this.summaryTableSobrecubierta = $('#summary-sobrecubierta');
|
||||
this.summaryTableFaja = $('#summary-faja');
|
||||
}
|
||||
|
||||
init() {
|
||||
@ -141,6 +144,10 @@ class PresupuestoCliente {
|
||||
this.#loadCubiertaData();
|
||||
}
|
||||
|
||||
Summary.updateEncuadernacion();
|
||||
Summary.updateFormato();
|
||||
Summary.updatePaginas();
|
||||
|
||||
|
||||
this.#initInterior();
|
||||
this.#initSeleccionTirada();
|
||||
@ -404,7 +411,7 @@ class PresupuestoCliente {
|
||||
this.posicionPaginasColor.val(this.formData.datosGenerales.posicionPaginasColor);
|
||||
|
||||
this.formatoPersonalizado.prop('checked', this.formData.datosGenerales.formatoPersonalizado);
|
||||
if( this.formData.datosGenerales.formatoPersonalizado ) {
|
||||
if (this.formData.datosGenerales.formatoPersonalizado) {
|
||||
this.ancho.val(this.formData.datosGenerales.ancho);
|
||||
this.alto.val(this.formData.datosGenerales.alto);
|
||||
}
|
||||
@ -671,6 +678,15 @@ class PresupuestoCliente {
|
||||
this.fajaSobrecubierta.val(this.formData.cubierta.faja.acabado);
|
||||
|
||||
this.#loadCubiertaData();
|
||||
this.summaryTableCubierta.removeClass('d-none');
|
||||
if (this.sobrecubierta.hasClass('active')) {
|
||||
this.summaryTableSobrecubierta.removeClass('d-none');
|
||||
Summary.updateSobreCubierta();
|
||||
}
|
||||
if (this.faja.hasClass('active')) {
|
||||
this.summaryTableFaja.removeClass('d-none');
|
||||
Summary.updateFaja();
|
||||
}
|
||||
|
||||
this.#changeTab('pills-cover');
|
||||
|
||||
@ -844,6 +860,7 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
this.#getPapelesCubierta(e.currentTarget.id);
|
||||
Summary.updateTapaCubierta();
|
||||
});
|
||||
|
||||
$(document).on('click', '.solapas-cubierta', (e) => {
|
||||
@ -858,6 +875,8 @@ class PresupuestoCliente {
|
||||
const dataToStore = this.#getCubiertaData();
|
||||
this.#updateCubiertaData(dataToStore);
|
||||
this.#cacheFormData();
|
||||
|
||||
Summary.updateTapaCubierta();
|
||||
});
|
||||
|
||||
$(document).on('click', '.papel-cubierta', (e) => {
|
||||
@ -881,6 +900,9 @@ class PresupuestoCliente {
|
||||
this.#updateCubiertaData(dataCubierta);
|
||||
this.#cacheFormData();
|
||||
|
||||
Summary.updatePapelCubierta();
|
||||
Summary.updateGramajeCubierta();
|
||||
|
||||
}).fail((xhr, status, error) => {
|
||||
console.error("Error al obtener los gramajes de interior: ", xhr.responseText);
|
||||
});
|
||||
@ -892,7 +914,7 @@ class PresupuestoCliente {
|
||||
const gramaje = parseInt($('#' + inputId).data('gramaje'));
|
||||
this.formData.cubierta.gramajeCubierta = gramaje;
|
||||
this.#cacheFormData();
|
||||
|
||||
Summary.updateGramajeCubierta();
|
||||
});
|
||||
|
||||
$(document).on('change', '.datos-cubierta', (e) => {
|
||||
@ -906,6 +928,7 @@ class PresupuestoCliente {
|
||||
|
||||
this.formData.cubierta.acabado = parseInt($(e.currentTarget).attr('sk-id')) || 1;
|
||||
this.#cacheFormData();
|
||||
Summary.updateAcabadoCubierta();
|
||||
});
|
||||
|
||||
$(document).on('click', '.custom-toggle', (e) => {
|
||||
@ -914,16 +937,24 @@ class PresupuestoCliente {
|
||||
if ($target.hasClass('active')) {
|
||||
if ($target.attr('id') === 'sobrecubierta') {
|
||||
this.divSobrecubierta.removeClass('d-none');
|
||||
this.summaryTableSobrecubierta.removeClass('d-none');
|
||||
Summary.updateSobreCubierta();
|
||||
}
|
||||
else if ($target.attr('id') === 'faja') {
|
||||
this.divFaja.removeClass('d-none');
|
||||
this.summaryTableFaja.removeClass('d-none');
|
||||
Summary.updateFaja();
|
||||
}
|
||||
} else {
|
||||
if ($target.attr('id') === 'sobrecubierta') {
|
||||
this.divSobrecubierta.addClass('d-none');
|
||||
this.summaryTableSobrecubierta.addClass('d-none');
|
||||
Summary.updateSobreCubierta();
|
||||
}
|
||||
else if ($target.attr('id') === 'faja') {
|
||||
this.divFaja.addClass('d-none');
|
||||
this.summaryTableFaja.addClass('d-none');
|
||||
Summary.updateFaja();
|
||||
}
|
||||
}
|
||||
const dataToStore = this.#getCubiertaData();
|
||||
@ -931,16 +962,39 @@ class PresupuestoCliente {
|
||||
this.#cacheFormData();
|
||||
});
|
||||
|
||||
$(document).on('change', '.sobrecubierta-item', () => {
|
||||
const dataToStore = this.#getCubiertaData();
|
||||
this.#updateCubiertaData(dataToStore);
|
||||
this.#cacheFormData();
|
||||
Summary.updateSobreCubierta();
|
||||
});
|
||||
|
||||
$(document).on('change', '.faja-item', () => {
|
||||
const dataToStore = this.#getCubiertaData();
|
||||
this.#updateCubiertaData(dataToStore);
|
||||
this.#cacheFormData();
|
||||
Summary.updateFaja();
|
||||
});
|
||||
|
||||
$('.btn-change-tab-cubierta').on('click', (e) => {
|
||||
|
||||
const data = this.#getPresupuestoData();
|
||||
const id = e.currentTarget.id;
|
||||
|
||||
if (id === 'btn-prev-cubierta') {
|
||||
data.calcular = false;
|
||||
}
|
||||
else {
|
||||
data.calcular = true;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/presupuesto/public/validar/cubierta',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
success: (data) => {
|
||||
if (id === 'btn-prev-cubierta') {
|
||||
this.summaryTableCubierta.addClass('d-none');
|
||||
this.#changeTab('pills-inside');
|
||||
}
|
||||
else {
|
||||
@ -965,6 +1019,12 @@ class PresupuestoCliente {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Eventos para el resumen
|
||||
$(document).on('change', '.tapa-cubierta-summary', () => {
|
||||
Summary.updateTapaCubierta();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
#getPapelesCubierta(tapa_id) {
|
||||
@ -1012,6 +1072,8 @@ class PresupuestoCliente {
|
||||
const dataToStore = this.#getCubiertaData();
|
||||
this.#updateCubiertaData(dataToStore);
|
||||
this.#cacheFormData();
|
||||
|
||||
Summary.updatePapelCubierta();
|
||||
},
|
||||
error: (xhr, status, error) => {
|
||||
console.error("Error al obtener los papeles de cubierta: ", xhr.responseText);
|
||||
@ -1110,7 +1172,7 @@ class PresupuestoCliente {
|
||||
|
||||
for (let i = 0; i < gramajes.length; i++) {
|
||||
const gramaje = gramajes[i];
|
||||
this.#addGramaje(this.divGramajeCubierta, 'gramaje-cubierta', gramaje, 'gramaje-cubierta datos-cubierta');
|
||||
this.#addGramaje(this.divGramajeCubierta, 'gramaje-cubierta datos-cubierta', gramaje, 'gramaje-cubierta');
|
||||
|
||||
// Seleccionar el gramaje por defecto
|
||||
if (this.formData.cubierta.gramajeCubierta === '' && i === 0) {
|
||||
@ -1123,6 +1185,8 @@ class PresupuestoCliente {
|
||||
// If not, select the first one by default
|
||||
this.divGramajeCubierta.find('input[type="radio"]').first().prop('checked', true);
|
||||
}
|
||||
|
||||
Summary.updateGramajeCubierta();
|
||||
}
|
||||
|
||||
#loadCubiertaData() {
|
||||
@ -1189,6 +1253,9 @@ class PresupuestoCliente {
|
||||
this.solapasFaja.val(this.formData.cubierta.faja.tamanioSolapasFaja);
|
||||
this.altoFaja.val(this.formData.cubierta.faja.alto);
|
||||
this.acabadoFaja.val(this.formData.cubierta.faja.acabado);
|
||||
|
||||
Summary.updateTapaCubierta();
|
||||
Summary.updateAcabadoCubierta();
|
||||
}
|
||||
/******************************
|
||||
* END CUBIERTA
|
||||
|
||||
@ -58,13 +58,84 @@ export function updateGramajeInterior() {
|
||||
|
||||
export function updateTapaCubierta(){
|
||||
|
||||
const $selected = $('.tipo-cubierta.selected');
|
||||
const $selected = $('.tapa-cubierta.selected');
|
||||
if ($selected.length > 0) {
|
||||
const resumen = $selected.data('summary-text') || $selected.attr('id');
|
||||
$('#summary-tapa-cubierta').text(resumen);
|
||||
}
|
||||
if($selected.attr('id') === 'tapaBlanda') {
|
||||
$('#summary-cubierta').removeClass('d-none');
|
||||
$('#summary-cubierta .table-responsive').removeClass('d-none');
|
||||
|
||||
$('.tapa-blanda-row').removeClass('d-none');
|
||||
$('.tapa-dura-row').addClass('d-none');
|
||||
$('#summary-cubierta-solapas').text($('#sin-solapas').hasClass('selected') ? $('#sin-solapas').data('summary-text') : $('#con-solapas').data('summary-text'));
|
||||
if($('#con-solapas').hasClass('selected')) {
|
||||
$('#summary-tamanio-solapa-row').removeClass('d-none');
|
||||
$('#summary-tamanio-solapa').text($('#tamanio-solapas-cubierta').val() + ' mm');
|
||||
} else {
|
||||
$('#summary-tamanio-solapa-row').addClass('d-none');
|
||||
$('#summary-tamanio-solapa').text('');
|
||||
}
|
||||
$('#summary-impresion-cubierta-row').removeClass('d-none');
|
||||
$('#summary-impresion-cubierta').text($('#impresion-cubierta option:selected').text());
|
||||
}
|
||||
else{
|
||||
$('.tapa-blanda-row').addClass('d-none');
|
||||
$('.tapa-dura-row').removeClass('d-none');
|
||||
$('#summary-papel-guardas').text($('#papel-guardas option:selected').text());
|
||||
$('#summary-guardas-impresas').text($('#guardas-impresas option:selected').text());
|
||||
$('#summary-cabezada').text($('#cabezada option:selected').text());
|
||||
}
|
||||
}
|
||||
|
||||
export function updatePapelCubierta() {
|
||||
const $selected = $('.papel-cubierta.selected');
|
||||
if ($selected.length > 0) {
|
||||
const resumen = $selected.data('summary-text') || $selected.val();
|
||||
$('#summary-papel-cubierta').text(resumen);
|
||||
}
|
||||
}
|
||||
|
||||
export function updateGramajeCubierta() {
|
||||
const gramaje = $('input[name="gramaje-cubierta"]:checked');
|
||||
if(gramaje.length > 0) {
|
||||
$('#summary-gramaje-cubierta').text(gramaje.data('gramaje'));
|
||||
}
|
||||
}
|
||||
|
||||
export function updateAcabadoCubierta() {
|
||||
const acabado = $('input[name="acabado-cubierta"]:checked');
|
||||
if(acabado.length > 0) {
|
||||
let labelText = '';
|
||||
const id = acabado.attr('id');
|
||||
|
||||
if (id) {
|
||||
labelText = $(`label[for="${id}"]`).text().trim();
|
||||
}
|
||||
|
||||
// Caso 2: input dentro de label
|
||||
if (!labelText) {
|
||||
labelText = acabado.closest('label').text().trim();
|
||||
}
|
||||
|
||||
$('#summary-acabado-cubierta').text(labelText);
|
||||
}
|
||||
}
|
||||
|
||||
export function updateSobreCubierta() {
|
||||
|
||||
if($('#sobrecubierta').hasClass('active')) {
|
||||
$('#summary-sobrecubierta-papel-gramaje').text($('#papel-sobrecubierta option:selected').text());
|
||||
$('#summary-sobrecubierta-tamanio-solapa').text($('#tamanio-solapas-sobrecubierta').val() + ' mm');
|
||||
$('#summary-sobrecubierta-acabado').text($('#sobrecubierta-acabado option:selected').text());
|
||||
}
|
||||
}
|
||||
|
||||
export function updateFaja() {
|
||||
|
||||
if($('#faja').hasClass('active')) {
|
||||
$('#summary-faja-papel-gramaje').text($('#papel-faja option:selected').text());
|
||||
$('#summary-faja-alto-faja').text($('#alto-faja').val() + ' mm');
|
||||
$('#summary-faja-tamanio-solapa').text($('#tamanio-solapas-faja').val() + ' mm');
|
||||
$('#summary-faja-acabado').text($('#faja-acabado option:selected').text());
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
<div class="ribbon-content mt-4">
|
||||
<div class="row justify-content-center imagen-container-group mt-3">
|
||||
<div id="tapaBlanda" class="tapa-cubierta image-container imagen-selector selected">
|
||||
<div id="tapaBlanda" class="tapa-cubierta image-container imagen-selector selected" th:attr="data-summary-text=#{presupuesto.tapa-blanda}">
|
||||
<img class="image-presupuesto" src="/assets/images/imprimelibros/presupuestador/tapa-blanda.png"
|
||||
alt="">
|
||||
<label for="titulo" class="form-label" th:text="#{presupuesto.tapa-blanda}">
|
||||
@ -29,7 +29,7 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="tapaDura" class="tapa-cubierta image-container imagen-selector">
|
||||
<div id="tapaDura" class="tapa-cubierta image-container imagen-selector" th:attr="data-summary-text=#{presupuesto.tapa-dura}">
|
||||
<img class="image-presupuesto"
|
||||
src="/assets/images/imprimelibros/presupuestador/tapa-dura-lomo-recto.png" alt="">
|
||||
<label class="form-label" th:text="#{presupuesto.tapa-dura}">
|
||||
@ -37,7 +37,7 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="tapaDuraLomoRedondo" class="tapa-cubierta image-container imagen-selector">
|
||||
<div id="tapaDuraLomoRedondo" class="tapa-cubierta image-container imagen-selector" th:attr="data-summary-text=#{presupuesto.tapa-dura-lomo-redondo}">
|
||||
<img class="image-presupuesto"
|
||||
src="/assets/images/imprimelibros/presupuestador/tapa-dura-lomo-redondo.png" alt="">
|
||||
<label class="form-label" th:text="#{presupuesto.tapa-dura-lomo-redondo}">
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
<!-- Bloque de solapas -->
|
||||
<div class="d-flex gap-3">
|
||||
<div id="sin-solapas" class="image-container imagen-selector solapas-cubierta selected">
|
||||
<div id="sin-solapas" class="image-container imagen-selector solapas-cubierta selected" th:attr="data-summary-text=#{app.no}">
|
||||
<img class="image-presupuesto"
|
||||
src="/assets/images/imprimelibros/presupuestador/sinSolapasCubierta.png" alt="">
|
||||
<label class="form-label text-center d-block" th:text="#{presupuesto.sin-solapas}">
|
||||
@ -61,7 +61,7 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="con-solapas" class="image-container imagen-selector solapas-cubierta">
|
||||
<div id="con-solapas" class="image-container imagen-selector solapas-cubierta" th:attr="data-summary-text=#{app.yes}">
|
||||
<img class="image-presupuesto"
|
||||
src="/assets/images/imprimelibros/presupuestador/conSolapasCubierta.png" alt="">
|
||||
<label class="form-label text-center d-block" th:text="#{presupuesto.con-solapas}">
|
||||
@ -77,7 +77,7 @@
|
||||
<label for="impresion-cubierta" class="form-label"
|
||||
th:text="#{presupuesto.impresion-cubierta}">Impresión de cubierta</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select class="form-select select2 datos-cubierta" id="impresion-cubierta">
|
||||
<select class="form-select select2 datos-cubierta tapa-cubierta-summary" id="impresion-cubierta">
|
||||
<option value="2" th:text="#{presupuesto.una-cara}">Una cara</option>
|
||||
<option value="4" th:text="#{presupuesto.dos-caras}">Dos caras</option>
|
||||
</select>
|
||||
@ -94,7 +94,7 @@
|
||||
<label for="tamanio-solapas-cubierta" class="form-label"
|
||||
th:text="#{presupuesto.tamanio-solapa}">Tamaño solapa</label>
|
||||
<input type="number"
|
||||
class="form-control form-control-sm solapas-presupuesto datos-cubierta"
|
||||
class="form-control form-control-sm solapas-presupuesto datos-cubierta tapa-cubierta-summary"
|
||||
id="tamanio-solapas-cubierta" min="60" max="120" value="80" step="1">
|
||||
<div class="form-text">
|
||||
<p class="mb-0">min: 60 mm</p>
|
||||
@ -114,7 +114,7 @@
|
||||
<div class="col-auto mb-3">
|
||||
<label for="papel-guardas" class="form-label" th:text="#{presupuesto.papel-guardas}">Papel de
|
||||
guardas</label>
|
||||
<select class="form-select select2 datos-cubierta" id="papel-guardas">
|
||||
<select class="form-select select2 datos-cubierta tapa-cubierta-summary" id="papel-guardas">
|
||||
<optgroup th:label="#{presupuesto.offset}">
|
||||
<option value="1" data-papel-id="3" data-gramaje="170"
|
||||
th:text="#{presupuesto.offset-blanco} + ' 170 gr'" selected>Offset blanco 170 gr
|
||||
@ -131,7 +131,7 @@
|
||||
<div class="col-auto mb-3">
|
||||
<label for="guardas-impresas" class="form-label" th:text="#{presupuesto.guardas-impresas}">Guardas
|
||||
impresas</label>
|
||||
<select class="form-select select2 datos-cubierta" id="guardas-impresas">
|
||||
<select class="form-select select2 datos-cubierta tapa-cubierta-summary" id="guardas-impresas">
|
||||
<option value="0" th:text="#{presupuesto.no}" selected>No</option>
|
||||
<option value="4" th:text="#{presupuesto.una-cara}">Una cara</option>
|
||||
<option value="8" th:text="#{presupuesto.dos-caras}">Dos caras</option>
|
||||
@ -139,7 +139,7 @@
|
||||
</div>
|
||||
<div class="col-auto mb-3">
|
||||
<label for="cabezada" class="form-label" th:text="#{presupuesto.cabezada}">Cabezada</label>
|
||||
<select class="form-select select2 datos-cubierta" id="cabezada">
|
||||
<select class="form-select select2 datos-cubierta tapa-cubierta-summary" id="cabezada">
|
||||
<option value="WHI" th:text="#{presupuesto.cabezada-blanca}" selected>Blanca</option>
|
||||
<option value="GRE" th:text="#{presupuesto.cabezada-verde}">Verde</option>
|
||||
<option value="BLUE" th:text="#{presupuesto.cabezada-azul}">Azul</option>
|
||||
@ -271,7 +271,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="papel-sobrecubierta" class="form-label"
|
||||
th:text="#{presupuesto.sobrecubierta-papel}">Papel</label>
|
||||
<select class="form-select select2 datos-cubierta w-auto" id="papel-sobrecubierta">
|
||||
<select class="form-select select2 datos-cubierta sobrecubierta-item w-auto" id="papel-sobrecubierta">
|
||||
<optgroup th:label="#{presupuesto.estucado}">
|
||||
<option selected value="2" data-papel-id="2" data-gramaje="170"
|
||||
th:text="#{presupuesto.estucado-mate} + ' 170 gr'">Estucado mate 170 gr
|
||||
@ -293,7 +293,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="tamanio-solapas-sobrecubierta" class="form-label"
|
||||
th:text="#{presupuesto.sobrecubierta-solapas}">Tamaño solapas sobrecubierta</label>
|
||||
<input type="number" class="form-control datos-cubierta w-auto"
|
||||
<input type="number" class="form-control datos-cubierta sobrecubierta-item w-auto"
|
||||
id="tamanio-solapas-sobrecubierta" min="60" max="120" value="80" step="1">
|
||||
<div class="form-text">
|
||||
<p class="mb-0">min: 60 mm</p>
|
||||
@ -304,7 +304,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="sobrecubierta-acabado" class="form-label"
|
||||
th:text="#{presupuesto.acabado}">Acabado</label>
|
||||
<select class="form-select select2 datos-cubierta w-auto" id="sobrecubierta-acabado">
|
||||
<select class="form-select select2 datos-cubierta sobrecubierta-item w-auto" id="sobrecubierta-acabado">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -333,7 +333,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="papel-faja" class="form-label"
|
||||
th:text="#{presupuesto.faja-papel}">Papel</label>
|
||||
<select class="form-select select2 datos-cubierta w-auto" id="papel-faja">
|
||||
<select class="form-select select2 datos-cubierta faja-item w-auto" id="papel-faja">
|
||||
<optgroup th:label="#{presupuesto.estucado}">
|
||||
<option selected value="2" data-papel-id="2" data-gramaje="170"
|
||||
th:text="#{presupuesto.estucado-mate} + ' 170 gr'">Estucado mate 170 gr
|
||||
@ -355,7 +355,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="alto-faja" class="form-label"
|
||||
th:text="#{presupuesto.faja-alto}">Alto faja</label>
|
||||
<input type="number" class="form-control datos-cubierta w-auto"
|
||||
<input type="number" class="form-control datos-cubierta faja-item w-auto"
|
||||
id="alto-faja" min="50" max="120" value="80" step="1">
|
||||
<div class="form-text">
|
||||
<p class="mb-0">min: 50 mm</p>
|
||||
@ -366,7 +366,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="tamanio-solapas-faja" class="form-label"
|
||||
th:text="#{presupuesto.faja-solapas}">Tamaño solapas faja</label>
|
||||
<input type="number" class="form-control datos-cubierta w-auto"
|
||||
<input type="number" class="form-control datos-cubierta faja-item w-auto"
|
||||
id="tamanio-solapas-faja" min="60" max="120" value="80" step="1">
|
||||
<div class="form-text">
|
||||
<p class="mb-0">min: 60 mm</p>
|
||||
@ -377,7 +377,7 @@
|
||||
<div class="d-flex flex-column me-2">
|
||||
<label for="faja-acabado" class="form-label"
|
||||
th:text="#{presupuesto.acabado}">Acabado</label>
|
||||
<select class="form-select select2 datos-cubierta w-auto" id="faja-acabado">
|
||||
<select class="form-select select2 datos-cubierta faja-item w-auto" id="faja-acabado">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="col-xl-4">
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex">
|
||||
@ -87,35 +87,124 @@
|
||||
<td>
|
||||
<span th:text="#{presupuesto.tipo-cubierta}"></span>
|
||||
</td>
|
||||
<td id="summary-tipo-cubierta" class="text-end"></td>
|
||||
<td id="summary-tapa-cubierta" class="text-end"></td>
|
||||
</tr>
|
||||
<tr id="summary-cubierta-solapas-row" class="d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.papel-cubierta}"></span>
|
||||
</td>
|
||||
<td id="summary-cubierta-solapas" class="text-end"></td>
|
||||
</tr>
|
||||
<tr id="summary-cubierta-solapas-row" class="d-none">
|
||||
<tr class="tapa-blanda-row d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.solapas}"></span>
|
||||
</td>
|
||||
<td id="summary-cubierta-solapas" class="text-end"></td>
|
||||
</tr>
|
||||
<tr id="summary-tamanio-solapa-row" class="d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.tamanio-solapa}"></span>
|
||||
<tr class="tapa-blanda-row d-none">
|
||||
<td class="ps-3">
|
||||
<span class="ps-3" th:text="#{presupuesto.tamanio-solapa}"></span>
|
||||
</td>
|
||||
<td id="summary-tamanio-solapa" class="text-end"></td>
|
||||
</tr>
|
||||
<tr class="tapa-blanda-row d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.impresion-cubierta}"></span>
|
||||
</td>
|
||||
<td id="summary-impresion-cubierta" class="text-end"></td>
|
||||
</tr>
|
||||
<tr class="tapa-dura-row d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.papel-guardas}"></span>
|
||||
</td>
|
||||
<td id="summary-papel-guardas" class="text-end"></td>
|
||||
</tr>
|
||||
<tr class="tapa-dura-row d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.guardas-impresas}"></span>
|
||||
</td>
|
||||
<td id="summary-guardas-impresas" class="text-end"></td>
|
||||
</tr>
|
||||
<tr class="tapa-dura-row d-none">
|
||||
<td>
|
||||
<span th:text="#{presupuesto.cabezada}"></span>
|
||||
</td>
|
||||
<td id="summary-cabezada" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.papel-cubierta}"></span>
|
||||
</td>
|
||||
<td id="summary-papel-cubierta" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.gramaje-cubierta}"></span>
|
||||
</td>
|
||||
<td id="summary-gramaje-cubierta" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.acabado}"></span>
|
||||
</td>
|
||||
<td id="summary-acabado-cubierta" class="text-end"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table id="summary-sobrecubierta" class="table table-responsive align-middle mb-0 d-none">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th th:text="#{presupuesto.sobrecubierta}" scope="col" colspan="2">Sobrecubierta</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.papel-gramaje}"></span>
|
||||
</td>
|
||||
<td id="summary-sobrecubierta-papel-gramaje" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.tamanio-solapa}"></span>
|
||||
</td>
|
||||
<td id="summary-sobrecubierta-tamanio-solapa" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.acabado}"></span>
|
||||
</td>
|
||||
<td id="summary-sobrecubierta-acabado" class="text-end"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table id="summary-faja" class="table table-responsive align-middle mb-0 d-none">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th th:text="#{presupuesto.faja}" scope="col" colspan="2">Faja</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.papel-gramaje}"></span>
|
||||
</td>
|
||||
<td id="summary-faja-papel-gramaje" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.faja-alto}"></span>
|
||||
</td>
|
||||
<td id="summary-faja-alto-faja" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.tamanio-solapa}"></span>
|
||||
</td>
|
||||
<td id="summary-faja-tamanio-solapa" class="text-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span th:text="#{presupuesto.acabado}"></span>
|
||||
</td>
|
||||
<td id="summary-faja-acabado" class="text-end"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div th:fragment="presupuestador">
|
||||
<div class="row">
|
||||
<div class="col-xl-8">
|
||||
<div class="col-xl-9">
|
||||
<div class="card">
|
||||
<div class="card-body checkout-tab">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user