mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 12:41:10 -04:00
fix customer validation issue
This commit is contained in:
@ -111,7 +111,5 @@ class Version110 extends Listener
|
|||||||
'thousand_separator' => ',',
|
'thousand_separator' => ',',
|
||||||
'decimal_separator' => '.'
|
'decimal_separator' => '.'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,9 @@ export const addCustomer = ({ commit, dispatch, state }, data) => {
|
|||||||
export const updateCustomer = ({ commit, dispatch, state }, data) => {
|
export const updateCustomer = ({ commit, dispatch, state }, data) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
window.axios.put(`/api/customers/${data.id}`, data).then((response) => {
|
window.axios.put(`/api/customers/${data.id}`, data).then((response) => {
|
||||||
|
if(response.data.success){
|
||||||
commit(types.UPDATE_CUSTOMER, response.data)
|
commit(types.UPDATE_CUSTOMER, response.data)
|
||||||
|
}
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user