fix: Update synchronization status messages and add "no_sync" option; adjust microtime and cacheTimestamp in config and state files; add beforeSaveScripts for Advoware sync status management

This commit is contained in:
2026-03-08 21:10:08 +01:00
parent 3547f47fc3
commit 1b904eb15f
18 changed files with 73 additions and 35 deletions

View File

@@ -39,7 +39,7 @@
"tooltips": { "tooltips": {
"aktennr": "Eindeutige Dokument-Nummer aus Advoware", "aktennr": "Eindeutige Dokument-Nummer aus Advoware",
"advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware", "advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware",
"syncStatus": "Status der Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich, unclean = Abweichungen, failed = Fehler", "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert",
"xaiId": "Eindeutige ID für x.AI Synchronisation", "xaiId": "Eindeutige ID für x.AI Synchronisation",
"xaiCollections": "Liste der x.AI Collections für dieses Dokument", "xaiCollections": "Liste der x.AI Collections für dieses Dokument",
"xaiSyncStatus": "Status der x.AI Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert", "xaiSyncStatus": "Status der x.AI Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert",
@@ -49,8 +49,9 @@
"syncStatus": { "syncStatus": {
"pending_sync": "Warte auf Sync", "pending_sync": "Warte auf Sync",
"clean": "Synchronisiert", "clean": "Synchronisiert",
"unclean": "Abweichungen", "unclean": "Änderungen ausstehend",
"failed": "Fehlgeschlagen" "failed": "Fehlgeschlagen",
"no_sync": "Kein Sync"
}, },
"xaiSyncStatus": { "xaiSyncStatus": {
"pending_sync": "Warte auf Sync", "pending_sync": "Warte auf Sync",

View File

@@ -99,13 +99,14 @@
"pending_sync": "Warte auf Sync", "pending_sync": "Warte auf Sync",
"clean": "Synchronisiert", "clean": "Synchronisiert",
"unclean": "Änderungen ausstehend", "unclean": "Änderungen ausstehend",
"failed": "Fehler" "failed": "Fehler",
"no_sync": "Kein Sync"
} }
}, },
"tooltips": { "tooltips": {
"advowareAktenzeichen": "Aktenzeichen aus Advoware für die Synchronisation", "advowareAktenzeichen": "Aktenzeichen aus Advoware für die Synchronisation",
"aktennr": "Eindeutige Kündigungs-Nummer aus Advoware", "aktennr": "Eindeutige Kündigungs-Nummer aus Advoware",
"syncStatus": "Status der Synchronisation mit Advoware", "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert",
"sendungsverfolgungsnummer": "Sendungsverfolgungsnummer für Einschreiben", "sendungsverfolgungsnummer": "Sendungsverfolgungsnummer für Einschreiben",
"mietrueckstand": "Gesamthöhe des Mietrückstands (nur bei Kündigungsgrund Mietrückstand)", "mietrueckstand": "Gesamthöhe des Mietrückstands (nur bei Kündigungsgrund Mietrückstand)",
"mietkaution": "Einbehaltene oder ausstehende Mietkaution", "mietkaution": "Einbehaltene oder ausstehende Mietkaution",

View File

@@ -40,14 +40,15 @@
"advowareAktenzeichen": "Aktenzeichen aus dem Advoware-System", "advowareAktenzeichen": "Aktenzeichen aus dem Advoware-System",
"aktennr": "Eindeutige Inkasso-Nummer aus Advoware", "aktennr": "Eindeutige Inkasso-Nummer aus Advoware",
"advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware", "advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware",
"syncStatus": "Status der Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich, unclean = Abweichungen, failed = Fehler" "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert"
}, },
"options": { "options": {
"syncStatus": { "syncStatus": {
"pending_sync": "Warte auf Sync", "pending_sync": "Warte auf Sync",
"clean": "Synchronisiert", "clean": "Synchronisiert",
"unclean": "Abweichungen", "unclean": "Änderungen ausstehend",
"failed": "Fehlgeschlagen" "failed": "Fehlgeschlagen",
"no_sync": "Kein Sync"
} }
} }
} }

View File

@@ -42,15 +42,16 @@
"advowareAktenzeichen": "Aktenzeichen aus dem Advoware-System", "advowareAktenzeichen": "Aktenzeichen aus dem Advoware-System",
"aktennr": "Eindeutige Klage-Nummer aus Advoware", "aktennr": "Eindeutige Klage-Nummer aus Advoware",
"advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware", "advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware",
"syncStatus": "Status der Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich, unclean = Abweichungen, failed = Fehler", "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert",
"xaiCollectionId": "Collection ID für x.AI Synchronisation" "xaiCollectionId": "Collection ID für x.AI Synchronisation"
}, },
"options": { "options": {
"syncStatus": { "syncStatus": {
"pending_sync": "Warte auf Sync", "pending_sync": "Warte auf Sync",
"clean": "Synchronisiert", "clean": "Synchronisiert",
"unclean": "Abweichungen", "unclean": "Änderungen ausstehend",
"failed": "Fehlgeschlagen" "failed": "Fehlgeschlagen",
"no_sync": "Kein Sync"
} }
} }
} }

