mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
Added owner column to teams table.
This commit is contained in:
parent
e5b57f63cd
commit
22aeaf7166
1
assets/add-user.svg
Normal file
1
assets/add-user.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Layer_2" height="512" viewBox="0 0 30 30" width="512" xmlns="http://www.w3.org/2000/svg" data-name="Layer 2"><g fill="rgb(0,0,0)"><path d="m15 14a5.5 5.5 0 1 1 5.5-5.5 5.51 5.51 0 0 1 -5.5 5.5zm0-9a3.5 3.5 0 1 0 3.5 3.5 3.5 3.5 0 0 0 -3.5-3.5z"/><path d="m7.5 24.5a1 1 0 0 1 -1-1 8.5 8.5 0 0 1 13.6-6.8 1 1 0 1 1 -1.2 1.6 6.44 6.44 0 0 0 -3.9-1.3 6.51 6.51 0 0 0 -6.5 6.5 1 1 0 0 1 -1 1z"/><path d="m23 27a1 1 0 0 1 -1-1v-6a1 1 0 0 1 2 0v6a1 1 0 0 1 -1 1z"/><path d="m26 24h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2z"/></g></svg>
|
After Width: | Height: | Size: 529 B |
@ -42,7 +42,7 @@ export default function TeamsTable({ data = [] }) {
|
||||
|
||||
const rowData = {
|
||||
...row,
|
||||
owner: row.teamUsers.find(({ role }) => role === ROLES.teamOwner)?.user?.username,
|
||||
owner: row.teamUser.find(({ role }) => role === ROLES.teamOwner)?.user?.username,
|
||||
action: (
|
||||
<Flexbox flex={1} justifyContent="end">
|
||||
<Link href={`/settings/teams/${id}`}>
|
||||
|
@ -49,14 +49,14 @@ export async function getUsers(): Promise<User[]> {
|
||||
export async function getUserTeams(userId: string): Promise<Team[]> {
|
||||
return prisma.client.team.findMany({
|
||||
where: {
|
||||
teamUsers: {
|
||||
teamUser: {
|
||||
some: {
|
||||
userId,
|
||||
},
|
||||
},
|
||||
},
|
||||
include: {
|
||||
teamUsers: {
|
||||
teamUser: {
|
||||
include: {
|
||||
user: true,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user