lehrer default filter fix

This commit is contained in:
2024-09-18 10:53:23 +02:00
parent 2e0455e098
commit a1e83a19b0

View File

@@ -2,5 +2,6 @@ export const getDefaultFilter = (userInformation) => {
if (!userInformation) return null; if (!userInformation) return null;
let type = userInformation.usertype == 'pupil' ? 'class' : 'teacher'; let type = userInformation.usertype == 'pupil' ? 'class' : 'teacher';
let value = userInformation.usertype == 'pupil' ? userInformation.classid : userInformation.id; let value = userInformation.usertype == 'pupil' ? userInformation.classid : userInformation.id;
return { type: type, value: value, group: String(userInformation.group) }; let group = userInformation.usertype == 'pupil' ? String(userInformation.group) : '1';
return { type: type, value: value, group: group };
}; };