aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/react/users.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/react/users.js b/src/client/react/users.js
index 492bf60..3a10a51 100644
--- a/src/client/react/users.js
+++ b/src/client/react/users.js
@@ -33,7 +33,16 @@ users.allUsers = USERS.map(user => ({
id: getId(user),
}));
+users.allRooms = users.allUsers.filter(user => user.type === 'r');
+users.allStudents = users.allUsers.filter(user => user.type === 's');
+users.allTeachers = users.allUsers.filter(user => user.type === 't');
+users.allClasses = users.allUsers.filter(user => user.type === 'c');
+
users.allIds = users.allUsers.map(user => user.id);
+users.allRoomIds = users.allRooms.map(user => user.id);
+users.allStudentIds = users.allStudents.map(user => user.id);
+users.allTeacherIds = users.allTeachers.map(user => user.id);
+users.allClassIds = users.allClasses.map(user => user.id);
users.byId = keyBy(users.allUsers, 'id');