try get student name even better

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-12-12 11:44:35 +03:00
parent 0aebb87210
commit c4ffbfe4d1
3 changed files with 1908 additions and 598 deletions

View File

@ -24,12 +24,13 @@ export const Attendance = () => {
attendance.forEach((lesson) => {
lesson.students.forEach((student) => {
const current = studentsMap.get(student.sub) || {}
studentsMap.set(student.sub, {
...student,
value:
student.family_name && student.given_name
value: current || (student.family_name && student.given_name
? `${student.family_name} ${student.given_name}`
: student.name || student.email || student.preferred_username || student.family_name || student.given_name,
: student.name || student.email || student.preferred_username || student.family_name || student.given_name),
})
})
})

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff