@dexteel/mesf-core 7.19.1 → 7.20.1

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
- ".": "7.19.1"
2
+ ".": "7.20.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.20.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.20.0...@dexteel/mesf-core-v7.20.1) (2026-04-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **Shift Navigator:** Use production date of last shift as maxDate instead of now. ([5677435](https://github.com/dexteel/mesf-core-frontend/commit/56774355e310a96acf99a5d2cbb7d2cebc474586))
9
+
10
+ ## [7.20.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.19.1...@dexteel/mesf-core-v7.20.0) (2026-04-17)
11
+
12
+
13
+ ### Features
14
+
15
+ * **Logbook:** Search shifts by selected asset. Manage by LogbookEntrySettings. ([bf923f9](https://github.com/dexteel/mesf-core-frontend/commit/bf923f98338eaddb7b1d1a15f82bdb3fe83f61c5))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **ContextMenu:** Add data-test-id to each MenuItem. ([30f6ce5](https://github.com/dexteel/mesf-core-frontend/commit/30f6ce5306ed57f6a86683e077d684291d090830))
21
+
3
22
  ## [7.19.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.19.0...@dexteel/mesf-core-v7.19.1) (2026-04-17)
4
23
 
5
24
 
package/dist/index.esm.js CHANGED
@@ -283,7 +283,7 @@ const ContextMenu$1 = ({ show, position, options }) => {
283
283
  "& .MuiSvgIcon-root": {
284
284
  fontSize: "1rem",
285
285
  },
286
- } }, options.map((option, i) => (React.createElement(MenuItem, { key: option.key + i, style: option.style, onClick: option.onClick, disabled: option.disabled },
286
+ } }, options.map((option, i) => (React.createElement(MenuItem, { key: option.key + i, style: option.style, onClick: option.onClick, disabled: option.disabled, "data-test-id": option.key },
287
287
  React.createElement(ListItemIcon, { style: { padding: 0, margin: 0 } }, option.icon),
288
288
  option.name)))));
289
289
  };
@@ -5803,7 +5803,7 @@ const ShiftDayNavigatorControl = (_a) => {
5803
5803
  }, size: "small" },
5804
5804
  React__default.createElement(ArrowBackRounded, null)))),
5805
5805
  React__default.createElement(Grid2, { size: "auto" },
5806
- React__default.createElement(DatePicker, { label: "Current Date", timezone: "UTC", format: "MM/DD/YYYY", maxDate: moment$h(), closeOnSelect: true, formatDensity: "dense", value: moment$h(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate), onChange: (date) => {
5806
+ React__default.createElement(DatePicker, { label: "Current Date", timezone: "UTC", format: "MM/DD/YYYY", maxDate: moment$h(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.LastProductionDate) || moment$h(), closeOnSelect: true, formatDensity: "dense", value: moment$h(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate), onChange: (date) => {
5807
5807
  if (date) {
5808
5808
  getShiftDataFromAPI(date.toDate(), 0, assetId).then(() => { });
5809
5809
  }
@@ -9977,6 +9977,7 @@ const LogbookSettingsInitialState = {
9977
9977
  exportToExcel: false,
9978
9978
  shiftsRange: 7,
9979
9979
  presetAssetId: undefined,
9980
+ useShiftNavigatorBasedOnAsset: false,
9980
9981
  },
9981
9982
  report: {
9982
9983
  withAssetFilter: undefined,
@@ -17403,18 +17404,31 @@ const Logbook$3 = () => {
17403
17404
  }
17404
17405
  }, [shiftInfo]);
17405
17406
  useEffect(() => {
17406
- if (shiftId) {
17407
- (() => __awaiter(void 0, void 0, void 0, function* () {
17408
- const shiftIdNumber = Number(shiftId);
17409
- yield getShiftDataFromAPI(null, shiftIdNumber);
17410
- }))();
17411
- }
17412
- else {
17413
- (() => __awaiter(void 0, void 0, void 0, function* () {
17414
- yield getShiftDataFromAPI(null, 0);
17415
- }))();
17407
+ if (!(entry === null || entry === void 0 ? void 0 : entry.useShiftNavigatorBasedOnAsset)) {
17408
+ if (shiftId) {
17409
+ (() => __awaiter(void 0, void 0, void 0, function* () {
17410
+ const shiftIdNumber = Number(shiftId);
17411
+ yield getShiftDataFromAPI(null, shiftIdNumber);
17412
+ }))();
17413
+ }
17414
+ else {
17415
+ (() => __awaiter(void 0, void 0, void 0, function* () {
17416
+ yield getShiftDataFromAPI(null, 0);
17417
+ }))();
17418
+ }
17416
17419
  }
17417
17420
  }, []);
17421
+ useEffect(() => {
17422
+ if (shiftId) {
17423
+ if (entry === null || entry === void 0 ? void 0 : entry.useShiftNavigatorBasedOnAsset) {
17424
+ (() => __awaiter(void 0, void 0, void 0, function* () {
17425
+ var _a;
17426
+ const currentDate = (_a = shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate) !== null && _a !== void 0 ? _a : null;
17427
+ yield getShiftDataFromAPI(currentDate, 0, assetId || Number(defaultAreaId));
17428
+ }))();
17429
+ }
17430
+ }
17431
+ }, [assetId, defaultAreaId]);
17418
17432
  return (React__default.createElement(Box, { sx: {
17419
17433
  width: "100%",
17420
17434
  height: "calc(100vh - 130px)",