update
This commit is contained in:
@@ -313,6 +313,8 @@ async function handleSubmit(e) {
|
||||
const url = customerId ? `/api/customers/${customerId}` : '/api/customers';
|
||||
const method = customerId ? 'PUT' : 'POST';
|
||||
|
||||
if (typeof showSpinner === 'function') showSpinner(customerId ? 'Saving customer & syncing QBO...' : 'Creating customer...');
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
method,
|
||||
@@ -330,6 +332,8 @@ async function handleSubmit(e) {
|
||||
} catch (error) {
|
||||
console.error('Error saving customer:', error);
|
||||
alert('Network error saving customer.');
|
||||
} finally {
|
||||
if (typeof hideSpinner === 'function') hideSpinner();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user