View File

@@ -42,7 +42,7 @@
"tooltips": { "tooltips": {
"aktennr": "Unique document number from Advoware", "aktennr": "Unique document number from Advoware",
"advowareLastSync": "Time of last synchronization with Advoware", "advowareLastSync": "Time of last synchronization with Advoware",
"syncStatus": "Synchronization status: pending_sync = Waiting for sync, clean = successful, unclean = discrepancies, failed = error", "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized",
"xaiId": "Unique ID for x.AI synchronization", "xaiId": "Unique ID for x.AI synchronization",
"xaiCollections": "List of x.AI collections for this document", "xaiCollections": "List of x.AI collections for this document",
"xaiSyncStatus": "x.AI synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized", "xaiSyncStatus": "x.AI synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized",
@@ -52,8 +52,9 @@
"syncStatus": { "syncStatus": {
"pending_sync": "Waiting for Sync", "pending_sync": "Waiting for Sync",
"clean": "Synchronized", "clean": "Synchronized",
"unclean": "Discrepancies", "unclean": "Changes Pending",
"failed": "Failed" "failed": "Failed",
"no_sync": "No Sync"
}, },
"xaiSyncStatus": { "xaiSyncStatus": {
"pending_sync": "Waiting for Sync", "pending_sync": "Waiting for Sync",

View File

@@ -95,15 +95,17 @@
"JaBesorgnisgrund259ZPO": "Yes, Concern, § 259 ZPO" "JaBesorgnisgrund259ZPO": "Yes, Concern, § 259 ZPO"
}, },
"syncStatus": { "syncStatus": {
"pending_sync": "Waiting for Sync",
"clean": "Synchronized", "clean": "Synchronized",
"unclean": "Changes Pending", "unclean": "Changes Pending",
"failed": "Failed" "failed": "Failed",
"no_sync": "No Sync"
} }
}, },
"tooltips": { "tooltips": {
"advowareAktenzeichen": "File number from Advoware for synchronization", "advowareAktenzeichen": "File number from Advoware for synchronization",
"aktennr": "Case number from Advoware", "aktennr": "Case number from Advoware",
"syncStatus": "Synchronization status with Advoware", "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized",
"sendungsverfolgungsnummer": "Tracking number for registered mail", "sendungsverfolgungsnummer": "Tracking number for registered mail",
"mietrueckstand": "Total amount of rent arrears (only for termination reason rent arrears)", "mietrueckstand": "Total amount of rent arrears (only for termination reason rent arrears)",
"mietkaution": "Withheld or outstanding security deposit", "mietkaution": "Withheld or outstanding security deposit",

View File

@@ -40,13 +40,15 @@
"advowareAktenzeichen": "Case number from Advoware system", "advowareAktenzeichen": "Case number from Advoware system",
"aktennr": "Unique collection number from Advoware", "aktennr": "Unique collection number from Advoware",
"advowareLastSync": "Time of last synchronization with Advoware", "advowareLastSync": "Time of last synchronization with Advoware",
"syncStatus": "Synchronization status: clean = successful, unclean = discrepancies, failed = error" "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized"
}, },
"options": { "options": {
"syncStatus": { "syncStatus": {
"pending_sync": "Waiting for Sync",
"clean": "Synchronized", "clean": "Synchronized",
"unclean": "Discrepancies", "unclean": "Changes Pending",
"failed": "Failed" "failed": "Failed",
"no_sync": "No Sync"
} }
} }
} }

View File

@@ -30,5 +30,17 @@
}, },
"labels": { "labels": {
"Create CVmhRumungsklage": "Create Räumungsklage" "Create CVmhRumungsklage": "Create Räumungsklage"
},
"tooltips": {
"syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized"
},
"options": {
"syncStatus": {
"pending_sync": "Waiting for Sync",
"clean": "Synchronized",
"unclean": "Changes Pending",
"failed": "Failed",
"no_sync": "No Sync"
}
} }
} }

View File

@@ -95,15 +95,17 @@
"pending_sync", "pending_sync",
"clean", "clean",
"unclean", "unclean",
"failed" "failed",
"no_sync"
], ],
"style": { "style": {
"pending_sync": "default", "pending_sync": "default",
"clean": "success", "clean": "success",
"unclean": "warning", "unclean": "warning",
"failed": "danger" "failed": "danger",
"no_sync": null
}, },
"default": "pending_sync", "default": "no_sync",
"tooltip": true, "tooltip": true,
"isCustom": true "isCustom": true
}, },

View File

@@ -80,15 +80,17 @@
"pending_sync", "pending_sync",
"clean", "clean",
"unclean", "unclean",
"failed" "failed",
"no_sync"
], ],
"style": { "style": {
"pending_sync": "default", "pending_sync": "default",
"clean": "success", "clean": "success",
"unclean": "warning", "unclean": "warning",
"failed": "danger" "failed": "danger",
"no_sync": null
}, },
"default": "pending_sync", "default": "no_sync",
"tooltip": true, "tooltip": true,
"isCustom": true "isCustom": true
}, },

