Neue Abwensenheitsmodi plus Upgrade Sitzplan

This commit is contained in:
2026-08-19 12:27:12 +02:00
parent 1731e5088e
commit b2c1b15167
16 changed files with 383 additions and 30 deletions
@@ -48,7 +48,7 @@ public partial class SeatingPlanTabView : UserControl
!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed) return;
var candidate = control.DataContext;
if (candidate is SeatCellViewModel { IsOccupied: false } or null) return;
if (DataContext is not SeatingPlanTabViewModel { IsEditable: true }) return;
if (DataContext is not SeatingPlanTabViewModel { CanEditLayout: true }) return;
_dragCandidate = candidate;
_dragTrigger = e;
_pressPosition = e.GetPosition(this);
@@ -132,7 +132,7 @@ public partial class SeatingPlanTabView : UserControl
}
private bool CanDropOn(SeatCellViewModel target) =>
DataContext is SeatingPlanTabViewModel { IsEditable: true }
DataContext is SeatingPlanTabViewModel { CanEditLayout: true }
&& ((_draggedSeat is not null && _draggedSeat != target) || _draggedStudent?.StudentId is not null);
private void OnUnassignedDragOver(object? sender, DragEventArgs e) =>