mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
Fix teamRole showing.
This commit is contained in:
parent
f2f5517051
commit
c5dd3390d6
@ -29,7 +29,9 @@ export function TeamMembersTable({
|
||||
}
|
||||
if (key === 'role') {
|
||||
return formatMessage(
|
||||
labels[Object.keys(ROLES).find(key => ROLES[key] === row.role) || labels.unknown],
|
||||
labels[
|
||||
Object.keys(ROLES).find(key => ROLES[key] === row?.teamUser[0]?.role) || labels.unknown
|
||||
],
|
||||
);
|
||||
}
|
||||
return data[key];
|
||||
|
@ -22,8 +22,8 @@ const schema = {
|
||||
}),
|
||||
POST: yup.object().shape({
|
||||
id: yup.string().uuid().required(),
|
||||
name: yup.string().max(50).required(),
|
||||
accessCode: yup.string().max(50).required(),
|
||||
name: yup.string().max(50),
|
||||
accessCode: yup.string().max(50),
|
||||
}),
|
||||
DELETE: yup.object().shape({
|
||||
id: yup.string().uuid().required(),
|
||||
|
@ -97,7 +97,18 @@ export async function getUsers(
|
||||
}
|
||||
|
||||
export async function getUsersByTeamId(teamId: string, filter?: UserSearchFilter) {
|
||||
return getUsers({ teamId, ...filter });
|
||||
return getUsers(
|
||||
{ teamId, ...filter },
|
||||
{
|
||||
include: {
|
||||
teamUser: {
|
||||
select: {
|
||||
role: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export async function createUser(data: {
|
||||
|
Loading…
Reference in New Issue
Block a user