diff --git a/components/ProductCard.vue b/components/ProductCard.vue
index 0496a13..837fa34 100644
--- a/components/ProductCard.vue
+++ b/components/ProductCard.vue
@@ -140,6 +140,13 @@
+ {{ modalText }}
+
@@ -160,6 +167,9 @@ export default {
modal: false,
productUrl: null,
relatedProducts: null,
+ active: false,
+ modalText: '',
+ modalColor: 'info',
}
},
computed: {
@@ -274,21 +284,16 @@ export default {
},
closeModal(value) {
+ console.log(value)
this.modal = false
- if (value === 200) {
- this.$bvToast.toast(`Email enviado correctamente`, {
- title: 'latienda.coop',
- autoHideDelay: 5000,
- appendToast: true,
- variant: 'success',
- })
+ this.active = true
+ if (value === 200 || value === 201) {
+ this.modalText = 'Actualizado correctamente'
+ this.modalColor = 'success'
} else if (value) {
- this.$bvToast.toast(`Se ha producido un error en el envío`, {
- title: 'latienda.coop',
- autoHideDelay: 5000,
- appendToast: true,
- variant: 'danger',
- })
+ this.modalText = 'Se ha producido un error en el envío'
+ this.modalColor = 'danger'
+
}
},
diff --git a/components/ProductCardDetails.vue b/components/ProductCardDetails.vue
index 42f001e..15ac2e0 100644
--- a/components/ProductCardDetails.vue
+++ b/components/ProductCardDetails.vue
@@ -106,6 +106,13 @@
+ {{ modalText }}
+
@@ -137,6 +144,9 @@ export default {
modal: true,
productUrl: null,
geolocation: null,
+ active: false,
+ modalText: '',
+ modalColor: 'info',
}
},
computed: {
@@ -161,19 +171,13 @@ export default {
},
closeModal(value) {
this.modal = false
- if (value === 200) {
- this.$bvToast.toast(`Email enviado correctamente`, {
- title: 'latienda.coop',
- autoHideDelay: 5000,
- appendToast: true,
- })
+ if (value === 200 || value === 201) {
+ this.modalText = 'Actualizado correctamente'
+ this.modalColor = 'success'
} else if (value) {
- this.$bvToast.toast(`Se ha producido un error en el envío`, {
- title: 'latienda.coop',
- autoHideDelay: 5000,
- appendToast: true,
- variant: 'danger',
- })
+ this.modalText = 'Se ha producido un error en el envío'
+ this.modalColor = 'danger'
+
}
},
// TODO: implement buyIntent (review functionality, because sendLog is not working)
diff --git a/components/ProductModal.vue b/components/ProductModal.vue
index 85a8fcd..7666445 100644
--- a/components/ProductModal.vue
+++ b/components/ProductModal.vue
@@ -182,7 +182,7 @@ export default {
})
},
handleEmit() {
- this.$emit('closeModal')
+ this.$emit('closeModal', null)
},
},
}
diff --git a/pages/busqueda.vue b/pages/busqueda.vue
index 2b8f329..1b45ad7 100644
--- a/pages/busqueda.vue
+++ b/pages/busqueda.vue
@@ -58,12 +58,13 @@
Hay {{ count }} productos
+
+