updated with new api
This commit is contained in:
parent
bbba8618cb
commit
171cbdac11
@ -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>
|
||||||
|
@ -210,7 +210,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => {
|
|||||||
setCourses(sortedCourses);
|
setCourses(sortedCourses);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user