diff --git a/LehrerApp.Desktop/Services/WebUntisIntegrationService.cs b/LehrerApp.Desktop/Services/WebUntisIntegrationService.cs index 7d0c3e0..1ed0f5f 100644 --- a/LehrerApp.Desktop/Services/WebUntisIntegrationService.cs +++ b/LehrerApp.Desktop/Services/WebUntisIntegrationService.cs @@ -205,6 +205,13 @@ public sealed class WebUntisIntegrationService(HttpClient http, WebUntisSettings }; } + public Task GetOpenPeriodsMetaAsync(int schoolYearId, CancellationToken token = default) => + ExecuteAsync(client => client.GetOpenPeriodsMetaAsync(schoolYearId, token), token); + + public Task> GetOpenPeriodsAsync(int schoolYearId, int? teacherId, + int? classId, DateOnly start, DateOnly end, CancellationToken token = default) => + ExecuteAsync(client => client.GetOpenPeriodsAsync(schoolYearId, teacherId, classId, start, end, token), token); + private async Task ExecuteAsync(Func> operation, CancellationToken token) { try { return await operation(await GetClientAsync(token)); } diff --git a/LehrerApp.Desktop/Views/MainWindow.axaml b/LehrerApp.Desktop/Views/MainWindow.axaml index 76e9213..7a5f8ee 100644 --- a/LehrerApp.Desktop/Views/MainWindow.axaml +++ b/LehrerApp.Desktop/Views/MainWindow.axaml @@ -250,6 +250,8 @@ +