mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
Merge branch 'fix-issue' into 'master'
fix small issues See merge request mohit.panjvani/crater-web!12
This commit is contained in:
@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user