diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index e7b9230d..b0ca5e14 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -126,9 +126,6 @@ function App() { {user?.firstName} {user?.lastName}

- -

{user?.role.name}

-

{user?.email}

diff --git a/frontend/src/fixtures/user.ts b/frontend/src/fixtures/user.ts index 43dcf67d..b3337f0f 100644 --- a/frontend/src/fixtures/user.ts +++ b/frontend/src/fixtures/user.ts @@ -2,11 +2,9 @@ import { Role, User } from "../lib/api/auth"; import { createArrayFactory, createObjectFactory } from "./factory"; const FIXTURE_ROLE = { - name: "Test Role", canStartDestruction: false, canReviewDestruction: false, canReviewFinalList: false, - canViewCaseDetails: true, }; export const roleFactory = createObjectFactory(FIXTURE_ROLE); @@ -26,11 +24,9 @@ const FIXTURE_RECORD_MANAGER: User = { lastName: "Manager", email: "recordmanager@example.com", role: { - name: "recordmanager", canStartDestruction: true, canReviewDestruction: false, canReviewFinalList: false, - canViewCaseDetails: false, }, }; @@ -41,11 +37,9 @@ const FIXTURE_BEOORDELAAR: User = { lastName: "del Laar", email: "beoordelaar@example.com", role: { - name: "beoordelaar", canStartDestruction: false, canReviewDestruction: true, canReviewFinalList: false, - canViewCaseDetails: false, }, }; @@ -56,11 +50,9 @@ const FIXTURE_PROCES_EIGENAAR: User = { lastName: "ei Genaar", email: "proceseigenaar@example.com", role: { - name: "proceseigenaar", canStartDestruction: false, canReviewDestruction: true, canReviewFinalList: false, - canViewCaseDetails: false, }, }; diff --git a/frontend/src/lib/api/auth.ts b/frontend/src/lib/api/auth.ts index 85d11d36..86d37a79 100644 --- a/frontend/src/lib/api/auth.ts +++ b/frontend/src/lib/api/auth.ts @@ -11,11 +11,9 @@ export type User = { }; export type Role = { - name: string; canStartDestruction: boolean; canReviewDestruction: boolean; canReviewFinalList: boolean; - canViewCaseDetails: boolean; }; /** diff --git a/frontend/src/lib/format/user.ts b/frontend/src/lib/format/user.ts index f294f044..04ecede8 100644 --- a/frontend/src/lib/format/user.ts +++ b/frontend/src/lib/format/user.ts @@ -6,10 +6,7 @@ import { User } from "../api/auth"; * @param showUsername * @param showRole */ -export function formatUser( - user: User, - { showUsername = true, showRole = false } = {}, -) { +export function formatUser(user: User, { showUsername = true } = {}) { if (!user) { return ""; } diff --git a/frontend/src/pages/destructionlist/create/DestructionListCreate.stories.tsx b/frontend/src/pages/destructionlist/create/DestructionListCreate.stories.tsx index ac42d7be..e74e01d6 100644 --- a/frontend/src/pages/destructionlist/create/DestructionListCreate.stories.tsx +++ b/frontend/src/pages/destructionlist/create/DestructionListCreate.stories.tsx @@ -57,11 +57,9 @@ const meta: Meta = { lastName: "Doe", email: "aaa@aaa.aaa", role: { - name: "Admin", canStartDestruction: true, canReviewDestruction: true, canReviewFinalList: false, - canViewCaseDetails: true, }, }, }, diff --git a/frontend/src/pages/destructionlist/detail/components/DestructionListToolbar/DestructionListToolbar.tsx b/frontend/src/pages/destructionlist/detail/components/DestructionListToolbar/DestructionListToolbar.tsx index b49a5172..681c3bba 100644 --- a/frontend/src/pages/destructionlist/detail/components/DestructionListToolbar/DestructionListToolbar.tsx +++ b/frontend/src/pages/destructionlist/detail/components/DestructionListToolbar/DestructionListToolbar.tsx @@ -95,8 +95,7 @@ export function DestructionListToolbar({ title }: DestructionListToolbarProps) { diff --git a/frontend/src/pages/landing/Landing.tsx b/frontend/src/pages/landing/Landing.tsx index 945b6c7d..276008ae 100644 --- a/frontend/src/pages/landing/Landing.tsx +++ b/frontend/src/pages/landing/Landing.tsx @@ -166,7 +166,6 @@ export const Landing = () => {   {formatUser(currentAssignee, { showUsername: false, - showRole: false, })} {otherAssignees.length && ( @@ -186,9 +185,7 @@ export const Landing = () => { timeAgo: timeAgo(list.created), assignees: otherAssignees.length ? ( formatUser(a.user, { showRole: true })) - .join(", ")} + content={otherAssignees.map((a) => formatUser(a.user)).join(", ")} placement="bottom" > {footer}