@dexteel/mesf-core 4.16.6 → 4.16.7

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.7"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # Changelog
2
+
3
+ ## [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)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ShiftNavigator:** Handle when no shifts are available ([8c18afc](https://github.com/dexteel/mesf-core-frontend/commit/8c18afcb3259d132cb29670e8aac560d5024f2b8))
9
+
10
+ ## [4.16.6] - 2024-07-17
11
+
12
+
13
+
1
14
  # Changelog
2
15
 
3
16
  ## [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
@@ -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 () {