|
@@ -7,14 +7,18 @@
|
|
|
:keys="['name', 'ean13', 'defaultCode']"
|
|
|
@onSearch='filterProducts'
|
|
|
)
|
|
|
- card-grid(
|
|
|
- @onAdd='showProductForm'
|
|
|
- :items='visibleProducts'
|
|
|
- :footerKeys="['price:c']"
|
|
|
- :currencyOptions='baseCurrency'
|
|
|
- :loading='loadingProducts'
|
|
|
- @onSelect='selectProduct'
|
|
|
- )
|
|
|
+ .products-grid
|
|
|
+ store-selector(
|
|
|
+ :items='stores'
|
|
|
+ )
|
|
|
+ card-grid(
|
|
|
+ @onAdd='showProductForm'
|
|
|
+ :items='visibleProducts'
|
|
|
+ :footerKeys="['price:c']"
|
|
|
+ :currencyOptions='baseCurrency'
|
|
|
+ :loading='loadingProducts'
|
|
|
+ @onSelect='selectProduct'
|
|
|
+ )
|
|
|
product-modal(
|
|
|
:show='showingProductForm'
|
|
|
@onAccept='submitProduct'
|
|
@@ -42,7 +46,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters, mapActions } from 'vuex'
|
|
|
- import { Searcher, CardGrid, Cart } from '../common'
|
|
|
+ import { Searcher, CardGrid, Cart, StoreSelector } from '../common'
|
|
|
import ProductModal from '../modals/ProductModal'
|
|
|
import VariantModal from '../modals/VariantModal'
|
|
|
import DiscountModal from '../modals/DiscountModal'
|
|
@@ -52,6 +56,7 @@
|
|
|
Searcher,
|
|
|
CardGrid,
|
|
|
Cart,
|
|
|
+ StoreSelector,
|
|
|
ProductModal,
|
|
|
VariantModal,
|
|
|
DiscountModal
|
|
@@ -60,6 +65,7 @@
|
|
|
...mapGetters([
|
|
|
'products',
|
|
|
'visibleProducts',
|
|
|
+ 'stores',
|
|
|
'loadingProducts',
|
|
|
'showingProductForm',
|
|
|
'cartItems',
|
|
@@ -90,5 +96,8 @@
|
|
|
width: calc(100% - 300px)
|
|
|
height: 100%
|
|
|
padding-right: 5px
|
|
|
- display: inline-block
|
|
|
+ .products-grid
|
|
|
+ width: 100%
|
|
|
+ height: 100%
|
|
|
+ display: flex
|
|
|
</style>
|