display course type on top left of slots

This commit is contained in:
imperosol
2025-09-13 00:19:18 +02:00
parent 61eef6bbca
commit 535b493b03
4 changed files with 14 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ const WEEKDAYS = [
] as const;
const SLOT_HEIGHT = 20 as const; // Each 15min has a height of 20px in the timetable
const SLOT_WIDTH = 400 as const; // Each weekday ha a width of 400px in the timetable
const SLOT_WIDTH = 250 as const; // Each weekday ha a width of 400px in the timetable
const MINUTES_PER_SLOT = 15 as const;
interface TimetableSlot {

View File

@@ -23,6 +23,13 @@
display: flex;
flex-direction: column;
justify-content: center;
.course-type {
position: absolute;
top: 0;
right: 0;
padding: 10px;
}
}
}
}

View File

@@ -9,7 +9,7 @@
{%- endblock -%}
{% block title %}
{% trans %}Timeplan generator{% endtrans %}
{% trans %}Timetable generator{% endtrans %}
{% endblock %}
{% block content %}
@@ -17,7 +17,7 @@
<form @submit.prevent="generate()">
<h1>Générateur d'emploi du temps</h1>
<div class="alert alert-red" x-show="!!error" x-cloak>
<p class="alert-main" x-text="error"></p>
<span class="alert-main" x-text="error"></span>
</div>
<div class="form-group">
<label for="timetable-input">Colle ton emploi du temps (sans l'entête)</label>
@@ -38,7 +38,8 @@
<div class="content">
<template x-for="course in courses">
<div class="slot" :style="getStyle(course)">
<span x-text="`${course.ueCode} (${course.courseType})`"></span>
<span class="course-type" x-text="course.courseType"></span>
<span x-text="course.ueCode"></span>
<span x-text="`${course.startHour} - ${course.endHour}`"></span>
<span x-text="(course.weekGroup ? `\nGroupe ${course.weekGroup}` : '')"></span>
<span x-text="course.room"></span>