feat: Pädagogische Klassen-Aufgaben, Prioritäten/Checklisten, Dashboard-Schnellzugriffe
Neue Aufgabenart über bestehende Felder (WorkTask.Kind=Reminder + GroupId) statt Vererbung, mit Priorität (TaskPriority) und optionaler Abhak-Liste (ChecklistItems, wahlweise Kurs- Roster oder Freitext). Kurs-Dashboard zeigt jetzt eine "Anstehende Aufgaben"-Karte samt direktem Anlege-Button; derselbe Anlege-Einstieg wurde auch ins Hauptdashboard und (als Schnellüberblick samt fehlender Übersicht/Mitarbeit-Buttons) in die Gruppenliste gezogen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -103,18 +103,26 @@
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
CornerRadius="8" Padding="16">
|
||||
<StackPanel>
|
||||
<TextBlock Text="OFFENE AUFGABEN" FontSize="11" FontWeight="Bold"
|
||||
Opacity="0.5" Margin="0,0,0,10"/>
|
||||
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,0,0,10">
|
||||
<TextBlock Grid.Column="0" Text="OFFENE AUFGABEN" FontSize="11" FontWeight="Bold"
|
||||
Opacity="0.5" VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="1" Content="🔔+" FontSize="12" Padding="7,2" Margin="0,0,4,0"
|
||||
ToolTip.Tip="Erinnerung anlegen" Command="{Binding AddReminderCommand}"/>
|
||||
<Button Grid.Column="2" Content="+" FontSize="12" Padding="8,2"
|
||||
ToolTip.Tip="Aufgabe anlegen" Command="{Binding AddTaskCommand}"/>
|
||||
</Grid>
|
||||
<ItemsControl ItemsSource="{Binding OpenTasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:TaskItem">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto" Margin="0,3">
|
||||
<TextBlock Grid.Column="0" Text="🔔" FontSize="12" Margin="0,0,4,0"
|
||||
<Grid ColumnDefinitions="4,Auto,*,Auto" Margin="0,3">
|
||||
<Border Grid.Column="0" Background="#D32F2F" CornerRadius="2" Margin="0,0,6,0"
|
||||
IsVisible="{Binding IsHighPriority}" ToolTip.Tip="Hohe Priorität"/>
|
||||
<TextBlock Grid.Column="1" Text="🔔" FontSize="12" Margin="0,0,4,0"
|
||||
IsVisible="{Binding IsReminder}"
|
||||
ToolTip.Tip="Erinnerung — kein Zeitbezug"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Title}"
|
||||
<TextBlock Grid.Column="2" Text="{Binding Title}"
|
||||
FontSize="13" TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding DueDate}"
|
||||
<TextBlock Grid.Column="3" Text="{Binding DueDate}"
|
||||
FontSize="12" Opacity="0.6" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
using Avalonia.Controls;
|
||||
using LehrerApp.Core.Models;
|
||||
using LehrerApp.Desktop.ViewModels;
|
||||
using LehrerApp.Desktop.Views.Workload;
|
||||
|
||||
namespace LehrerApp.Desktop.Views.Dashboard;
|
||||
public partial class DashboardView : UserControl { public DashboardView() => InitializeComponent(); }
|
||||
|
||||
public partial class DashboardView : UserControl
|
||||
{
|
||||
public DashboardView() => InitializeComponent();
|
||||
|
||||
protected override void OnDataContextChanged(EventArgs e)
|
||||
{
|
||||
base.OnDataContextChanged(e);
|
||||
if (DataContext is DashboardViewModel vm)
|
||||
vm.OnAddTask = ShowAddTaskDialog;
|
||||
}
|
||||
|
||||
private async Task<WorkTask?> ShowAddTaskDialog(bool startAsReminder)
|
||||
{
|
||||
var owner = TopLevel.GetTopLevel(this) as Window;
|
||||
if (owner is null) return null;
|
||||
return await WorkTaskDialogHelper.ShowDialog(owner, startAsReminder: startAsReminder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user