Upgrade Sitzplan - Jetzt mit Bewertungsfeature
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<Grid RowDefinitions="Auto,*" Margin="16">
|
||||
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,*,Auto" Margin="0,0,0,12">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto" Margin="0,0,0,12">
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="6" Margin="0,0,12,0">
|
||||
<TextBlock Text="Schüler:" VerticalAlignment="Center"/>
|
||||
<ComboBox ItemsSource="{Binding StudentFilterOptions}" SelectedItem="{Binding SelectedStudentFilter}"
|
||||
@@ -16,7 +16,12 @@
|
||||
<CheckBox Grid.Column="1" Content="Nur dieser Unterricht" IsChecked="{Binding OnlyThisGroup}"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip.Tip="Standardmäßig werden auch Einträge aus anderen Lerngruppen desselben Schülers angezeigt (optisch abgesetzt) — damit Muster über mehrere Fächer/Kurse hinweg sichtbar bleiben."/>
|
||||
<Button Grid.Column="3" Content="+ Eintrag" Command="{Binding AddDocumentationCommand}"/>
|
||||
<Border Grid.Column="2" Background="#FB8C00" CornerRadius="11" Padding="9,3" Margin="12,0"
|
||||
IsVisible="{Binding !!DraftCount}">
|
||||
<TextBlock Text="{Binding DraftCount, StringFormat='Nacharbeiten: {0}'}" Foreground="White"
|
||||
FontSize="11" FontWeight="SemiBold"/>
|
||||
</Border>
|
||||
<Button Grid.Column="4" Content="+ Eintrag" Command="{Binding AddDocumentationCommand}"/>
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer Grid.Row="1">
|
||||
@@ -32,6 +37,10 @@
|
||||
<TextBlock Grid.Column="0" Text="{Binding DateDisplay}" Opacity="0.5" FontSize="12"/>
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<Border Background="#FB8C00" CornerRadius="8" Padding="6,1"
|
||||
IsVisible="{Binding IsDraft}">
|
||||
<TextBlock Text="ENTWURF" Foreground="White" FontSize="9" FontWeight="Bold"/>
|
||||
</Border>
|
||||
<TextBlock Text="{Binding StudentName}" FontWeight="SemiBold" FontSize="13"/>
|
||||
<TextBlock Text="{Binding Model.Title}" FontSize="13" Opacity="0.8"
|
||||
IsVisible="{Binding IsRevealed}"/>
|
||||
|
||||
@@ -66,6 +66,12 @@
|
||||
<StackPanel Spacing="3">
|
||||
<TextBlock Text="{Binding PlanTitle}" FontSize="22" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding PlanSubtitle}" Opacity="0.65"/>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,6,0,0"
|
||||
IsVisible="{Binding IsEditMode, Converter={x:Static BoolConverters.Not}}">
|
||||
<TextBlock Text="Unterricht:" VerticalAlignment="Center" FontSize="12" Opacity="0.65"/>
|
||||
<ComboBox ItemsSource="{Binding TodaySessions}" SelectedItem="{Binding SelectedSession}"
|
||||
DisplayMemberBinding="{Binding DisplayName}" MinWidth="210"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Bottom" Spacing="4">
|
||||
<ToggleSwitch Content="Bearbeitungsmodus" IsChecked="{Binding IsEditMode}"
|
||||
@@ -112,7 +118,7 @@
|
||||
PointerPressed="OnDragSourcePressed"
|
||||
PointerMoved="OnDragSourceMoved"
|
||||
PointerReleased="OnDragSourceReleased"
|
||||
Tapped="OnSeatTapped">
|
||||
Tapped="OnSeatTapped" Opacity="{Binding LessonOpacity}">
|
||||
<StackPanel Spacing="5">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Text="{Binding PositionLabel}" FontSize="10" Opacity="0.5"/>
|
||||
@@ -120,6 +126,33 @@
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding StudentName}" FontWeight="SemiBold" FontSize="13"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="5"
|
||||
IsVisible="{Binding ShowLessonOverview}">
|
||||
<Border Background="#1976D2" CornerRadius="8" Padding="6,1"
|
||||
IsVisible="{Binding HasAttendanceBadge}">
|
||||
<TextBlock Text="{Binding AttendanceBadge}" Foreground="White" FontSize="10"
|
||||
ToolTip.Tip="Anwesenheit"/>
|
||||
</Border>
|
||||
<Border Background="#FB8C00" CornerRadius="8" Padding="6,1"
|
||||
IsVisible="{Binding HasHomeworkBadge}">
|
||||
<TextBlock Text="{Binding HomeworkBadge}" Foreground="White" FontSize="10"
|
||||
ToolTip.Tip="Hausaufgabe"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<Expander Header="+ Situation" FontSize="10"
|
||||
IsVisible="{Binding CanRecordLesson}">
|
||||
<ItemsControl ItemsSource="{Binding SituationTags}" Margin="0,4,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate><WrapPanel ItemSpacing="3" LineSpacing="3"/></ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SituationTagChoice">
|
||||
<ToggleButton Content="{Binding Text}" IsChecked="{Binding IsSelected, Mode=OneWay}"
|
||||
Command="{Binding ToggleCommand}" FontSize="9" Padding="5,2"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Threading;
|
||||
using Avalonia.VisualTree;
|
||||
using LehrerApp.Core.Models;
|
||||
using LehrerApp.Desktop.ViewModels.Groups;
|
||||
using LehrerApp.Desktop.Views.Shared;
|
||||
@@ -195,6 +197,9 @@ public partial class SeatingPlanTabView : UserControl
|
||||
|
||||
private async void OnSeatTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (e.Source is Control source &&
|
||||
(source is Button or Expander || source.FindAncestorOfType<Button>() is not null ||
|
||||
source.FindAncestorOfType<Expander>() is not null)) return;
|
||||
if (DateTime.UtcNow < _ignoreTapUntil || sender is not Border { DataContext: SeatCellViewModel seat }
|
||||
|| !seat.IsOccupied || DataContext is not SeatingPlanTabViewModel vm) return;
|
||||
await vm.AssessStudent(seat);
|
||||
|
||||
Reference in New Issue
Block a user