updated with new api

This commit is contained in:
Maciek Głowacki 2020-12-29 17:32:06 +01:00
parent bbba8618cb
commit 171cbdac11
3 changed files with 9 additions and 3 deletions

View File

@ -190,11 +190,15 @@ export const SchedulerRow = ({ groups, indexRow, rowTop, cellWidth, cellHeight }
{groupsPerDay[group.day] < 3 ? (
<TextWrapper>
<div>{`${groups[index].time}-${groups[index].endTime}`}</div>
<div>3/{groups[index].capacity}</div>
<div>
{groups[index].takenPlaces}/{groups[index].capacity}
</div>
</TextWrapper>
) : (
<TextWrapper style={{ flexDirection: 'column' }}>
<div style={{ alignSelf: 'flex-end' }}>3/{groups[index].capacity}</div>
<div style={{ alignSelf: 'flex-end' }}>
{groups[index].takenPlaces}/{groups[index].capacity}
</div>
</TextWrapper>
)}
</ClassWrap>

View File

@ -210,7 +210,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => {
setCourses(sortedCourses);
} catch (e) {
console.log(e);
}
}
};
useEffect(() => {

View File

@ -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;
}