toast replace by modals, and product filters working
This commit is contained in:
@@ -106,6 +106,13 @@
|
||||
<ProductsRelated :related-products="relatedProducts" />
|
||||
</div>
|
||||
<ProductModal v-if="modal" :product="product" @close-modal="closeModal" />
|
||||
<BModal
|
||||
id="modal-center"
|
||||
v-model="active"
|
||||
centered
|
||||
title="latienda.coop"
|
||||
:ok-variant="modalColor"> {{ modalText }}
|
||||
</BModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user