From ed710c73a56c3760d2f4660943e120de72570a54 Mon Sep 17 00:00:00 2001 From: bsiggel Date: Tue, 20 Jan 2026 21:17:25 +0100 Subject: [PATCH] Refactor layouts by updating widths in CVmhMietverhltnis and adding new listSmall layout for CAdressen; create layout for CVmhRumungsklage; update cache timestamps in config. --- .../layouts/CAdressen/listSmall.json | 21 +++++++++++ .../layouts/CVmhMietverhltnis/list.json | 25 +++++++++++-- .../layouts/CVmhRumungsklage/list.json | 23 ++++++++++++ custom/scripts/check_and_rebuild.sh | 36 ++++++++++++++----- data/config.php | 4 +-- 5 files changed, 97 insertions(+), 12 deletions(-) create mode 100644 custom/Espo/Custom/Resources/layouts/CAdressen/listSmall.json create mode 100644 custom/Espo/Custom/Resources/layouts/CVmhRumungsklage/list.json diff --git a/custom/Espo/Custom/Resources/layouts/CAdressen/listSmall.json b/custom/Espo/Custom/Resources/layouts/CAdressen/listSmall.json new file mode 100644 index 00000000..2244c1f6 --- /dev/null +++ b/custom/Espo/Custom/Resources/layouts/CAdressen/listSmall.json @@ -0,0 +1,21 @@ +[ + { + "name": "name", + "link": true + }, + { + "name": "adresseStreet" + }, + { + "name": "adressePostalCode" + }, + { + "name": "adresseCity" + }, + { + "name": "adresseCountry" + }, + { + "name": "isActive" + } +] diff --git a/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/list.json b/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/list.json index 09989255..8e14e001 100644 --- a/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/list.json +++ b/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/list.json @@ -1,10 +1,31 @@ [ { "name": "name", - "link": true + "link": true, + "width": 18 }, { "name": "status", - "width": 16 + "width": 12 + }, + { + "name": "nutzungsart", + "width": 12 + }, + { + "name": "vertragsdatum", + "width": 12 + }, + { + "name": "auszugsfrist", + "width": 12 + }, + { + "name": "beendigungsTatbestand", + "width": 20 + }, + { + "name": "modifiedAt", + "width": 14 } ] \ No newline at end of file diff --git a/custom/Espo/Custom/Resources/layouts/CVmhRumungsklage/list.json b/custom/Espo/Custom/Resources/layouts/CVmhRumungsklage/list.json new file mode 100644 index 00000000..6246f54d --- /dev/null +++ b/custom/Espo/Custom/Resources/layouts/CVmhRumungsklage/list.json @@ -0,0 +1,23 @@ +[ + { + "name": "name", + "link": true, + "width": 28 + }, + { + "name": "advowareAktenzeichen", + "width": 22 + }, + { + "name": "assignedUser", + "width": 18 + }, + { + "name": "modifiedAt", + "width": 16 + }, + { + "name": "createdAt", + "width": 16 + } +] diff --git a/custom/scripts/check_and_rebuild.sh b/custom/scripts/check_and_rebuild.sh index e93db4a5..f4d362af 100755 --- a/custom/scripts/check_and_rebuild.sh +++ b/custom/scripts/check_and_rebuild.sh @@ -55,24 +55,25 @@ fi echo "" -# 2. Dateirechte prüfen +# 2. Dateirechte prüfen und korrigieren echo -e "${BLUE}[2/3] Prüfe Dateirechte...${NC}" echo "---" WRONG_OWNER=0 +FIXED_FILES=0 CUSTOM_FILES=$(find "$CUSTOM_DIR" -type f 2>/dev/null || echo "") +CUSTOM_DIRS=$(find "$CUSTOM_DIR" -type d 2>/dev/null || echo "") if [ -z "$CUSTOM_FILES" ]; then echo -e "${YELLOW}⚠ Warnung: Keine Dateien im custom/ Verzeichnis gefunden${NC}" WARNINGS=$((WARNINGS + 1)) else + # Prüfe Dateien while IFS= read -r file; do if [ -n "$file" ]; then OWNER=$(stat -c '%U:%G' "$file" 2>/dev/null || echo "unknown:unknown") if [ "$OWNER" != "www-data:www-data" ]; then - echo -e "${YELLOW}⚠ Warnung: Falsche Dateirechte für $file (Owner: $OWNER, erwartet: www-data:www-data)${NC}" WRONG_OWNER=$((WRONG_OWNER + 1)) - WARNINGS=$((WARNINGS + 1)) fi fi done <<< "$CUSTOM_FILES" @@ -81,11 +82,30 @@ else echo -e "${GREEN}✓ Alle Dateien haben korrekte Berechtigungen (www-data:www-data)${NC}" else echo -e "${YELLOW}⚠ $WRONG_OWNER Dateien mit falschen Berechtigungen gefunden${NC}" - echo "" - echo "Zum Beheben aller Berechtigungen ausführen:" - echo " sudo chown -R www-data:www-data $CUSTOM_DIR" - echo " sudo chmod -R 664 $CUSTOM_DIR/**/*.json" - echo " sudo chmod -R 775 $CUSTOM_DIR/**/*/ # Verzeichnisse" + echo -e "${BLUE}→ Korrigiere Berechtigungen automatisch...${NC}" + + # Korrigiere Owner für alle Dateien + if sudo chown -R www-data:www-data "$CUSTOM_DIR" 2>/dev/null; then + # Korrigiere Dateiberechtigungen + while IFS= read -r file; do + if [ -n "$file" ]; then + sudo chmod 664 "$file" 2>/dev/null || true + fi + done <<< "$CUSTOM_FILES" + + # Korrigiere Verzeichnisberechtigungen + while IFS= read -r dir; do + if [ -n "$dir" ]; then + sudo chmod 775 "$dir" 2>/dev/null || true + fi + done <<< "$CUSTOM_DIRS" + + FIXED_FILES=$WRONG_OWNER + echo -e "${GREEN}✓ $FIXED_FILES Dateien korrigiert${NC}" + else + echo -e "${RED}✗ Fehler: Berechtigungen konnten nicht korrigiert werden${NC}" + ERRORS=$((ERRORS + 1)) + fi fi fi diff --git a/data/config.php b/data/config.php index 90a58acb..4dde7987 100644 --- a/data/config.php +++ b/data/config.php @@ -349,8 +349,8 @@ return [ 0 => 'youtube.com', 1 => 'google.com' ], - 'cacheTimestamp' => 1768938828, - 'microtime' => 1768938828.490905, + 'cacheTimestamp' => 1768940234, + 'microtime' => 1768940234.540769, 'siteUrl' => 'https://crm.bitbylaw.com', 'fullTextSearchMinLength' => 4, 'appTimestamp' => 1768843902,