Created a student performance page

This commit is contained in:
Tiago Ribeiro
2024-08-19 16:41:35 +01:00
parent 229275aaee
commit df1c0bad4d
9 changed files with 488 additions and 54 deletions

View File

@@ -154,7 +154,13 @@ const CreatePanel = ({user, users, group, onClose}: CreateDialogProps) => {
label: `${users.find((y) => y.id === x)?.email} - ${users.find((y) => y.id === x)?.name}`,
}))}
options={users
.filter((x) => (user.type === "teacher" ? x.type === "student" : x.type === "student" || x.type === "teacher"))
.filter((x) =>
user.type === "teacher"
? x.type === "student"
: user.type === "corporate"
? x.type === "student" || x.type === "teacher"
: x.type === "student" || x.type === "teacher" || x.type === "corporate",
)
.map((x) => ({value: x.id, label: `${x.email} - ${x.name}`}))}
onChange={(value) => setParticipants(value.map((x) => x.value))}
isMulti

View File

@@ -27,7 +27,7 @@ export default function Lists({user}: {user: User}) {
}>
User List
</Tab>
{checkAccess(user, ["developer"]) && (
{checkAccess(user, ["developer", "admin", "corporate", "mastercorporate", "teacher"]) && (
<Tab
className={({selected}) =>
clsx(