From d771d4bc0977caf04317eecf02fb4a17690083fb Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Tue, 21 Apr 2026 10:45:11 +0200
Subject: [PATCH] fix critical trustee db sync
---
src/pages/views/trustee/TrusteeInstanceRolesView.tsx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/pages/views/trustee/TrusteeInstanceRolesView.tsx b/src/pages/views/trustee/TrusteeInstanceRolesView.tsx
index c89fb65..529d5b1 100644
--- a/src/pages/views/trustee/TrusteeInstanceRolesView.tsx
+++ b/src/pages/views/trustee/TrusteeInstanceRolesView.tsx
@@ -20,7 +20,10 @@ import { useLanguage } from '../../../providers/language/LanguageContext';
interface InstanceRole {
id: string;
roleLabel: string;
- description?: string;
+ // Backend resolves TextMultilingual to a plain string via resolveText().
+ // We accept the raw object as a defensive fallback so a missing resolver
+ // upstream cannot blank-screen the page (would render an object child).
+ description?: string | { xx?: string; [lang: string]: string | undefined };
featureCode: string;
mandateId: string;
featureInstanceId: string;
@@ -36,8 +39,10 @@ export const TrusteeInstanceRolesView: React.FC = () => {
const [error, setError] = useState(null);
const [expandedRoleId, setExpandedRoleId] = useState(null);
- const getTextValue = (value: string | undefined): string => {
- return value || '';
+ const getTextValue = (value: InstanceRole['description']): string => {
+ if (!value) return '';
+ if (typeof value === 'string') return value;
+ return value.xx || Object.values(value).find(v => typeof v === 'string') || '';
};
// Load instance roles