Stundenplan: Wochenraster, Wochennavigation, Ferien/Feiertage (Kapitel 4.3)
Neuer Stundenplan mit "Heute"-Standardansicht (Tagesliste unten angedockt, gruppenübergreifendes Wochenraster mit Fach/Klasse/Raum/Thema, Vor-/Zurück- Navigation zwischen Kalenderwochen) und separatem Bearbeiten-Raster für die wöchentliche Zuordnung. Badges für Ferien-/Klausur-Nähe und ausgegraute Ferientage direkt im Plan statt einer separaten Liste. Ferien-/Feiertage- Pflege (Bundesland, Schulferien) sitzt jetzt in den Einstellungen statt im Stundenplan selbst. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,17 @@ public class FakeResults : IExamResultRepository
|
||||
public void SaveMany(List<ExamResult> results) { }
|
||||
}
|
||||
|
||||
public class FakeGradingKeyTemplates : IGradingKeyTemplateRepository
|
||||
{
|
||||
private readonly List<GradingKeyTemplate> _all = [];
|
||||
public List<GradingKeyTemplate> GetAll() => _all;
|
||||
public List<GradingKeyTemplate> GetByGradingSystem(GradingSystem system) =>
|
||||
_all.Where(t => t.GradingSystem == system).ToList();
|
||||
public GradingKeyTemplate? GetById(Guid id) => _all.FirstOrDefault(t => t.Id == id);
|
||||
public void Save(GradingKeyTemplate template) { _all.RemoveAll(t => t.Id == template.Id); _all.Add(template); }
|
||||
public void Delete(Guid id) => _all.RemoveAll(t => t.Id == id);
|
||||
}
|
||||
|
||||
public class FakeSchemes : IGradingSchemeRepository
|
||||
{
|
||||
private readonly Dictionary<Guid, GradingScheme> _byGroup = [];
|
||||
@@ -206,6 +217,32 @@ public class FakeAlternativeLessonPaths(List<AlternativeLessonPath> all) : IAlte
|
||||
public void Delete(Guid id) => all.RemoveAll(p => p.Id == id);
|
||||
}
|
||||
|
||||
public class FakeTimetableSlots : ITimetableSlotRepository
|
||||
{
|
||||
private readonly List<TimetableSlot> _all = [];
|
||||
public void Add(TimetableSlot s) => _all.Add(s);
|
||||
public List<TimetableSlot> GetAll() => _all.ToList();
|
||||
public List<TimetableSlot> GetByGroup(Guid groupId) => _all.Where(s => s.GroupId == groupId).ToList();
|
||||
public void Save(TimetableSlot slot)
|
||||
{
|
||||
var occupied = _all.FirstOrDefault(s => s.Weekday == slot.Weekday && s.PeriodNumber == slot.PeriodNumber);
|
||||
if (occupied is not null && occupied.Id != slot.Id)
|
||||
throw new InvalidOperationException("Diese Stunde ist bereits belegt.");
|
||||
_all.RemoveAll(s => s.Id == slot.Id);
|
||||
_all.Add(slot);
|
||||
}
|
||||
public void Delete(Guid id) => _all.RemoveAll(s => s.Id == id);
|
||||
}
|
||||
|
||||
public class FakeSchoolHolidays : ISchoolHolidayRepository
|
||||
{
|
||||
private readonly List<SchoolHoliday> _all = [];
|
||||
public void Add(SchoolHoliday h) => _all.Add(h);
|
||||
public List<SchoolHoliday> GetAll() => _all.ToList();
|
||||
public void Save(SchoolHoliday holiday) { _all.RemoveAll(h => h.Id == holiday.Id); _all.Add(holiday); }
|
||||
public void Delete(Guid id) => _all.RemoveAll(h => h.Id == id);
|
||||
}
|
||||
|
||||
public class FakeReportGrades : IReportGradeRepository
|
||||
{
|
||||
private readonly List<ReportGrade> _all = [];
|
||||
|
||||
Reference in New Issue
Block a user