Supplier.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template lang="pug">
  2. .purchase-step
  3. .supplier-selection-step
  4. .supplier-selector
  5. searcher(:items='suppliers' :keys="['name', 'displayName']" @onSearch='filterSuplliers')
  6. card-grid(:items='visibleSuppliers' :loading='loadingSuppliers' @onSelect='selectSupplier')
  7. transition(name='slide-fade')
  8. customer-form
  9. </template>
  10. <script>
  11. import { mapGetters, mapActions } from 'vuex'
  12. import { Searcher, CardGrid } from '../common'
  13. import SupplierForm from '@/components/forms/SupplierForm'
  14. export default {
  15. components: {
  16. Searcher,
  17. CardGrid,
  18. SupplierForm
  19. },
  20. computed: mapGetters([
  21. 'suppliers',
  22. 'visibleSuppliers',
  23. 'loadingSuppliers'
  24. ]),
  25. methods: mapActions([
  26. 'selectSupplier',
  27. 'filterSuppliers'
  28. ])
  29. }
  30. </script>
  31. <style lang="sass">
  32. .purchase-step
  33. .supplier-selection-step
  34. width: 100%
  35. height: 100%
  36. display: flex
  37. .supplier-selector
  38. width: 100%
  39. height: 100%
  40. .slide-fade-enter-active
  41. transition: all 300ms ease;
  42. .slide-fade-enter
  43. transform: translateX(300px)
  44. opacity: 0
  45. </style>