Files
LehrerApp/LehrerApp.Desktop/Views/Groups/GroupDetailView.axaml
T
adminandClaude Sonnet 5 4d2a89b14b Kurs-Übersicht gefüllt: nächste Termine, Mitarbeitshinweis, offene Kontrollen/Dokumentationen, auffällige Fehlzeiten
Der bislang leere "Übersicht"-Tab je Kurs zeigt jetzt einen kompakten
"Was steht an"-Überblick aus bereits vorhandenen Daten mit Klick-Durchsprung
in den jeweiligen Tab: nächste Stunde/Klausur, Hinweis auf die letzte
Mitarbeitssitzung, offene Hausaufgaben-Kontrolle, offene Entschuldigungen,
offene Dokumentations-Entwürfe und auffällige Fehlzeiten.

Die Fehlzeiten-Karte ist bewusst kein 1:1-Abbild der Dashboard-Warnung: erst
ab einer Mindeststichprobe von 8 erfassten Terminen im Schuljahr gemeldet,
damit ein einzelner Fehltag zu Schuljahresbeginn nicht sofort als auffällig
gilt. Das Hauptdashboard hat dasselbe Problem noch, wird dort separat
nachgezogen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 22:39:31 +02:00

208 lines
11 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
xmlns:views="clr-namespace:LehrerApp.Desktop.Views.Groups"
xmlns:models="clr-namespace:LehrerApp.Core.Models;assembly=LehrerApp.Core"
xmlns:shared="clr-namespace:LehrerApp.Desktop.Views.Shared"
x:Class="LehrerApp.Desktop.Views.Groups.GroupDetailView"
x:DataType="vm:GroupDetailViewModel">
<Grid RowDefinitions="Auto,Auto,*">
<!-- Header -->
<Border Grid.Row="0" Padding="20,16"
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="0,0,0,1">
<Grid ColumnDefinitions="*,Auto">
<shared:PageHeader Grid.Column="0" Title="{Binding GroupTitle}" Subtitle="{Binding GroupSubtitle}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8">
<TextBlock VerticalAlignment="Center" Opacity="0.6" FontSize="13">
<Run Text="{Binding StudentCount}"/>
<Run Text=" Schüler"/>
</TextBlock>
<CheckBox Content="Ausgetretene anzeigen" IsChecked="{Binding ShowFormerStudents}"
VerticalAlignment="Center"/>
<Button Content=" Schüler" Command="{Binding AddStudentCommand}" IsEnabled="{Binding IsEditable}"/>
<Button Content="⇩ Teilnehmer importieren…" Click="OnImportParticipantsClick"
IsEnabled="{Binding IsEditable}"/>
<Button Content="{Binding SelectedStudent.WithdrawActionLabel}"
Command="{Binding WithdrawStudentCommand}"
IsVisible="{Binding SelectedStudent, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Button Content="Austragung zurücknehmen" Command="{Binding ReinstateStudentCommand}"
IsVisible="{Binding SelectedStudent.HasExitDate}"/>
<Button Content=" Klausur" Command="{Binding AddExamCommand}" IsEnabled="{Binding IsEditable}"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="1" Background="#FFF3CD" BorderBrush="#D97706" BorderThickness="0,0,0,1"
Padding="20,10" IsVisible="{Binding IsReadOnly}">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" Spacing="2">
<TextBlock Text="Archivierte Lerngruppe · schreibgeschützt" FontWeight="SemiBold"
Foreground="#92400E"/>
<TextBlock Text="Alle historischen Daten bleiben sichtbar. Für Korrekturen muss die Gruppe ausdrücklich wieder aktiviert werden."
FontSize="12" Foreground="#92400E" TextWrapping="Wrap"/>
</StackPanel>
<Button Grid.Column="1" Content="Gruppe wieder aktivieren"
Command="{Binding ReactivateGroupCommand}" Margin="16,0,0,0"/>
</Grid>
</Border>
<TabbedPage Grid.Row="2" TabPlacement="Top" SelectedIndex="{Binding ActiveTabIndex}">
<!-- Tab: Übersicht -->
<ContentPage Header="Übersicht">
<views:GroupOverviewTabView DataContext="{Binding OverviewTab}"/>
</ContentPage>
<!-- Tab: Schüler -->
<ContentPage Header="Schüler">
<DataGrid ItemsSource="{Binding Students}"
SelectedItem="{Binding SelectedStudent}"
AutoGenerateColumns="False"
IsReadOnly="True"
GridLinesVisibility="Horizontal"
CanUserReorderColumns="False"
CanUserResizeColumns="True"
Margin="0">
<DataGrid.Columns>
<DataGridTemplateColumn Header="" Width="48">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="vm:StudentSummary">
<Border Width="30" Height="30" CornerRadius="15" Background="{Binding AvatarColor}"
HorizontalAlignment="Center" VerticalAlignment="Center"
ToolTip.Tip="{Binding AvatarTooltip}">
<TextBlock Text="{Binding AvatarLabel}" Foreground="White" FontWeight="Bold"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Name" Binding="{Binding FullName}" Width="*"/>
<DataGridTextColumn Header="Zeitraum" Binding="{Binding PeriodLabel}" Width="190"/>
<DataGridTextColumn Header="Status" Binding="{Binding MembershipStatus}" Width="170"/>
<DataGridTemplateColumn Header="Niveau" Width="130"
IsVisible="{Binding IsDifferentiated}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="vm:StudentSummary">
<ComboBox ItemsSource="{x:Static vm:StudentSummary.NiveauOptions}"
SelectedItem="{Binding NiveauName}"
IsEnabled="{Binding CanEdit}"
HorizontalAlignment="Stretch" Margin="2"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</ContentPage>
<!-- Tab: Sitzpläne -->
<ContentPage Header="Sitzpläne">
<views:SeatingPlanTabView DataContext="{Binding SeatingPlanTab}"/>
</ContentPage>
<!-- Tab: Mitarbeit -->
<ContentPage Header="Mitarbeit">
<views:ParticipationTabView DataContext="{Binding ParticipationTab}"/>
</ContentPage>
<!-- Tab: Klausuren -->
<ContentPage Header="Klausuren">
<Grid RowDefinitions="Auto,*">
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,8"
IsVisible="{Binding SelectedExam, Converter={x:Static ObjectConverters.IsNotNull}}"
IsEnabled="{Binding IsEditable}">
<Button Content="Punkte eingeben" Command="{Binding GradeExamCommand}"/>
<Button Content="Auswertung" Command="{Binding EvaluateExamCommand}"/>
<Button Content="Bearbeiten" Command="{Binding EditExamCommand}"/>
<Button Content="Duplizieren" Command="{Binding DuplicateExamCommand}"/>
<SplitButton Content="Status ▸" Command="{Binding AdvanceExamStatusCommand}">
<SplitButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedLeft">
<MenuItem Header="Geplant" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Planned}"/>
<MenuItem Header="Durchgeführt" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Conducted}"/>
<MenuItem Header="Korrigiert" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Graded}"/>
<MenuItem Header="Zurückgegeben" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Returned}"/>
</MenuFlyout>
</SplitButton.Flyout>
</SplitButton>
<Button Content="Löschen" Command="{Binding DeleteExamCommand}"/>
</StackPanel>
<DataGrid Grid.Row="1" ItemsSource="{Binding Exams}"
SelectedItem="{Binding SelectedExam}"
AutoGenerateColumns="False"
IsReadOnly="True"
GridLinesVisibility="Horizontal"
CanUserReorderColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Datum" Binding="{Binding Date}" Width="110"/>
<DataGridTextColumn Header="Titel" Binding="{Binding Title}" Width="*"/>
<DataGridTextColumn Header="Niveau" Binding="{Binding NiveauLabel}" Width="80"
IsVisible="{Binding IsDifferentiated}"/>
<DataGridTemplateColumn Header="Status" Width="150">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="vm:ExamSummary">
<Border Background="{Binding StatusColorHex}" CornerRadius="4"
Padding="8,2" HorizontalAlignment="Left">
<TextBlock Text="{Binding StatusLabel}" FontSize="12" Foreground="White"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Rückgabe" Binding="{Binding ReturnedAtDisplay}" Width="100"/>
</DataGrid.Columns>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Punkte eingeben" Command="{Binding GradeExamCommand}"/>
<MenuItem Header="Auswertung" Command="{Binding EvaluateExamCommand}"/>
<MenuItem Header="Bearbeiten" Command="{Binding EditExamCommand}"/>
<MenuItem Header="Duplizieren" Command="{Binding DuplicateExamCommand}"/>
<MenuItem Header="Status">
<MenuItem Header="Weiter" Command="{Binding AdvanceExamStatusCommand}"/>
<Separator/>
<MenuItem Header="Geplant" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Planned}"/>
<MenuItem Header="Durchgeführt" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Conducted}"/>
<MenuItem Header="Korrigiert" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Graded}"/>
<MenuItem Header="Zurückgegeben" Command="{Binding SetExamStatusCommand}"
CommandParameter="{x:Static models:ExamStatus.Returned}"/>
</MenuItem>
<Separator/>
<MenuItem Header="Löschen" Command="{Binding DeleteExamCommand}"/>
</ContextMenu>
</DataGrid.ContextMenu>
</DataGrid>
</Grid>
</ContentPage>
<!-- Tab: Noten -->
<ContentPage Header="Noten">
<views:GradeOverviewTabView DataContext="{Binding GradeOverviewTab}"/>
</ContentPage>
<!-- Tab: Planung -->
<ContentPage Header="Planung">
<views:PlanningTabView DataContext="{Binding PlanningTab}"/>
</ContentPage>
<!-- Tab: Kompetenzen -->
<ContentPage Header="Kompetenzen">
<views:CompetencyOverviewTabView DataContext="{Binding CompetencyOverviewTab}"/>
</ContentPage>
<!-- Tab: Dokumentation -->
<ContentPage Header="Dokumentation">
<views:GroupDocumentationTabView DataContext="{Binding GroupDocumentationTab}"/>
</ContentPage>
</TabbedPage>
</Grid>
</UserControl>