mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into analytics
This commit is contained in:
commit
c6f656e142
@ -12,16 +12,16 @@ export function TeamWebsitesPage({ teamId }: { teamId: string }) {
|
|||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const { user } = useLogin();
|
const { user } = useLogin();
|
||||||
|
|
||||||
const canEdit = team?.teamUser?.find(
|
const allowEdit = !!team?.teamUser?.find(
|
||||||
({ userId, role }) => role !== ROLES.viewOnly && userId === user.id,
|
({ userId, role }) => userId === user.id && role !== ROLES.teamViewOnly,
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHeader title={formatMessage(labels.websites)}>
|
<PageHeader title={formatMessage(labels.websites)}>
|
||||||
{canEdit && <WebsiteAddButton teamId={teamId} />}
|
{allowEdit && <WebsiteAddButton teamId={teamId} />}
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<TeamWebsitesDataTable teamId={teamId} allowEdit={canEdit} />
|
<TeamWebsitesDataTable teamId={teamId} allowEdit={allowEdit} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ export function UsersTable({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
<GridColumn name="created" label={formatMessage(labels.created)} width={'120px'}>
|
<GridColumn name="created" label={formatMessage(labels.created)} width={'150px'}>
|
||||||
{row =>
|
{row =>
|
||||||
formatDistance(new Date(row.createdAt), new Date(), {
|
formatDistance(new Date(row.createdAt), new Date(), {
|
||||||
addSuffix: true,
|
addSuffix: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user