Upgrade Sitzplan - Jetzt mit Bewertungsfeature
This commit is contained in:
@@ -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