-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # frontend/app_student/pubspec.yaml
- Loading branch information
Showing
28 changed files
with
205 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea/ | ||
.vscode/ | ||
backend/vendor/ | ||
backend/vendor/ | ||
/backend/.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
# app_student | ||
# Application Flutter pour l'emploi du temps et les notes - Groupe 3iL | ||
|
||
A new Flutter project. | ||
Ce projet est une application mobile développée en Flutter par des étudiants du Groupe 3iL. Elle vise à fournir aux étudiants un accès facile à leur emploi du temps et à leurs notes. | ||
|
||
## Getting Started | ||
## Configuration | ||
|
||
This project is a starting point for a Flutter application. | ||
### Environnements | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
L'application est configurée pour fonctionner dans deux environnements différents : développement (dev) et production (prod). Chaque environnement utilise une API distincte. | ||
|
||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) | ||
- **Dev**: Utilise une API de développement pour tester et déboguer l'application. | ||
- **Prod**: Utilise une API de production pour une utilisation en direct. | ||
|
||
For help getting started with Flutter development, view the | ||
[online documentation](https://docs.flutter.dev/), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. | ||
## Version de Flutter | ||
|
||
Ce projet utilise Flutter version 3.19.2. | ||
|
||
## Internationalisation (i18n) | ||
|
||
L'application utilise la fonctionnalité de localisation (l10n) de Flutter pour supporter plusieurs langues. N'oubliez pas de générer les fichiers de localisation en exécutant `flutter gen-l10n` avant de construire l'application. | ||
|
||
## Pré-requis | ||
|
||
Avant de pousser votre code, assurez-vous de respecter les points suivants : | ||
|
||
- Utilisez `dart format` pour formater votre code. | ||
- Exécutez `flutter analyze` pour détecter tout problème dans votre code. | ||
- Assurez-vous d'exécuter `pub get` pour installer toutes les dépendances du projet. | ||
|
||
## Contributions | ||
|
||
Les contributions des autres étudiants sont les bienvenues! N'hésitez pas à proposer des améliorations, des corrections de bugs ou de nouvelles fonctionnalités en soumettant des pull requests. | ||
|
||
## Licence | ||
|
||
Ce projet est destiné à des fins éducatives. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import 'package:app_student/api/class_groups/entities/class_group_entity.dart'; | ||
|
||
class UserEntity { | ||
final String ine; | ||
final String firstName; | ||
final DateTime birthDate; | ||
final ClassGroupEntity? classGroup; | ||
final String? className; | ||
|
||
UserEntity( | ||
{required this.ine, | ||
required this.firstName, | ||
required this.birthDate, | ||
this.classGroup}); | ||
this.className = ''}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 17 additions & 2 deletions
19
frontend/app_student/lib/class_groups/cubit/class_group_cubit.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,37 @@ | ||
import 'package:app_student/api/class_groups/models/class_group_model.dart'; | ||
import 'package:app_student/api/class_groups/repositories/class_group_repository.dart'; | ||
import 'package:app_student/api/users/models/user_model.dart'; | ||
import 'package:bloc/bloc.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
import '../../api/class_groups/repositories/class_group_repository.dart'; | ||
import '../../api/users/repositories/user_repository.dart'; | ||
|
||
part 'class_group_state.dart'; | ||
|
||
class ClassGroupCubit extends Cubit<ClassGroupState> { | ||
final ClassGroupRepository classRepository; | ||
final UserRepository userRepository; | ||
|
||
ClassGroupCubit({required this.classRepository}) : super(ClassGroupInitial()); | ||
ClassGroupCubit({required this.classRepository, required this.userRepository}) | ||
: super(ClassGroupInitial()); | ||
|
||
Future<void> fetchClasses() async { | ||
try { | ||
emit(ClassGroupLoading()); | ||
final classes = await classRepository.getClasses(); | ||
|
||
emit(ClassGroupLoaded(classes)); | ||
} catch (e) { | ||
emit(ClassGroupError(e.toString())); | ||
} | ||
} | ||
|
||
Future<UserModel> getConnectedUser() async { | ||
return userRepository.getUser(); | ||
} | ||
|
||
Future<void> saveClass(ClassGroupModel classGroup) async { | ||
await userRepository.saveUserClass(classGroup.name.toString()); | ||
emit(ClassGroupSelected()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
frontend/app_student/lib/class_groups/views/class_group_view.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.