|
@@ -1,12 +1,14 @@
|
|
|
<template lang="pug">
|
|
|
.pos
|
|
|
- form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#7c7bad" nextButtonText="Continuar" backButtonText="Volver" transition="fade" @on-complete="completeSale()")
|
|
|
- tab-content(title="Agregue productos al carrito" :before-change="checkCart")
|
|
|
+ form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#7c7bad" :nextButtonText="getNextMessage()" backButtonText="Volver" transition="fade")
|
|
|
+ tab-content(title="Qué productos necesita?" :before-change="checkCart")
|
|
|
cart-step
|
|
|
- tab-content(title="Seleccione un cliente" :before-change="checkCustomer")
|
|
|
+ tab-content(title="Quién es el cliente?" :before-change="checkCustomer")
|
|
|
customer-step
|
|
|
- tab-content(title="Vea un resumen de su operación")
|
|
|
+ tab-content(title="Cómo quieres pagar?")
|
|
|
payment-step
|
|
|
+ tab-content(title="Qué monto quieres pagar?" v-if="payment === 'cash'")
|
|
|
+ payment-cash-step
|
|
|
loader
|
|
|
</template>
|
|
|
|
|
@@ -17,6 +19,8 @@
|
|
|
import CartStep from '@/components/cart/CartStep'
|
|
|
import CustomerStep from '@/components/customer/CustomerStep'
|
|
|
import PaymentStep from '@/components/payment/PaymentStep'
|
|
|
+ import PaymentCashStep from '@/components/payment/PaymentCashStep'
|
|
|
+
|
|
|
import Loader from '@/components/Loader'
|
|
|
|
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
@@ -29,11 +33,13 @@
|
|
|
CartStep,
|
|
|
CustomerStep,
|
|
|
PaymentStep,
|
|
|
+ PaymentCashStep,
|
|
|
Loader,
|
|
|
},
|
|
|
computed: mapGetters([
|
|
|
'cartIsEmpty',
|
|
|
- 'hasSelectedCustomer'
|
|
|
+ 'hasSelectedCustomer',
|
|
|
+ 'payment'
|
|
|
]),
|
|
|
methods: {
|
|
|
checkCart() {
|
|
@@ -50,6 +56,9 @@
|
|
|
|
|
|
return this.hasSelectedCustomer
|
|
|
},
|
|
|
+ getNextMessage() {
|
|
|
+ return this.payment === 'cash' ? 'Continuar' : 'Finalizar'
|
|
|
+ },
|
|
|
...mapActions([
|
|
|
'initSale',
|
|
|
'notify',
|