mario-core 2.5.8 → 2.6.2

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.
@@ -22,7 +22,7 @@ import Creatable from 'react-select/creatable';
22
22
  import ReactNotification$1 from 'react-notifications-component';
23
23
  import 'react-notifications-component/dist/theme.css';
24
24
  import { AiOutlineEye } from 'react-icons/ai';
25
- import format$1 from 'date-fns/format';
25
+ import moment from 'moment';
26
26
 
27
27
  // A type of promise-like that resolves synchronously and supports only one observer
28
28
 
@@ -130,10 +130,10 @@ var COLORS = {
130
130
  SUCCESS: "#28a745",
131
131
  INFO: "#007bff"
132
132
  };
133
- var DATE_FORMAT = "yyyy-MM-dd";
134
- var DATE_RESULT = "dd-MM-yyyy";
135
- var FULL_DATE_RESULT = "dd-MM-yyyy HH:mm";
136
- var FULL_DATE_FORMAT = "yyyy-MM-dd HH:mm";
133
+ var DATE_FORMAT = "yyyy-MM-DD";
134
+ var DATE_RESULT = "DD-MM-yyyy";
135
+ var FULL_DATE_RESULT = "DD-MM-yyyy HH:mm";
136
+ var FULL_DATE_FORMAT = "yyyy-MM-DD HH:mm";
137
137
  var DATE_MIN_VALUE = "0001-01-01T00:00:00";
138
138
  var LICENSE_AGGRID = "Alhanko&Johnson_BASE23_single_1_Devs__22_November_2020_[v2]_MTYwNjAwMzIwMDAwMA==d452f38afc893671cad92795e95d52a1";
139
139
  var BASE_URL = function () {
@@ -1242,7 +1242,7 @@ var ContentHomePage = function ContentHomePage(_ref) {
1242
1242
 
1243
1243
  var HOME_ADMIN = "/admin/user";
1244
1244
  var HOME_TEACHER = "/home";
1245
- var HOME_STUDENT = "/studenthome";
1245
+ var HOME_STUDENT = "/home";
1246
1246
  var DASHBOARD_TITLE = "Dashboard";
1247
1247
  var ROOT_TITLE = "Mario Framework";
1248
1248
 
@@ -5147,14 +5147,11 @@ var NotificationStatusSelector = function NotificationStatusSelector(_ref) {
5147
5147
 
5148
5148
  var NotificationStatusSelector$1 = memo(NotificationStatusSelector);
5149
5149
 
5150
- var FULL_FORMAT = "MM-dd-yyyy HH:mm:ss";
5151
5150
  var utcToLocalTime = (function (time, FORMAT) {
5152
5151
  if (time === DATE_MIN_VALUE) return "";
5153
5152
 
5154
5153
  try {
5155
- var utcDate = format$1(new Date(time), FULL_FORMAT);
5156
- var utcDateFormat = format$1(new Date(utcDate), FULL_FORMAT) + " UTC";
5157
- return format$1(new Date(utcDateFormat), FORMAT || DATE_FORMAT);
5154
+ return moment.utc(time).local().format(FORMAT || DATE_FORMAT);
5158
5155
  } catch (_unused) {
5159
5156
  return "";
5160
5157
  }
@@ -5202,7 +5199,7 @@ var useNotificationList = function useNotificationList() {
5202
5199
  };
5203
5200
 
5204
5201
  var viewNotification = function viewNotification(notification) {
5205
- var _JSON$parse;
5202
+ var _JSON$parse, _JSON$parse2;
5206
5203
 
5207
5204
  var source = notification.source,
5208
5205
  extraData = notification.extraData;
@@ -5212,8 +5209,8 @@ var useNotificationList = function useNotificationList() {
5212
5209
  window.open("/player/diagnosticsurvey/" + Number(extraData));
5213
5210
  break;
5214
5211
 
5215
- case "Student Session":
5216
- window.open("/start-session/" + JSON.parse(extraData).sessionId + "/" + ((_JSON$parse = JSON.parse(extraData)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.sessionResultId) + "/1");
5212
+ case "NewSessionCreated":
5213
+ window.open("/start-question/" + ((_JSON$parse = JSON.parse(extraData)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[0]) + "/" + ((_JSON$parse2 = JSON.parse(extraData)) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[1]));
5217
5214
  break;
5218
5215
 
5219
5216
  case "CertificateApproved":
@@ -5385,7 +5382,7 @@ var NotificationList = function NotificationList() {
5385
5382
  }
5386
5383
  })), React.createElement("td", {
5387
5384
  className: "text-center align-middle"
5388
- }, ["AssessmentAssignment", "Student Session", "CertificateApproved"].includes(record.source) && React.createElement(AiOutlineEye, {
5385
+ }, ["AssessmentAssignment", "NewSessionCreated", "CertificateApproved"].includes(record.source) && React.createElement(AiOutlineEye, {
5389
5386
  className: "cursor-pointer",
5390
5387
  size: ICON_SIZE,
5391
5388
  title: "Detail",