Updated the User list to also show their demographic information

This commit is contained in:
Tiago Ribeiro
2023-10-12 23:13:37 +01:00
parent 320aedefb1
commit 1a255b5a4d
2 changed files with 132 additions and 81 deletions

View File

@@ -110,6 +110,10 @@ const CreatePanel = ({user, users, group, onCreate}: CreateDialogProps) => {
className="w-full max-w-[200px] self-end"
disabled={!name}
onClick={() => {
if (name !== group?.name && (name === "Students" || name === "Teachers")) {
toast.error("That group name is reserved and cannot be used, please enter another one.");
return;
}
onCreate({name: name!, admin, participants, id: group?.id || uuidv4()});
}}>
{!group ? "Create" : "Update"}