Stundenplan: Dropdown für Unterrichtsansicht/Sitzplan/Planung/Planungsviewer
Die zwei Buttons in der "Heute"-Tagesliste mit teils vom Lesson-Status
abhängiger Doppelbedeutung ("Verlaufsplan ansehen"/"Zur Lerngruppe") waren
unklar. Ersetzt durch ein Dropdown mit vier ausdrücklich benannten Zielen;
drei nutzen bestehende Commands, "Sitzplan" (Sitzpläne-Tab) ist neu und
bisher nur indirekt über den Unterrichtsmodus erreichbar gewesen.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -900,6 +900,9 @@ public class UpcomingExamItem(DateOnly date, string groupName, string title)
|
||||
public string Title { get; } = title;
|
||||
}
|
||||
|
||||
public enum TimetableLessonDestination { TeachingMode, Viewer, SeatingPlan, Planning }
|
||||
public sealed record TimetableDestinationOption(TimetableLessonDestination Kind, string Label);
|
||||
|
||||
public class TodayLessonItem
|
||||
{
|
||||
public Guid GroupId { get; private init; }
|
||||
@@ -922,6 +925,33 @@ public class TodayLessonItem
|
||||
public bool HasLesson => Lesson is not null;
|
||||
public string OpenButtonLabel => Lesson is not null ? "Verlaufsplan ansehen" : "Zur Lerngruppe";
|
||||
|
||||
/// Nutzer-Feedback: es war unklar, wie man aus der "Heute"-Tagesliste zwischen
|
||||
/// Unterrichtsansicht, Sitzplan, Planung und Planungsviewer wechselt — bisher zwei Buttons
|
||||
/// mit unterschiedlicher, teils vom Lesson-Status abhängiger Bedeutung
|
||||
/// ("Verlaufsplan ansehen"/"Zur Lerngruppe"). Ein Dropdown mit ausdrücklich benannten Zielen
|
||||
/// statt dessen (Wiring/Routing in TimetableView.axaml.cs). Unterrichtsansicht/Planungsviewer
|
||||
/// brauchen eine existierende Lesson, Sitzplan/Planung sind auch ohne bereits möglich (Planung
|
||||
/// ist ohnehin der Ort, an dem man eine Lesson für den Slot erst anlegt).
|
||||
public IReadOnlyList<TimetableDestinationOption> DestinationOptions
|
||||
{
|
||||
get
|
||||
{
|
||||
var options = new List<TimetableDestinationOption>();
|
||||
if (HasLesson)
|
||||
{
|
||||
options.Add(new(TimetableLessonDestination.TeachingMode, "▶ Unterrichtsansicht"));
|
||||
options.Add(new(TimetableLessonDestination.Viewer, "📋 Planungsviewer"));
|
||||
}
|
||||
if (HasGroupId)
|
||||
{
|
||||
options.Add(new(TimetableLessonDestination.SeatingPlan, "🪑 Sitzplan"));
|
||||
options.Add(new(TimetableLessonDestination.Planning, "✏️ Planung"));
|
||||
}
|
||||
return options;
|
||||
}
|
||||
}
|
||||
public bool HasDestinationOptions => DestinationOptions.Count > 0;
|
||||
|
||||
public TodayLessonItem(Guid groupId, int periodNumber, string groupName, string room,
|
||||
string colorHex, string? lessonTopic, string? examTitle, bool hasUnhandledHomework = false,
|
||||
Lesson? lesson = null)
|
||||
|
||||
Reference in New Issue
Block a user