diff --git a/dashboard/src/App.jsx b/dashboard/src/App.jsx index cc75da5..85ea2ae 100644 --- a/dashboard/src/App.jsx +++ b/dashboard/src/App.jsx @@ -259,11 +259,18 @@ function CustomerDetail({ customerId, onDelete }) { setSyncing(true) setDeployResult(null) try { - await fetch('/sync', { + const r = await fetch('/sync', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ customer_id: customerId }) }) - } catch (_) {} + const result = await r.json() + const custResult = result.results?.find(r => r.customer_id === customerId || r.status === 'error') + if (custResult?.status === 'error') { + setDeployResult({ module: 'סנכרון', status: 'error', message: custResult.message }) + } + } catch (e) { + setDeployResult({ module: 'סנכרון', status: 'error', message: `שגיאת רשת: ${e.message}` }) + } reload() setSyncing(false) } @@ -393,9 +400,18 @@ function CustomerDetail({ customerId, onDelete }) { )} {deployResult && ( -