@dexteel/mesf-core 7.18.0 → 7.19.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.
package/dist/index.esm.js CHANGED
@@ -25,7 +25,7 @@ import DeleteIcon from '@mui/icons-material/Delete';
25
25
  import EditIcon from '@mui/icons-material/Edit';
26
26
  import FindInPageIcon from '@mui/icons-material/FindInPage';
27
27
  import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
28
- import { ArrowRight, ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight, Cloud, ExpandLess, ExpandMore, Square as Square$1, Timeline, Send, Menu as Menu$1, People, Storage, Group, Assignment, Chat, ViewList, Build, Settings as Settings$2, Code as Code$1, FastRewind, FastForward, ZoomIn, Restore, Lock, Create, Delete, Folder, InsertChart, Search, PlaylistAdd, DragIndicator, Save, AttachFile, CloudUpload, GetApp } from '@mui/icons-material';
28
+ import { ArrowRight, ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight, Cloud, ExpandLess, ExpandMore, Square as Square$1, Timeline, Send, Menu as Menu$1, People, Storage, Group as Group$1, Assignment, Chat, ViewList, Build, Settings as Settings$2, Code as Code$1, FastRewind, FastForward, ZoomIn, Restore, Lock, Create, Delete, Folder, InsertChart, Search, PlaylistAdd, DragIndicator, Save, AttachFile, CloudUpload, GetApp } from '@mui/icons-material';
29
29
  import ContentCopyIcon from '@mui/icons-material/ContentCopy';
30
30
  import FormatListBulletedSharpIcon from '@mui/icons-material/FormatListBulletedSharp';
31
31
  import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
@@ -35,9 +35,9 @@ import { DataGrid, GridOverlay } from '@mui/x-data-grid';
35
35
  import PropTypes from 'prop-types';
36
36
  import GetAppIcon from '@mui/icons-material/GetApp';
37
37
  import { DatePicker } from '@mui/x-date-pickers/DatePicker';
38
- import moment$g from 'moment-timezone';
38
+ import moment$h from 'moment-timezone';
39
39
  import { useParams, useNavigate, useSearchParams, Link, Navigate, Routes, Route, useLocation, BrowserRouter } from 'react-router-dom';
40
- import moment$f from 'moment';
40
+ import moment$g from 'moment';
41
41
  import SkipNextIcon from '@mui/icons-material/SkipNext';
42
42
  import PersonOutlineIcon from '@mui/icons-material/PersonOutline';
43
43
  import LockIcon from '@mui/icons-material/Lock';
@@ -45,10 +45,12 @@ import PersonIcon from '@mui/icons-material/Person';
45
45
  import { LogLevel as LogLevel$1, PublicClientApplication } from '@azure/msal-browser';
46
46
  import { useMsal, MsalProvider } from '@azure/msal-react';
47
47
  import AccountCircleIcon from '@mui/icons-material/AccountCircle';
48
+ import { Group, Panel, Separator, useDefaultLayout } from 'react-resizable-panels';
48
49
  import RefreshIcon from '@mui/icons-material/Refresh';
49
50
  import ReplayIcon from '@mui/icons-material/Replay';
50
51
  import ToggleOfIcon from '@mui/icons-material/ToggleOff';
51
52
  import ToggleOnIcon from '@mui/icons-material/ToggleOn';
53
+ import 'moment-duration-format';
52
54
  import { useComplexState } from 'use-complex-state';
53
55
  import { createSlice } from '@reduxjs/toolkit';
54
56
  import CheckBoxIcon from '@mui/icons-material/CheckBox';
@@ -61,7 +63,6 @@ import { DateTimePicker as DateTimePicker$1 } from '@mui/x-date-pickers/DateTime
61
63
  import ClearAllIcon from '@mui/icons-material/ClearAll';
62
64
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
63
65
  import axios from 'axios';
64
- import { Group as Group$1, Panel, Separator, useDefaultLayout } from 'react-resizable-panels';
65
66
  import { LocalizationProvider as LocalizationProvider$1 } from '@mui/x-date-pickers/LocalizationProvider';
66
67
  import InsertChartIcon from '@mui/icons-material/InsertChart';
67
68
  import ReactECharts from 'echarts-for-react';
