mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-13 08:58:48 +00:00
añadidos limites cuando lomo interior es menor que 10
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
databaseChangeLog:
|
||||
- changeSet:
|
||||
id: 0018-change-presupuesto-ch-3
|
||||
author: jjo
|
||||
preConditions:
|
||||
- dbms:
|
||||
type: mysql
|
||||
|
||||
changes:
|
||||
- sql:
|
||||
splitStatements: false
|
||||
stripComments: true
|
||||
sql: |
|
||||
ALTER TABLE presupuesto
|
||||
DROP CHECK presupuesto_chk_3;
|
||||
|
||||
rollback:
|
||||
- sql:
|
||||
splitStatements: false
|
||||
stripComments: true
|
||||
sql: |
|
||||
ALTER TABLE presupuesto
|
||||
ADD CONSTRAINT presupuesto_chk_3
|
||||
CHECK (tipo_cubierta BETWEEN 0 AND 2);
|
||||
@ -32,4 +32,6 @@ databaseChangeLog:
|
||||
- include:
|
||||
file: db/changelog/changesets/0016-fix-enum-estado-pedidos-lineas.yml
|
||||
- include:
|
||||
file: db/changelog/changesets/0017-add-fecha-entrega-to-pedidos-lineas.yml
|
||||
file: db/changelog/changesets/0017-add-fecha-entrega-to-pedidos-lineas.yml
|
||||
- include:
|
||||
file: db/changelog/changesets/0018-change-presupuesto-ch-3.yml
|
||||
@ -138,6 +138,7 @@ presupuesto.papel-guardas=Papel de guardas
|
||||
presupuesto.guardas-impresas=Guardas impresas
|
||||
presupuesto.no=No
|
||||
presupuesto.cabezada=Cabezada
|
||||
presupuesto.cabezada-sin-cabezada=Sin cabezada
|
||||
presupuesto.cabezada-blanca=Blanca
|
||||
presupuesto.cabezada-verde=Verde
|
||||
presupuesto.cabezada-azul=Azul
|
||||
|
||||
@ -925,6 +925,7 @@ export default class PresupuestoWizard {
|
||||
this.#changeTab('pills-general-data');
|
||||
} else {
|
||||
const maxSolapas = data.solapas ?? 120;
|
||||
const lomo = data.lomo ?? 0;
|
||||
$('.solapas-presupuesto').attr('max', maxSolapas);
|
||||
$('.max-solapa-text').text(function (_, textoActual) {
|
||||
return textoActual.replace(/\d+/, maxSolapas);
|
||||
@ -949,6 +950,20 @@ export default class PresupuestoWizard {
|
||||
this.acabadoSobrecubierta.val(this.formData.cubierta.sobrecubierta.acabado);
|
||||
this.fajaSobrecubierta.val(this.formData.cubierta.faja.acabado);
|
||||
|
||||
if(lomo < 10){
|
||||
this.formData.cubierta.cabezada = "NOCAB";
|
||||
this.cabezada.val("NOCAB");
|
||||
this.cabezada.prop("disabled", true);
|
||||
if(this.formData.cubierta.tipoCubierta === 'tapaDuraLomoRedondo'){
|
||||
this.formData.cubierta.tipoCubierta = 'tapaDura';
|
||||
}
|
||||
$("#tapaDuraLomoRedondo").addClass("d-none");
|
||||
}
|
||||
else{
|
||||
this.cabezada.prop("disabled", false);
|
||||
$("#tapaDuraLomoRedondo").removeClass("d-none");
|
||||
}
|
||||
|
||||
this.#loadCubiertaData();
|
||||
this.summaryTableCubierta.removeClass('d-none');
|
||||
if (this.sobrecubierta.hasClass('active')) {
|
||||
|
||||
@ -151,6 +151,7 @@
|
||||
<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 tapa-cubierta-summary" id="cabezada">
|
||||
<option value="NOCAB" th:text="#{presupuesto.cabezada-sin-cabezada}">Sin cabezada</option>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user