Skip to content

Commit 7ec900a

Browse files
Merge pull request #68 from AlessGarau/develop
FIX overflow in class slot and add class name
2 parents 39b0d7e + 5e31a21 commit 7ec900a

File tree

6 files changed

+6
-1
lines changed

6 files changed

+6
-1
lines changed

packages/client/src/components/Planning/PlannedClassSlot/PlannedClassSlot.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const PlannedClassSlot: React.FC<PlannedClassSlotProps> = ({ plannedClass, isEmp
7171
X
7272
</button>
7373
<div className="font-semibold text-sm text-slotFilled">{plannedClass.title}</div>
74+
<div className="text-xs font-medium text-slotFilled">{plannedClass.className}</div>
7475
<div className="text-xs text-slotFilled">{plannedClass.teacher}</div>
7576
<div className="text-xs text-slotFilled">
7677
{plannedClass.startTime} - {plannedClass.endTime}

packages/client/src/components/Planning/PlanningContainer/PlanningContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const PlanningContainer: React.FC<PlanningContainerProps> = ({
114114
const timeSlots = getTimeSlotsForDay(plannedClasses);
115115
return (
116116
<td key={day.day} className={`flex-1 h-96`}>
117-
<div className="flex flex-col gap-2 h-full">
117+
<div className="flex flex-col gap-2 h-full overflow-y-auto">
118118
{timeSlots.map((slot, index) => (
119119
<PlannedClassSlot
120120
key={slot.plannedClass ? `${classroom.id}-${day.day}-${slot.plannedClass.id}` : `${classroom.id}-${day.day}-empty-${index}`}

packages/client/src/types/Planning.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export interface PlannedClass {
22
id: string;
33
title: string;
4+
className: string;
45
teacher: string;
56
startTime: string;
67
endTime: string;

packages/server/src/feature/lesson/Mapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export class LessonMapper {
1111
return {
1212
id: lesson.id,
1313
title: lesson.title,
14+
className: lesson.class?.name || "",
1415
teacher: teacher ? `${teacher.first_name} ${teacher.last_name}` : "TBD",
1516
startTime: this.formatTime(lesson.start_time),
1617
endTime: this.formatTime(lesson.end_time),

packages/server/src/feature/lesson/validate.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const UpdateLessonBodySchema = z.object({
1616
export const PlannedLessonSchema = z.object({
1717
id: z.string().uuid(),
1818
title: z.string(),
19+
className: z.string(),
1920
teacher: z.string(),
2021
startTime: z.string(),
2122
endTime: z.string(),

packages/server/src/feature/planning/Mapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class PlanningMapper implements IPlanningMapper {
4545
return {
4646
id: lesson.id,
4747
title: lesson.title,
48+
className: lesson.class?.name || "",
4849
teacher: teacher ? `${teacher.first_name} ${teacher.last_name}` : "TBD",
4950
startTime: this.formatTime(lesson.start_time),
5051
endTime: this.formatTime(lesson.end_time),

0 commit comments

Comments
 (0)