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