@@ -794,7 +795,7 @@ class MESApiService {
794
795
  data.dataBaseName = database;
795
796
  data.parameters = formattedParameters;
796
797
  Date.prototype.toJSON = function () {
797
- return moment$f(this).format("YYYY-MM-DDTHH:mm:ss");
798
+ return moment$g(this).format("YYYY-MM-DDTHH:mm:ss");
798
799
  }; // eslint-disable-line
799
800
  let isError = { ok: true };
800
801
  return fetch(this.config.API_PROCEDURE_URL + "/Execute", {
@@ -848,7 +849,7 @@ class MESApiService {
848
849
  data.method = procedure;
849
850
  data.parameters = formattedParameters;
850
851
  Date.prototype.toJSON = function () {
851
- return moment$f(this).format("YYYY-MM-DDTHH:mm:ss");
852
+ return moment$g(this).format("YYYY-MM-DDTHH:mm:ss");
852
853
  }; // eslint-disable-line
853
854
  const curatedMethod = procedure.replace(/[\[\]]/g, ""); // remove brackets from method name
854
855
  try {
@@ -892,7 +893,7 @@ class MESApiService {
892
893
  data.dataBaseName = database;
893
894
  data.parameters = formattedParameters;
894
895
  Date.prototype.toJSON = function () {
895
- return moment$f(this).format("YYYY-MM-DDTHH:mm:ss");
896
+ return moment$g(this).format("YYYY-MM-DDTHH:mm:ss");
896
897
  }; // eslint-disable-line
897
898
  let isError = { ok: true };
898
899
  return fetch(this.config.API_PROCEDURE_URL + "/ExecuteJSON", {
@@ -944,7 +945,7 @@ class MESApiService {
944
945
  formattedParameters.push(formattedParameter);
945
946
  });
946
947
  Date.prototype.toJSON = function () {
947
- return moment$f(this).format("YYYY-MM-DDTHH:mm:ss");
948
+ return moment$g(this).format("YYYY-MM-DDTHH:mm:ss");
948
949
  }; // eslint-disable-line
949
950
  let isError = { ok: true };
950
951
  files.forEach((element) => {
@@ -1006,7 +1007,7 @@ class MESApiService {
1006
1007
  data.parameters = formattedParameters;
1007
1008
  data.fileName = fileName || "Default.xlsx";
1008
1009
  Date.prototype.toJSON = function () {
1009
- return moment$f(this).format("YYYY-MM-DDTHH:mm:ss");
1010
+ return moment$g(this).format("YYYY-MM-DDTHH:mm:ss");
1010
1011
  }; // eslint-disable-line
1011
1012
  let isError = { ok: true };
1012
1013
  return fetch(this.config.API_PROCEDURE_URL + "/Export", {
@@ -1080,7 +1081,7 @@ class MESApiService {
1080
1081
  data.parameters = formattedParameters;
1081
1082
  data.fileName = fileName || "Default.xlsx";
1082
1083
  Date.prototype.toJSON = function () {
1083
- return moment$f(this).format("YYYY-MM-DDTHH:mm:ss");
1084
+ return moment$g(this).format("YYYY-MM-DDTHH:mm:ss");
1084
1085
  }; // eslint-disable-line
1085
1086
  let isError = { ok: true };
1086
1087
  return fetch(this.config.API_PROCEDURE_URL + "/ExportExcel", {
@@ -1489,7 +1490,7 @@ class TimeService {
1489
1490
  else {
1490
1491
  this.timeZone = timeZone;
1491
1492
  }
1492
- moment$g.tz.setDefault(this.timeZone);
1493
+ moment$h.tz.setDefault(this.timeZone);
1493
1494
  }
1494
1495
  toUTC(datetime, format$1) {
1495
1496
  try {
@@ -1527,7 +1528,7 @@ class TimeService {
1527
1528
  return this.timeZone;
1528
1529
  }
1529
1530
  }
1530
- const getMomentTz = () => moment$g;
1531
+ const getMomentTz = () => moment$h;
1531
1532
  const dxtServerTimeZone = () => TimeService.getInstance().getServerTimeZone;
1532
1533
  const dxtToUTC = TimeService.getInstance().toUTC;
1533
1534
  const dxtToLocalServerTime = TimeService.getInstance().toLocalServerTime;
@@ -5630,11 +5631,11 @@ const useShiftNavigatorManager = () => {
5630
5631
  assetId,
5631
5632
  });
5632
5633
  if (resp.ok) {
5633
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$f
5634
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5634
5635
  .utc(resp.data.CurrentProductionDate)
5635
- .toDate(), CurrentStart: moment$f.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$f.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$f
5636
+ .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5636
5637
  .utc(resp.data.PreviousProductionDate)
5637
- .toDate(), PreviousStart: moment$f.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$f.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$f.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$f.utc(resp.data.LastStart).toDate(), LastEnd: moment$f.utc(resp.data.LastEnd).toDate() });
5638
+ .toDate(), PreviousStart: moment$g.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$g.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$g.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$g.utc(resp.data.LastStart).toDate(), LastEnd: moment$g.utc(resp.data.LastEnd).toDate() });
5638
5639
  setShiftInfo(shift);
5639
5640
  return shift;
5640
5641
  }
@@ -5649,11 +5650,11 @@ const useShiftNavigatorManager = () => {
5649
5650
  assetId,
5650
5651
  });
5651
5652
  if (resp.ok) {
5652
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$f
5653
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5653
5654
  .utc(resp.data.CurrentProductionDate)
5654
- .toDate(), CurrentStart: moment$f.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$f.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$f
5655
+ .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5655
5656
  .utc(resp.data.PreviousProductionDate)
5656
- .toDate(), PreviousStart: moment$f.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$f.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$f.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$f.utc(resp.data.LastStart).toDate(), LastEnd: moment$f.utc(resp.data.LastEnd).toDate() });
5657
+ .toDate(), PreviousStart: moment$g.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$g.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$g.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$g.utc(resp.data.LastStart).toDate(), LastEnd: moment$g.utc(resp.data.LastEnd).toDate() });
5657
5658
  setShiftInfo(shift);
5658
5659
  return shift;
5659
5660
  }
@@ -5670,11 +5671,11 @@ const useShiftNavigatorManager = () => {
5670
5671
  assetId,
5671
5672
  });
5672
5673
  if (resp.ok) {
5673
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$f
5674
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5674
5675
  .utc(resp.data.CurrentProductionDate)
5675
- .toDate(), CurrentStart: moment$f.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$f.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$f
5676
+ .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5676
5677
  .utc(resp.data.PreviousProductionDate)
5677
- .toDate(), PreviousStart: moment$f.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$f.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$f.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$f.utc(resp.data.LastStart).toDate(), LastEnd: moment$f.utc(resp.data.LastEnd).toDate() });
5678
+ .toDate(), PreviousStart: moment$g.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$g.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$g.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$g.utc(resp.data.LastStart).toDate(), LastEnd: moment$g.utc(resp.data.LastEnd).toDate() });
5678
5679
  setShiftInfo(shift);
5679
5680
  return shift;
5680
5681
  }
@@ -5754,13 +5755,13 @@ const ShiftDayNavigatorControl = (_a) => {
5754
5755
  shiftId: shiftInfo.CurrentShiftId,
5755
5756
  });
5756
5757
  if (resp.ok) {
5757
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5758
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$h
5758
5759
  .utc(resp.data.CurrentProductionDate)
5759
- .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5760
+ .toDate(), CurrentStart: moment$h.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$h.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$h
5760
5761
  .utc(resp.data.PreviousProductionDate)
5761
- .toDate(), PreviousStart: moment$g.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$g.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$g
5762
+ .toDate(), PreviousStart: moment$h.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$h.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$h
5762
5763
  .utc(resp.data.LastProductionDate)
5763
- .toDate(), LastStart: moment$g.utc(resp.data.LastStart).toDate(), LastEnd: moment$g.utc(resp.data.LastEnd).toDate() });
5764
+ .toDate(), LastStart: moment$h.utc(resp.data.LastStart).toDate(), LastEnd: moment$h.utc(resp.data.LastEnd).toDate() });
5764
5765
  setShiftInfoCopy(shift);
5765
5766
  }
5766
5767
  }
@@ -5801,7 +5802,7 @@ const ShiftDayNavigatorControl = (_a) => {
5801
5802
  }, size: "small" },
5802
5803
  React__default.createElement(ArrowBackRounded, null)))),
