Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feat/marks-absences
Browse files Browse the repository at this point in the history
  • Loading branch information
julesartd committed May 21, 2024
1 parent 9e639bf commit 68e4f0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/app_student/lib/users/cubit/user_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:io';
import 'package:app_student/api/class_groups/models/class_group_model.dart';
import 'package:app_student/api/users/models/user_model.dart';
import 'package:bloc/bloc.dart';
import 'package:meta/meta.dart';
import 'package:flutter/foundation.dart';

import '../../api/users/repositories/user_repository.dart';
import '../../utils/global.dart';
Expand Down Expand Up @@ -76,7 +76,13 @@ class UserCubit extends Cubit<UserState> {
final user = await userRepository.getUser();
if (user.studentId != null) {
final File marks = await userRepository.getMarks(user.studentId!);
if (kDebugMode) {
print(marks.path);
}
final File absences = await userRepository.getAbsences(user.studentId!);
if (kDebugMode) {
print(absences.path);
}
emit(UserLoaded(user));
} else {
throw Exception('No student ID found in SharedPreferences');
Expand Down

0 comments on commit 68e4f0d

Please sign in to comment.