fix critical trustee db sync
This commit is contained in:
parent
1c4233c7ea
commit
d771d4bc09
1 changed files with 8 additions and 3 deletions
|
|
@ -20,7 +20,10 @@ import { useLanguage } from '../../../providers/language/LanguageContext';
|
||||||
interface InstanceRole {
|
interface InstanceRole {
|
||||||
id: string;
|
id: string;
|
||||||
roleLabel: 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;
|
featureCode: string;
|
||||||
mandateId: string;
|
mandateId: string;
|
||||||
featureInstanceId: string;
|
featureInstanceId: string;
|
||||||
|
|
@ -36,8 +39,10 @@ export const TrusteeInstanceRolesView: React.FC = () => {
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
const [expandedRoleId, setExpandedRoleId] = useState<string | null>(null);
|
const [expandedRoleId, setExpandedRoleId] = useState<string | null>(null);
|
||||||
|
|
||||||
const getTextValue = (value: string | undefined): string => {
|
const getTextValue = (value: InstanceRole['description']): string => {
|
||||||
return value || '';
|
if (!value) return '';
|
||||||
|
if (typeof value === 'string') return value;
|
||||||
|
return value.xx || Object.values(value).find(v => typeof v === 'string') || '';
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load instance roles
|
// Load instance roles
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue