Skip to content

Commit 5cdd7c4

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/RenewCommissieDescriptionFetcher
2 parents 920afe7 + 0255f78 commit 5cdd7c4

File tree

7 files changed

+117
-106
lines changed

7 files changed

+117
-106
lines changed

lib/src/features/training/model/reservation.dart

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Reservation {
2323

2424
final String objectName;
2525
final String creatorName;
26+
final bool? creatorIsAdmin;
2627

2728
// Firestore doesn't support DateTime, so we use Timestamp instead.
2829
@JsonKey(name: "startTime")
@@ -47,6 +48,7 @@ class Reservation {
4748
required this.creatorId,
4849
required this.objectName,
4950
required this.creatorName,
51+
this.creatorIsAdmin,
5052
});
5153

5254
// ignore: sort_constructors_first

lib/src/features/training/model/reservation.g.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/features/training/pages/plan_training_page.dart

+4
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ class _PlanTrainingPageState extends ConsumerState<PlanTrainingPage> {
257257
: () => createReservation(
258258
currentUser.identifier.toString(),
259259
currentUser.fullName,
260+
currentUser.isAdmin,
260261
),
261262
child: <Widget>[
262263
Icon(inProgress ? LucideIcons.loader : LucideIcons.check)
@@ -276,6 +277,7 @@ class _PlanTrainingPageState extends ConsumerState<PlanTrainingPage> {
276277
void createReservation(
277278
String uid,
278279
String creatorName,
280+
bool? creatorIsAdmin,
279281
) async {
280282
setState(() {
281283
inProgress = true;
@@ -288,6 +290,7 @@ class _PlanTrainingPageState extends ConsumerState<PlanTrainingPage> {
288290
creatorId: uid,
289291
objectName: widget.objectName,
290292
creatorName: creatorName,
293+
creatorIsAdmin: creatorIsAdmin,
291294
));
292295

293296
if (res['success'] == true) {
@@ -339,6 +342,7 @@ class _PlanTrainingPageState extends ConsumerState<PlanTrainingPage> {
339342
'object': r.reservationObject.path,
340343
'objectName': r.objectName,
341344
'creatorName': r.creatorName,
345+
'creatorIsAdmin': r.creatorIsAdmin,
342346
});
343347

344348
return result.data;
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
C:/Users/fschu/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.1/
1+
C:/Users/fschu/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.1/
2+
/home/pim/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.2/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/pim/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+2/
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
C:/Users/fschu/AppData/Local/Pub/Cache/hosted/pub.dev/package_info_plus-8.1.1/
1+
C:/Users/fschu/AppData/Local/Pub/Cache/hosted/pub.dev/package_info_plus-8.1.1/
2+
/home/pim/.pub-cache/hosted/pub.dev/package_info_plus-8.3.0/

0 commit comments

Comments
 (0)