Skip to content

Commit

Permalink
Make substitution feature available on stable track (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored May 5, 2024
1 parent 0030a7c commit 2d1eebb
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions app/lib/timetable/timetable_page/lesson/substitution_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,35 +65,33 @@ class _SubstitutionSection extends StatelessWidget {
hasPermissionsToManageLessons: hasPermissionsToManageLessons,
)
] else ...[
if (!isStableStage)
if (hasPermissionsToManageLessons) ...[
ListTile(
leading: const Icon(Icons.cancel),
title: const Text("Stunde entfallen lassen"),
onTap: () => Navigator.pop(
context,
hasUnlocked
? _LessonModelSheetAction.cancelLesson
: _LessonModelSheetAction.showSubstitutionPlusDialog),
),
ListTile(
leading: const Icon(Icons.place_outlined),
title: const Text("Raumänderung"),
onTap: () => Navigator.pop(
context,
hasUnlocked
? _LessonModelSheetAction.addRoomSubstitution
: _LessonModelSheetAction.showSubstitutionPlusDialog),
if (hasPermissionsToManageLessons) ...[
ListTile(
leading: const Icon(Icons.cancel),
title: const Text("Stunde entfallen lassen"),
onTap: () => Navigator.pop(
context,
hasUnlocked
? _LessonModelSheetAction.cancelLesson
: _LessonModelSheetAction.showSubstitutionPlusDialog),
),
ListTile(
leading: const Icon(Icons.place_outlined),
title: const Text("Raumänderung"),
onTap: () => Navigator.pop(
context,
hasUnlocked
? _LessonModelSheetAction.addRoomSubstitution
: _LessonModelSheetAction.showSubstitutionPlusDialog),
),
] else
const ListTile(
leading: Icon(Icons.info),
title: Text(
'Du hast keine Berechtigung, den Vertretungsplan zu ändern.',
),
] else
const ListTile(
leading: Icon(Icons.info),
title: Text(
'Du hast keine Berechtigung, den Vertretungsplan zu ändern.',
),
subtitle:
Text('Bitte wende dich an deinen Kurs-Administrator.'),
)
subtitle: Text('Bitte wende dich an deinen Kurs-Administrator.'),
)
],
],
);
Expand Down

0 comments on commit 2d1eebb

Please sign in to comment.