@@ -56,13 +56,22 @@
}),
methods: {
checkCart() {
+ if (!this.cartIsEmpty) {
+ this.notify('Necesitas agregar productos al carrito para continuar')
+ }
+
return this.cartIsEmpty
},
checkCustomer() {
+ if (!this.hasSelectedCustomer) {
+ this.notify('Necesitas seleccionar un cliente para continuar')
return this.hasSelectedCustomer
...mapActions([
- 'fetchData'
+ 'fetchData',
+ 'notify'
])
mounted() {
@@ -1,4 +1,7 @@
const actions = {
+ notify({ commit }, payload) {
+ openerp.web.notification.do_warn('Atención', payload)
+ },
fetchData({ dispatch }) {
let promises = [
dispatch('fetchCompany'),