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>
210 lines
11 KiB
XML
210 lines
11 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
||
xmlns:vmRoot="clr-namespace:LehrerApp.Desktop.ViewModels"
|
||
x:Class="LehrerApp.Desktop.Views.Groups.GroupOverviewTabView"
|
||
x:DataType="vm:GroupOverviewViewModel">
|
||
|
||
<UserControl.Styles>
|
||
<Style Selector="Border.card">
|
||
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
|
||
<Setter Property="CornerRadius" Value="8"/>
|
||
<Setter Property="Padding" Value="16"/>
|
||
<Setter Property="Margin" Value="0,0,12,12"/>
|
||
<Setter Property="MinWidth" Value="260"/>
|
||
<Setter Property="MaxWidth" Value="340"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.cardTitle">
|
||
<Setter Property="FontSize" Value="11"/>
|
||
<Setter Property="FontWeight" Value="Bold"/>
|
||
<Setter Property="Opacity" Value="0.5"/>
|
||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.cardBody.stale">
|
||
<Setter Property="Foreground" Value="#D97706"/>
|
||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.overdue">
|
||
<Setter Property="Foreground" Value="Red"/>
|
||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||
</Style>
|
||
<Style Selector="Button.cardLink">
|
||
<Setter Property="FontSize" Value="11"/>
|
||
<Setter Property="Padding" Value="0"/>
|
||
<Setter Property="Background" Value="Transparent"/>
|
||
<Setter Property="BorderThickness" Value="0"/>
|
||
<Setter Property="Margin" Value="0,10,0,0"/>
|
||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||
</Style>
|
||
</UserControl.Styles>
|
||
|
||
<ScrollViewer Padding="20">
|
||
<StackPanel Spacing="0">
|
||
<WrapPanel>
|
||
|
||
<!-- Nächste Stunde -->
|
||
<Border Classes="card">
|
||
<StackPanel>
|
||
<TextBlock Text="NÄCHSTE STUNDE" Classes="cardTitle"/>
|
||
<TextBlock Text="{Binding NextLessonLabel}" TextWrapping="Wrap" Classes="cardBody"
|
||
IsVisible="{Binding HasNextLesson}"/>
|
||
<TextBlock Text="Keine geplante Stunde in Sicht." Classes="emptyhint"
|
||
IsVisible="{Binding !HasNextLesson}"/>
|
||
<Button Content="Zur Planung ›" Classes="cardLink" Command="{Binding NavigateToPlanningCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Nächste Klausur -->
|
||
<Border Classes="card">
|
||
<StackPanel>
|
||
<TextBlock Text="NÄCHSTE KLAUSUR" Classes="cardTitle"/>
|
||
<TextBlock Text="{Binding NextExamLabel}" TextWrapping="Wrap" Classes="cardBody"
|
||
IsVisible="{Binding HasNextExam}"/>
|
||
<TextBlock Text="Keine Klausur geplant." Classes="emptyhint"
|
||
IsVisible="{Binding !HasNextExam}"/>
|
||
<Button Content="Zu den Klausuren ›" Classes="cardLink" Command="{Binding NavigateToExamsCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Mitarbeit -->
|
||
<Border Classes="card">
|
||
<StackPanel>
|
||
<TextBlock Text="MITARBEIT" Classes="cardTitle"/>
|
||
<TextBlock Text="{Binding ParticipationHintLabel}" TextWrapping="Wrap"
|
||
Classes="cardBody" Classes.stale="{Binding ParticipationHintIsStale}"/>
|
||
<Button Content="Zur Mitarbeit ›" Classes="cardLink" Command="{Binding NavigateToParticipationCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Offene Hausaufgaben-Kontrolle -->
|
||
<Border Classes="card" IsVisible="{Binding HasOpenHomeworkCheck}">
|
||
<StackPanel>
|
||
<TextBlock Text="OFFENE HAUSAUFGABEN-KONTROLLE" Classes="cardTitle"/>
|
||
<TextBlock Text="{Binding OpenHomeworkCheckLabel}" TextWrapping="Wrap" Classes="cardBody stale"/>
|
||
<Button Content="Zur Planung ›" Classes="cardLink" Command="{Binding NavigateToPlanningCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Offene Dokumentationen -->
|
||
<Border Classes="card" IsVisible="{Binding !!DraftDocumentationCount}">
|
||
<StackPanel>
|
||
<TextBlock Text="OFFENE DOKUMENTATIONEN" Classes="cardTitle"/>
|
||
<TextBlock TextWrapping="Wrap" Classes="cardBody">
|
||
<Run Text="{Binding DraftDocumentationCount}"/>
|
||
<Run Text=" Entwurf/Entwürfe noch nicht ausformuliert."/>
|
||
</TextBlock>
|
||
<Button Content="Zur Dokumentation ›" Classes="cardLink" Command="{Binding NavigateToDocumentationCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
</WrapPanel>
|
||
|
||
<WrapPanel>
|
||
<!-- Offene Entschuldigungen -->
|
||
<Border Classes="card" MinWidth="340" MaxWidth="420"
|
||
IsVisible="{Binding HasOpenExcuses}">
|
||
<StackPanel>
|
||
<TextBlock Text="OFFENE ENTSCHULDIGUNGEN" Classes="cardTitle"/>
|
||
<ItemsControl ItemsSource="{Binding OpenExcuses}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vmRoot:OpenExcuseItem">
|
||
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,4">
|
||
<StackPanel Grid.Column="0">
|
||
<TextBlock Text="{Binding StudentName}" FontSize="13" FontWeight="SemiBold"
|
||
TextTrimming="CharacterEllipsis"/>
|
||
<TextBlock Text="{Binding DateDisplay}" FontSize="11" Opacity="0.6"/>
|
||
</StackPanel>
|
||
<Button Grid.Column="1" Content="Entschuldigt" FontSize="11" Padding="7,3"
|
||
Command="{Binding MarkExcusedCommand}" Margin="0,0,4,0"/>
|
||
<Button Grid.Column="2" Content="Unentschuldigt" FontSize="11" Padding="7,3"
|
||
Command="{Binding MarkUnexcusedCommand}"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Auffällige Fehlzeiten: bewusst zurückhaltender formuliert/gestylt als die
|
||
Fehlzeiten-Warnung im Hauptdashboard, siehe GroupOverviewViewModel.AttendanceMinSampleSize. -->
|
||
<Border Classes="card" MinWidth="340" MaxWidth="420"
|
||
IsVisible="{Binding HasAttendanceNotices}">
|
||
<StackPanel>
|
||
<TextBlock Text="AUFFÄLLIGE FEHLZEITEN" Classes="cardTitle"/>
|
||
<ItemsControl ItemsSource="{Binding AttendanceNotices}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vmRoot:AttendanceWarningItem">
|
||
<Grid ColumnDefinitions="*,Auto" Margin="0,4">
|
||
<TextBlock Grid.Column="0" Text="{Binding StudentName}" FontSize="13"
|
||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
|
||
<TextBlock Grid.Column="1" FontSize="12" Foreground="#D97706" FontWeight="SemiBold"
|
||
VerticalAlignment="Center">
|
||
<Run Text="{Binding AbsenceRatePercent, StringFormat={}{0:0.#}}"/>
|
||
<Run Text=" %"/>
|
||
</TextBlock>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Fehlende Hausaufgaben aus der letzten Sitzung -->
|
||
<Border Classes="card" MinWidth="340" MaxWidth="420"
|
||
IsVisible="{Binding HasMissingHomework}">
|
||
<StackPanel>
|
||
<TextBlock Text="FEHLENDE HAUSAUFGABEN" Classes="cardTitle"/>
|
||
<TextBlock Text="{Binding MissingHomeworkSessionLabel}" FontSize="11" Opacity="0.6" Margin="0,-6,0,6"/>
|
||
<ItemsControl ItemsSource="{Binding MissingHomeworkStudents}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:MissingHomeworkItem">
|
||
<Grid ColumnDefinitions="*,Auto" Margin="0,4">
|
||
<TextBlock Grid.Column="0" Text="{Binding StudentName}" FontSize="13"
|
||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
|
||
<TextBlock Grid.Column="1" Text="{Binding StatusLabel}" FontSize="11"
|
||
Opacity="0.7" VerticalAlignment="Center" TextAlignment="Right"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
<Button Content="Zur Mitarbeit ›" Classes="cardLink" Command="{Binding NavigateToParticipationCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Anstehende Aufgaben für diese Klasse (pädagogische Erinnerungen/Aufgaben, Nutzer-
|
||
Feedback: "dürfen gerne auch im passenden Kurs-Dashboard stehen") — anders als die
|
||
übrigen Karten dieser Reihe bewusst immer sichtbar (statt Has…-gated), da sie zugleich
|
||
der Anlege-Einstieg für die erste Aufgabe dieser Gruppe ist. -->
|
||
<Border Classes="card" MinWidth="340" MaxWidth="420">
|
||
<StackPanel>
|
||
<Grid ColumnDefinitions="*,Auto">
|
||
<TextBlock Grid.Column="0" Text="ANSTEHENDE AUFGABEN" Classes="cardTitle"/>
|
||
<Button Grid.Column="1" Content="+" FontSize="12" Padding="8,2" Margin="0,-4,0,0"
|
||
ToolTip.Tip="Aufgabe/Erinnerung für diese Gruppe anlegen"
|
||
Command="{Binding AddGroupTaskCommand}"/>
|
||
</Grid>
|
||
<ItemsControl ItemsSource="{Binding GroupTasks}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:GroupTaskItem">
|
||
<Grid ColumnDefinitions="4,Auto,*,Auto" Margin="0,4">
|
||
<Border Grid.Column="0" Background="{Binding PriorityColorHex}" CornerRadius="2"
|
||
Margin="0,0,6,0" IsVisible="{Binding IsHighPriority}"/>
|
||
<TextBlock Grid.Column="1" Text="🔔" FontSize="12" Margin="0,0,4,0"
|
||
IsVisible="{Binding IsReminder}" VerticalAlignment="Center"/>
|
||
<TextBlock Grid.Column="2" Text="{Binding Title}" FontSize="13"
|
||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
|
||
<TextBlock Grid.Column="3" Text="{Binding DueDateDisplay}" FontSize="12"
|
||
VerticalAlignment="Center" Classes.overdue="{Binding IsOverdue}"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
<TextBlock Text="Keine anstehenden Aufgaben für diese Gruppe." Classes="emptyhint"
|
||
IsVisible="{Binding !HasGroupTasks}"/>
|
||
<Button Content="Zu den Aufgaben ›" Classes="cardLink" Command="{Binding NavigateToWorkloadCommand}"/>
|
||
</StackPanel>
|
||
</Border>
|
||
</WrapPanel>
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</UserControl>
|