This commit is contained in:
2026-02-24 16:35:03 -06:00
parent be834fa9a0
commit 29a37ad98a
4 changed files with 311 additions and 108 deletions

View File

@@ -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();
}
}