mario-core 2.9.98-beta → 2.9.101-beta

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.
@@ -2673,12 +2673,14 @@ var apiUpload = axios.create({
2673
2673
  if (!key.includes('learning-plan')) delete localStorage[key];
2674
2674
  });
2675
2675
  var userEmail = localStorage.getItem("USER_EMAIL");
2676
+ var roles = localStorage.getItem("ROLES");
2676
2677
  var hostName = window.location.hostname;
2677
2678
 
2678
2679
  if (userEmail) {
2679
2680
  amplitude.getInstance().logEvent("general: session end", {
2680
2681
  user_id: userEmail,
2681
- domain: hostName
2682
+ domain: hostName,
2683
+ roles: roles
2682
2684
  });
2683
2685
  amplitude.getInstance().resetSessionId();
2684
2686
  }
@@ -2822,6 +2824,8 @@ var useLogin = function useLogin() {
2822
2824
  }));
2823
2825
 
2824
2826
  if (data !== null && data !== void 0 && data.email && !roles.includes("Admin")) {
2827
+ var _data$roles;
2828
+
2825
2829
  amplitude.getInstance().init(!isLocalhost ? INIT_AMPLITUDE_KEY_PROD : INIT_AMPLITUDE_KEY_STAGE, data.email, {
2826
2830
  includeReferrer: false,
2827
2831
  includeUtm: false
@@ -2829,14 +2833,18 @@ var useLogin = function useLogin() {
2829
2833
  var hostName = window.location.hostname;
2830
2834
  amplitude.getInstance().logEvent("general: session start", {
2831
2835
  user_id: data.email,
2832
- domain: hostName
2836
+ domain: hostName,
2837
+ roles: data === null || data === void 0 ? void 0 : (_data$roles = data.roles) === null || _data$roles === void 0 ? void 0 : _data$roles.toString()
2833
2838
  });
2834
2839
  localStorage.setItem("USER_EMAIL", data.email);
2835
2840
 
2836
2841
  if (isLoginFirst) {
2842
+ var _data$roles2;
2843
+
2837
2844
  amplitude.getInstance().logEvent("general: first login", {
2838
2845
  user_id: data.email,
2839
- domain: hostName
2846
+ domain: hostName,
2847
+ roles: data === null || data === void 0 ? void 0 : (_data$roles2 = data.roles) === null || _data$roles2 === void 0 ? void 0 : _data$roles2.toString()
2840
2848
  });
2841
2849
  }
2842
2850
  }
@@ -9496,7 +9504,8 @@ var initialState = {
9496
9504
  first_login: "",
9497
9505
  duration_since: 0,
9498
9506
  last_page: "",
9499
- event: ""
9507
+ event: "",
9508
+ roles: ""
9500
9509
  }
9501
9510
  };
9502
9511
  var commonReducer = createReducer(initialState, function (builder) {