✨(anct) fetch and display organization names of communes
ANCT-specific extraction of organization names for communes, front end changes to match.
This commit is contained in:
committed by
Laurent Bossavit
parent
d495ef3e19
commit
20cc173e93
@@ -9,6 +9,7 @@ export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
name?: string;
|
||||
organization?: Organization;
|
||||
abilities?: {
|
||||
mailboxes: UserAbilities;
|
||||
contacts: UserAbilities;
|
||||
@@ -16,6 +17,12 @@ export interface User {
|
||||
};
|
||||
}
|
||||
|
||||
export interface Organization {
|
||||
id: string;
|
||||
name: string;
|
||||
registration_id_list: [string];
|
||||
}
|
||||
|
||||
export type UserAbilities = {
|
||||
can_view?: boolean;
|
||||
can_create?: boolean;
|
||||
|
||||
@@ -14,7 +14,12 @@ export const AccountDropdown = () => {
|
||||
<DropButton
|
||||
button={
|
||||
<Box $flex $direction="row" $align="center">
|
||||
<Text $theme="primary">{userName}</Text>
|
||||
<Box $flex $direction="column" $align="left">
|
||||
<Text $theme="primary">{userName}</Text>
|
||||
{userData?.organization?.registration_id_list?.at(0) && (
|
||||
<Text $theme="primary">{userData?.organization?.name}</Text>
|
||||
)}
|
||||
</Box>
|
||||
<Text className="material-icons" $theme="primary" aria-hidden="true">
|
||||
arrow_drop_down
|
||||
</Text>
|
||||
|
||||
Reference in New Issue
Block a user