Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make substitution feature available on stable track #1613

Merged
merged 1 commit into from
May 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading