mario-teacher-student-client 3.0.9-counselor → 3.0.10-counselor

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.
@@ -6,4 +6,3 @@ export interface STYLE_PROPS {
6
6
  width: number;
7
7
  duration: number;
8
8
  }
9
- export declare const NOTIFICATION_ALERT_KEY_ID = "NOTIFICATION_ALERT_KEY_ID";
package/dist/index.css CHANGED
@@ -5386,7 +5386,7 @@ h2._2HVLw {
5386
5386
  position: absolute;
5387
5387
  color: rgba(0, 0, 0, 0.54);
5388
5388
  font-size: 1rem;
5389
- font-family: "Roboto", "Helvetica", "Arial",
5390
5389
  sans-serif;
5390
+ font-family: "Roboto", "Helvetica", "Arial", sans-serif;
5391
5391
  letter-spacing: 0.00938em;
5392
5392
  background: #ffffff; }
5393
5393
  ._3TPGz ._1n-GQ ._1IiKL ._1k0E0 ._10gXX ._1Rtg2 {
package/dist/index.js CHANGED
@@ -592,10 +592,11 @@ var NotificationStepLogin = function NotificationStepLogin(_ref) {
592
592
  var isTeacher = roles.includes("Teacher") || roles.includes("Assistant");
593
593
  var isAssistant = roles.includes("Assistant") && !roles.includes("Teacher");
594
594
  var isStudent = roles.includes("Student");
595
+ var isCounselor = roles.includes("Counselor");
595
596
  var classes = React.useMemo(function () {
596
597
  var className = '';
597
598
 
598
- if (isAssistant) {
599
+ if (isAssistant || isCounselor) {
599
600
  className = "notification-assistant";
600
601
  } else if (isTeacher) {
601
602
  className = "notification";
@@ -915,8 +916,6 @@ var getBySchool = function getBySchool() {
915
916
  return marioCore.api.get("" + NOTIFICATION_ALERT);
916
917
  };
917
918
 
918
- var NOTIFICATION_ALERT_KEY_ID = "NOTIFICATION_ALERT_KEY_ID";
919
-
920
919
  var useNotificationAlert = function useNotificationAlert() {
921
920
  var _useState = React.useState(),
922
921
  data = _useState[0],
@@ -927,7 +926,7 @@ var useNotificationAlert = function useNotificationAlert() {
927
926
  setOpen = _useState2[1];
928
927
 
929
928
  var location = reactRouterDom.useLocation();
930
- var closedNotificationAlertId = localStorage.getItem(NOTIFICATION_ALERT_KEY_ID);
929
+ var closedNotificationAlertId = localStorage.getItem(marioCore.NOTIFICATION_ALERT_KEY);
931
930
 
932
931
  var getData = function getData() {
933
932
  try {
@@ -935,10 +934,10 @@ var useNotificationAlert = function useNotificationAlert() {
935
934
  return Promise.resolve(getBySchool()).then(function (res) {
936
935
  setData(res.data);
937
936
 
938
- if (res.data.id == closedNotificationAlertId) {
939
- setOpen(false);
940
- } else {
937
+ if (!!res.data.id && res.data.id != closedNotificationAlertId) {
941
938
  setOpen(true);
939
+ } else {
940
+ setOpen(false);
942
941
  }
943
942
  });
944
943
  }, function (err) {
@@ -956,7 +955,7 @@ var useNotificationAlert = function useNotificationAlert() {
956
955
 
957
956
  var handleCloseNotification = function handleCloseNotification() {
958
957
  setOpen(false);
959
- !!data && localStorage.setItem(NOTIFICATION_ALERT_KEY_ID, "" + data.id);
958
+ !!data && localStorage.setItem(marioCore.NOTIFICATION_ALERT_KEY, "" + data.id);
960
959
  };
961
960
 
962
961
  React.useEffect(function () {
@@ -1320,7 +1319,7 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
1320
1319
  return React__default.createElement("div", null, React__default.createElement(AppBar, {
1321
1320
  position: "fixed",
1322
1321
  className: classes.header
1323
- }, !!(notificationAlert !== null && notificationAlert !== void 0 && notificationAlert.name) && React__default.createElement(NotificationAlert, {
1322
+ }, !!(notificationAlert !== null && notificationAlert !== void 0 && notificationAlert.name) && !!(notificationAlert !== null && notificationAlert !== void 0 && notificationAlert.id) && React__default.createElement(NotificationAlert, {
1324
1323
  isOpen: isOpen,
1325
1324
  data: notificationAlert,
1326
1325
  onClose: handleCloseNotification,
@@ -19863,8 +19862,6 @@ var StudentList = function StudentList() {
19863
19862
  return (_state$common = state.common) === null || _state$common === void 0 ? void 0 : (_state$common$user = _state$common.user) === null || _state$common$user === void 0 ? void 0 : _state$common$user.roles;
19864
19863
  });
19865
19864
  var isTeacher = roles.includes("Teacher");
19866
- var isAssistant = roles.includes("Assistant") && !roles.includes("Teacher");
19867
- var isCounselor = roles.includes("Counselor");
19868
19865
  var user = reactRedux.useSelector(function (state) {
19869
19866
  var _state$common2;
19870
19867
 
@@ -20027,7 +20024,7 @@ var StudentList = function StudentList() {
20027
20024
  className: myStudent["title-student-gr"] + " " + myStudent[classFontSize]
20028
20025
  }, React__default.createElement(core.Grid, {
20029
20026
  className: "" + myStudent["title-student-list"]
20030
- }, t("my_students")), (!isAssistant || !isCounselor) && React__default.createElement(core.Grid, {
20027
+ }, t("my_students")), isTeacher && React__default.createElement(core.Grid, {
20031
20028
  className: "" + myStudent["btn-import"]
20032
20029
  }, React__default.createElement(Input, {
20033
20030
  className: "d-none",
@@ -20465,7 +20462,7 @@ var StudentList = function StudentList() {
20465
20462
  caption: classes.fontCustom,
20466
20463
  select: classes.select
20467
20464
  }
20468
- }))), screenWidth < 600 && !isAssistant && React__default.createElement(core.Grid, {
20465
+ }))), screenWidth < 600 && isTeacher && React__default.createElement(core.Grid, {
20469
20466
  className: "" + myStudent["btn-import-mobile"]
20470
20467
  }, React__default.createElement(Input, {
20471
20468
  className: "d-none",
@@ -53053,7 +53050,7 @@ var useNoteAdd = function useNoteAdd() {
53053
53050
  };
53054
53051
 
53055
53052
  var _temp5 = function () {
53056
- if (role === "Teacher" || role == "Assistant") {
53053
+ if (role === "Teacher" || role == "Assistant" || role == "Counselor") {
53057
53054
  var _temp6 = function _temp6() {
53058
53055
  if (!data.title) setErrorTitle(true);
53059
53056
  if (!data.studentId) setErrorSelect(true);