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 ? ( {groupsPerDay[group.day] < 3 ? (
<TextWrapper> <TextWrapper>
<div>{`${groups[index].time}-${groups[index].endTime}`}</div> <div>{`${groups[index].time}-${groups[index].endTime}`}</div>
<div>3/{groups[index].capacity}</div> <div>
{groups[index].takenPlaces}/{groups[index].capacity}
</div>
</TextWrapper> </TextWrapper>
) : ( ) : (
<TextWrapper style={{ flexDirection: 'column' }}> <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> </TextWrapper>
)} )}
</ClassWrap> </ClassWrap>

View File

@ -19,6 +19,7 @@ export interface Group {
room: string; room: string;
type: GroupType; type: GroupType;
capacity?: number; capacity?: number;
takenPlaces: number;
} }
export interface Course { export interface Course {
@ -50,5 +51,6 @@ export interface SchedulerEvent {
room: string; room: string;
type: GroupType; type: GroupType;
capacity?: number; capacity?: number;
takenPlaces: number;
name: string; name: string;
} }