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',
|
||||
html: `
|
||||
<div class="d-flex flex-column">
|
||||
<div class="d-flex flex-row">
|
||||
<p class="px-2 ">Total presupuesto :</p><span>${value}</span>
|
||||
</div>
|
||||
<p class="fs-big">Total presupuesto</p>
|
||||
<span class="badge badge-label-primary fs-large">${value}</span>
|
||||
</div>`,
|
||||
customClass: {
|
||||
popup: 'bg-primary text-white',
|
||||
},
|
||||
background: '#a5dc86',
|
||||
target: target,
|
||||
allowEscapeKey: false,
|
||||
showConfirmButton: false,
|
||||
|
||||
@ -297,7 +297,7 @@ class Resumen {
|
||||
|
||||
$('#totalAntesDescuento').text((this.addSeparatorsNF(totalAntesDescuento.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), ".", ",", ".")) + "€")
|
||||
$('#totalAntesDescuento').attr('val', (totalAntesDescuento).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').attr('val', ((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2))
|
||||
|
||||
this.updateToastSummary()
|
||||
}
|
||||
|
||||
|
||||
@ -362,8 +361,18 @@ class Resumen {
|
||||
this.toastPresupuestoTotal.close()
|
||||
}
|
||||
|
||||
this.toastPresupuestoTotal = toastPresupuestoSummary($("#totalDespuesDecuento").text())
|
||||
this.toastPresupuestoTotal.fire();
|
||||
this.toastPresupuestoTotal = toastPresupuestoSummary($("#totalDespuesDecuento").text() ?? 0)
|
||||
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