View File

@@ -80,15 +80,17 @@
"pending_sync", "pending_sync",
"clean", "clean",
"unclean", "unclean",
"failed" "failed",
"no_sync"
], ],
"style": { "style": {
"pending_sync": "default", "pending_sync": "default",
"clean": "success", "clean": "success",
"unclean": "warning", "unclean": "warning",
"failed": "danger" "failed": "danger",
"no_sync": null
}, },
"default": "pending_sync", "default": "no_sync",
"tooltip": true, "tooltip": true,
"isCustom": true "isCustom": true
}, },

View File

@@ -88,15 +88,17 @@
"pending_sync", "pending_sync",
"clean", "clean",
"unclean", "unclean",
"failed" "failed",
"no_sync"
], ],
"style": { "style": {
"pending_sync": "default", "pending_sync": "default",
"clean": "success", "clean": "success",
"unclean": "warning", "unclean": "warning",
"failed": "danger" "failed": "danger",
"no_sync": null
}, },
"default": "pending_sync", "default": "no_sync",
"tooltip": true, "tooltip": true,
"isCustom": true "isCustom": true
}, },

View File

@@ -1,3 +1,3 @@
{ {
"beforeSaveScript": "// Automatische x.AI Sync-Status Verwaltung\n\n// Fall 1: xaiId wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('xaiId') != null &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}\n// Fall 2: xaiId wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('xaiId') == null &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 3: Dokument hat xaiId und relevante Felder haben sich geändert\nelse if (\n xaiId != null &&\n xaiSyncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('description') ||\n attribute\\isChanged('dokumentId') ||\n attribute\\isChanged('md5sum') ||\n attribute\\isChanged('sha256')\n )\n) {\n xaiSyncStatus = 'unclean';\n}\n// Fall 4: Bei neuem Dokument MIT xaiId → pending_sync\nelse if (\n entity\\isNew() &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuem Dokument OHNE xaiId → no_sync\nelse if (\n entity\\isNew() &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}" "beforeSaveScript": "// Automatische x.AI Sync-Status Verwaltung\n\n// Fall 1: xaiId wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('xaiId') != null &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}\n// Fall 2: xaiId wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('xaiId') == null &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 3: Dokument hat xaiId und relevante Felder haben sich geändert\nelse if (\n xaiId != null &&\n xaiSyncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('description') ||\n attribute\\isChanged('dokumentId') ||\n attribute\\isChanged('md5sum') ||\n attribute\\isChanged('sha256')\n )\n) {\n xaiSyncStatus = 'unclean';\n}\n// Fall 4: Bei neuem Dokument MIT xaiId → pending_sync\nelse if (\n entity\\isNew() &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuem Dokument OHNE xaiId → no_sync\nelse if (\n entity\\isNew() &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}\n\n// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Dokument hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('description') ||\n attribute\\isChanged('dokumentId') ||\n attribute\\isChanged('md5sum') ||\n attribute\\isChanged('sha256')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuem Dokument MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuem Dokument OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}"
} }

View File

@@ -0,0 +1,3 @@
{
"beforeSaveScript": "// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Entität hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('advowareAktenzeichen') ||\n attribute\\isChanged('kuendigungsdatum') ||\n attribute\\isChanged('beendigungstermin') ||\n attribute\\isChanged('status')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuer Entität MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuer Entität OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}"
}

View File

@@ -0,0 +1,3 @@
{
"beforeSaveScript": "// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Entität hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('advowareAktenzeichen') ||\n attribute\\isChanged('gerichtsrubrum') ||\n attribute\\isChanged('gegenstandswert')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuer Entität MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuer Entität OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}"
}

View File

@@ -0,0 +1,3 @@
{
"beforeSaveScript": "// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Entität hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('advowareAktenzeichen') ||\n attribute\\isChanged('gerichtsrubrum') ||\n attribute\\isChanged('gegenstandswert')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuer Entität MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuer Entität OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}"
}

View File

@@ -358,7 +358,7 @@ return [
0 => 'youtube.com', 0 => 'youtube.com',
1 => 'google.com' 1 => 'google.com'
], ],
'microtime' => 1772997342.745464, 'microtime' => 1772999883.405378,
'siteUrl' => 'https://crm.bitbylaw.com', 'siteUrl' => 'https://crm.bitbylaw.com',
'fullTextSearchMinLength' => 4, 'fullTextSearchMinLength' => 4,
'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws', 'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws',

View File

@@ -1,7 +1,7 @@
<?php <?php
return [ return [
'cacheTimestamp' => 1772997342, 'cacheTimestamp' => 1772999883,
'microtimeState' => 1772997342.877304, 'microtimeState' => 1772999883.544947,
'currencyRates' => [ 'currencyRates' => [
'EUR' => 1.0 'EUR' => 1.0
], ],