diff --git a/src/components/SchedulerRow.tsx b/src/components/SchedulerRow.tsx index a0ad042..a007620 100644 --- a/src/components/SchedulerRow.tsx +++ b/src/components/SchedulerRow.tsx @@ -190,11 +190,15 @@ export const SchedulerRow = ({ groups, indexRow, rowTop, cellWidth, cellHeight } {groupsPerDay[group.day] < 3 ? ( {`${groups[index].time}-${groups[index].endTime}`} - 3/{groups[index].capacity} + + {groups[index].takenPlaces}/{groups[index].capacity} + ) : ( - 3/{groups[index].capacity} + + {groups[index].takenPlaces}/{groups[index].capacity} + )} diff --git a/src/contexts/CoursesProvider.tsx b/src/contexts/CoursesProvider.tsx index c7c9e91..6962fb7 100644 --- a/src/contexts/CoursesProvider.tsx +++ b/src/contexts/CoursesProvider.tsx @@ -210,7 +210,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => { setCourses(sortedCourses); } catch (e) { console.log(e); - } + } }; useEffect(() => { diff --git a/src/types/index.ts b/src/types/index.ts index a6d8ade..fcf3b7c 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -19,6 +19,7 @@ export interface Group { room: string; type: GroupType; capacity?: number; + takenPlaces: number; } export interface Course { @@ -50,5 +51,6 @@ export interface SchedulerEvent { room: string; type: GroupType; capacity?: number; + takenPlaces: number; name: string; }