Arbeitszeit: Aufgabenverwaltung (Kapitel 6.1)

Navigationspunkt "Arbeitszeit" zeigt jetzt eine echte Aufgabenliste statt eines
Placeholders: Filter nach Status/Kategorie/Gruppe (Standard blendet Erledigtes aus),
Sortierung nach Fälligkeit, Anlegen/Bearbeiten-Dialog, Status per Klick durchschalten.
This commit is contained in:
2026-08-15 22:33:40 +02:00
parent 0800832ae5
commit 5c0b6854f5
11 changed files with 692 additions and 6 deletions
@@ -0,0 +1,31 @@
using Avalonia.Controls;
using LehrerApp.Core.Interfaces;
using LehrerApp.Core.Models;
using LehrerApp.Desktop.ViewModels.Workload;
using Microsoft.Extensions.DependencyInjection;
namespace LehrerApp.Desktop.Views.Workload;
public partial class WorkTaskListView : UserControl
{
public WorkTaskListView() => InitializeComponent();
protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);
if (DataContext is WorkTaskListViewModel vm)
vm.OnEditTask = ShowEditDialog;
}
private async Task<WorkTask?> ShowEditDialog(WorkTask? source)
{
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return null;
var groups = App.Services.GetRequiredService<IGroupRepository>().GetAll(includeInactive: true);
var vm = new AddEditWorkTaskDialogViewModel(source, groups);
var dialog = new AddEditWorkTaskDialog { DataContext = vm };
await dialog.ShowDialog<bool>(owner);
return vm.Result;
}
}