Merge pull request #54 from valueonag/feat/demo-system-readieness

fix critical trustee db sync
This commit is contained in:
Patrick Motsch 2026-04-21 10:46:22 +02:00 committed by GitHub
commit ebaaef7b4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<string | null>(null);
const [expandedRoleId, setExpandedRoleId] = useState<string | null>(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