build version 400

This commit is contained in:
Mohit Panjwani
2020-12-02 17:54:08 +05:30
parent 326508e567
commit 89ee58590c
963 changed files with 62887 additions and 48868 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="item-selector">
<base-select
<sw-select
ref="baseSelect"
v-model="customerSelect"
:options="customers"
@ -21,40 +21,41 @@
import { mapActions, mapGetters } from 'vuex'
export default {
data () {
data() {
return {
customerSelect: null,
loading: false
loading: false,
}
},
computed: {
...mapGetters('customer', [
'customers'
])
...mapGetters('customer', ['customers']),
},
created() {
this.fetchCustomers()
},
methods: {
...mapActions('customer', [
'fetchCustomers'
]),
async searchCustomers (search) {
...mapActions('customer', ['fetchCustomers']),
async searchCustomers(search) {
this.loading = true
await this.fetchCustomers({search})
await this.fetchCustomers({ search })
this.loading = false
},
onTextChange (val) {
onTextChange(val) {
this.searchCustomers(val)
},
checkCustomers (val) {
checkCustomers(val) {
if (!this.customers.length) {
this.fetchCustomers()
}
},
deselectCustomer () {
deselectCustomer() {
this.customerSelect = null
this.$emit('deselect')
}
}
},
},
}
</script>