-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merge master * Add new page * Finir FAQ login * Add FAQ to more page * Add faq viewmodel tests * flutter test --update-goldens * Add more page test * Clean up * [BOT] Applying version. * [BOT] Applying format. * Fix test * Remove unused * Remove unused variables * Change colors in darkteam * [BOT] Applying format. * generate goldens * [BOT] Applying format. * [BOT] Update golden files * Import * -_- * 😑 * [BOT] Applying version. --------- Co-authored-by: camillebrulotte <[email protected]> Co-authored-by: clubapplets-server <[email protected]>
- Loading branch information
1 parent
3ec46ac
commit db09c2a
Showing
23 changed files
with
732 additions
and
83 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
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 |
---|---|---|
@@ -0,0 +1,129 @@ | ||
// FLUTTER / DART / THIRD-PARTIES | ||
import 'package:flutter/material.dart'; | ||
|
||
// MODELS | ||
import 'package:notredame/core/models/faq_actions.dart'; | ||
import 'package:notredame/core/models/faq_questions.dart'; | ||
|
||
// CONSTANTS | ||
import 'package:notredame/core/constants/app_info.dart'; | ||
|
||
class Faq { | ||
List<QuestionItem> questions = [ | ||
QuestionItem( | ||
title: { | ||
"fr": "Quel mot de passe dois-je utiliser pour me connecter ?", | ||
"en": "What password should I use to log in?" | ||
}, | ||
description: { | ||
"fr": | ||
"Le mot de passe à utiliser correspond à celui utilisé pour la connexion à MonÉTS et les autres systèmes informatiques de l’ÉTS.", | ||
"en": | ||
"The password is the one you use for logging into MonÉTS and other ÉTS computer systems." | ||
}, | ||
), | ||
QuestionItem( | ||
title: { | ||
"fr": "Je n’ai pas accès au cours et au programme.", | ||
"en": "I don't have access to the courses and program." | ||
}, | ||
description: { | ||
"fr": | ||
"Les nouveaux étudiants pourraient ne pas voir l’horaire et les cours inscrits avant le début de la première session de cours. Cependant, ces informations apparaissent dès le début de la première session de cours.", | ||
"en": | ||
"New students may not see the schedule and courses before the start of the first course session. However, this information becomes available at the beginning of the first course session." | ||
}, | ||
), | ||
QuestionItem( | ||
title: { | ||
"fr": | ||
"Je suis diplômé de l’ÉTS et je souhaite faire réactiver mon compte.", | ||
"en": "I am an ÉTS graduate, and I want to reactivate my account." | ||
}, | ||
description: { | ||
"fr": "Vous pouvez demander de réactiver votre compte", | ||
"en": "You can request to reactivate your account." | ||
}, | ||
), | ||
QuestionItem( | ||
title: { | ||
"fr": "Je ne vois plus mes notes de contrôle", | ||
"en": "I can't see my grades anymore." | ||
}, | ||
description: { | ||
"fr": | ||
"Il est possible qu’il s’agit de la période d'évaluation des cours. Vous devez compléter les évaluations sur SignETS. Les notes seront disponibles après avoir répondu aux évaluations.", | ||
"en": | ||
"It is possible that this is the course evaluation period. You need to complete the evaluations on SignETS. Grades will be available after responding to the evaluations." | ||
}, | ||
), | ||
]; | ||
|
||
List<ActionItem> actions = [ | ||
ActionItem( | ||
title: { | ||
"fr": "Où trouver mon code universel ?", | ||
"en": "Where can I find my universal code?" | ||
}, | ||
description: { | ||
"fr": | ||
"Le code universel se trouve dans la décision d’admission sur le portail de monÉTS.", | ||
"en": | ||
"The universal code can be found in the admission decision on the MonÉTS portal." | ||
}, | ||
type: ActionType.webview, | ||
link: "https://portail.etsmtl.ca/home/Admission", | ||
iconName: Icons.person, | ||
iconColor: const Color(0xFFD5A8F8), | ||
circleColor: const Color(0xFF6939B7), | ||
), | ||
ActionItem( | ||
title: { | ||
"fr": | ||
"Je suis diplômé de l’ÉTS et je souhaite faire réactiver mon compte.", | ||
"en": "I am an ÉTS graduate, and I want to reactivate my account." | ||
}, | ||
description: { | ||
"fr": "Vous pouvez demander de réactiver votre compte.", | ||
"en": "You can request to reactivate your account." | ||
}, | ||
type: ActionType.webview, | ||
link: "https://formulaires.etsmtl.ca/ReactivationCompte", | ||
iconName: Icons.school, | ||
iconColor: const Color(0xFF78E2BC), | ||
circleColor: const Color(0xFF39B78A), | ||
), | ||
ActionItem( | ||
title: { | ||
"fr": | ||
"Questions concernant vos conditions d'admission, des inscriptions et des conditions relatives à la poursuite de vos études", | ||
"en": | ||
"Questions about your admission conditions, registrations, and conditions for continuing your studies" | ||
}, | ||
description: { | ||
"fr": "Veuillez contacter le Bureau de la registraire.", | ||
"en": "Please contact the Office of the Registrar." | ||
}, | ||
type: ActionType.email, | ||
link: "[email protected]", | ||
iconName: Icons.email, | ||
iconColor: const Color(0xFFFCA4A4), | ||
circleColor: const Color(0xFFDA4444), | ||
), | ||
ActionItem( | ||
title: { | ||
"fr": "Questions concernant l’application ÉTSMobile", | ||
"en": "Questions about the ÉTSMobile app" | ||
}, | ||
description: { | ||
"fr": "Veuillez contacter App|ETS.", | ||
"en": "Please contact App|ETS." | ||
}, | ||
type: ActionType.email, | ||
link: AppInfo.email, | ||
iconName: Icons.install_mobile, | ||
iconColor: const Color(0xFF71D8F7), | ||
circleColor: const Color(0xFF397DB7), | ||
), | ||
]; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// FLUTTER / DART / THIRD-PARTIES | ||
import 'package:flutter/material.dart'; | ||
|
||
class ActionItem { | ||
final Map<String, String> title; | ||
final Map<String, String> description; | ||
final ActionType type; | ||
final String link; | ||
final IconData iconName; | ||
final Color iconColor; | ||
final Color circleColor; | ||
|
||
ActionItem({ | ||
@required this.title, | ||
@required this.description, | ||
@required this.type, | ||
@required this.link, | ||
@required this.iconName, | ||
@required this.iconColor, | ||
@required this.circleColor, | ||
}); | ||
} | ||
|
||
enum ActionType { | ||
webview, | ||
email, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// FLUTTER / DART / THIRD-PARTIES | ||
import 'package:flutter/material.dart'; | ||
|
||
class QuestionItem { | ||
final Map<String, String> title; | ||
final Map<String, String> description; | ||
|
||
QuestionItem({ | ||
@required this.title, | ||
@required this.description, | ||
}); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// FLUTTER / DART / THIRD-PARTIES | ||
import 'package:flutter/material.dart'; | ||
import 'package:notredame/locator.dart'; | ||
import 'package:stacked/stacked.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
|
||
// MANAGERS | ||
import 'package:notredame/core/managers/settings_manager.dart'; | ||
|
||
// SERVICES | ||
import 'package:notredame/core/services/launch_url_service.dart'; | ||
import 'package:notredame/core/services/analytics_service.dart'; | ||
|
||
// CONSTANTS | ||
import 'package:notredame/core/constants/app_info.dart'; | ||
|
||
class FaqViewModel extends BaseViewModel { | ||
final SettingsManager _settingsManager = locator<SettingsManager>(); | ||
|
||
final LaunchUrlService _launchUrlService = locator<LaunchUrlService>(); | ||
|
||
Locale get locale => _settingsManager.locale; | ||
|
||
String mailtoStr(String email, String subject) { | ||
return 'mailto:$email?subject=$subject'; | ||
} | ||
|
||
Future<void> launchWebsite(String link, Brightness brightness) async { | ||
await _launchUrlService.launchInBrowser(link, brightness); | ||
} | ||
|
||
Future<void> openMail(String addressEmail, BuildContext context) async { | ||
var email = ""; | ||
if (addressEmail == AppInfo.email) { | ||
email = mailtoStr(addressEmail, AppIntl.of(context).email_subject); | ||
} else { | ||
email = mailtoStr(addressEmail, ""); | ||
} | ||
|
||
final urlLaunchable = await _launchUrlService.canLaunch(email); | ||
|
||
if (urlLaunchable) { | ||
await _launchUrlService.launch(email); | ||
} else { | ||
locator<AnalyticsService>().logError("login_view", "Cannot send email."); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.