DeliveryStep.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template lang="pug">
  2. .purchase-step
  3. .delivery-selector-step
  4. .delivery-selector
  5. searcher(
  6. mode='normal'
  7. :items='stockPickings'
  8. :keys="['name', 'origin', 'partner.name']"
  9. @onSearch='filterStockPickings'
  10. )
  11. card-grid(
  12. imageKey='partner.image'
  13. :items='visibleStockPickings'
  14. :headerKeys="['name', 'partner.name']"
  15. :footerKeys="['origin']"
  16. :loading='loadingStockPickings'
  17. @onSelect='selectStockPicking'
  18. )
  19. </template>
  20. <script>
  21. import { mapGetters, mapActions } from 'vuex'
  22. import { Searcher, CardGrid } from '../common'
  23. export default {
  24. components: {
  25. Searcher,
  26. CardGrid
  27. },
  28. computed: mapGetters([
  29. 'stockPickings',
  30. 'visibleStockPickings',
  31. 'loadingStockPickings'
  32. ]),
  33. methods: mapActions([
  34. 'filterStockPickings',
  35. 'selectStockPicking'
  36. ])
  37. }
  38. </script>
  39. <style lang="sass">
  40. .purchase-step
  41. .delivery-selector-step
  42. width: 100%
  43. height: 100%
  44. display: flex
  45. .delivery-selector
  46. width: 100%
  47. height: 100%
  48. </style>