From 1ef2617bc7856a4e8c9affa38ecc9d9b210ade46 Mon Sep 17 00:00:00 2001 From: bsiggel Date: Tue, 20 Jan 2026 21:39:00 +0100 Subject: [PATCH] Refactor CVmhMietverhltnis and CMietobjekt layouts; add dynamic logic for fields; update cache timestamps in config; adjust permissions for check & rebuild script. --- .../i18n/de_DE/CVmhMietverhltnis.json | 6 ++- .../i18n/en_US/CVmhMietverhltnis.json | 6 ++- .../CMietobjekt/bottomPanelsDetail.json | 2 +- .../CVmhMietverhltnis/bottomPanelsDetail.json | 32 +++++----------- .../layouts/CVmhMietverhltnis/detail.json | 30 +++++++-------- .../clientDefs/CVmhMietverhltnis.json | 37 +++++++++++++++++++ .../metadata/entityDefs/CMietobjekt.json | 5 +-- .../entityDefs/CVmhMietverhltnis.json | 29 ++++++--------- custom/scripts/check_and_rebuild.sh | 0 data/config.php | 4 +- 10 files changed, 87 insertions(+), 64 deletions(-) mode change 100644 => 100755 custom/scripts/check_and_rebuild.sh diff --git a/custom/Espo/Custom/Resources/i18n/de_DE/CVmhMietverhltnis.json b/custom/Espo/Custom/Resources/i18n/de_DE/CVmhMietverhltnis.json index cc0805c4..476eb6f6 100644 --- a/custom/Espo/Custom/Resources/i18n/de_DE/CVmhMietverhltnis.json +++ b/custom/Espo/Custom/Resources/i18n/de_DE/CVmhMietverhltnis.json @@ -13,7 +13,8 @@ "contactsMietverhltnis": "Freigegebene Nutzer", "sonstigebesitzervmhmietverhltnis": "Sonstige Bewohner", "dokumentesvmhMietverhltnisse": "Dokumente", - "vmhMietobjekt2Mietverhltnis": "Mietobjekte" + "vmhMietobjekt2Mietverhltnis": "Mietobjekte", + "vmhMietobjekt": "Mietobjekt" }, "links": { "calls": "Anrufe", @@ -24,7 +25,8 @@ "contactsMietverhltnis": "Freigegebene Nutzer", "sonstigebesitzervmhmietverhltnis": "Sonstige Bewohner", "dokumentesvmhMietverhltnisse": "Dokumente", - "vmhMietobjekt2Mietverhltnis": "Mietobjekte" + "vmhMietobjekt2Mietverhltnis": "Mietobjekte", + "vmhMietobjekt": "Mietobjekt" }, "labels": { "Create CVmhMietverhltnis": "Mietverhältnis erstellen" diff --git a/custom/Espo/Custom/Resources/i18n/en_US/CVmhMietverhltnis.json b/custom/Espo/Custom/Resources/i18n/en_US/CVmhMietverhltnis.json index 38e72f80..c463664d 100644 --- a/custom/Espo/Custom/Resources/i18n/en_US/CVmhMietverhltnis.json +++ b/custom/Espo/Custom/Resources/i18n/en_US/CVmhMietverhltnis.json @@ -22,7 +22,8 @@ "vertragsdatum": "Contract Date", "objekttyp": "Property Type", "dokumentesvmhMietverhltnisse": "Documents", - "vmhMietobjekt2Mietverhltnis": "Properties" + "vmhMietobjekt2Mietverhltnis": "Properties", + "vmhMietobjekt": "Property" }, "links": { "meetings": "Meetings", @@ -34,7 +35,8 @@ "contactsMietverhltnis": "Portal Users", "sonstigebesitzervmhmietverhltnis": "Other Residents", "dokumentesvmhMietverhltnisse": "Documents", - "vmhMietobjekt2Mietverhltnis": "Properties" + "vmhMietobjekt2Mietverhltnis": "Properties", + "vmhMietobjekt": "Property" }, "labels": { "Create CVmhMietverhltnis": "Create Mietverhältnis" diff --git a/custom/Espo/Custom/Resources/layouts/CMietobjekt/bottomPanelsDetail.json b/custom/Espo/Custom/Resources/layouts/CMietobjekt/bottomPanelsDetail.json index 7ded4638..2722987c 100644 --- a/custom/Espo/Custom/Resources/layouts/CMietobjekt/bottomPanelsDetail.json +++ b/custom/Espo/Custom/Resources/layouts/CMietobjekt/bottomPanelsDetail.json @@ -19,7 +19,7 @@ "tabBreak": true, "tabLabel": "Mietverhältnisse" }, - "vmhMietverhltnises2Mietobjekt": { + "vmhMietverhltnises": { "index": 3 }, "_tabBreak_4": { diff --git a/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/bottomPanelsDetail.json b/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/bottomPanelsDetail.json index a13c736f..a329db92 100644 --- a/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/bottomPanelsDetail.json +++ b/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/bottomPanelsDetail.json @@ -8,20 +8,8 @@ "history": { "disabled": true }, - "_tabBreak_5": { - "index": 0, - "tabBreak": true, - "tabLabel": "Mietobjekt" - }, - "vmhMietobjekt2Mietverhltnis": { - "dynamicLogicVisible": null, - "style": "info", - "dynamicLogicStyled": null, - "sticked": false, - "index": 1 - }, "_tabBreak_2": { - "index": 2, + "index": 0, "tabBreak": true, "tabLabel": "Freigegebene Nutzer" }, @@ -30,38 +18,38 @@ "style": "warning", "dynamicLogicStyled": null, "sticked": true, - "index": 3 + "index": 1 }, "_tabBreak_0": { - "index": 4, + "index": 2, "tabBreak": true, "tabLabel": "Vermieter" }, "vmhbeteiligtevermieter": { - "index": 5 + "index": 3 }, "_tabBreak_1": { - "index": 6, + "index": 4, "tabBreak": true, "tabLabel": "Mieter" }, "vmhbeteiligtemieter": { - "index": 7 + "index": 5 }, "_tabBreak_3": { - "index": 8, + "index": 6, "tabBreak": true, "tabLabel": "Sonstige Bewohner" }, "sonstigebesitzervmhmietverhltnis": { - "index": 9 + "index": 7 }, "_tabBreak_4": { - "index": 10, + "index": 8, "tabBreak": true, "tabLabel": "Dokumente" }, "dokumentesvmhMietverhltnisse": { - "index": 11 + "index": 9 } } \ No newline at end of file diff --git a/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/detail.json b/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/detail.json index 49389cda..b435be8a 100644 --- a/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/detail.json +++ b/custom/Espo/Custom/Resources/layouts/CVmhMietverhltnis/detail.json @@ -6,13 +6,13 @@ "name": "name" }, { - "name": "status" - }, - { - "name": "vertragsdatum" + "name": "vmhMietobjekt" }, { "name": "nutzungsart" + }, + { + "name": "vertragsdatum" } ] ], @@ -27,6 +27,9 @@ { "rows": [ [ + { + "name": "status" + }, { "name": "beendigungsTatbestand" }, @@ -35,21 +38,18 @@ }, { "name": "auszugsfrist" - }, + } + ], + [ { "name": "besorgnisNichtRechtzeitigerAuszug" - } + }, + false, + false, + false ] ], - "dynamicLogicVisible": { - "conditionGroup": [ - { - "type": "notEquals", - "attribute": "status", - "value": "Bestehend" - } - ] - }, + "dynamicLogicVisible": null, "style": "primary", "dynamicLogicStyled": null, "tabBreak": false, diff --git a/custom/Espo/Custom/Resources/metadata/clientDefs/CVmhMietverhltnis.json b/custom/Espo/Custom/Resources/metadata/clientDefs/CVmhMietverhltnis.json index fa2ebc38..97b10c4a 100644 --- a/custom/Espo/Custom/Resources/metadata/clientDefs/CVmhMietverhltnis.json +++ b/custom/Espo/Custom/Resources/metadata/clientDefs/CVmhMietverhltnis.json @@ -63,5 +63,42 @@ "layout": null, "selectPrimaryFilterName": null } + }, + "dynamicLogic": { + "fields": { + "beendigungsTatbestand": { + "readOnly": { + "conditionGroup": [ + { + "type": "equals", + "attribute": "status", + "value": "Bestehend" + } + ] + } + }, + "kndigungsgrundWohnraum": { + "readOnly": { + "conditionGroup": [ + { + "type": "equals", + "attribute": "status", + "value": "Bestehend" + } + ] + } + }, + "auszugsfrist": { + "readOnly": { + "conditionGroup": [ + { + "type": "equals", + "attribute": "status", + "value": "Bestehend" + } + ] + } + } + } } } \ No newline at end of file diff --git a/custom/Espo/Custom/Resources/metadata/entityDefs/CMietobjekt.json b/custom/Espo/Custom/Resources/metadata/entityDefs/CMietobjekt.json index 088f0f97..f0e4b7e9 100644 --- a/custom/Espo/Custom/Resources/metadata/entityDefs/CMietobjekt.json +++ b/custom/Espo/Custom/Resources/metadata/entityDefs/CMietobjekt.json @@ -110,10 +110,9 @@ "relationName": "entityTeam", "layoutRelationshipsDisabled": true }, - "vmhMietverhltnises2Mietobjekt": { + "vmhMietverhltnises": { "type": "hasMany", - "relationName": "cMietobjektVmhMietverhltnis", - "foreign": "vmhMietobjekt2Mietverhltnis", + "foreign": "vmhMietobjekt", "entity": "CVmhMietverhltnis", "audited": false, "isCustom": true diff --git a/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhMietverhltnis.json b/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhMietverhltnis.json index 267e3047..617a9be7 100644 --- a/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhMietverhltnis.json +++ b/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhMietverhltnis.json @@ -73,7 +73,7 @@ "isCustom": true }, "kndigungsgrundWohnraum": { - "type": "enum", + "type": "multiEnum", "required": false, "options": [ "Mietrückstand", @@ -85,18 +85,7 @@ "573a Abs. 2 (Einliegerwohnung)", "GewerbeOrdentlich" ], - "style": { - "Mietrückstand": null, - "Eigenbedarf": null, - "Fehlverhalten": null, - "Verwertung": null, - "ZVG Eigenbedarf": null, - "573a Abs. 1 (nicht mehr als 2 Whng.)": null, - "573a Abs. 2 (Einliegerwohnung)": null, - "GewerbeOrdentlich": null - }, - "default": "Mietrückstand", - "maxLength": 100, + "default": ["Mietrückstand"], "isCustom": true }, "auszugsfrist": { @@ -119,12 +108,14 @@ "options": [ "Kündigung Vermieter", "Kündigung Mieter", + "Aufhebungsvertrag", "Befristung", "ZVG Zuschlagsbeschluss" ], "style": { "Kündigung Vermieter": null, "Kündigung Mieter": null, + "Aufhebungsvertrag": null, "Befristung": null, "ZVG Zuschlagsbeschluss": null }, @@ -138,6 +129,11 @@ "required": true, "before": "auszugsfrist", "isCustom": true + }, + "vmhMietobjekt": { + "type": "link", + "required": false, + "isCustom": true } }, "links": { @@ -228,10 +224,9 @@ "audited": false, "isCustom": true }, - "vmhMietobjekt2Mietverhltnis": { - "type": "hasMany", - "relationName": "cMietobjektVmhMietverhltnis", - "foreign": "vmhMietverhltnises2Mietobjekt", + "vmhMietobjekt": { + "type": "belongsTo", + "foreign": "vmhMietverhltnises", "entity": "CMietobjekt", "audited": false, "isCustom": true diff --git a/custom/scripts/check_and_rebuild.sh b/custom/scripts/check_and_rebuild.sh old mode 100644 new mode 100755 diff --git a/data/config.php b/data/config.php index 29346a8a..4bcc5d5f 100644 --- a/data/config.php +++ b/data/config.php @@ -349,8 +349,8 @@ return [ 0 => 'youtube.com', 1 => 'google.com' ], - 'cacheTimestamp' => 1768940490, - 'microtime' => 1768940490.734497, + 'cacheTimestamp' => 1768941491, + 'microtime' => 1768941491.973093, 'siteUrl' => 'https://crm.bitbylaw.com', 'fullTextSearchMinLength' => 4, 'appTimestamp' => 1768843902,