Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fix viewonly for teams addwebsite button
Francis Cao8048bc78669d
diff --git a/src/app/(main)/settings/teams/[teamId]/websites/TeamWebsitesPage.tsx b/src/app/(main)/settings/teams/[teamId]/websites/TeamWebsitesPage.tsxindex ade430146..c5092c8b7 100644--- a/src/app/(main)/settings/teams/[teamId]/websites/TeamWebsitesPage.tsx+++ b/src/app/(main)/settings/teams/[teamId]/websites/TeamWebsitesPage.tsx@@ -12,16 +12,16 @@ export function TeamWebsitesPage({ teamId }: { teamId: string }) {const { formatMessage, labels } = useMessages();const { user } = useLogin();- const canEdit = team?.teamUser?.find(- ({ userId, role }) => role !== ROLES.viewOnly && userId === user.id,+ const allowEdit = !!team?.teamUser?.find(+ ({ userId, role }) => userId === user.id && role !== ROLES.teamViewOnly,);return (<><PageHeader title={formatMessage(labels.websites)}>- {canEdit && <WebsiteAddButton teamId={teamId} />}+ {allowEdit && <WebsiteAddButton teamId={teamId} />}</PageHeader>- <TeamWebsitesDataTable teamId={teamId} allowEdit={canEdit} />+ <TeamWebsitesDataTable teamId={teamId} allowEdit={allowEdit} /></>);}diff --git a/src/app/(main)/settings/users/UsersTable.tsx b/src/app/(main)/settings/users/UsersTable.tsxindex 88effa54b..76a048091 100644--- a/src/app/(main)/settings/users/UsersTable.tsx+++ b/src/app/(main)/settings/users/UsersTable.tsx@@ -26,7 +26,7 @@ export function UsersTable({)}</GridColumn>- <GridColumn name="created" label={formatMessage(labels.created)} width={'120px'}>+ <GridColumn name="created" label={formatMessage(labels.created)} width={'150px'}>{row =>formatDistance(new Date(row.createdAt), new Date(), {addSuffix: true,