mario-core 2.9.210-release → 2.9.213-release

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22378,6 +22378,10 @@ var useLogin = function useLogin() {
22378
22378
  profileImageFileName: profileImageFileName
22379
22379
  }));
22380
22380
 
22381
+ if (!localStorage.getItem("ROLES") && roles.includes("Admin")) {
22382
+ localStorage.setItem("ROLES", "Admin");
22383
+ }
22384
+
22381
22385
  if (data !== null && data !== void 0 && data.email && !roles.includes("Admin")) {
22382
22386
  var _data$roles;
22383
22387
 
@@ -22809,7 +22813,7 @@ var BlockLogin = function BlockLogin(_ref) {
22809
22813
  var googleId = res.googleId;
22810
22814
 
22811
22815
  if (email.includes("@gmail")) {
22812
- alert("Please login with your school email");
22816
+ alert("The email address you used does not match the login information in the database. Please check that you are using your school assigned email address to log into MARIO for Me. If you have further trouble please notify your school site administrator:");
22813
22817
  return;
22814
22818
  }
22815
22819
 
@@ -23791,6 +23795,7 @@ var TheSidebar = function TheSidebar(_ref) {
23791
23795
 
23792
23796
  var signOut = useCallback(function () {
23793
23797
  localStorage.removeItem(ACCESS_TOKEN);
23798
+ localStorage.removeItem("ROLES");
23794
23799
  dispatch(reset());
23795
23800
  history.push("/");
23796
23801
  }, []);
@@ -23983,6 +23988,7 @@ var TheHeaderDropdown = function TheHeaderDropdown(_ref) {
23983
23988
  var isTeacher = roles.includes(TEACHER_ROLE);
23984
23989
  var signOut = useCallback(function () {
23985
23990
  localStorage.removeItem(ACCESS_TOKEN);
23991
+ localStorage.removeItem("ROLES");
23986
23992
  dispatch(reset());
23987
23993
  history.push("/");
23988
23994
  }, []);
@@ -24294,11 +24300,7 @@ var ModelSelectRole = function ModelSelectRole(_ref) {
24294
24300
  var roles = user === null || user === void 0 ? void 0 : user.roles;
24295
24301
 
24296
24302
  var handleSelectUserRoles = function handleSelectUserRoles(roles) {
24297
- if (roles.includes("Admin")) {
24298
- dispatch(setLoading(true));
24299
- return history.push("/admin/dashboard");
24300
- }
24301
-
24303
+ dispatch(setLoading(true));
24302
24304
  var roleSelect = roles.includes("Teacher/Assistant") ? ["Teacher", "Assistant"] : roles;
24303
24305
  dispatch(setUser(_extends({}, user, {
24304
24306
  roles: roleSelect
@@ -24308,6 +24310,8 @@ var ModelSelectRole = function ModelSelectRole(_ref) {
24308
24310
 
24309
24311
  if (roles.includes("Parent")) {
24310
24312
  history.push("/parent");
24313
+ } else if (roles.includes("Admin")) {
24314
+ history.push("/admin/dashboard");
24311
24315
  } else {
24312
24316
  pathname !== "/home" ? history.push("/home") : window.location.reload();
24313
24317
  }