@dexteel/mesf-core 7.19.0 → 7.20.0

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.0"
2
+ ".": "7.20.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [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)
4
+
5
+
6
+ ### Features
7
+
8
+ * **Logbook:** Search shifts by selected asset. Manage by LogbookEntrySettings. ([bf923f9](https://github.com/dexteel/mesf-core-frontend/commit/bf923f98338eaddb7b1d1a15f82bdb3fe83f61c5))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **ContextMenu:** Add data-test-id to each MenuItem. ([30f6ce5](https://github.com/dexteel/mesf-core-frontend/commit/30f6ce5306ed57f6a86683e077d684291d090830))
14
+
15
+ ## [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)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **Jobs Page:** add moment-duration-format dependency ([ce54111](https://github.com/dexteel/mesf-core-frontend/commit/ce54111b6d755ca3638cde9ec4194f54b5f11633))
21
+
3
22
  ## [7.19.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.18.0...@dexteel/mesf-core-v7.19.0) (2026-04-15)
4
23
 
5
24
 
@@ -1,5 +1,4 @@
1
1
  import { ColDef } from "ag-grid-community";
2
- import "moment-duration-format";
3
2
  import { Job } from "../../../models/Job";
4
3
  type Props = {
5
4
  setShowModal: (modal: "create" | "update" | "reset" | "enable" | "") => void;
package/dist/index.esm.js CHANGED
@@ -50,7 +50,6 @@ import RefreshIcon from '@mui/icons-material/Refresh';
50
50
  import ReplayIcon from '@mui/icons-material/Replay';
51
51
  import ToggleOfIcon from '@mui/icons-material/ToggleOff';
52
52
  import ToggleOnIcon from '@mui/icons-material/ToggleOn';
53
- import 'moment-duration-format';
54
53
  import { useComplexState } from 'use-complex-state';
55
54
  import { createSlice } from '@reduxjs/toolkit';
56
55
  import CheckBoxIcon from '@mui/icons-material/CheckBox';
@@ -74,6 +73,7 @@ import PersonPinCircleIcon from '@mui/icons-material/PersonPinCircle';
74
73
  import Dialog from '@mui/material/Dialog';
75
74
  import Typography from '@mui/material/Typography';
76
75
  import { format, fromZonedTime, formatInTimeZone } from 'date-fns-tz';
76
+ import momentDurationFormatSetup from 'moment-duration-format';
77
77
  import { findIana } from 'windows-iana';
78
78
  import Code from '@mui/icons-material/Code';
79
79
  import Square from '@mui/icons-material/Square';
@@ -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
  };
@@ -1472,6 +1472,7 @@ const useAssetActions = ({ asset, selectedNodes, setSelectedNodes, isCtrlPressin
1472
1472
  return { handleDrop, handleCtrlClick, handleDragEnd, handleDragStart };
1473
1473
  };
1474
1474
 
1475
+ momentDurationFormatSetup(moment$h);
1475
1476
  class TimeService {
1476
1477
  constructor() {
1477
1478
  this.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -9976,6 +9977,7 @@ const LogbookSettingsInitialState = {
9976
9977
  exportToExcel: false,
9977
9978
  shiftsRange: 7,
9978
9979
  presetAssetId: undefined,
9980
+ useShiftNavigatorBasedOnAsset: false,
9979
9981
  },
9980
9982
  report: {
9981
9983
  withAssetFilter: undefined,
@@ -17402,18 +17404,31 @@ const Logbook$3 = () => {
17402
17404
  }
17403
17405
  }, [shiftInfo]);
17404
17406
  useEffect(() => {
17405
- if (shiftId) {
17406
- (() => __awaiter(void 0, void 0, void 0, function* () {
17407
- const shiftIdNumber = Number(shiftId);
17408
- yield getShiftDataFromAPI(null, shiftIdNumber);
17409
- }))();
17410
- }
17411
- else {
17412
- (() => __awaiter(void 0, void 0, void 0, function* () {
17413
- yield getShiftDataFromAPI(null, 0);
17414
- }))();
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
+ }
17415
17419
  }
17416
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]);
17417
17432
  return (React__default.createElement(Box, { sx: {
17418
17433
  width: "100%",
17419
17434
  height: "calc(100vh - 130px)",