moved func to utils

This commit is contained in:
2024-09-15 16:03:10 +02:00
parent e8bd840797
commit 906403f752
3 changed files with 8 additions and 15 deletions

View File

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