fix: bank sync fehler sichtbar machen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 26s
Build and Push Docker Images / build-frontend (push) Successful in 1m15s
Build and Push Docker Images / build-website (push) Successful in 19s
Build and Push Docker Images / build-central-services-api (push) Successful in 16s
Build and Push Docker Images / build-central-services-admin (push) Successful in 17s
Build and Push Docker Images / build-docs (push) Successful in 16s
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 26s
Build and Push Docker Images / build-frontend (push) Successful in 1m15s
Build and Push Docker Images / build-website (push) Successful in 19s
Build and Push Docker Images / build-central-services-api (push) Successful in 16s
Build and Push Docker Images / build-central-services-admin (push) Successful in 17s
Build and Push Docker Images / build-docs (push) Successful in 16s
This commit is contained in:
@@ -174,11 +174,15 @@ watch([selectedPeriod, dateRange], () => {
|
||||
const syncBankStatements = async () => {
|
||||
isSyncing.value = true
|
||||
try {
|
||||
await $api('/api/functions/services/bankstatementsync', {method: 'POST'})
|
||||
toast.add({title: 'Erfolg', description: 'Bankdaten synchronisiert.', color: 'green'})
|
||||
const result = await $api('/api/functions/services/bankstatementsync', {method: 'POST'})
|
||||
const description = result.accountsFound === 0
|
||||
? 'Es sind keine aktiven Bankkonten eingerichtet.'
|
||||
: `${result.accountsSynced} Konto/Konten synchronisiert, ${result.transactionsImported} neue Umsätze importiert.`
|
||||
toast.add({title: 'Bankdaten synchronisiert', description, color: 'green'})
|
||||
await setupPage()
|
||||
} catch (error) {
|
||||
toast.add({title: 'Fehler', description: 'Fehler beim Abruf.', color: 'red'})
|
||||
const description = error?.data?.message || error?.message || 'Fehler beim Abruf.'
|
||||
toast.add({title: 'Bank-Synchronisierung fehlgeschlagen', description, color: 'red'})
|
||||
} finally {
|
||||
isSyncing.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user