5803
5804
  React__default.createElement(Grid2, { size: "auto" },
5804
- React__default.createElement(DatePicker, { label: "Current Date", timezone: "UTC", format: "MM/DD/YYYY", maxDate: moment$g(), closeOnSelect: true, formatDensity: "dense", value: moment$g(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate), onChange: (date) => {
5805
+ 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) => {
5805
5806
  if (date) {
5806
5807
  getShiftDataFromAPI(date.toDate(), 0, assetId).then(() => { });
5807
5808
  }
@@ -5867,8 +5868,8 @@ const getShiftsRangeByParameters = (period_1, ...args_1) => __awaiter(void 0, [p
5867
5868
  if (resp.ok) {
5868
5869
  const data = resp.data;
5869
5870
  data.tables[0].rows.map((shift) => {
5870
- shift.Start = moment$g.utc(shift["Start"]).toDate();
5871
- shift.End = moment$g.utc(shift["End"]).toDate();
5871
+ shift.Start = moment$h.utc(shift["Start"]).toDate();
5872
+ shift.End = moment$h.utc(shift["End"]).toDate();
5872
5873
  });
5873
5874
  return {
5874
5875
  ok: true,
@@ -5908,10 +5909,10 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
5908
5909
  return;
5909
5910
  try {
5910
5911
  if (direction === "prev" && (startShift === null || startShift === void 0 ? void 0 : startShift.Start)) {
5911
- yield searchShiftsRangeByParameters(period, moment$g(startShift.Start).toDate(), null, false, "prev");
5912
+ yield searchShiftsRangeByParameters(period, moment$h(startShift.Start).toDate(), null, false, "prev");
5912
5913
  }
5913
5914
  else if (direction === "next" && (endShift === null || endShift === void 0 ? void 0 : endShift.End)) {
5914
- yield searchShiftsRangeByParameters(period, null, moment$g(endShift.End).toDate(), false, "next");
5915
+ yield searchShiftsRangeByParameters(period, null, moment$h(endShift.End).toDate(), false, "next");
5915
5916
  }
5916
5917
  }
5917
5918
  catch (error) {
@@ -6011,8 +6012,8 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6011
6012
  const newPeriod = event.target.value;
6012
6013
  setPeriod(newPeriod);
6013
6014
  if (newPeriod === "Custom") {
6014
- const today = moment$g();
6015
- const yesterday = moment$g().subtract(1, "day");
6015
+ const today = moment$h();
6016
+ const yesterday = moment$h().subtract(1, "day");
6016
6017
  setCustomStartDate(yesterday);
6017
6018
  setCustomEndDate(today);
6018
6019
  yield searchShiftsRangeByParameters("Custom", yesterday.toDate(), today.toDate(), false);
@@ -6020,7 +6021,7 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6020
6021
  else {
6021
6022
  setCustomStartDate(null);
6022
6023
  setCustomEndDate(null);
6023
- yield searchShiftsRangeByParameters(newPeriod, null, (endShift === null || endShift === void 0 ? void 0 : endShift.Start) ? moment$g(endShift.Start).toDate() : null, false);
6024
+ yield searchShiftsRangeByParameters(newPeriod, null, (endShift === null || endShift === void 0 ? void 0 : endShift.Start) ? moment$h(endShift.Start).toDate() : null, false);
6024
6025
  }
6025
6026
  });
6026
6027
  useEffect(() => {
@@ -6079,8 +6080,8 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6079
6080
  },
6080
6081
  } },
6081
6082
  React__default.createElement(DatePicker$1, { label: "Start", format: dateFormat, value: isCustomMode
6082
- ? customStartDate || moment$g().subtract(1, "day")
6083
- : moment$g((startShift === null || startShift === void 0 ? void 0 : startShift.Start) || moment$g().subtract(1, "day")), onChange: (value) => handleDateChange(value ? moment$g(value) : null, "start"), disabled: loadingShiftPeriodList, maxDate: isCustomMode ? moment$g() : undefined, enableAccessibleFieldDOMStructure: false, slots: {
6083
+ ? customStartDate || moment$h().subtract(1, "day")
6084
+ : moment$h((startShift === null || startShift === void 0 ? void 0 : startShift.Start) || moment$h().subtract(1, "day")), onChange: (value) => handleDateChange(value ? moment$h(value) : null, "start"), disabled: loadingShiftPeriodList, maxDate: isCustomMode ? moment$h() : undefined, enableAccessibleFieldDOMStructure: false, slots: {
6084
6085
  textField: (props) => (React__default.createElement(TextField, Object.assign({}, props, { size: "small", variant: "outlined", fullWidth: true, style: { width: "100%" }, InputProps: Object.assign(Object.assign({}, props.InputProps), { style: { paddingTop: "2px" } }) }))),
6085
6086
  openPickerIcon: () => (React__default.createElement("div", { style: {
6086
6087
  display: "flex",
@@ -6122,8 +6123,8 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6122
6123
  },
6123
6124
  } },
6124
6125
  React__default.createElement(DatePicker$1, { label: "End", format: dateFormat, value: isCustomMode
6125
- ? customEndDate || moment$g()
6126
- : moment$g((endShift === null || endShift === void 0 ? void 0 : endShift.End) || (endShift === null || endShift === void 0 ? void 0 : endShift.Start) || moment$g()), onChange: (value) => handleDateChange(value ? moment$g(value) : null, "end"), disabled: loadingShiftPeriodList, minDate: isCustomMode && customStartDate ? customStartDate : undefined, maxDate: isCustomMode ? moment$g() : undefined, enableAccessibleFieldDOMStructure: false, slots: {
6126
+ ? customEndDate || moment$h()
6127
+ : moment$h((endShift === null || endShift === void 0 ? void 0 : endShift.End) || (endShift === null || endShift === void 0 ? void 0 : endShift.Start) || moment$h()), onChange: (value) => handleDateChange(value ? moment$h(value) : null, "end"), disabled: loadingShiftPeriodList, minDate: isCustomMode && customStartDate ? customStartDate : undefined, maxDate: isCustomMode ? moment$h() : undefined, enableAccessibleFieldDOMStructure: false, slots: {
6127
6128
  textField: (props) => (React__default.createElement(TextField, Object.assign({}, props, { size: "small", variant: "outlined", fullWidth: true, style: { width: "100%" }, InputProps: Object.assign(Object.assign({}, props.InputProps), { style: { paddingTop: "2px" } }) }))),
6128
6129
  openPickerIcon: () => (React__default.createElement("div", { style: {
6129
6130
  display: "flex",
@@ -6149,7 +6150,7 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6149
6150
  React__default.createElement(SkipNextIcon, null)))));
6150
6151
  };
6151
6152
 
6152
- const moment$e = getMomentTz();
6153
+ const moment$f = getMomentTz();
6153
6154
  const getShifts = (params, signal) => __awaiter(void 0, void 0, void 0, function* () {
6154
6155
  var _a;
6155
6156
  const apiService = new MESApiService();
@@ -6163,26 +6164,26 @@ const getShifts = (params, signal) => __awaiter(void 0, void 0, void 0, function
6163
6164
  if (resp.ok) {
6164
6165
  let rows = get(resp, "data.tables[0].rows", []);
6165
6166
  rows = rows.map((row) => {
6166
- (row.CurrentProductionDate = moment$e
6167
+ (row.CurrentProductionDate = moment$f
6167
6168
  .utc(row["CurrentProductionDate"])
6168
6169
  .toDate()),
6169
- (row.CurrentStart = moment$e.utc(row["CurrentStart"]).toDate()),
6170
- (row.CurrentEnd = moment$e.utc(row["CurrentEnd"]).toDate()),
6171
- (row.PreviousProductionDate = moment$e
6170
+ (row.CurrentStart = moment$f.utc(row["CurrentStart"]).toDate()),
6171
+ (row.CurrentEnd = moment$f.utc(row["CurrentEnd"]).toDate()),
6172
+ (row.PreviousProductionDate = moment$f
6172
6173
  .utc(row["PreviousProductionDate"])
6173
6174
  .toDate()),
6174
- (row.PreviousStart = moment$e.utc(row["PreviousStart"]).toDate()),
6175
- (row.PreviousEnd = moment$e.utc(row["PreviousEnd"]).toDate()),
6176
- (row.NextProductionDate = moment$e
6175
+ (row.PreviousStart = moment$f.utc(row["PreviousStart"]).toDate()),
6176
+ (row.PreviousEnd = moment$f.utc(row["PreviousEnd"]).toDate()),
6177
+ (row.NextProductionDate = moment$f
6177
6178
  .utc(row["NextProductionDate"])
6178
6179
  .toDate()),
6179
- (row.NextStart = moment$e.utc(row["NextStart"]).toDate()),
6180
- (row.NextEnd = moment$e.utc(row["NextEnd"]).toDate()),
6181
- (row.LastProductionDate = moment$e
6180
+ (row.NextStart = moment$f.utc(row["NextStart"]).toDate()),
6181
+ (row.NextEnd = moment$f.utc(row["NextEnd"]).toDate()),
6182
+ (row.LastProductionDate = moment$f
6182
6183
  .utc(row["LastProductionDate"])
6183
6184
  .toDate()),
6184
- (row.LastStart = moment$e.utc(row["LastStart"]).toDate()),
6185
- (row.LastEnd = moment$e.utc(row["LastEnd"]).toDate());
6185
+ (row.LastStart = moment$f.utc(row["LastStart"]).toDate()),
6186
+ (row.LastEnd = moment$f.utc(row["LastEnd"]).toDate());
6186
6187
  return row;
6187
6188
  });
6188
6189
  return rows;
@@ -6206,7 +6207,7 @@ const getShiftsByRange = (_a) => __awaiter(void 0, [_a], void 0, function* ({ sh
6206
6207
  const resp = yield apiService.callV2("[MES].[GetShiftsByRange]", parameters);
6207
6208
  if (resp.ok) {
6208
6209
  let rows = get(resp, "data.tables[0].rows", []);
6209
- rows = rows.map((row) => (Object.assign(Object.assign({}, row), { Start: moment$e.utc(row.Start).toDate(), End: moment$e.utc(row.End).toDate() })));
6210
+ rows = rows.map((row) => (Object.assign(Object.assign({}, row), { Start: moment$f.utc(row.Start).toDate(), End: moment$f.utc(row.End).toDate() })));
6210
6211
  return rows;
6211
6212
  }
6212
6213
  else {
@@ -6224,7 +6225,7 @@ const getShiftsAroundCurrent = (_a) => __awaiter(void 0, [_a], void 0, function*
6224
6225
  const resp = yield apiService.callV2("[MES].[GetShiftsAroundCurrent]", parameters);
6225
6226
  if (resp.ok) {
6226
6227
  let rows = get(resp, "data.tables[0].rows", []);
6227
- rows = rows.map((row) => (Object.assign(Object.assign({}, row), { Start: moment$e.utc(row.Start).toDate(), End: moment$e.utc(row.End).toDate() })));
6228
+ rows = rows.map((row) => (Object.assign(Object.assign({}, row), { Start: moment$f.utc(row.Start).toDate(), End: moment$f.utc(row.End).toDate() })));
6228
6229
  return rows;
6229
6230
  }
6230
6231
  else {
@@ -6232,7 +6233,7 @@ const getShiftsAroundCurrent = (_a) => __awaiter(void 0, [_a], void 0, function*
6232
6233
  }
6233
6234
  });
6234
6235
 
6235
- const moment$d = getMomentTz();
6236
+ const moment$e = getMomentTz();
6236
6237
  const useShiftsAroundCurrent = ({ currentShiftId, shiftsRange, enabled = true, }) => {
6237
6238
  return useQuery({
6238
6239
  queryKey: ["shiftsAroundCurrent", currentShiftId, shiftsRange],
@@ -6279,7 +6280,7 @@ const ShiftAutocomplete = ({ currentShiftId, value, onShiftSelected, disabled, s
6279
6280
  React__default.createElement(Grid2, { container: true },
6280
6281
  React__default.createElement(Grid2, { size: { xs: 12 } },
6281
6282
  React__default.createElement(Autocomplete, { loading: isLoading, options: rows || [], getOptionLabel: (option) => {
6282
- return `${moment$d
6283
+ return `${moment$e
6283
6284
  .utc(option.ProductionDate)
6284
6285
  .format("MM/DD/YYYY")} - ${option.Shift} - ${option.Crew}`;
6285
6286
  }, value: selectedShift, onChange: (event, newValue) => {
@@ -7107,15 +7108,15 @@ const getJobs = (signal) => __awaiter(void 0, void 0, void 0, function* () {
7107
7108
  if (resp.ok) {
7108
7109
  let rows = get(resp, "data.tables[0].rows", []);
7109
7110
  rows = rows.map((job) => (Object.assign(Object.assign({}, job), { LastStarted: job.LastStarted
7110
- ? moment$f.utc(job["LastStarted"]).toDate()
7111
+ ? moment$g.utc(job["LastStarted"]).toDate()
7111
7112
  : null, LastContact: job.LastContact
7112
- ? moment$f.utc(job["LastContact"]).toDate()
7113
+ ? moment$g.utc(job["LastContact"]).toDate()
7113
7114
  : null, LastCounter: job.LastCounter
7114
- ? moment$f.utc(job["LastCounter"]).toDate()
7115
- : null, StartTime: job.StartTime ? moment$f.utc(job["StartTime"]).toDate() : null, NextExecutionTime: job.NextExecutionTime
7116
- ? moment$f.utc(job["NextExecutionTime"]).toDate()
7115
+ ? moment$g.utc(job["LastCounter"]).toDate()
7116
+ : null, StartTime: job.StartTime ? moment$g.utc(job["StartTime"]).toDate() : null, NextExecutionTime: job.NextExecutionTime
7117
+ ? moment$g.utc(job["NextExecutionTime"]).toDate()
7117
7118
  : null, LastExecutionTime: job.LastExecutionTime
7118
- ? moment$f.utc(job["LastExecutionTime"]).toDate()
7119
+ ? moment$g.utc(job["LastExecutionTime"]).toDate()
7119
7120
  : null })));
7120
7121
  return rows;
7121
7122
  }
@@ -7309,7 +7310,7 @@ const JobDetails = ({ job, modal, onHide, suffixTitle }) => {
7309
7310
  } })),
7310
7311
  React__default.createElement(Grid2, { size: { xs: 12, md: 6 } },
7311
7312
  React__default.createElement(Controller, { name: "StartTime", control: control, render: ({ field, fieldState: { error } }) => (React__default.createElement(React__default.Fragment, null,
7312
- React__default.createElement(DateTimePicker, { label: "Start Time", value: field.value ? moment$g(field.value) : null, onChange: field.onChange, format: "MM/DD/YYYY HH:mm:ss", views: ["year", "month", "day", "hours", "minutes"], ampm: false, timezone: TimeService.getInstance().getServerTimeZone(), slotProps: {
7313
+ React__default.createElement(DateTimePicker, { label: "Start Time", value: field.value ? moment$h(field.value) : null, onChange: field.onChange, format: "MM/DD/YYYY HH:mm:ss", views: ["year", "month", "day", "hours", "minutes"], ampm: false, timezone: TimeService.getInstance().getServerTimeZone(), slotProps: {
7313
7314
  textField: {
7314
7315
  size: "small",
7315
7316
  margin: "none",
@@ -7323,7 +7324,7 @@ const JobDetails = ({ job, modal, onHide, suffixTitle }) => {
7323
7324
  return (React__default.createElement(TextField, { label: "Last Status", value: (_a = field.value) !== null && _a !== void 0 ? _a : "", variant: "outlined", size: "small", fullWidth: true, disabled: true }));
7324
7325
  } })),
7325
7326
  React__default.createElement(Grid2, { size: { xs: 12, md: 6 } },
7326
- React__default.createElement(Controller, { name: "LastExecutionTime", control: control, render: ({ field }) => (React__default.createElement(DateTimePicker, { label: "Last Execution Time", value: field.value ? moment$g(field.value) : null, format: "MM/DD/YYYY HH:mm:ss", views: ["year", "month", "day", "hours", "minutes"], ampm: false, timezone: TimeService.getInstance().getServerTimeZone(), disabled: true, slotProps: {
7327
+ React__default.createElement(Controller, { name: "LastExecutionTime", control: control, render: ({ field }) => (React__default.createElement(DateTimePicker, { label: "Last Execution Time", value: field.value ? moment$h(field.value) : null, format: "MM/DD/YYYY HH:mm:ss", views: ["year", "month", "day", "hours", "minutes"], ampm: false, timezone: TimeService.getInstance().getServerTimeZone(), disabled: true, slotProps: {
7327
7328
  textField: {
7328
7329
  size: "small",
7329
7330
  margin: "none",
@@ -7331,7 +7332,7 @@ const JobDetails = ({ job, modal, onHide, suffixTitle }) => {
7331
7332
  },
7332
7333
  } })) })),
7333
7334
  React__default.createElement(Grid2, { size: { xs: 12, md: 6 } },
7334
- React__default.createElement(Controller, { name: "NextExecutionTime", control: control, render: ({ field }) => (React__default.createElement(DateTimePicker, { label: "Next Execution Time", value: field.value ? moment$g(field.value) : null, format: "MM/DD/YYYY HH:mm:ss", views: ["year", "month", "day", "hours", "minutes"], ampm: false, timezone: TimeService.getInstance().getServerTimeZone(), disabled: true, slotProps: {
7335
+ React__default.createElement(Controller, { name: "NextExecutionTime", control: control, render: ({ field }) => (React__default.createElement(DateTimePicker, { label: "Next Execution Time", value: field.value ? moment$h(field.value) : null, format: "MM/DD/YYYY HH:mm:ss", views: ["year", "month", "day", "hours", "minutes"], ampm: false, timezone: TimeService.getInstance().getServerTimeZone(), disabled: true, slotProps: {
7335
7336
  textField: {
7336
7337
  size: "small",
7337
7338
  margin: "none",
@@ -7417,6 +7418,7 @@ const useJobsOptionsFunctions = ({ setShowModal, setJobSelected, }) => {
7417
7418
  };
7418
7419
  };
7419
7420
 
7421
+ const moment$d = getMomentTz();
7420
7422
  const useJobsTableData = ({ setShowModal, setJobSelected, showContextMenu, }) => {
7421
7423
  const renderButtonMenu = (params) => {
7422
7424
  return (React__default.createElement(IconButton$1, { style: {}, onClick: (e) => showContextMenu(e, params.data, "jobsContext"), size: "small" },
@@ -7436,19 +7438,20 @@ const useJobsTableData = ({ setShowModal, setJobSelected, showContextMenu, }) =>
7436
7438
  field: "PeriodTime",
7437
7439
  headerName: "Period Time",
7438
7440
  flex: 2,
7439
- valueFormatter: ({ value }) => {
7440
- if (value === null || value === undefined)
7441
- return "";
7442
- const horas = Math.floor(value / 3600);
7443
- const minutos = Math.floor((value % 3600) / 60);
7444
- const segundos = value % 60;
7445
- return `${horas}h ${minutos}min ${segundos}s`;
7446
- },
7441
+ valueGetter: (params) => moment$d
7442
+ .duration(params.data.PeriodTime, "seconds")
7443
+ .format("h[h] m[m] s[s]"),
7444
+ },
7445
+ {
7446
+ field: "LastExecutionTime",
7447
+ headerName: "Last Execution",
7448
+ valueGetter: (params) => dxtToLocalServerTime(params.data.LastExecutionTime, "MM/dd HH:mm"),
7449
+ flex: 2,
7447
7450
  },
7448
7451
  {
7449
7452
  field: "NextExecutionTime",
7450
7453
  headerName: "Next Execution",
7451
- valueFormatter: ({ value }) => value === null ? "" : moment$f(value).format("DD/MM/YY HH:mm"),
7454
+ valueGetter: (params) => dxtToLocalServerTime(params.data.NextExecutionTime, "MM/dd HH:mm"),
7452
7455
  flex: 2,
7453
7456
  },
7454
7457
  {
@@ -7476,6 +7479,7 @@ const useJobsTableData = ({ setShowModal, setJobSelected, showContextMenu, }) =>
7476
7479
  return { columnDefs };
7477
7480
  };
7478
7481
 
7482
+ const jobStorageKey = "job-table-panel-sizes";
7479
7483
  const useSearchJobs = () => {
7480
7484
  return useQuery({
7481
7485
  queryKey: ["jobs"],
@@ -7486,6 +7490,8 @@ const CustomStatusPanel$1 = ({ handleNew }) => (React.createElement(IconButton$1
7486
7490
  React.createElement(PlaylistAddIcon, { style: { width: 30, height: 30 } })));
7487
7491
  const TableJobs = () => {
7488
7492
  const queryClient = useQueryClient();
7493
+ const groupRef = useRef(null);
7494
+ const [hover, setHover] = useState(false);
7489
7495
  const [jobSelected, setJobSelected] = useState(null);
7490
7496
  const [gridApi, setGridApi] = useState(null);
7491
7497
  const [errorMessage, setErrorMessage] = useState("");
@@ -7581,6 +7587,44 @@ const TableJobs = () => {
7581
7587
  }
7582
7588
  }
7583
7589
  };
7590
+ const getSavedPanelLayout = () => {
7591
+ try {
7592
+ const saved = localStorage.getItem(jobStorageKey);
7593
+ if (saved) {
7594
+ const layout = JSON.parse(saved);
7595
+ if (layout && typeof layout === "object") {
7596
+ return layout;
7597
+ }
7598
+ }
7599
+ }
7600
+ catch (e) {
7601
+ console.error("Error loading panel layout:", e);
7602
+ }
7603
+ return { table: 50, details: 50 };
7604
+ };
7605
+ const handlePanelResize = (layout) => {
7606
+ try {
7607
+ localStorage.setItem(jobStorageKey, JSON.stringify(layout));
7608
+ }
7609
+ catch (e) {
7610
+ console.error("Error saving panel layout:", e);
7611
+ }
7612
+ };
7613
+ const resetPanelLayout = () => {
7614
+ if (groupRef.current) {
7615
+ const defaultLayout = { table: 50, details: 50 };
7616
+ groupRef.current.setLayout(defaultLayout);
7617
+ try {
7618
+ localStorage.setItem(jobStorageKey, JSON.stringify(defaultLayout));
7619
+ }
7620
+ catch (e) {
7621
+ console.error("Error saving default layout:", e);
7622
+ }
7623
+ }
7624
+ };
7625
+ const handleSeparatorDoubleClick = () => {
7626
+ resetPanelLayout();
7627
+ };
7584
7628
  useEffect(() => {
7585
7629
  if (e && isError) {
7586
7630
  setErrorMessage(e.message);
@@ -7596,36 +7640,47 @@ const TableJobs = () => {
7596
7640
  React.createElement(Grid2, { container: true, justifyContent: "flex-start", p: 1, spacing: 1 },
7597
7641
  React.createElement(Grid2, { size: { md: 12, xs: 12 } },
7598
7642
  React.createElement(Typography$1, { variant: "h5", fontWeight: 600 }, "System Jobs")),
7599
- React.createElement(Grid2, { container: true, justifyContent: "flex-start", alignItems: "center", sx: {
7600
- width: "100%",
7601
- "& .MuiDataGrid-row": {
7602
- cursor: "pointer",
7603
- },
7604
- "& .MuiDataGrid-columnHeaderTitle, & .MuiTablePagination-caption": {
7605
- fontWeight: "bold",
7606
- fontColor: "black",
7607
- },
7608
- }, spacing: 2 },
7609
- React.createElement(Grid2, { size: { md: 6, xs: 12 } },
7610
- React.createElement(Paper, { elevation: 2, style: { height: "70vh", width: "100%" } },
7611
- React.createElement(AgGridReact, { loading: isLoading, rowData: rows, columnDefs: columnDefs, defaultColDef: defaultColDef, getContextMenuItems: getContextMenuItems, loadingOverlayComponent: CenteredLazyLoading, rowHeight: 34, headerHeight: 34, animateRows: true, rowSelection: "single", onGridReady: (params) => setGridApi(params.api), getRowId: (params) => `${params.data.JobId}`, onRowClicked: onRowClicked, onCellKeyDown: onCellKeyDown, gridOptions: {
7612
- theme: themeDXT,
7613
- statusBar: {
7614
- statusPanels: [
7615
- {
7616
- statusPanel: (params) => (React.createElement(CustomStatusPanel$1, { handleNew: handleNewJob })),
7617
- align: "left",
7618
- },
7619
- {
7620
- statusPanel: "agTotalRowCountComponent",
7621
- align: "right",
7622
- },
7623
- ],
7624
- },
7625
- } }))),
7626
- React.createElement(Grid2, { size: { md: 6, xs: 12 } },
7627
- React.createElement(Paper, { elevation: 2, style: { height: "70vh", width: "100%" }, className: `ag-theme-material` },
7628
- React.createElement(JobDetails, { job: jobSelected, modal: showModal, onHide: onDetailsHide, suffixTitle: "System Jobs" }))))),
7643
+ React.createElement(Grid2, { sx: { width: "100%" } },
7644
+ React.createElement(Group, { orientation: "horizontal", defaultLayout: getSavedPanelLayout(), onLayoutChange: handlePanelResize, groupRef: groupRef, style: { height: "100%" } },
7645
+ React.createElement(Panel, { id: "table", minSize: 20 },
7646
+ React.createElement(Paper, { elevation: 2, style: { height: "70vh", width: "100%" } },
7647
+ React.createElement(AgGridReact, { loading: isLoading, rowData: rows, columnDefs: columnDefs, defaultColDef: defaultColDef, getContextMenuItems: getContextMenuItems, loadingOverlayComponent: CenteredLazyLoading, rowHeight: 34, headerHeight: 34, animateRows: true, rowSelection: "single", onGridReady: (params) => setGridApi(params.api), getRowId: (params) => `${params.data.JobId}`, onRowClicked: onRowClicked, onCellKeyDown: onCellKeyDown, gridOptions: {
7648
+ theme: themeDXT,
7649
+ statusBar: {
7650
+ statusPanels: [
7651
+ {
7652
+ statusPanel: (params) => (React.createElement(CustomStatusPanel$1, { handleNew: handleNewJob })),
7653
+ align: "left",
7654
+ },
7655
+ {
7656
+ statusPanel: "agTotalRowCountComponent",
7657
+ align: "right",
7658
+ },
7659
+ ],
7660
+ },
7661
+ } }))),
7662
+ React.createElement(Separator, { onDoubleClick: handleSeparatorDoubleClick, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), style: {
7663
+ width: hover ? "10px" : "8px",
7664
+ background: hover ? "#bdbdbd" : "#e0e0e0",
7665
+ position: "relative",
7666
+ cursor: "col-resize",
7667
+ marginLeft: 5,
7668
+ marginRight: 5,
7669
+ borderRadius: 10,
7670
+ } },
7671
+ React.createElement("div", { style: {
7672
+ position: "absolute",
7673
+ top: "50%",
7674
+ left: "50%",
7675
+ transform: "translate(-50%, -50%)",
7676
+ width: "3px",
7677
+ height: "40px",
7678
+ background: hover ? "#616161" : "#9e9e9e",
7679
+ borderRadius: "2px",
7680
+ } })),
7681
+ React.createElement(Panel, { id: "details", minSize: 20 },
7682
+ React.createElement(Paper, { elevation: 2, style: { height: "70vh", width: "100%" } },
7683
+ React.createElement(JobDetails, { job: jobSelected, modal: showModal, onHide: onDetailsHide, suffixTitle: "System Jobs" })))))),
7629
7684
  React.createElement(ResetJob, { show: showModal === "reset", onHide: (shouldUpdate) => __awaiter(void 0, void 0, void 0, function* () {
7630
7685
  setShowModal("");
7631
7686
  setJobSelected(null);
@@ -7980,7 +8035,7 @@ const CodeFilter = ({ LogTypeCode, setLogTypeCodeFilter }) => {
7980
8035
 
7981
8036
  const DateFilter = ({ date, setDate, label = "Date", minDate, maxDate, }) => {
7982
8037
  return (React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment },
7983
- React__default.createElement(DatePicker$1, { format: "MM/DD/YYYY", minDate: minDate ? moment$f(minDate) : undefined, maxDate: maxDate ? moment$f(maxDate) : undefined, sx: {
8038
+ React__default.createElement(DatePicker$1, { format: "MM/DD/YYYY", minDate: minDate ? moment$g(minDate) : undefined, maxDate: maxDate ? moment$g(maxDate) : undefined, sx: {
7984
8039
  minWidth: "100%",
7985
8040
  borderTopLeftRadius: 3,
7986
8041
  borderTopRightRadius: 3,
@@ -7990,7 +8045,7 @@ const DateFilter = ({ date, setDate, label = "Date", minDate, maxDate, }) => {
7990
8045
  size: "small",
7991
8046
  fullWidth: true,
7992
8047
  },
7993
- }, label: label, value: date ? moment$f(date) : null, onChange: (newDate) => setDate(newDate ? newDate.toDate() : null) })));
8048
+ }, label: label, value: date ? moment$g(date) : null, onChange: (newDate) => setDate(newDate ? newDate.toDate() : null) })));
7994
8049
  };
7995
8050
 
7996
8051
  const SearchFilter = ({ search, setSearch }) => {
@@ -8095,7 +8150,7 @@ const getLogs = (params, signal) => __awaiter(void 0, void 0, void 0, function*
8095
8150
  const resp = yield apiService.callV2("[MES].[GetLogs]", parameters);
8096
8151
  if (resp.ok) {
8097
8152
  let rows = get(resp, "data.tables[0].rows", []);
8098
- rows = rows.map((log) => (Object.assign(Object.assign({}, log), { Timestamp: log.Timestamp ? moment$f.utc(log["Timestamp"]).toDate() : null })));
8153
+ rows = rows.map((log) => (Object.assign(Object.assign({}, log), { Timestamp: log.Timestamp ? moment$g.utc(log["Timestamp"]).toDate() : null })));
8099
8154
  return rows;
8100
8155
  }
8101
8156
  else {
@@ -8225,8 +8280,8 @@ const getLogTypeByCodeId = (logTypeCodeId) => {
8225
8280
  return get(LOG_TYPE_CODES, `${logTypeCodeId}.description`, " -");
8226
8281
  };
8227
8282
  const TableLogs = () => {
8228
- const [startDate, setStartDate] = useState(moment$f().add(-5, "days").hour(0).minute(0).second(0).toDate());
8229
- const [endDate, setEndDate] = useState(moment$f().hour(23).minute(59).second(59).toDate());
8283
+ const [startDate, setStartDate] = useState(moment$g().add(-5, "days").hour(0).minute(0).second(0).toDate());
8284
+ const [endDate, setEndDate] = useState(moment$g().hour(23).minute(59).second(59).toDate());
8230
8285
  const [timezone, setTimezone] = useState("UTC");
8231
8286
  const [search, setSearch] = useState("");
8232
8287
  const [logTypeCode, setLogTypeCode] = useState(["I", "W", "E"]);
@@ -8249,7 +8304,7 @@ const TableLogs = () => {
8249
8304
  const formattedRows = rows === null || rows === void 0 ? void 0 : rows.map(({ LogId, Timestamp, Source, Message, LogTypeCode, User }) => ({
8250
8305
  id: LogId,
8251
8306
  Timestamp: timezone === "UTC"
8252
- ? moment$f(Timestamp).utc().format("YYYY-MM-DD HH:mm:ss z")
8307
+ ? moment$g(Timestamp).utc().format("YYYY-MM-DD HH:mm:ss z")
8253
8308
  : dxtToLocalServerTime(Timestamp, "yyyy-MM-dd HH:mm:ss z"),
8254
8309
  Source,
8255
8310
  Message: isNil(Message) ? "" : Message.replaceAll("Added", " Added"),
@@ -8273,8 +8328,8 @@ const TableLogs = () => {
8273
8328
  }, []);
8274
8329
  const { showContextMenu, registerConfig } = useContextMenuMESF();
8275
8330
  const handleResetButtonClick = () => {
8276
- setStartDate(moment$f().add(-5, "days").hour(0).minute(0).second(0).toDate());
8277
- setEndDate(moment$f().hour(23).minute(59).second(59).toDate());
8331
+ setStartDate(moment$g().add(-5, "days").hour(0).minute(0).second(0).toDate());
8332
+ setEndDate(moment$g().hour(23).minute(59).second(59).toDate());
8278
8333
  setSearch("");
8279
8334
  gridAPI === null || gridAPI === void 0 ? void 0 : gridAPI.setGridOption("quickFilterText", "");
8280
8335
  setLogTypeCode(["I", "W", "E"]);
@@ -8364,7 +8419,7 @@ const TableLogs = () => {
8364
8419
  setEndDate(null);
8365
8420
  }
8366
8421
  else {
8367
- setEndDate(moment$f().hour(23).minute(59).second(59).toDate());
8422
+ setEndDate(moment$g().hour(23).minute(59).second(59).toDate());
8368
8423
  }
8369
8424
  setAutoRefresh(checked);
8370
8425
  } })),
@@ -9062,14 +9117,14 @@ const CreateShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetN
9062
9117
  minWidth: "100%",
9063
9118
  borderTopLeftRadius: 3,
9064
9119
  borderTopRightRadius: 3,
9065
- }, label: "Start", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9120
+ }, label: "Start", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9066
9121
  textField: {
9067
9122
  fullWidth: true,
9068
9123
  variant: "standard",
9069
9124
  },
9070
9125
  } })),
9071
9126
  React.createElement(Grid2, { size: { md: 6, xs: 12 } },
9072
- React.createElement(DatePicker$1, { label: "Time", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9127
+ React.createElement(DatePicker$1, { label: "Time", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9073
9128
  textField: {
9074
9129
  fullWidth: true,
9075
9130
  variant: "standard",
@@ -9259,7 +9314,7 @@ const DeleteShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetN
9259
9314
  minWidth: "100%",
9260
9315
  borderTopLeftRadius: 3,
9261
9316
  borderTopRightRadius: 3,
9262
- }, label: "Start", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9317
+ }, label: "Start", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9263
9318
  textField: {
9264
9319
  fullWidth: true,
9265
9320
  variant: "standard",
@@ -9267,7 +9322,7 @@ const DeleteShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetN
9267
9322
  },
9268
9323
  } })),
9269
9324
  React.createElement(Grid2, { size: { md: 6, xs: 12 } },
9270
- React.createElement(DatePicker$1, { label: "Time", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9325
+ React.createElement(DatePicker$1, { label: "Time", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9271
9326
  textField: {
9272
9327
  fullWidth: true,
9273
9328
  variant: "standard",
@@ -9392,14 +9447,14 @@ const EditShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetNam
9392
9447
  minWidth: "100%",
9393
9448
  borderTopLeftRadius: 3,
9394
9449
  borderTopRightRadius: 3,
9395
- }, label: "Start", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9450
+ }, label: "Start", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9396
9451
  textField: {
9397
9452
  fullWidth: true,
9398
9453
  variant: "standard",
9399
9454
  },
9400
9455
  } })),
9401
9456
  React.createElement(Grid2, { size: { md: 6, xs: 12 } },
9402
- React.createElement(DatePicker$1, { label: "Time", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9457
+ React.createElement(DatePicker$1, { label: "Time", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9403
9458
  textField: {
9404
9459
  fullWidth: true,
9405
9460
  variant: "standard",
@@ -9571,7 +9626,7 @@ const useTableData$4 = ({ setShiftSelected, setOpenModalEditShift, setOpenModalD
9571
9626
  {
9572
9627
  field: "PatternStart",
9573
9628
  headerName: "Pattern Start",
9574
- valueFormatter: ({ value }) => `${moment$f(value).format("L")}, ${moment$f(value).format("LTS")}`,
9629
+ valueFormatter: ({ value }) => `${moment$g(value).format("L")}, ${moment$g(value).format("LTS")}`,
9575
9630
  minWidth: 180,
9576
9631
  flex: 4,
9577
9632
  cellStyle: {
@@ -10506,7 +10561,7 @@ const renderInput = (param, onChange, disabled) => {
10506
10561
  return (React__default.createElement(TextField, { type: "number", label: param.parameterName, value: param.value, onChange: (e) => onChange(e.target.value === "" ? "" : Number(e.target.value)), disabled: disabled, fullWidth: true, size: "small", inputProps: { step: "any" } }));
10507
10562
  }
10508
10563
  if (["datetime", "datetime2", "date", "smalldatetime"].includes(type)) {
10509
- return (React__default.createElement(DateTimePicker$1, { label: param.parameterName, value: param.value ? moment$f(param.value) : null, onChange: (newValue) => onChange((newValue === null || newValue === void 0 ? void 0 : newValue.toDate()) || null), disabled: disabled, slotProps: {
10564
+ return (React__default.createElement(DateTimePicker$1, { label: param.parameterName, value: param.value ? moment$g(param.value) : null, onChange: (newValue) => onChange((newValue === null || newValue === void 0 ? void 0 : newValue.toDate()) || null), disabled: disabled, slotProps: {
10510
10565
  textField: {
10511
10566
  fullWidth: true,
10512
10567
  size: "small",
@@ -10972,7 +11027,7 @@ const Configuration = () => {
10972
11027
  } }, "Security") },
10973
11028
  React__default.createElement(ListItemButton, { selected: option === "users", component: Link, to: "/configuration/users" },
10974
11029
  React__default.createElement(ListItemIcon, null,
10975
- React__default.createElement(Group, null)),
11030
+ React__default.createElement(Group$1, null)),
10976
11031
  React__default.createElement(ListItemText, { primary: "Users" })),
10977
11032
  React__default.createElement(ListItemButton, { selected: option === "profiles", component: Link, to: "/configuration/profiles" },
10978
11033
  React__default.createElement(ListItemIcon, null,
@@ -11773,21 +11828,21 @@ const dateNavigator = (startDate, endDate, scope, operator, current = false) =>
11773
11828
  }
11774
11829
  else {
11775
11830
  const [quantity, duration] = scope.split(" ");
11776
- newStartDate = moment$f(newEndDate)
11831
+ newStartDate = moment$g(newEndDate)
11777
11832
  .subtract(quantity, duration[0])
11778
11833
  .toDate();
11779
11834
  }
11780
11835
  }
11781
11836
  else {
11782
11837
  if (scope === "custom") {
11783
- const durationInMs = moment$f(endDate).diff(moment$f(startDate));
11784
- newStartDate = moment$f(startDate)[operator](durationInMs).toDate();
11838
+ const durationInMs = moment$g(endDate).diff(moment$g(startDate));
11839
+ newStartDate = moment$g(startDate)[operator](durationInMs).toDate();
11785
11840
  }
11786
11841
  else {
11787
11842
  const [quantity, duration] = scope.split(" ");
11788
- newStartDate = moment$f(startDate)[operator](quantity, duration[0])
11843
+ newStartDate = moment$g(startDate)[operator](quantity, duration[0])
11789
11844
  .toDate();
11790
- newEndDate = moment$f(endDate)[operator](quantity, duration[0])
11845
+ newEndDate = moment$g(endDate)[operator](quantity, duration[0])
11791
11846
  .toDate();
11792
11847
  }
11793
11848
  }
@@ -11823,11 +11878,11 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11823
11878
  };
11824
11879
  const handlePartialDateNavigator = (operator) => {
11825
11880
  // Calculate 20% of the current period
11826
- const durationInMs = moment$f(timeScopeEnd).diff(moment$f(timeScopeStart));
11881
+ const durationInMs = moment$g(timeScopeEnd).diff(moment$g(timeScopeStart));
11827
11882
  const partialDuration = Math.round(durationInMs * 0.2);
11828
- const newStartDate = moment$f(timeScopeStart)[operator](partialDuration, "milliseconds")
11883
+ const newStartDate = moment$g(timeScopeStart)[operator](partialDuration, "milliseconds")
11829
11884
  .toDate();
11830
- const newEndDate = moment$f(timeScopeEnd)[operator](partialDuration, "milliseconds")
11885
+ const newEndDate = moment$g(timeScopeEnd)[operator](partialDuration, "milliseconds")
11831
11886
  .toDate();
11832
11887
  setTotalScope({
11833
11888
  start: newStartDate,
@@ -11836,7 +11891,7 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11836
11891
  });
11837
11892
  };
11838
11893
  const handleDateChange = (newValue, key) => {
11839
- const newDate = moment$f(newValue).toDate();
11894
+ const newDate = moment$g(newValue).toDate();
11840
11895
  // If scope is "custom", just update the changed date
11841
11896
  if (scope === "custom") {
11842
11897
  setTotalScope({ [key]: newDate });
@@ -11943,7 +11998,7 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11943
11998
  React__default.createElement(FastRewind, { fontSize: "medium", sx: { color: "black" } })))),
11944
11999
  React__default.createElement(Grid2, { size: { md: 3.5 } },
11945
12000
  React__default.createElement(LocalizationProvider$1, { dateAdapter: AdapterMoment },
11946
- React__default.createElement(DateTimePicker, { label: "Start", format: "MM/DD/YYYY HH:mm:ss", value: moment$f(timeScopeStart), onChange: (newValue) => {
12001
+ React__default.createElement(DateTimePicker, { label: "Start", format: "MM/DD/YYYY HH:mm:ss", value: moment$g(timeScopeStart), onChange: (newValue) => {
11947
12002
  if (newValue) {
11948
12003
  handleDateChange(newValue.toDate(), "start");
11949
12004
  }
@@ -11966,7 +12021,7 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11966
12021
  React__default.createElement(MenuItem, { value: "custom" }, "Custom")))),
11967
12022
  React__default.createElement(Grid2, { size: { md: 3.5 } },
11968
12023
  React__default.createElement(LocalizationProvider$1, { dateAdapter: AdapterMoment },
11969
- React__default.createElement(DateTimePicker, { label: "End", format: "MM/DD/YYYY HH:mm:ss", value: autoRefresh ? null : moment$f(timeScopeEnd), onChange: (newValue) => {
12024
+ React__default.createElement(DateTimePicker, { label: "End", format: "MM/DD/YYYY HH:mm:ss", value: autoRefresh ? null : moment$g(timeScopeEnd), onChange: (newValue) => {
11970
12025
  if (newValue) {
11971
12026
  handleDateChange(newValue.toDate(), "end");
11972
12027
  }
@@ -15757,7 +15812,7 @@ const TrendingsPageV2 = () => {
15757
15812
  display: "flex",
15758
15813
  width: "100%",
15759
15814
  } },
15760
- React__default.createElement(Group$1, { orientation: "vertical", style: { width: "100%", height: "100%" } },
15815
+ React__default.createElement(Group, { orientation: "vertical", style: { width: "100%", height: "100%" } },
15761
15816
  React__default.createElement(Panel, { defaultSize: 80, minSize: 20 },
15762
15817
  React__default.createElement("div", { style: { height: "100%", width: "100%" } },
15763
15818
  React__default.createElement(TrendingChartV2, { customOptions: chartOptions, series: filteredSeries, isLoading: seriesLoading && seriesFetching, onChartReady: setChartInstance, dataLoadedTrigger: dataLoadedTrigger }))),
@@ -15855,7 +15910,7 @@ const ProvidersLoader = ({ children, }) => {
15855
15910
  };
15856
15911
 
15857
15912
  const timezone = TimeService.getInstance().getServerTimeZone();
15858
- moment$g.tz.setDefault(timezone);
15913
+ moment$h.tz.setDefault(timezone);
15859
15914
  const base = document.getElementsByTagName("base")[0].getAttribute("href") || "/";
15860
15915
  const queryClient = new QueryClient({
15861
15916
  defaultOptions: {
@@ -15881,7 +15936,7 @@ function MESFMain({ authentication, routes, navbar, navbarTitle = "MESF", config
15881
15936
  React__default.createElement(HelmetDexteelProvider, { navbarTitle: navbarTitle },
15882
15937
  React__default.createElement(QueryClientProvider, { client: queryClient },
15883
15938
  React__default.createElement(AuthProvider, { authConfig: authentication },
15884
- React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, dateLibInstance: moment$g },
15939
+ React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, dateLibInstance: moment$h },
15885
15940
  React__default.createElement(UserProvider, null,
15886
15941
  React__default.createElement(UTLSettingsProvider, null,
15887
15942
  React__default.createElement(ProvidersLoader, null,
@@ -17370,7 +17425,7 @@ const Logbook$3 = () => {
17370
17425
  fontWeight: 600,
17371
17426
  userSelect: "none",
17372
17427
  } }, "LOGBOOK")),
17373
- React__default.createElement(Group$1, { id: "logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
17428
+ React__default.createElement(Group, { id: "logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
17374
17429
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
17375
17430
  React__default.createElement(Box, { sx: {
17376
17431
  display: "flex",
@@ -17981,7 +18036,7 @@ const Logbook$2 = () => {
17981
18036
  fontWeight: 600,
17982
18037
  userSelect: "none",
17983
18038
  } }, "LOGBOOK REPORT")),
17984
- React__default.createElement(Group$1, { id: "logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
18039
+ React__default.createElement(Group, { id: "logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
17985
18040
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
17986
18041
  React__default.createElement(Box, { sx: {
17987
18042
  display: "flex",
@@ -19713,7 +19768,7 @@ const Logbook$1 = () => {
19713
19768
  fontWeight: 600,
19714
19769
  userSelect: "none",
19715
19770
  } }, "LOGBOOK")),
19716
- React__default.createElement(Group$1, { id: "section-logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
19771
+ React__default.createElement(Group, { id: "section-logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
19717
19772
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
19718
19773
  React__default.createElement(Box, { sx: {
19719
19774
  display: "flex",
@@ -20292,7 +20347,7 @@ const Logbook = () => {
20292
20347
  fontWeight: 600,
20293
20348
  userSelect: "none",
20294
20349
  } }, "LOGBOOK REPORT")),
20295
- React__default.createElement(Group$1, { id: "section-logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
20350
+ React__default.createElement(Group, { id: "section-logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
20296
20351
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
20297
20352
  React__default.createElement(Box, { sx: {
20298
20353
  display: "flex",
@@ -20531,7 +20586,16 @@ const AreaSelector = () => {
20531
20586
  borderRadius: "2px",
20532
20587
  overflowY: "auto",
20533
20588
  } },
20534
- React__default.createElement(List, { dense: true, style: { padding: 0 } }, areasList === null || areasList === void 0 ? void 0 : areasList.map((area) => (React__default.createElement(ListItemButton, { key: `Area-${area === null || area === void 0 ? void 0 : area.AssetId}`, onClick: () => handleChangeAreaId(area === null || area === void 0 ? void 0 : area.AssetId, area === null || area === void 0 ? void 0 : area.AssetName), style: { cursor: "pointer", width: "100%" } },
20589
+ React__default.createElement(List, { dense: true, style: { padding: 0 } }, areasList === null || areasList === void 0 ? void 0 : areasList.map((area) => (React__default.createElement(ListItemButton, { key: `Area-${area === null || area === void 0 ? void 0 : area.AssetId}`, onClick: () => handleChangeAreaId(area === null || area === void 0 ? void 0 : area.AssetId, area === null || area === void 0 ? void 0 : area.AssetName), selected: (area === null || area === void 0 ? void 0 : area.AssetId) === defaultAreaIdToChange, sx: {
20590
+ "&.Mui-selected": {
20591
+ backgroundColor: (theme) => alpha(theme.palette.info.main, 0.2),
20592
+ "&:hover": {
20593
+ backgroundColor: (theme) => alpha(theme.palette.info.main, 0.4),
20594
+ },
20595
+ },
20596
+ cursor: "pointer",
20597
+ width: "100%",
20598
+ } },
20535
20599
  React__default.createElement(ListItemText, { primary: area === null || area === void 0 ? void 0 : area.AssetName })))))))))),
20536
20600
  React__default.createElement(DialogActions$1, null,
20537
20601
  React__default.createElement(Button, { autoFocus: true, onClick: handleCancel, color: "primary" }, "Cancel"),