fix small issues

This commit is contained in:
yogesh_gohil
2019-11-12 20:09:45 +05:30
parent 4decc56b7c
commit 4063984e56
6 changed files with 35 additions and 15 deletions

View File

@ -624,17 +624,20 @@ export default {
this.isLoading = true
this.formData.currency_id = this.currency.id
}
let response = await this.addCustomer(this.formData)
if (response.data.success) {
window.toastr['success'](this.$t('customers.created_message'))
this.$router.push('/admin/customers')
this.isLoading = false
return true
try {
let response = await this.addCustomer(this.formData)
if (response.data.success) {
window.toastr['success'](this.$t('customers.created_message'))
this.$router.push('/admin/customers')
this.isLoading = false
return true
}
} catch (err) {
if (err.response.data.errors.email) {
this.isLoading = false
window.toastr['error'](this.$t('validation.email_already_taken'))
}
}
window.toastr['error'](response.data.error)
}
},
async fetchBillingState () {