|
@@ -2,27 +2,32 @@
|
|
|
.purchase-step
|
|
|
.supplier-selection-step
|
|
|
.supplier-selector
|
|
|
- supplier-searcher
|
|
|
- supplier-grid
|
|
|
+ searcher(:items='suppliers' :keys="['name', 'displayName']" @onSearch='filterSuppliers')
|
|
|
+ card-grid(:items='visibleSuppliers' canAdd)
|
|
|
transition(name='slide-fade')
|
|
|
supplier-details(v-if='!!supplierSelected')
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { mapGetters } from 'vuex'
|
|
|
+ import { mapGetters, mapActions } from 'vuex'
|
|
|
|
|
|
- import SupplierSearcher from '@/components/supplier/SupplierSearcher'
|
|
|
- import SupplierGrid from '@/components/supplier/SuppliersGrid'
|
|
|
+ import Searcher from '@/components/common/Searcher'
|
|
|
+ import CardGrid from '@/components/common/CardGrid'
|
|
|
import SupplierDetails from '@/components/supplier/SupplierDetails'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- SupplierSearcher,
|
|
|
- SupplierGrid,
|
|
|
- SupplierDetails
|
|
|
+ Searcher,
|
|
|
+ CardGrid,
|
|
|
+ SupplierDetails,
|
|
|
},
|
|
|
computed: mapGetters([
|
|
|
+ 'suppliers',
|
|
|
+ 'visibleSuppliers',
|
|
|
'supplierSelected'
|
|
|
+ ]),
|
|
|
+ methods: mapActions([
|
|
|
+ 'filterSuppliers'
|
|
|
])
|
|
|
}
|
|
|
</script>
|
|
@@ -41,7 +46,7 @@
|
|
|
width: 360px
|
|
|
margin: 0 15px
|
|
|
.slide-fade-enter-active
|
|
|
- transition: all .3s ease
|
|
|
+ transition: all 300ms ease
|
|
|
.slide-fade-leave-active
|
|
|
transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0)
|
|
|
.slide-fade-enter, .slide-fade-leave-to
|