Skip to content

Commit

Permalink
feat: add statusText so custom status can be displayed instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Oct 1, 2024
1 parent d817399 commit e5b91ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/services/pronote/timetable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const decodeTimetableClass = (c: pronote.TimetableClassLesson | pronote.Timetabl
room: c.classrooms.join(", ") || void 0,
teacher: c.teacherNames?.join(", ") ?? void 0,
status: c.status === "Cours annulé" || c.status === "Prof. absent" || c.status === "Classe absente" || c.status === "Prof./pers. absent" || c.status === "Sortie pédagogique" ? TimetableClassStatus.CANCELED : void 0,
statusText: c.status,
...base
} satisfies TimetableClass;
}
Expand Down
1 change: 1 addition & 0 deletions src/services/shared/Timetable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface TimetableClass {
teacher?: string
backgroundColor?: string,
status?: TimetableClassStatus,
statusText?: string,
source?: string
}

Expand Down

0 comments on commit e5b91ec

Please sign in to comment.