mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix toast
This commit is contained in:
@ -48,14 +48,12 @@ export const toastPresupuestoSummary = (value, target = 'body') => {
|
|||||||
position: 'bottom-end',
|
position: 'bottom-end',
|
||||||
html: `
|
html: `
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
<div class="d-flex flex-row">
|
<p class="fs-big">Total presupuesto</p>
|
||||||
<p class="px-2 ">Total presupuesto :</p><span>${value}</span>
|
<span class="badge badge-label-primary fs-large">${value}</span>
|
||||||
</div>
|
|
||||||
</div>`,
|
</div>`,
|
||||||
customClass: {
|
customClass: {
|
||||||
popup: 'bg-primary text-white',
|
popup: 'bg-primary text-white',
|
||||||
},
|
},
|
||||||
background: '#a5dc86',
|
|
||||||
target: target,
|
target: target,
|
||||||
allowEscapeKey: false,
|
allowEscapeKey: false,
|
||||||
showConfirmButton: false,
|
showConfirmButton: false,
|
||||||
|
|||||||
@ -297,7 +297,7 @@ class Resumen {
|
|||||||
|
|
||||||
$('#totalAntesDescuento').text((this.addSeparatorsNF(totalAntesDescuento.toFixed(2), ".", ",", ".")) + "€")
|
$('#totalAntesDescuento').text((this.addSeparatorsNF(totalAntesDescuento.toFixed(2), ".", ",", ".")) + "€")
|
||||||
$('#descuentoTotal').text((this.addSeparatorsNF(totalDescuento.toFixed(2), ".", ",", ".")) + "€")
|
$('#descuentoTotal').text((this.addSeparatorsNF(totalDescuento.toFixed(2), ".", ",", ".")) + "€")
|
||||||
$('#totalDespuesDecuento').text((this.addSeparatorsNF(totalPresupuesto.toFixed(2), ".", ",", ".")) + "€").trigger("change")
|
$('#totalDespuesDecuento').text((this.addSeparatorsNF(totalPresupuesto.toFixed(2), ".", ",", ".")) + "€")
|
||||||
$('#precioUnidadPresupuesto').text((this.addSeparatorsNF(precioUnidad.toFixed(4), ".", ",", ".")) + "€")
|
$('#precioUnidadPresupuesto').text((this.addSeparatorsNF(precioUnidad.toFixed(4), ".", ",", ".")) + "€")
|
||||||
$('#totalAntesDescuento').attr('val', (totalAntesDescuento).toFixed(2))
|
$('#totalAntesDescuento').attr('val', (totalAntesDescuento).toFixed(2))
|
||||||
$('#descuentoTotal').attr('val', (totalDescuento).toFixed(2))
|
$('#descuentoTotal').attr('val', (totalDescuento).toFixed(2))
|
||||||
@ -310,7 +310,6 @@ class Resumen {
|
|||||||
$('#factor_ponderado').text(this.addSeparatorsNF(((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2), ".", ",", "."))
|
$('#factor_ponderado').text(this.addSeparatorsNF(((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2), ".", ",", "."))
|
||||||
$('#factor_ponderado').attr('val', ((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2))
|
$('#factor_ponderado').attr('val', ((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2))
|
||||||
|
|
||||||
this.updateToastSummary()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -362,8 +361,18 @@ class Resumen {
|
|||||||
this.toastPresupuestoTotal.close()
|
this.toastPresupuestoTotal.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.toastPresupuestoTotal = toastPresupuestoSummary($("#totalDespuesDecuento").text())
|
this.toastPresupuestoTotal = toastPresupuestoSummary($("#totalDespuesDecuento").text() ?? 0)
|
||||||
this.toastPresupuestoTotal.fire();
|
this.toastPresupuestoTotal.fire().then((result) => {
|
||||||
|
if(result.isDismissed){
|
||||||
|
this.updateToastSummary()
|
||||||
|
$('html, body').animate(
|
||||||
|
{
|
||||||
|
scrollTop: $("#totalDespuesDecuento").offset().top
|
||||||
|
},
|
||||||
|
1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user