From be26a48c14dc6655289231b5261e0e0057a56cf7 Mon Sep 17 00:00:00 2001
From: Ale <ale.tasistro@gmail.com>
Date: Thu, 12 May 2022 23:16:15 -0300
Subject: [PATCH] Cambio de alert a bulma toast y bulma toast duration de 1000
 a 1500

---
 public/js/app.js       |  2 +-
 public/js/productos.js | 18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/public/js/app.js b/public/js/app.js
index c82cc11..72fe098 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -61,7 +61,7 @@ Vue.component('nav-bar', {
         }).then(() => {
             bulmaToast.toast({
               message: 'Pedido actualizado exitosamente',
-              duration: 1000,
+              duration: 1500,
               type: 'is-danger',
               position: 'bottom-center',
               animate: { in: 'fadeIn', out: 'fadeOut' }
diff --git a/public/js/productos.js b/public/js/productos.js
index ec4be86..bbd1096 100644
--- a/public/js/productos.js
+++ b/public/js/productos.js
@@ -187,8 +187,22 @@ Vue.component('producto-container', {
         Event.$emit("migas-pop");
     },
     agregarProducto() {
-        if (this.cant < 0) alert("No se puede agregar cantidades negativas")
-        else if (!Number.isInteger(this.cant)) alert("Las cantidades deben ser números enteros")
+        if (this.cant < 0)
+            bulmaToast.toast({
+                message: 'Las cantidades deben ser números mayores a 0',
+                duration: 1500,
+                type: 'is-danger',
+                position: 'bottom-center',
+                animate: { in: 'fadeIn', out: 'fadeOut' }
+            });
+        else if (!Number.isInteger(this.cant))
+            bulmaToast.toast({
+                message: 'Las cantidades deben ser números enteros',
+                duration: 1500,
+                type: 'is-danger',
+                position: 'bottom-center',
+                animate: { in: 'fadeIn', out: 'fadeOut' }
+            });
         else {
             Event.$emit("sync-subpedido", this.cant, this.producto.id);
             this.cerrar();