Unterrichtsplanung: Serienerzeugung, Stundenraster, Aufsichten & Vertretung (Kapitel 4.2/4.3 Nachtrag)
Stunden serienweise aus dem Stundenplan erzeugen (4.2.5); Stundenraster (Uhrzeiten je Stunde) in den Einstellungen mit Zeitbedarf-Rückmeldung im Verlaufsplan-Editor; wiederkehrende Pausenaufsicht; neuer "Vertretung eintragen"-Dialog für einmalige Vertretungsaufsicht, Vertretungsstunde, Sondereinsätze (Ausflüge, Berufsmessen) und schlichten Stundenausfall. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -410,6 +410,30 @@ public class SchoolHolidayRepository(LiteDbContext db) : ISchoolHolidayRepositor
|
||||
public void Delete(Guid id) => db.SchoolHolidays.Delete(id);
|
||||
}
|
||||
|
||||
public class SupervisionDutyRepository(LiteDbContext db) : ISupervisionDutyRepository
|
||||
{
|
||||
public List<SupervisionDuty> GetAll() =>
|
||||
db.SupervisionDuties.FindAll().OrderBy(d => d.Weekday).ThenBy(d => d.AfterPeriod).ToList();
|
||||
public void Save(SupervisionDuty duty)
|
||||
{
|
||||
var occupied = db.SupervisionDuties.FindAll()
|
||||
.FirstOrDefault(d => d.Weekday == duty.Weekday && d.AfterPeriod == duty.AfterPeriod);
|
||||
if (occupied is not null && occupied.Id != duty.Id)
|
||||
throw new InvalidOperationException("Für diese Pause ist bereits eine Aufsicht eingetragen.");
|
||||
db.SupervisionDuties.Upsert(duty);
|
||||
}
|
||||
public void Delete(Guid id) => db.SupervisionDuties.Delete(id);
|
||||
}
|
||||
|
||||
public class SubstitutionEntryRepository(LiteDbContext db) : ISubstitutionEntryRepository
|
||||
{
|
||||
public List<SubstitutionEntry> GetAll() => db.SubstitutionEntries.FindAll().OrderBy(e => e.Date).ToList();
|
||||
public List<SubstitutionEntry> GetByDate(DateOnly date) =>
|
||||
db.SubstitutionEntries.Find(e => e.Date == date).ToList();
|
||||
public void Save(SubstitutionEntry entry) => db.SubstitutionEntries.Upsert(entry);
|
||||
public void Delete(Guid id) => db.SubstitutionEntries.Delete(id);
|
||||
}
|
||||
|
||||
public class CompetencyDomainRepository(LiteDbContext db) : ICompetencyDomainRepository
|
||||
{
|
||||
public List<CompetencyDomain> GetBySubjectAndGrade(Guid subjectId, int gradeLevel) =>
|
||||
|
||||
Reference in New Issue
Block a user