574 lines
38 KiB
XML
574 lines
38 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.ClassTeacher"
|
||
xmlns:views="clr-namespace:LehrerApp.Desktop.Views.ClassTeacher"
|
||
xmlns:conv="clr-namespace:LehrerApp.Desktop.Converters"
|
||
x:Class="LehrerApp.Desktop.Views.ClassTeacher.ClassTeacherOverviewView"
|
||
x:DataType="vm:ClassTeacherOverviewViewModel">
|
||
|
||
<!-- Flächen- und Statusfarben kommen aus Styles/SemanticBrushes.axaml und werden bewusst per
|
||
DynamicResource geholt, damit der Theme-Wechsel (hell/dunkel) sie live austauscht. Die
|
||
Statusfarbe einer Zeile setzt deshalb ein Style-Selektor über Klassen und nicht ein
|
||
Hex-String aus dem ViewModel — ein lokal gesetztes Attribut würde den Selektor überstimmen. -->
|
||
<UserControl.Styles>
|
||
<Style Selector="Border.metric">
|
||
<Setter Property="Background" Value="{DynamicResource AppCardBackgroundBrush}"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppCardBorderBrush}"/>
|
||
<Setter Property="BorderThickness" Value="1"/>
|
||
<Setter Property="CornerRadius" Value="8"/>
|
||
<Setter Property="Padding" Value="14,12"/>
|
||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||
</Style>
|
||
<Style Selector="Button.filter">
|
||
<Setter Property="Background" Value="Transparent"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppFilterBorderBrush}"/>
|
||
<Setter Property="BorderThickness" Value="1"/>
|
||
<Setter Property="CornerRadius" Value="6"/>
|
||
<Setter Property="Padding" Value="16,6"/>
|
||
<Setter Property="FontSize" Value="12"/>
|
||
</Style>
|
||
<Style Selector="Button.filter.active">
|
||
<Setter Property="Background" Value="{DynamicResource AppFilterActiveBackgroundBrush}"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppFilterActiveBorderBrush}"/>
|
||
<Setter Property="Foreground" Value="{DynamicResource AppFilterActiveForegroundBrush}"/>
|
||
</Style>
|
||
<Style Selector="Button.rosterRow">
|
||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||
<Setter Property="Background" Value="{DynamicResource AppListRowBackgroundBrush}"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppListRowBorderBrush}"/>
|
||
<Setter Property="BorderThickness" Value="1,0,1,1"/>
|
||
<Setter Property="Padding" Value="0"/>
|
||
<Setter Property="MinHeight" Value="48"/>
|
||
</Style>
|
||
<Style Selector="Button.rosterRow:pointerover /template/ ContentPresenter">
|
||
<Setter Property="Background" Value="{DynamicResource AppListRowHoverBrush}"/>
|
||
</Style>
|
||
<Style Selector="Button.rosterRowAction">
|
||
<Setter Property="Width" Value="30"/>
|
||
<Setter Property="Height" Value="48"/>
|
||
<Setter Property="Background" Value="{DynamicResource AppListRowBackgroundBrush}"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppListRowBorderBrush}"/>
|
||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||
<Setter Property="Foreground" Value="{DynamicResource AppAccentTextBrush}"/>
|
||
<Setter Property="FontSize" Value="16"/>
|
||
<Setter Property="Padding" Value="0"/>
|
||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||
</Style>
|
||
<Style Selector="Button.rosterRowAction:pointerover /template/ ContentPresenter">
|
||
<Setter Property="Background" Value="{DynamicResource AppListRowHoverBrush}"/>
|
||
</Style>
|
||
<Style Selector="Border.sidePanel">
|
||
<Setter Property="Background" Value="{DynamicResource AppCardBackgroundBrush}"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppCardBorderBrush}"/>
|
||
<Setter Property="BorderThickness" Value="1"/>
|
||
<Setter Property="CornerRadius" Value="8"/>
|
||
<Setter Property="Padding" Value="14"/>
|
||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.sectionLabel">
|
||
<Setter Property="FontSize" Value="13"/>
|
||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||
<Setter Property="Margin" Value="4,10,0,6"/>
|
||
</Style>
|
||
|
||
<!-- Statusstufe: Basis ist "unauffällig", die Klassen aus dem ViewModel schalten hoch. -->
|
||
<Style Selector="TextBlock.status">
|
||
<Setter Property="Foreground" Value="{DynamicResource AppStatusOkBrush}"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.status.info">
|
||
<Setter Property="Foreground" Value="{DynamicResource AppStatusInfoBrush}"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.status.warning">
|
||
<Setter Property="Foreground" Value="{DynamicResource AppStatusWarningBrush}"/>
|
||
</Style>
|
||
<Style Selector="TextBlock.status.danger">
|
||
<Setter Property="Foreground" Value="{DynamicResource AppStatusDangerBrush}"/>
|
||
</Style>
|
||
<Style Selector="Border.statusFill">
|
||
<Setter Property="Background" Value="{DynamicResource AppStatusOkBrush}"/>
|
||
</Style>
|
||
<Style Selector="Border.statusFill.info">
|
||
<Setter Property="Background" Value="{DynamicResource AppStatusInfoBrush}"/>
|
||
</Style>
|
||
<Style Selector="Border.statusFill.warning">
|
||
<Setter Property="Background" Value="{DynamicResource AppStatusWarningBrush}"/>
|
||
</Style>
|
||
<Style Selector="Border.statusFill.danger">
|
||
<Setter Property="Background" Value="{DynamicResource AppStatusDangerBrush}"/>
|
||
</Style>
|
||
<Style Selector="Border.compactDay">
|
||
<Setter Property="Width" Value="28"/>
|
||
<Setter Property="Height" Value="28"/>
|
||
<Setter Property="CornerRadius" Value="6"/>
|
||
<Setter Property="Background" Value="{DynamicResource AppChipBackgroundBrush}"/>
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppCardBorderBrush}"/>
|
||
<Setter Property="BorderThickness" Value="1"/>
|
||
<Setter Property="Margin" Value="2"/>
|
||
</Style>
|
||
<Style Selector="Border.compactDay.today">
|
||
<Setter Property="BorderBrush" Value="{DynamicResource AppAccentTextBrush}"/>
|
||
<Setter Property="BorderThickness" Value="2"/>
|
||
</Style>
|
||
</UserControl.Styles>
|
||
|
||
<UserControl.Resources>
|
||
<!-- Eine Vorlage für beide Roster-Listen (auffällig / übrige): Sie waren Zeichen für Zeichen
|
||
identisch und mussten bisher doppelt gepflegt werden. -->
|
||
<DataTemplate x:Key="RosterRowTemplate" x:DataType="vm:ClassTeacherRosterRow">
|
||
<!-- Zwei Geschwister-Controls statt eines ContextMenu auf dem Zeilen-Button: Avalonia löst
|
||
$parent-Vorfahrenpfade in einem ContextMenu nicht zuverlässig auf, weil dessen Popup
|
||
nicht im normalen visuellen Baum unter dem ItemsControl hängt. Ein separater kleiner
|
||
Button daneben bleibt im normalen Baum und kann so ganz regulär auf das ViewModel des
|
||
ItemsControl zugreifen. -->
|
||
<Grid ColumnDefinitions="*,Auto">
|
||
<Button Grid.Column="0" Classes="rosterRow"
|
||
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherOverviewViewModel)DataContext).ShowDetailsForStudentCommand}"
|
||
CommandParameter="{Binding}">
|
||
<Grid ColumnDefinitions="4,42,220,*,150,18">
|
||
<Border Grid.Column="0" Classes="statusFill"
|
||
Classes.info="{Binding IsInfoStatus}"
|
||
Classes.warning="{Binding IsWarningStatus}"
|
||
Classes.danger="{Binding IsDangerStatus}"/>
|
||
<Border Grid.Column="1" Width="28" Height="28" CornerRadius="14"
|
||
BorderBrush="{DynamicResource AppAvatarBorderBrush}" BorderThickness="1"
|
||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||
ToolTip.Tip="{Binding AbsenceTooltip}">
|
||
<TextBlock Text="{Binding Initials}" FontSize="10"
|
||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||
</Border>
|
||
<TextBlock Grid.Column="2" Text="{Binding StudentName}" VerticalAlignment="Center"
|
||
TextTrimming="CharacterEllipsis"/>
|
||
<StackPanel Grid.Column="3" VerticalAlignment="Center" Spacing="1"
|
||
ToolTip.Tip="{Binding YearSummaryTooltip}">
|
||
<!-- Quick-Win Barrierefreiheit: Status nicht ausschließlich über Farbe, sondern auch
|
||
über ein vorangestelltes Symbol bei Warnung/Gefahr (StatusTextWithGlyph). -->
|
||
<TextBlock Text="{Binding StatusTextWithGlyph}" Classes="status"
|
||
Classes.info="{Binding IsInfoStatus}"
|
||
Classes.warning="{Binding IsWarningStatus}"
|
||
Classes.danger="{Binding IsDangerStatus}"
|
||
FontSize="12" TextTrimming="CharacterEllipsis"/>
|
||
<!-- Fehlquote seit Schuljahresbeginn (Nutzer-Feedback: der Heute-Snapshot allein sagt
|
||
für Zeugnis/Attestpflicht wenig aus) — als dezente zweite Zeile statt eigener
|
||
Spalte, damit das bestehende Layout nicht neu vermessen werden muss. -->
|
||
<TextBlock Text="{Binding YearSummaryLabel}" IsVisible="{Binding HasYearSummary}"
|
||
FontSize="10" Opacity="0.5" TextTrimming="CharacterEllipsis"/>
|
||
</StackPanel>
|
||
<TextBlock Grid.Column="4" Text="{Binding ClassRegisterLabel}"
|
||
Foreground="{DynamicResource AppAccentTextBrush}"
|
||
VerticalAlignment="Center" FontSize="11"/>
|
||
<TextBlock Grid.Column="5" Text="›" FontSize="18" Opacity="0.7" VerticalAlignment="Center"/>
|
||
</Grid>
|
||
</Button>
|
||
<!-- Quick-Win: "Eltern kontaktieren" als vorbefüllte Wiedervorlage direkt aus der Zeile
|
||
anlegen, statt erst ins Aufgaben-Modul zu wechseln und von Hand einzutragen. -->
|
||
<Button Grid.Column="1" Classes="rosterRowAction" Content="+"
|
||
ToolTip.Tip="Wiedervorlage „Eltern kontaktieren“ anlegen"
|
||
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherOverviewViewModel)DataContext).CreateReminderForStudentCommand}"
|
||
CommandParameter="{Binding}"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</UserControl.Resources>
|
||
|
||
<Grid>
|
||
<StackPanel IsVisible="{Binding !HomeroomClassConfigured}" HorizontalAlignment="Center"
|
||
VerticalAlignment="Center" Spacing="12" MaxWidth="380">
|
||
<Border Width="56" Height="56" CornerRadius="28" HorizontalAlignment="Center"
|
||
Background="{DynamicResource AppAccentSoftBackgroundBrush}">
|
||
<TextBlock Text="KL" FontSize="18" FontWeight="Bold"
|
||
Foreground="{DynamicResource AppAccentOnSoftBrush}"
|
||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||
</Border>
|
||
<TextBlock Text="Noch keine Klasse ausgewählt" FontSize="18" FontWeight="SemiBold" HorizontalAlignment="Center"/>
|
||
<TextBlock TextWrapping="Wrap" TextAlignment="Center" FontSize="13" Opacity="0.65"
|
||
Text="Wähle in den WebUntis-Einstellungen die Klasse aus, deren Klassenlehrer/-in du bist."/>
|
||
<Button Content="Zu den Einstellungen" Command="{Binding GoToSettingsCommand}" HorizontalAlignment="Center"/>
|
||
</StackPanel>
|
||
|
||
<TabbedPage IsVisible="{Binding HomeroomClassConfigured}" TabPlacement="Top"
|
||
SelectedIndex="{Binding ActiveTabIndex, Mode=TwoWay}">
|
||
<ContentPage Header="Übersicht">
|
||
<Grid RowDefinitions="Auto,Auto,*" Margin="16,12,16,16" RowSpacing="10">
|
||
<Grid Grid.Row="0" ColumnDefinitions="*,Auto">
|
||
<StackPanel Grid.Column="0" Spacing="2">
|
||
<TextBlock Text="{Binding HomeroomClassName, StringFormat='Klasse {0}'}"
|
||
FontSize="24" FontWeight="SemiBold"/>
|
||
<TextBlock Text="Klassenlehrer-Übersicht" FontSize="13" Opacity="0.58"/>
|
||
</StackPanel>
|
||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
|
||
<TextBlock Text="{Binding LastUpdatedLabel}" FontSize="11" Opacity="0.55" VerticalAlignment="Center"/>
|
||
<Button Content="↻ Aktualisieren" Command="{Binding LoadCommand}" IsEnabled="{Binding !Busy}"
|
||
Background="Transparent" BorderThickness="0"
|
||
Foreground="{DynamicResource AppAccentTextBrush}"/>
|
||
</StackPanel>
|
||
</Grid>
|
||
|
||
<Grid Grid.Row="1" ColumnDefinitions="*,*,*,*">
|
||
<Border Grid.Column="0" Classes="metric">
|
||
<Grid ColumnDefinitions="36,*">
|
||
<TextBlock Text="◉" FontSize="22" VerticalAlignment="Center"
|
||
Foreground="{DynamicResource AppStatusInfoBrush}"/>
|
||
<StackPanel Grid.Column="1"><TextBlock Text="{Binding StudentCount}" FontSize="22" FontWeight="SemiBold"/><TextBlock Text="Schüler*innen" FontSize="11" Opacity="0.6"/></StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
<Border Grid.Column="1" Classes="metric">
|
||
<Grid ColumnDefinitions="36,*">
|
||
<TextBlock Text="△" FontSize="24" VerticalAlignment="Center"
|
||
Foreground="{DynamicResource AppStatusWarningBrush}"/>
|
||
<StackPanel Grid.Column="1"><TextBlock Text="{Binding TodayAlertCount}" FontSize="22" FontWeight="SemiBold"/><TextBlock Text="heute auffällig" FontSize="11" Opacity="0.6"/></StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
<Border Grid.Column="2" Classes="metric">
|
||
<Grid ColumnDefinitions="36,*">
|
||
<TextBlock Text="!" FontSize="22" VerticalAlignment="Center"
|
||
Foreground="{DynamicResource AppStatusDangerBrush}"/>
|
||
<StackPanel Grid.Column="1"><TextBlock Text="{Binding TodayUnexcusedCount}" FontSize="22" FontWeight="SemiBold"/><TextBlock Text="{Binding TodayUnexcusedSummaryLabel}" FontSize="11" Opacity="0.6"/></StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
<Border Grid.Column="3" Classes="metric" Margin="0">
|
||
<Grid ColumnDefinitions="36,*">
|
||
<TextBlock Text="▤" FontSize="21" VerticalAlignment="Center"
|
||
Foreground="{DynamicResource AppStatusInfoBrush}"/>
|
||
<StackPanel Grid.Column="1"><TextBlock Text="{Binding RecentClassRegisterCount}" FontSize="22" FontWeight="SemiBold"/><TextBlock Text="Klassenbucheinträge · 7 Tage" FontSize="11" Opacity="0.6"/></StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
|
||
<Grid Grid.Row="2" ColumnDefinitions="*,286" ColumnSpacing="12">
|
||
<Grid Grid.Column="0" RowDefinitions="Auto,*">
|
||
<Border Grid.Row="0" Background="{DynamicResource AppCardBackgroundBrush}"
|
||
BorderBrush="{DynamicResource AppCardBorderBrush}" BorderThickness="1"
|
||
CornerRadius="8" Padding="8" Margin="0,0,0,4">
|
||
<Grid ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,*,250" ColumnSpacing="8">
|
||
<Button Grid.Column="0" Classes="filter" Classes.active="{Binding AlertsFilterSelected}"
|
||
Content="Auffällig" Command="{Binding ShowAlertsCommand}"/>
|
||
<Button Grid.Column="1" Classes="filter" Classes.active="{Binding ClassRegisterFilterSelected}"
|
||
Content="Klassenbuch" Command="{Binding ShowClassRegisterCommand}"/>
|
||
<Button Grid.Column="2" Classes="filter" Classes.active="{Binding AllFilterSelected}"
|
||
Content="Alle" Command="{Binding ShowAllCommand}"/>
|
||
<!-- Nutzer-Feedback: "Auffällig" zeigt nur den Heute-Snapshot — wer heute zufällig
|
||
da ist, aber zuvor mehrfach unentschuldigt fehlte, taucht dort gar nicht auf,
|
||
während ein einmaliger Erstfehltag ganz oben landet. Neuer Reiter sortiert
|
||
stattdessen nach dem kumulierten Score seit Schuljahresbeginn
|
||
(ClassTeacherRosterRow.PatternScore: unentschuldigt > entschuldigt >
|
||
Verspätung) und ist deshalb der beim Öffnen aktive Standard-Reiter. -->
|
||
<Button Grid.Column="3" Classes="filter" Classes.active="{Binding PatternScoreFilterSelected}"
|
||
Content="Gesamtbild" Command="{Binding ShowPatternScoreCommand}"
|
||
ToolTip.Tip="Sortiert nach Auffälligkeits-Score seit Schuljahresbeginn (unentschuldigt zählt am stärksten, Verspätung am wenigsten) statt nur nach dem heutigen Status."/>
|
||
<Button Grid.Column="4" Content="⚙ Gewichtung" FontSize="12" Padding="10,4"
|
||
Background="Transparent" Click="OnEditPatternScoreWeights"
|
||
ToolTip.Tip="Legt fest, wie stark einzelne Ereignisse in den Auffälligkeits-Score der 'Gesamtbild'-Sortierung einfließen."/>
|
||
<TextBox Grid.Column="6" Text="{Binding SearchText, Mode=TwoWay}" PlaceholderText="Schüler*in suchen…"
|
||
FontSize="12" MinHeight="32"/>
|
||
</Grid>
|
||
</Border>
|
||
<ScrollViewer Grid.Row="1">
|
||
<StackPanel>
|
||
<TextBlock Classes="sectionLabel" Text="{Binding PrimarySectionTitle}" IsVisible="{Binding HasPrimaryRoster}"/>
|
||
<ItemsControl ItemsSource="{Binding PrimaryRoster}" ItemTemplate="{StaticResource RosterRowTemplate}"/>
|
||
|
||
<TextBlock Classes="sectionLabel" Text="{Binding SecondarySectionTitle}" IsVisible="{Binding HasSecondaryRoster}"/>
|
||
<ItemsControl ItemsSource="{Binding SecondaryRoster}" ItemTemplate="{StaticResource RosterRowTemplate}"/>
|
||
|
||
<StackPanel IsVisible="{Binding HasNoFilterResults}" HorizontalAlignment="Center" Margin="0,54,0,0" Spacing="6">
|
||
<TextBlock Text="Keine passenden Schüler*innen" FontWeight="SemiBold" HorizontalAlignment="Center"/>
|
||
<TextBlock Text="Passe Filter oder Suche an." FontSize="12" Opacity="0.55"/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</Grid>
|
||
|
||
<ScrollViewer Grid.Column="1">
|
||
<StackPanel>
|
||
<Border Classes="sidePanel">
|
||
<StackPanel Spacing="9">
|
||
<TextBlock Text="Tagesüberblick" FontSize="14" FontWeight="SemiBold"/>
|
||
<!-- Quick-Win: ein gestapelter 100-%-Balken statt vier Einzelzeilen mit
|
||
separater Prozentspalte — Verteilung auf einen Blick statt aus vier
|
||
Prozentzahlen erschlossen. Jedes Segment multipliziert per MultiBinding
|
||
die gerenderte Breite der Track-Leiste (x:Name="DayOverviewTrack") mit
|
||
seinem Anteil 0…1 (FractionWidthConverter) — bleibt dadurch korrekt, egal
|
||
wie breit die Seitenspalte in XAML gerade ist.
|
||
Reihenfolge Ok→Info→Warnung→Gefahr (nicht Ok→Warnung→Info→Gefahr):
|
||
Grün und das validierte Dunkel-Gelb liegen unter Protanopie zu nah
|
||
beieinander (ΔE 3.0), direkt benachbart wäre das dieselbe Verwechslung
|
||
wie beim ursprünglichen Nutzer-Feedback zu Warnung/Gefahr. Mit Info
|
||
dazwischen entspricht die Reihenfolge zudem der echten Dringlichkeit
|
||
(siehe ClassTeacherRosterRow.AttentionRank: Gefahr > Warnung > Info > Ok). -->
|
||
<Grid Height="10" ToolTip.Tip="{Binding DayOverviewTooltip}">
|
||
<Border x:Name="DayOverviewTrack" Background="{DynamicResource AppTrackBackgroundBrush}"
|
||
CornerRadius="5"/>
|
||
<Border CornerRadius="5" ClipToBounds="True" HorizontalAlignment="Left">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Border Classes="statusFill">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="DayOverviewTrack" Path="Bounds.Width"/>
|
||
<Binding Path="PresentFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
<Border Classes="statusFill info">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="DayOverviewTrack" Path="Bounds.Width"/>
|
||
<Binding Path="ExcusedAbsenceFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
<Border Classes="statusFill warning">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="DayOverviewTrack" Path="Bounds.Width"/>
|
||
<Binding Path="LateFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
<Border Classes="statusFill danger">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="DayOverviewTrack" Path="Bounds.Width"/>
|
||
<Binding Path="UnexcusedAbsenceFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
</StackPanel>
|
||
</Border>
|
||
</Grid>
|
||
<StackPanel Spacing="5">
|
||
<StackPanel Orientation="Horizontal" Spacing="6"><Border Width="7" Height="7" CornerRadius="4" Classes="statusFill"/><TextBlock Text="{Binding PresentSummaryLabel}" FontSize="12"/></StackPanel>
|
||
<StackPanel Orientation="Horizontal" Spacing="6"><Border Width="7" Height="7" CornerRadius="4" Classes="statusFill info"/><TextBlock Text="{Binding ExcusedAbsenceSummaryLabel}" FontSize="12"/></StackPanel>
|
||
<StackPanel Orientation="Horizontal" Spacing="6"><Border Width="7" Height="7" CornerRadius="4" Classes="statusFill warning"/><TextBlock Text="{Binding LateSummaryLabel}" FontSize="12"/></StackPanel>
|
||
<StackPanel Orientation="Horizontal" Spacing="6"><Border Width="7" Height="7" CornerRadius="4" Classes="statusFill danger"/><TextBlock Text="{Binding UnexcusedAbsenceSummaryLabel}" FontSize="12"/></StackPanel>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<Border Classes="sidePanel">
|
||
<StackPanel Spacing="8">
|
||
<TextBlock Text="Trend · letzte 7 Tage" FontSize="14" FontWeight="SemiBold"/>
|
||
<ItemsControl ItemsSource="{Binding TrendDays}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:ClassTeacherTrendDay">
|
||
<Grid ColumnDefinitions="42,*,24" Margin="0,2">
|
||
<TextBlock Text="{Binding DayLabel}" FontSize="11" Opacity="0.6" VerticalAlignment="Center"/>
|
||
<Grid Grid.Column="1" Height="8" VerticalAlignment="Center"
|
||
ToolTip.Tip="{Binding DetailTooltip}">
|
||
<Border x:Name="TrendTrack" Background="{DynamicResource AppTrackBackgroundBrush}"
|
||
CornerRadius="4"/>
|
||
<!-- Gestapelter Balken: drei sich nicht überschneidende Segmente
|
||
(siehe ClassTeacherTrendDay). Jedes Segment multipliziert per
|
||
MultiBinding die gerenderte Breite von "TrendTrack" mit seinem
|
||
Anteil 0…1 (FractionWidthConverter) — bleibt damit auch dann
|
||
korrekt proportional, wenn die Seitenspalte in XAML mal eine
|
||
andere Breite bekommt. Der äußere Wrapper ist auf CornerRadius
|
||
zugeschnitten, damit nur die äußeren Kanten rund sind, nicht
|
||
jedes Segment einzeln. -->
|
||
<Border CornerRadius="4" ClipToBounds="True" HorizontalAlignment="Left">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="TrendTrack" Path="Bounds.Width"/>
|
||
<Binding Path="TotalFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
<StackPanel Orientation="Horizontal">
|
||
<Border Classes="statusFill danger">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="TrendTrack" Path="Bounds.Width"/>
|
||
<Binding Path="UnexcusedFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
<Border Classes="statusFill warning">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="TrendTrack" Path="Bounds.Width"/>
|
||
<Binding Path="LateExcusedFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
<Border Classes="statusFill info">
|
||
<Border.Width>
|
||
<MultiBinding Converter="{x:Static conv:FractionWidthConverter.Instance}">
|
||
<Binding ElementName="TrendTrack" Path="Bounds.Width"/>
|
||
<Binding Path="ExcusedFraction"/>
|
||
</MultiBinding>
|
||
</Border.Width>
|
||
</Border>
|
||
</StackPanel>
|
||
</Border>
|
||
</Grid>
|
||
<TextBlock Grid.Column="2" Text="{Binding AlertCount}" FontSize="11" HorizontalAlignment="Right"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||
<Border Width="7" Height="7" CornerRadius="4" Classes="statusFill danger"/>
|
||
<TextBlock Text="Unentsch." FontSize="10" Opacity="0.55"/>
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||
<Border Width="7" Height="7" CornerRadius="4" Classes="statusFill warning"/>
|
||
<TextBlock Text="Verspätet" FontSize="10" Opacity="0.55"/>
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||
<Border Width="7" Height="7" CornerRadius="4" Classes="statusFill info"/>
|
||
<TextBlock Text="Entschuldigt" FontSize="10" Opacity="0.55"/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Verdichtete Monatsansicht: exakt eine Zelle je Kalendertag. Ohne Ereignis
|
||
bleibt nur die Tageszahl sichtbar; bei Auffälligkeiten ersetzt das stärkste
|
||
Statuskürzel die Zahl. Alle Details bleiben per Tooltip und Drill-down erhalten. -->
|
||
<Border Classes="sidePanel">
|
||
<StackPanel Spacing="8">
|
||
<Grid ColumnDefinitions="*,Auto">
|
||
<StackPanel>
|
||
<TextBlock Text="Monat auf einen Blick" FontSize="14" FontWeight="SemiBold"/>
|
||
<TextBlock Text="{Binding CompactMonthLabel}" FontSize="11" Opacity="0.55"/>
|
||
</StackPanel>
|
||
<Button Grid.Column="1" Content="Öffnen ›" Command="{Binding OpenMonthlyCalendarCommand}"
|
||
Background="Transparent" BorderThickness="0" Padding="6,2"
|
||
Foreground="{DynamicResource AppAccentTextBrush}"/>
|
||
</Grid>
|
||
<ItemsControl ItemsSource="{Binding CompactMonthDays}" HorizontalAlignment="Center">
|
||
<ItemsControl.ItemsPanel>
|
||
<ItemsPanelTemplate><UniformGrid Columns="7"/></ItemsPanelTemplate>
|
||
</ItemsControl.ItemsPanel>
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:ClassTeacherCompactCalendarDay">
|
||
<Border Classes="compactDay" Classes.today="{Binding IsToday}"
|
||
ToolTip.Tip="{Binding Tooltip}">
|
||
<Grid>
|
||
<TextBlock Text="{Binding DayNumber}" FontSize="11" Opacity="0.7"
|
||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||
IsVisible="{Binding !HasSignal}"/>
|
||
<Border Background="{Binding SignalColorHex}" CornerRadius="5"
|
||
IsVisible="{Binding HasSignal}">
|
||
<TextBlock Text="{Binding SignalCode}" Foreground="White" FontSize="11"
|
||
FontWeight="Bold" HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"/>
|
||
</Border>
|
||
</Grid>
|
||
</Border>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
<TextBlock Text="U unentsch. · ! Klassenbuch · A abwesend · V verspätet · E entsch."
|
||
FontSize="9" Opacity="0.5" TextWrapping="Wrap"/>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<Border Classes="sidePanel" IsVisible="{Binding HasOpenExcuses}">
|
||
<StackPanel Spacing="8">
|
||
<TextBlock Text="Offene Entschuldigungen" FontSize="14" FontWeight="SemiBold"/>
|
||
<ItemsControl ItemsSource="{Binding OpenExcuses}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:ClassTeacherOpenExcuseRow">
|
||
<Grid ColumnDefinitions="*,Auto">
|
||
<Button Grid.Column="0" Classes="rosterRow" Padding="6,5"
|
||
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherOverviewViewModel)DataContext).ShowDetailsForOpenExcuseCommand}"
|
||
CommandParameter="{Binding}">
|
||
<Grid ColumnDefinitions="4,*,Auto" Margin="0,2">
|
||
<Border Grid.Column="0" CornerRadius="2" Margin="0,1,8,1"
|
||
Classes="statusFill" Classes.warning="{Binding !IsOverdue}"
|
||
Classes.danger="{Binding IsOverdue}"/>
|
||
<StackPanel Grid.Column="1">
|
||
<TextBlock Text="{Binding StudentName}" FontSize="12" FontWeight="SemiBold"/>
|
||
<TextBlock Text="{Binding DaysOpenLabel}" FontSize="11" Opacity="0.62"/>
|
||
</StackPanel>
|
||
<TextBlock Grid.Column="2" Text="{Binding DateLabel}" FontSize="11"
|
||
Opacity="0.5" VerticalAlignment="Center"/>
|
||
</Grid>
|
||
</Button>
|
||
<Button Grid.Column="1" Classes="rosterRowAction" Content="+"
|
||
ToolTip.Tip="Wiedervorlage „Eltern kontaktieren“ anlegen"
|
||
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherOverviewViewModel)DataContext).CreateReminderForOpenExcuseCommand}"
|
||
CommandParameter="{Binding}"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
<TextBlock FontSize="11" Opacity="0.5" IsVisible="{Binding HasOpenExcuseOverflow}">
|
||
<Run Text="+"/><Run Text="{Binding OpenExcuseOverflowCount}"/><Run Text=" weitere"/>
|
||
</TextBlock>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<Border Classes="sidePanel" IsVisible="{Binding HasPatternNotices}">
|
||
<StackPanel Spacing="8">
|
||
<TextBlock Text="Muster erkannt" FontSize="14" FontWeight="SemiBold"/>
|
||
<ItemsControl ItemsSource="{Binding PatternNotices}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="vm:ClassTeacherPatternNotice">
|
||
<Grid ColumnDefinitions="4,*,Auto" Margin="0,3">
|
||
<Border CornerRadius="2" Margin="0,1,8,1" Classes="statusFill"
|
||
Classes.info="{Binding IsInfoStatus}"
|
||
Classes.warning="{Binding IsWarningStatus}"
|
||
Classes.danger="{Binding IsDangerStatus}"/>
|
||
<StackPanel Grid.Column="1">
|
||
<TextBlock Text="{Binding StudentName}" FontSize="12" FontWeight="SemiBold"/>
|
||
<TextBlock Text="{Binding Message}" FontSize="11" Opacity="0.62" TextWrapping="Wrap"/>
|
||
</StackPanel>
|
||
<Button Grid.Column="2" Classes="rosterRowAction" Content="+"
|
||
IsVisible="{Binding CanCreateReminder}"
|
||
ToolTip.Tip="Wiedervorlage „Eltern kontaktieren“ anlegen"
|
||
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherOverviewViewModel)DataContext).CreateReminderForPatternNoticeCommand}"
|
||
CommandParameter="{Binding}"/>
|
||
</Grid>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<Border Classes="sidePanel">
|
||
<StackPanel Spacing="8">
|
||
<TextBlock Text="Nächste Schritte" FontSize="14" FontWeight="SemiBold"/>
|
||
<Button Content="Klassenbuch öffnen" Command="{Binding OpenClassRegisterCommand}" HorizontalAlignment="Stretch"/>
|
||
<!-- Nutzer-Feedback: Zahlen-Badges für offene eigene Dokumentation direkt am
|
||
Button, der zum Klassenbuch-Tab (jetzt Dokumentations-Hub) führt, statt in
|
||
einer eigenen Kennzahlkarte in der bereits vollen 4-Spalten-Reihe oben. -->
|
||
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,-4,0,0"
|
||
IsVisible="{Binding HasOwnDocumentationAlerts}">
|
||
<Border Background="#FB8C00" CornerRadius="9" Padding="7,2"
|
||
IsVisible="{Binding !!OwnDocumentationFollowUpCount}">
|
||
<TextBlock Text="{Binding OwnDocumentationFollowUpCount, StringFormat='Nacharbeit: {0}'}"
|
||
Foreground="White" FontSize="10" FontWeight="SemiBold"/>
|
||
</Border>
|
||
<Border Background="#E53935" CornerRadius="9" Padding="7,2"
|
||
IsVisible="{Binding !!OwnDocumentationCriticalCount}">
|
||
<TextBlock Text="{Binding OwnDocumentationCriticalCount, StringFormat='kritisch: {0}'}"
|
||
Foreground="White" FontSize="10" FontWeight="SemiBold"/>
|
||
</Border>
|
||
</StackPanel>
|
||
<Button Content="Fehlzeiten öffnen" Command="{Binding OpenAbsencesCommand}" HorizontalAlignment="Stretch"/>
|
||
<Button Content="Aufgaben & Wiedervorlagen" Command="{Binding GoToWorkloadCommand}"
|
||
HorizontalAlignment="Stretch" Background="Transparent"/>
|
||
</StackPanel>
|
||
</Border>
|
||
<TextBlock Text="{Binding Status}" FontSize="11" TextWrapping="Wrap" Opacity="0.6"/>
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</Grid>
|
||
</Grid>
|
||
</ContentPage>
|
||
|
||
<ContentPage Header="Klassenbuch">
|
||
<views:ClassTeacherRegisterView DataContext="{Binding DetailsTab}"/>
|
||
</ContentPage>
|
||
<ContentPage Header="Fehlzeiten">
|
||
<views:ClassTeacherAbsencesView DataContext="{Binding DetailsTab}"/>
|
||
</ContentPage>
|
||
<ContentPage Header="Vorgänge">
|
||
<views:ClassTeacherCasesView DataContext="{Binding CasesTab}"/>
|
||
</ContentPage>
|
||
</TabbedPage>
|
||
</Grid>
|
||
</UserControl>
|