Enhance sync logging with detailed stats (behandlet/oprettet/opdateret/sprunget over)
This commit is contained in:
parent
ed0491c567
commit
c2cf8cf5a3
@ -1454,9 +1454,15 @@ async function syncFromVtiger() {
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
const details = [
|
||||
`Behandlet: ${result.total_processed || 0}`,
|
||||
`Oprettet: ${result.created || 0}`,
|
||||
`Opdateret: ${result.updated || 0}`,
|
||||
`Sprunget over: ${result.skipped || 0}`
|
||||
].join(' | ');
|
||||
addSyncLogEntry(
|
||||
'vTiger Sync Fuldført',
|
||||
`${result.created || 0} nye firmaer, ${result.updated || 0} opdateret`,
|
||||
details,
|
||||
'success'
|
||||
);
|
||||
|
||||
@ -1491,9 +1497,15 @@ async function syncVtigerContacts() {
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
const details = [
|
||||
`Behandlet: ${result.total_processed || 0}`,
|
||||
`Oprettet: ${result.created || 0}`,
|
||||
`Opdateret: ${result.updated || 0}`,
|
||||
`Sprunget over: ${result.skipped || 0}`
|
||||
].join(' | ');
|
||||
addSyncLogEntry(
|
||||
'vTiger Kontakt Sync Fuldført',
|
||||
`${result.created || 0} nye kontakter, ${result.updated || 0} opdateret`,
|
||||
details,
|
||||
'success'
|
||||
);
|
||||
|
||||
@ -1526,9 +1538,14 @@ async function syncFromEconomic() {
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
const details = [
|
||||
`Behandlet: ${result.total_processed || 0}`,
|
||||
`Matchet: ${result.matched || 0}`,
|
||||
`Ikke matchet: ${result.not_matched || 0}`
|
||||
].join(' | ');
|
||||
addSyncLogEntry(
|
||||
'e-conomic Sync Fuldført',
|
||||
`${result.matched || 0} firmaer matchet med e-conomic kundenumre`,
|
||||
details,
|
||||
'success'
|
||||
);
|
||||
|
||||
@ -1563,9 +1580,14 @@ async function syncCvrToEconomic() {
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
const details = [
|
||||
`Kontrolleret: ${result.checked || 0}`,
|
||||
`Fundet i e-conomic: ${result.found || 0}`,
|
||||
`Linket: ${result.linked || 0}`
|
||||
].join(' | ');
|
||||
addSyncLogEntry(
|
||||
'CVR Søgning Fuldført',
|
||||
`Fundet ${result.found || 0} firmaer med CVR match i e-conomic`,
|
||||
details,
|
||||
'success'
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user