|
@@ -1,19 +1,12 @@
|
|
|
<template lang="pug">
|
|
|
.pos
|
|
|
- form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#7c7bad" nextButtonText="Continuar" backButtonText="Volver" @on-complete="completeSale()")
|
|
|
+ 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")
|
|
|
- .products
|
|
|
- .products-container
|
|
|
- products-searcher
|
|
|
- products-grid(:symbol="currency.symbol")
|
|
|
- .cart-container
|
|
|
- cart-total(:total="total" :symbol="currency.symbol")
|
|
|
- cart-items(:symbol="currency.symbol")
|
|
|
+ cart-step
|
|
|
tab-content(title="Seleccione un cliente" :before-change="checkCustomer")
|
|
|
- customer-searcher
|
|
|
- customers-grid
|
|
|
+ customer-step
|
|
|
tab-content(title="Vea un resumen de su operación")
|
|
|
- payment
|
|
|
+ payment-step
|
|
|
loader
|
|
|
</template>
|
|
|
|
|
@@ -21,39 +14,27 @@
|
|
|
import { FormWizard, TabContent } from 'vue-form-wizard'
|
|
|
import 'vue-form-wizard/dist/vue-form-wizard.min.css'
|
|
|
|
|
|
+ import CartStep from '@/components/cart/CartStep'
|
|
|
+ import CustomerStep from '@/components/customer/CustomerStep'
|
|
|
+ import PaymentStep from '@/components/payment/PaymentStep'
|
|
|
import Loader from '@/components/Loader'
|
|
|
- import ProductsSearcher from '@/components/ProductsSearcher'
|
|
|
- import ProductsGrid from '@/components/ProductsGrid'
|
|
|
- import CartTotal from '@/components/CartTotal'
|
|
|
- import CartItems from '@/components/CartItems'
|
|
|
- import CartItem from '@/components/CartItem'
|
|
|
- import CustomerSearcher from '@/components/CustomerSearcher'
|
|
|
- import CustomersGrid from '@/components/CustomersGrid'
|
|
|
- import Payment from '@/components/Payment'
|
|
|
|
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- 'form-wizard': FormWizard,
|
|
|
- 'tab-content': TabContent,
|
|
|
- 'loader': Loader,
|
|
|
- 'products-searcher': ProductsSearcher,
|
|
|
- 'products-grid': ProductsGrid,
|
|
|
- 'cart-total': CartTotal,
|
|
|
- 'cart-items': CartItems,
|
|
|
- 'cart-item': CartItem,
|
|
|
- 'customer-searcher': CustomerSearcher,
|
|
|
- 'customers-grid': CustomersGrid,
|
|
|
- 'payment': Payment
|
|
|
+ TabContent,
|
|
|
+ FormWizard,
|
|
|
+ CartStep,
|
|
|
+ CustomerStep,
|
|
|
+ PaymentStep,
|
|
|
+ Loader,
|
|
|
},
|
|
|
- computed: mapGetters({
|
|
|
- total: 'getTotal',
|
|
|
- currency: 'getCurrency',
|
|
|
- cartIsEmpty: 'cartIsEmpty',
|
|
|
- hasSelectedCustomer: 'hasSelectedCustomer'
|
|
|
- }),
|
|
|
+ computed: mapGetters([
|
|
|
+ 'cartIsEmpty',
|
|
|
+ 'hasSelectedCustomer'
|
|
|
+ ]),
|
|
|
methods: {
|
|
|
checkCart() {
|
|
|
if (!this.cartIsEmpty) {
|
|
@@ -117,25 +98,11 @@
|
|
|
height: calc(100% - 20px)
|
|
|
margin: 10px
|
|
|
|
|
|
- .products
|
|
|
+ .pos-step
|
|
|
width: 100%
|
|
|
height: 100%
|
|
|
- display: block
|
|
|
background: #fff
|
|
|
|
|
|
- .products-container
|
|
|
- width: calc(100% - 300px)
|
|
|
- height: 100%
|
|
|
- padding-right: 5px
|
|
|
- display: inline-block
|
|
|
-
|
|
|
- .cart-container
|
|
|
- width: 300px
|
|
|
- height: 100%
|
|
|
- border-left: 1px solid #d3d3d3
|
|
|
- padding-left: 10px
|
|
|
- display: inline-block
|
|
|
- vertical-align: top
|
|
|
.wizard-card-footer
|
|
|
width: 100%
|
|
|
height: 50px
|