@dexteel/mesf-core 4.16.6 → 4.16.8

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "4.16.6"
2
+ ".": "4.16.8"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # Changelog
2
+
3
+ ## [4.16.8](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.16.7...@dexteel/mesf-core-v4.16.8) (2024-07-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ShiftNavigator:** Show current date correctly ([289ca45](https://github.com/dexteel/mesf-core-frontend/commit/289ca45143f76544bbc26289f3cd0be0b82d6c1d))
9
+
10
+ ## [4.16.7] - 2024-07-19
11
+
12
+
13
+
14
+ # Changelog
15
+
16
+ ## [4.16.7](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.16.6...@dexteel/mesf-core-v4.16.7) (2024-07-19)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **ShiftNavigator:** Handle when no shifts are available ([8c18afc](https://github.com/dexteel/mesf-core-frontend/commit/8c18afcb3259d132cb29670e8aac560d5024f2b8))
22
+
23
+ ## [4.16.6] - 2024-07-17
24
+
25
+
26
+
1
27
  # Changelog
2
28
 
3
29
  ## [4.16.6](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.16.5...@dexteel/mesf-core-v4.16.6) (2024-07-17)
package/dist/index.esm.js CHANGED
@@ -4,8 +4,8 @@ import { values, get, isNil as isNil$1, isEmpty, round, isNaN, isNumber } from '
4
4
  import * as React from 'react';
5
5
  import React__default, { useState, useRef, useEffect, useMemo, Component, createContext, useContext, useCallback, lazy, Suspense } from 'react';
6
6
  import { ArrowRight, ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight } from '@material-ui/icons';
7
- import { DatePicker } from '@mui/x-date-pickers/DatePicker/DatePicker';
8
7
  import { Outlet, useParams, useNavigate, useSearchParams, Link, Navigate, Routes, Route, BrowserRouter } from 'react-router-dom';
8
+ import { DatePicker } from '@mui/x-date-pickers/DatePicker';
9
9
  import { Alert as Alert$1, Modal as Modal$1, Navbar, Container, Nav, NavDropdown } from 'react-bootstrap';
10
10
  import { useMsal, MsalProvider } from '@azure/msal-react';
11
11
  import { LogLevel, PublicClientApplication } from '@azure/msal-browser';
@@ -7717,16 +7717,17 @@ var ShiftNavigatorProvider = function (_a) {
7717
7717
 
7718
7718
  var moment = getMomentTz();
7719
7719
  var ShiftDayNavigatorControl = function (props) {
7720
- var _a = useShiftNavigator(), shiftInfo = _a.shiftInfo, initShiftNavigator = _a.initShiftNavigator, moveShift = _a.moveShift, getShiftDataFromAPI = _a.getShiftDataFromAPI;
7720
+ var _a;
7721
+ var _b = useShiftNavigator(), shiftInfo = _b.shiftInfo, initShiftNavigator = _b.initShiftNavigator, moveShift = _b.moveShift, getShiftDataFromAPI = _b.getShiftDataFromAPI;
7721
7722
  var shiftId = useParams().shiftId;
7722
7723
  var firstRender = useRef(true);
7723
7724
  var updateHistory = function (shiftId) {
7724
7725
  var paths = location.pathname.split("/");
7725
7726
  window.history.replaceState(null, "", "/".concat(paths[1]) + "/".concat(shiftId));
7726
7727
  };
7727
- if (shiftInfo !== null && shiftInfo.CurrentShiftId !== null) {
7728
+ if (shiftInfo !== null && shiftInfo.CurrentShiftId) {
7728
7729
  if (props.useRouter) {
7729
- updateHistory(shiftInfo.CurrentShiftId.toString());
7730
+ updateHistory((_a = shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId) === null || _a === void 0 ? void 0 : _a.toString());
7730
7731
  }
7731
7732
  }
7732
7733
  useEffect(function () {
@@ -7756,7 +7757,7 @@ var ShiftDayNavigatorControl = function (props) {
7756
7757
  }, size: "small" },
7757
7758
  React__default.createElement(ArrowBackRounded, null)))),
7758
7759
  React__default.createElement(Grid, { item: true },
7759
- React__default.createElement(DatePicker, { label: "Current Date", timezone: TimeService.getInstance().getServerTimeZone(), format: "MM/DD/YYYY", maxDate: moment(), closeOnSelect: true, formatDensity: 'dense', value: moment(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate), onChange: function (date) {
7760
+ React__default.createElement(DatePicker, { label: "Current Date", timezone: 'UTC', format: "MM/DD/YYYY", maxDate: moment(), closeOnSelect: true, formatDensity: 'dense', value: moment(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate), onChange: function (date) {
7760
7761
  if (date) {
7761
7762
  getShiftDataFromAPI(date.toDate(), 0)
7762
7763
  .then(function () {