@dexteel/mesf-core 7.18.0 → 7.19.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.
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,6 +45,7 @@ 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';
@@ -61,7 +62,6 @@ import { DateTimePicker as DateTimePicker$1 } from '@mui/x-date-pickers/DateTime
61
62
  import ClearAllIcon from '@mui/icons-material/ClearAll';
62
63
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
63
64
  import axios from 'axios';
64
- import { Group as Group$1, Panel, Separator, useDefaultLayout } from 'react-resizable-panels';
65
65
  import { LocalizationProvider as LocalizationProvider$1 } from '@mui/x-date-pickers/LocalizationProvider';
66
66
  import InsertChartIcon from '@mui/icons-material/InsertChart';
67
67
  import ReactECharts from 'echarts-for-react';
@@ -73,6 +73,7 @@ import PersonPinCircleIcon from '@mui/icons-material/PersonPinCircle';
73
73
  import Dialog from '@mui/material/Dialog';
74
74
  import Typography from '@mui/material/Typography';
75
75
  import { format, fromZonedTime, formatInTimeZone } from 'date-fns-tz';
76
+ import momentDurationFormatSetup from 'moment-duration-format';
76
77
  import { findIana } from 'windows-iana';
77
78
  import Code from '@mui/icons-material/Code';
78
79
  import Square from '@mui/icons-material/Square';
@@ -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", {
@@ -1471,6 +1472,7 @@ const useAssetActions = ({ asset, selectedNodes, setSelectedNodes, isCtrlPressin
1471
1472
  return { handleDrop, handleCtrlClick, handleDragEnd, handleDragStart };
1472
1473
  };
1473
1474
 
1475
+ momentDurationFormatSetup(moment$h);
1474
1476
  class TimeService {
1475
1477
  constructor() {
1476
1478
  this.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -1489,7 +1491,7 @@ class TimeService {
1489
1491
  else {
1490
1492
  this.timeZone = timeZone;
1491
1493
  }
1492
- moment$g.tz.setDefault(this.timeZone);
1494
+ moment$h.tz.setDefault(this.timeZone);
1493
1495
  }
1494
1496
  toUTC(datetime, format$1) {
1495
1497
  try {
@@ -1527,7 +1529,7 @@ class TimeService {
1527
1529
  return this.timeZone;
1528
1530
  }
1529
1531
  }
1530
- const getMomentTz = () => moment$g;
1532
+ const getMomentTz = () => moment$h;
1531
1533
  const dxtServerTimeZone = () => TimeService.getInstance().getServerTimeZone;
1532
1534
  const dxtToUTC = TimeService.getInstance().toUTC;
1533
1535
  const dxtToLocalServerTime = TimeService.getInstance().toLocalServerTime;
@@ -5630,11 +5632,11 @@ const useShiftNavigatorManager = () => {
5630
5632
  assetId,
5631
5633
  });
5632
5634
  if (resp.ok) {
5633
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$f
5635
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5634
5636
  .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
5637
+ .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5636
5638
  .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() });
5639
+ .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
5640
  setShiftInfo(shift);
5639
5641
  return shift;
5640
5642
  }
@@ -5649,11 +5651,11 @@ const useShiftNavigatorManager = () => {
5649
5651
  assetId,
5650
5652
  });
5651
5653
  if (resp.ok) {
5652
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$f
5654
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5653
5655
  .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
5656
+ .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5655
5657
  .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() });
5658
+ .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
5659
  setShiftInfo(shift);
5658
5660
  return shift;
5659
5661
  }
@@ -5670,11 +5672,11 @@ const useShiftNavigatorManager = () => {
5670
5672
  assetId,
5671
5673
  });
5672
5674
  if (resp.ok) {
5673
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$f
5675
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5674
5676
  .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
5677
+ .toDate(), CurrentStart: moment$g.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$g.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$g
5676
5678
  .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() });
5679
+ .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
5680
  setShiftInfo(shift);
5679
5681
  return shift;
5680
5682
  }
@@ -5754,13 +5756,13 @@ const ShiftDayNavigatorControl = (_a) => {
5754
5756
  shiftId: shiftInfo.CurrentShiftId,
5755
5757
  });
5756
5758
  if (resp.ok) {
5757
- const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$g
5759
+ const shift = Object.assign(Object.assign({}, resp.data), { CurrentProductionDate: moment$h
5758
5760
  .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
5761
+ .toDate(), CurrentStart: moment$h.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$h.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$h
5760
5762
  .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
5763
+ .toDate(), PreviousStart: moment$h.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$h.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$h
5762
5764
  .utc(resp.data.LastProductionDate)
5763
- .toDate(), LastStart: moment$g.utc(resp.data.LastStart).toDate(), LastEnd: moment$g.utc(resp.data.LastEnd).toDate() });
5765
+ .toDate(), LastStart: moment$h.utc(resp.data.LastStart).toDate(), LastEnd: moment$h.utc(resp.data.LastEnd).toDate() });
5764
5766
  setShiftInfoCopy(shift);
5765
5767
  }
5766
5768
  }
@@ -5801,7 +5803,7 @@ const ShiftDayNavigatorControl = (_a) => {
5801
5803
  }, size: "small" },
5802
5804
  React__default.createElement(ArrowBackRounded, null)))),
5803
5805
  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) => {
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) => {
5805
5807
  if (date) {
5806
5808
  getShiftDataFromAPI(date.toDate(), 0, assetId).then(() => { });
5807
5809
  }
@@ -5867,8 +5869,8 @@ const getShiftsRangeByParameters = (period_1, ...args_1) => __awaiter(void 0, [p
5867
5869
  if (resp.ok) {
5868
5870
  const data = resp.data;
5869
5871
  data.tables[0].rows.map((shift) => {
5870
- shift.Start = moment$g.utc(shift["Start"]).toDate();
5871
- shift.End = moment$g.utc(shift["End"]).toDate();
5872
+ shift.Start = moment$h.utc(shift["Start"]).toDate();
5873
+ shift.End = moment$h.utc(shift["End"]).toDate();
5872
5874
  });
5873
5875
  return {
5874
5876
  ok: true,
@@ -5908,10 +5910,10 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
5908
5910
  return;
5909
5911
  try {
5910
5912
  if (direction === "prev" && (startShift === null || startShift === void 0 ? void 0 : startShift.Start)) {
5911
- yield searchShiftsRangeByParameters(period, moment$g(startShift.Start).toDate(), null, false, "prev");
5913
+ yield searchShiftsRangeByParameters(period, moment$h(startShift.Start).toDate(), null, false, "prev");
5912
5914
  }
5913
5915
  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");
5916
+ yield searchShiftsRangeByParameters(period, null, moment$h(endShift.End).toDate(), false, "next");
5915
5917
  }
5916
5918
  }
5917
5919
  catch (error) {
@@ -6011,8 +6013,8 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6011
6013
  const newPeriod = event.target.value;
6012
6014
  setPeriod(newPeriod);
6013
6015
  if (newPeriod === "Custom") {
6014
- const today = moment$g();
6015
- const yesterday = moment$g().subtract(1, "day");
6016
+ const today = moment$h();
6017
+ const yesterday = moment$h().subtract(1, "day");
6016
6018
  setCustomStartDate(yesterday);
6017
6019
  setCustomEndDate(today);
6018
6020
  yield searchShiftsRangeByParameters("Custom", yesterday.toDate(), today.toDate(), false);
@@ -6020,7 +6022,7 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6020
6022
  else {
6021
6023
  setCustomStartDate(null);
6022
6024
  setCustomEndDate(null);
6023
- yield searchShiftsRangeByParameters(newPeriod, null, (endShift === null || endShift === void 0 ? void 0 : endShift.Start) ? moment$g(endShift.Start).toDate() : null, false);
6025
+ yield searchShiftsRangeByParameters(newPeriod, null, (endShift === null || endShift === void 0 ? void 0 : endShift.Start) ? moment$h(endShift.Start).toDate() : null, false);
6024
6026
  }
6025
6027
  });
6026
6028
  useEffect(() => {
@@ -6079,8 +6081,8 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6079
6081
  },
6080
6082
  } },
6081
6083
  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: {
6084
+ ? customStartDate || moment$h().subtract(1, "day")
6085
+ : 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
6086
  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
6087
  openPickerIcon: () => (React__default.createElement("div", { style: {
6086
6088
  display: "flex",
@@ -6122,8 +6124,8 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6122
6124
  },
6123
6125
  } },
6124
6126
  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: {
6127
+ ? customEndDate || moment$h()
6128
+ : 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
6129
  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
6130
  openPickerIcon: () => (React__default.createElement("div", { style: {
6129
6131
  display: "flex",
@@ -6149,7 +6151,7 @@ const ShiftPeriodNavigatorControl = ({ value, actualPeriod, onChange, showShiftA
6149
6151
  React__default.createElement(SkipNextIcon, null)))));
6150
6152
  };
6151
6153
 
6152
- const moment$e = getMomentTz();
6154
+ const moment$f = getMomentTz();
6153
6155
  const getShifts = (params, signal) => __awaiter(void 0, void 0, void 0, function* () {
6154
6156
  var _a;
6155
6157
  const apiService = new MESApiService();
@@ -6163,26 +6165,26 @@ const getShifts = (params, signal) => __awaiter(void 0, void 0, void 0, function
6163
6165
  if (resp.ok) {
6164
6166
  let rows = get(resp, "data.tables[0].rows", []);
6165
6167
  rows = rows.map((row) => {
6166
- (row.CurrentProductionDate = moment$e
6168
+ (row.CurrentProductionDate = moment$f
6167
6169
  .utc(row["CurrentProductionDate"])
6168
6170
  .toDate()),
6169
- (row.CurrentStart = moment$e.utc(row["CurrentStart"]).toDate()),
6170
- (row.CurrentEnd = moment$e.utc(row["CurrentEnd"]).toDate()),
6171
- (row.PreviousProductionDate = moment$e
6171
+ (row.CurrentStart = moment$f.utc(row["CurrentStart"]).toDate()),
6172
+ (row.CurrentEnd = moment$f.utc(row["CurrentEnd"]).toDate()),
6173
+ (row.PreviousProductionDate = moment$f
6172
6174
  .utc(row["PreviousProductionDate"])
6173
6175
  .toDate()),
6174
- (row.PreviousStart = moment$e.utc(row["PreviousStart"]).toDate()),
6175
- (row.PreviousEnd = moment$e.utc(row["PreviousEnd"]).toDate()),
6176
- (row.NextProductionDate = moment$e
6176
+ (row.PreviousStart = moment$f.utc(row["PreviousStart"]).toDate()),
6177
+ (row.PreviousEnd = moment$f.utc(row["PreviousEnd"]).toDate()),
6178
+ (row.NextProductionDate = moment$f
6177
6179
  .utc(row["NextProductionDate"])
6178
6180
  .toDate()),
6179
- (row.NextStart = moment$e.utc(row["NextStart"]).toDate()),
6180
- (row.NextEnd = moment$e.utc(row["NextEnd"]).toDate()),
6181
- (row.LastProductionDate = moment$e
6181
+ (row.NextStart = moment$f.utc(row["NextStart"]).toDate()),
6182
+ (row.NextEnd = moment$f.utc(row["NextEnd"]).toDate()),
6183
+ (row.LastProductionDate = moment$f
6182
6184
  .utc(row["LastProductionDate"])
6183
6185
  .toDate()),
6184
- (row.LastStart = moment$e.utc(row["LastStart"]).toDate()),
6185
- (row.LastEnd = moment$e.utc(row["LastEnd"]).toDate());
6186
+ (row.LastStart = moment$f.utc(row["LastStart"]).toDate()),
6187
+ (row.LastEnd = moment$f.utc(row["LastEnd"]).toDate());
6186
6188
  return row;
6187
6189
  });
6188
6190
  return rows;
@@ -6206,7 +6208,7 @@ const getShiftsByRange = (_a) => __awaiter(void 0, [_a], void 0, function* ({ sh
6206
6208
  const resp = yield apiService.callV2("[MES].[GetShiftsByRange]", parameters);
6207
6209
  if (resp.ok) {
6208
6210
  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() })));
6211
+ rows = rows.map((row) => (Object.assign(Object.assign({}, row), { Start: moment$f.utc(row.Start).toDate(), End: moment$f.utc(row.End).toDate() })));
6210
6212
  return rows;
6211
6213
  }
6212
6214
  else {
@@ -6224,7 +6226,7 @@ const getShiftsAroundCurrent = (_a) => __awaiter(void 0, [_a], void 0, function*
6224
6226
  const resp = yield apiService.callV2("[MES].[GetShiftsAroundCurrent]", parameters);
6225
6227
  if (resp.ok) {
6226
6228
  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() })));
6229
+ rows = rows.map((row) => (Object.assign(Object.assign({}, row), { Start: moment$f.utc(row.Start).toDate(), End: moment$f.utc(row.End).toDate() })));
6228
6230
  return rows;
6229
6231
  }
6230
6232
  else {
@@ -6232,7 +6234,7 @@ const getShiftsAroundCurrent = (_a) => __awaiter(void 0, [_a], void 0, function*
6232
6234
  }
6233
6235
  });
6234
6236
 
6235
- const moment$d = getMomentTz();
6237
+ const moment$e = getMomentTz();
6236
6238
  const useShiftsAroundCurrent = ({ currentShiftId, shiftsRange, enabled = true, }) => {
6237
6239
  return useQuery({
6238
6240
  queryKey: ["shiftsAroundCurrent", currentShiftId, shiftsRange],
@@ -6279,7 +6281,7 @@ const ShiftAutocomplete = ({ currentShiftId, value, onShiftSelected, disabled, s
6279
6281
  React__default.createElement(Grid2, { container: true },
6280
6282
  React__default.createElement(Grid2, { size: { xs: 12 } },
6281
6283
  React__default.createElement(Autocomplete, { loading: isLoading, options: rows || [], getOptionLabel: (option) => {
6282
- return `${moment$d
6284
+ return `${moment$e
6283
6285
  .utc(option.ProductionDate)
6284
6286
  .format("MM/DD/YYYY")} - ${option.Shift} - ${option.Crew}`;
6285
6287
  }, value: selectedShift, onChange: (event, newValue) => {
@@ -7107,15 +7109,15 @@ const getJobs = (signal) => __awaiter(void 0, void 0, void 0, function* () {
7107
7109
  if (resp.ok) {
7108
7110
  let rows = get(resp, "data.tables[0].rows", []);
7109
7111
  rows = rows.map((job) => (Object.assign(Object.assign({}, job), { LastStarted: job.LastStarted
7110
- ? moment$f.utc(job["LastStarted"]).toDate()
7112
+ ? moment$g.utc(job["LastStarted"]).toDate()
7111
7113
  : null, LastContact: job.LastContact
7112
- ? moment$f.utc(job["LastContact"]).toDate()
7114
+ ? moment$g.utc(job["LastContact"]).toDate()
7113
7115
  : 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()
7116
+ ? moment$g.utc(job["LastCounter"]).toDate()
7117
+ : null, StartTime: job.StartTime ? moment$g.utc(job["StartTime"]).toDate() : null, NextExecutionTime: job.NextExecutionTime
7118
+ ? moment$g.utc(job["NextExecutionTime"]).toDate()
7117
7119
  : null, LastExecutionTime: job.LastExecutionTime
7118
- ? moment$f.utc(job["LastExecutionTime"]).toDate()
7120
+ ? moment$g.utc(job["LastExecutionTime"]).toDate()
7119
7121
  : null })));
7120
7122
  return rows;
7121
7123
  }
@@ -7309,7 +7311,7 @@ const JobDetails = ({ job, modal, onHide, suffixTitle }) => {
7309
7311
  } })),
7310
7312
  React__default.createElement(Grid2, { size: { xs: 12, md: 6 } },
7311
7313
  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: {
7314
+ 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
7315
  textField: {
7314
7316
  size: "small",
7315
7317
  margin: "none",
@@ -7323,7 +7325,7 @@ const JobDetails = ({ job, modal, onHide, suffixTitle }) => {
7323
7325
  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
7326
  } })),
7325
7327
  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: {
7328
+ 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
7329
  textField: {
7328
7330
  size: "small",
7329
7331
  margin: "none",
@@ -7331,7 +7333,7 @@ const JobDetails = ({ job, modal, onHide, suffixTitle }) => {
7331
7333
  },
7332
7334
  } })) })),
7333
7335
  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: {
7336
+ 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
7337
  textField: {
7336
7338
  size: "small",
7337
7339
  margin: "none",
@@ -7417,6 +7419,7 @@ const useJobsOptionsFunctions = ({ setShowModal, setJobSelected, }) => {
7417
7419
  };
7418
7420
  };
7419
7421
 
7422
+ const moment$d = getMomentTz();
7420
7423
  const useJobsTableData = ({ setShowModal, setJobSelected, showContextMenu, }) => {
7421
7424
  const renderButtonMenu = (params) => {
7422
7425
  return (React__default.createElement(IconButton$1, { style: {}, onClick: (e) => showContextMenu(e, params.data, "jobsContext"), size: "small" },
@@ -7436,19 +7439,20 @@ const useJobsTableData = ({ setShowModal, setJobSelected, showContextMenu, }) =>
7436
7439
  field: "PeriodTime",
7437
7440
  headerName: "Period Time",
7438
7441
  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
- },
7442
+ valueGetter: (params) => moment$d
7443
+ .duration(params.data.PeriodTime, "seconds")
7444
+ .format("h[h] m[m] s[s]"),
7445
+ },
7446
+ {
7447
+ field: "LastExecutionTime",
7448
+ headerName: "Last Execution",
7449
+ valueGetter: (params) => dxtToLocalServerTime(params.data.LastExecutionTime, "MM/dd HH:mm"),
7450
+ flex: 2,
7447
7451
  },
7448
7452
  {
7449
7453
  field: "NextExecutionTime",
7450
7454
  headerName: "Next Execution",
7451
- valueFormatter: ({ value }) => value === null ? "" : moment$f(value).format("DD/MM/YY HH:mm"),
7455
+ valueGetter: (params) => dxtToLocalServerTime(params.data.NextExecutionTime, "MM/dd HH:mm"),
7452
7456
  flex: 2,
7453
7457
  },
7454
7458
  {
@@ -7476,6 +7480,7 @@ const useJobsTableData = ({ setShowModal, setJobSelected, showContextMenu, }) =>
7476
7480
  return { columnDefs };
7477
7481
  };
7478
7482
 
7483
+ const jobStorageKey = "job-table-panel-sizes";
7479
7484
  const useSearchJobs = () => {
7480
7485
  return useQuery({
7481
7486
  queryKey: ["jobs"],
@@ -7486,6 +7491,8 @@ const CustomStatusPanel$1 = ({ handleNew }) => (React.createElement(IconButton$1
7486
7491
  React.createElement(PlaylistAddIcon, { style: { width: 30, height: 30 } })));
7487
7492
  const TableJobs = () => {
7488
7493
  const queryClient = useQueryClient();
7494
+ const groupRef = useRef(null);
7495
+ const [hover, setHover] = useState(false);
7489
7496
  const [jobSelected, setJobSelected] = useState(null);
7490
7497
  const [gridApi, setGridApi] = useState(null);
7491
7498
  const [errorMessage, setErrorMessage] = useState("");
@@ -7581,6 +7588,44 @@ const TableJobs = () => {
7581
7588
  }
7582
7589
  }
7583
7590
  };
7591
+ const getSavedPanelLayout = () => {
7592
+ try {
7593
+ const saved = localStorage.getItem(jobStorageKey);
7594
+ if (saved) {
7595
+ const layout = JSON.parse(saved);
7596
+ if (layout && typeof layout === "object") {
7597
+ return layout;
7598
+ }
7599
+ }
7600
+ }
7601
+ catch (e) {
7602
+ console.error("Error loading panel layout:", e);
7603
+ }
7604
+ return { table: 50, details: 50 };
7605
+ };
7606
+ const handlePanelResize = (layout) => {
7607
+ try {
7608
+ localStorage.setItem(jobStorageKey, JSON.stringify(layout));
7609
+ }
7610
+ catch (e) {
7611
+ console.error("Error saving panel layout:", e);
7612
+ }
7613
+ };
7614
+ const resetPanelLayout = () => {
7615
+ if (groupRef.current) {
7616
+ const defaultLayout = { table: 50, details: 50 };
7617
+ groupRef.current.setLayout(defaultLayout);
7618
+ try {
7619
+ localStorage.setItem(jobStorageKey, JSON.stringify(defaultLayout));
7620
+ }
7621
+ catch (e) {
7622
+ console.error("Error saving default layout:", e);
7623
+ }
7624
+ }
7625
+ };
7626
+ const handleSeparatorDoubleClick = () => {
7627
+ resetPanelLayout();
7628
+ };
7584
7629
  useEffect(() => {
7585
7630
  if (e && isError) {
7586
7631
  setErrorMessage(e.message);
@@ -7596,36 +7641,47 @@ const TableJobs = () => {
7596
7641
  React.createElement(Grid2, { container: true, justifyContent: "flex-start", p: 1, spacing: 1 },
7597
7642
  React.createElement(Grid2, { size: { md: 12, xs: 12 } },
7598
7643
  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" }))))),
7644
+ React.createElement(Grid2, { sx: { width: "100%" } },
7645
+ React.createElement(Group, { orientation: "horizontal", defaultLayout: getSavedPanelLayout(), onLayoutChange: handlePanelResize, groupRef: groupRef, style: { height: "100%" } },
7646
+ React.createElement(Panel, { id: "table", minSize: 20 },
7647
+ React.createElement(Paper, { elevation: 2, style: { height: "70vh", width: "100%" } },
7648
+ 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: {
7649
+ theme: themeDXT,
7650
+ statusBar: {
7651
+ statusPanels: [
7652
+ {
7653
+ statusPanel: (params) => (React.createElement(CustomStatusPanel$1, { handleNew: handleNewJob })),
7654
+ align: "left",
7655
+ },
7656
+ {
7657
+ statusPanel: "agTotalRowCountComponent",
7658
+ align: "right",
7659
+ },
7660
+ ],
7661
+ },
7662
+ } }))),
7663
+ React.createElement(Separator, { onDoubleClick: handleSeparatorDoubleClick, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), style: {
7664
+ width: hover ? "10px" : "8px",
7665
+ background: hover ? "#bdbdbd" : "#e0e0e0",
7666
+ position: "relative",
7667
+ cursor: "col-resize",
7668
+ marginLeft: 5,
7669
+ marginRight: 5,
7670
+ borderRadius: 10,
7671
+ } },
7672
+ React.createElement("div", { style: {
7673
+ position: "absolute",
7674
+ top: "50%",
7675
+ left: "50%",
7676
+ transform: "translate(-50%, -50%)",
7677
+ width: "3px",
7678
+ height: "40px",
7679
+ background: hover ? "#616161" : "#9e9e9e",
7680
+ borderRadius: "2px",
7681
+ } })),
7682
+ React.createElement(Panel, { id: "details", minSize: 20 },
7683
+ React.createElement(Paper, { elevation: 2, style: { height: "70vh", width: "100%" } },
7684
+ React.createElement(JobDetails, { job: jobSelected, modal: showModal, onHide: onDetailsHide, suffixTitle: "System Jobs" })))))),
7629
7685
  React.createElement(ResetJob, { show: showModal === "reset", onHide: (shouldUpdate) => __awaiter(void 0, void 0, void 0, function* () {
7630
7686
  setShowModal("");
7631
7687
  setJobSelected(null);
@@ -7980,7 +8036,7 @@ const CodeFilter = ({ LogTypeCode, setLogTypeCodeFilter }) => {
7980
8036
 
7981
8037
  const DateFilter = ({ date, setDate, label = "Date", minDate, maxDate, }) => {
7982
8038
  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: {
8039
+ React__default.createElement(DatePicker$1, { format: "MM/DD/YYYY", minDate: minDate ? moment$g(minDate) : undefined, maxDate: maxDate ? moment$g(maxDate) : undefined, sx: {
7984
8040
  minWidth: "100%",
7985
8041
  borderTopLeftRadius: 3,
7986
8042
  borderTopRightRadius: 3,
@@ -7990,7 +8046,7 @@ const DateFilter = ({ date, setDate, label = "Date", minDate, maxDate, }) => {
7990
8046
  size: "small",
7991
8047
  fullWidth: true,
7992
8048
  },
7993
- }, label: label, value: date ? moment$f(date) : null, onChange: (newDate) => setDate(newDate ? newDate.toDate() : null) })));
8049
+ }, label: label, value: date ? moment$g(date) : null, onChange: (newDate) => setDate(newDate ? newDate.toDate() : null) })));
7994
8050
  };
7995
8051
 
7996
8052
  const SearchFilter = ({ search, setSearch }) => {
@@ -8095,7 +8151,7 @@ const getLogs = (params, signal) => __awaiter(void 0, void 0, void 0, function*
8095
8151
  const resp = yield apiService.callV2("[MES].[GetLogs]", parameters);
8096
8152
  if (resp.ok) {
8097
8153
  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 })));
8154
+ rows = rows.map((log) => (Object.assign(Object.assign({}, log), { Timestamp: log.Timestamp ? moment$g.utc(log["Timestamp"]).toDate() : null })));
8099
8155
  return rows;
8100
8156
  }
8101
8157
  else {
@@ -8225,8 +8281,8 @@ const getLogTypeByCodeId = (logTypeCodeId) => {
8225
8281
  return get(LOG_TYPE_CODES, `${logTypeCodeId}.description`, " -");
8226
8282
  };
8227
8283
  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());
8284
+ const [startDate, setStartDate] = useState(moment$g().add(-5, "days").hour(0).minute(0).second(0).toDate());
8285
+ const [endDate, setEndDate] = useState(moment$g().hour(23).minute(59).second(59).toDate());
8230
8286
  const [timezone, setTimezone] = useState("UTC");
8231
8287
  const [search, setSearch] = useState("");
8232
8288
  const [logTypeCode, setLogTypeCode] = useState(["I", "W", "E"]);
@@ -8249,7 +8305,7 @@ const TableLogs = () => {
8249
8305
  const formattedRows = rows === null || rows === void 0 ? void 0 : rows.map(({ LogId, Timestamp, Source, Message, LogTypeCode, User }) => ({
8250
8306
  id: LogId,
8251
8307
  Timestamp: timezone === "UTC"
8252
- ? moment$f(Timestamp).utc().format("YYYY-MM-DD HH:mm:ss z")
8308
+ ? moment$g(Timestamp).utc().format("YYYY-MM-DD HH:mm:ss z")
8253
8309
  : dxtToLocalServerTime(Timestamp, "yyyy-MM-dd HH:mm:ss z"),
8254
8310
  Source,
8255
8311
  Message: isNil(Message) ? "" : Message.replaceAll("Added", " Added"),
@@ -8273,8 +8329,8 @@ const TableLogs = () => {
8273
8329
  }, []);
8274
8330
  const { showContextMenu, registerConfig } = useContextMenuMESF();
8275
8331
  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());
8332
+ setStartDate(moment$g().add(-5, "days").hour(0).minute(0).second(0).toDate());
8333
+ setEndDate(moment$g().hour(23).minute(59).second(59).toDate());
8278
8334
  setSearch("");
8279
8335
  gridAPI === null || gridAPI === void 0 ? void 0 : gridAPI.setGridOption("quickFilterText", "");
8280
8336
  setLogTypeCode(["I", "W", "E"]);
@@ -8364,7 +8420,7 @@ const TableLogs = () => {
8364
8420
  setEndDate(null);
8365
8421
  }
8366
8422
  else {
8367
- setEndDate(moment$f().hour(23).minute(59).second(59).toDate());
8423
+ setEndDate(moment$g().hour(23).minute(59).second(59).toDate());
8368
8424
  }
8369
8425
  setAutoRefresh(checked);
8370
8426
  } })),
@@ -9062,14 +9118,14 @@ const CreateShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetN
9062
9118
  minWidth: "100%",
9063
9119
  borderTopLeftRadius: 3,
9064
9120
  borderTopRightRadius: 3,
9065
- }, label: "Start", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9121
+ }, label: "Start", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9066
9122
  textField: {
9067
9123
  fullWidth: true,
9068
9124
  variant: "standard",
9069
9125
  },
9070
9126
  } })),
9071
9127
  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: {
9128
+ 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
9129
  textField: {
9074
9130
  fullWidth: true,
9075
9131
  variant: "standard",
@@ -9259,7 +9315,7 @@ const DeleteShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetN
9259
9315
  minWidth: "100%",
9260
9316
  borderTopLeftRadius: 3,
9261
9317
  borderTopRightRadius: 3,
9262
- }, label: "Start", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9318
+ }, label: "Start", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9263
9319
  textField: {
9264
9320
  fullWidth: true,
9265
9321
  variant: "standard",
@@ -9267,7 +9323,7 @@ const DeleteShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetN
9267
9323
  },
9268
9324
  } })),
9269
9325
  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: {
9326
+ 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
9327
  textField: {
9272
9328
  fullWidth: true,
9273
9329
  variant: "standard",
@@ -9392,14 +9448,14 @@ const EditShift = ({ shiftSelected, show, onHide, suffixTitle, assetId, assetNam
9392
9448
  minWidth: "100%",
9393
9449
  borderTopLeftRadius: 3,
9394
9450
  borderTopRightRadius: 3,
9395
- }, label: "Start", value: value ? moment$f(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9451
+ }, label: "Start", value: value ? moment$g(value) : value, onChange: (evt) => onChange(evt === null || evt === void 0 ? void 0 : evt.toDate()), slotProps: {
9396
9452
  textField: {
9397
9453
  fullWidth: true,
9398
9454
  variant: "standard",
9399
9455
  },
9400
9456
  } })),
9401
9457
  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: {
9458
+ 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
9459
  textField: {
9404
9460
  fullWidth: true,
9405
9461
  variant: "standard",
@@ -9571,7 +9627,7 @@ const useTableData$4 = ({ setShiftSelected, setOpenModalEditShift, setOpenModalD
9571
9627
  {
9572
9628
  field: "PatternStart",
9573
9629
  headerName: "Pattern Start",
9574
- valueFormatter: ({ value }) => `${moment$f(value).format("L")}, ${moment$f(value).format("LTS")}`,
9630
+ valueFormatter: ({ value }) => `${moment$g(value).format("L")}, ${moment$g(value).format("LTS")}`,
9575
9631
  minWidth: 180,
9576
9632
  flex: 4,
9577
9633
  cellStyle: {
@@ -10506,7 +10562,7 @@ const renderInput = (param, onChange, disabled) => {
10506
10562
  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
10563
  }
10508
10564
  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: {
10565
+ 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
10566
  textField: {
10511
10567
  fullWidth: true,
10512
10568
  size: "small",
@@ -10972,7 +11028,7 @@ const Configuration = () => {
10972
11028
  } }, "Security") },
10973
11029
  React__default.createElement(ListItemButton, { selected: option === "users", component: Link, to: "/configuration/users" },
10974
11030
  React__default.createElement(ListItemIcon, null,
10975
- React__default.createElement(Group, null)),
11031
+ React__default.createElement(Group$1, null)),
10976
11032
  React__default.createElement(ListItemText, { primary: "Users" })),
10977
11033
  React__default.createElement(ListItemButton, { selected: option === "profiles", component: Link, to: "/configuration/profiles" },
10978
11034
  React__default.createElement(ListItemIcon, null,
@@ -11773,21 +11829,21 @@ const dateNavigator = (startDate, endDate, scope, operator, current = false) =>
11773
11829
  }
11774
11830
  else {
11775
11831
  const [quantity, duration] = scope.split(" ");
11776
- newStartDate = moment$f(newEndDate)
11832
+ newStartDate = moment$g(newEndDate)
11777
11833
  .subtract(quantity, duration[0])
11778
11834
  .toDate();
11779
11835
  }
11780
11836
  }
11781
11837
  else {
11782
11838
  if (scope === "custom") {
11783
- const durationInMs = moment$f(endDate).diff(moment$f(startDate));
11784
- newStartDate = moment$f(startDate)[operator](durationInMs).toDate();
11839
+ const durationInMs = moment$g(endDate).diff(moment$g(startDate));
11840
+ newStartDate = moment$g(startDate)[operator](durationInMs).toDate();
11785
11841
  }
11786
11842
  else {
11787
11843
  const [quantity, duration] = scope.split(" ");
11788
- newStartDate = moment$f(startDate)[operator](quantity, duration[0])
11844
+ newStartDate = moment$g(startDate)[operator](quantity, duration[0])
11789
11845
  .toDate();
11790
- newEndDate = moment$f(endDate)[operator](quantity, duration[0])
11846
+ newEndDate = moment$g(endDate)[operator](quantity, duration[0])
11791
11847
  .toDate();
11792
11848
  }
11793
11849
  }
@@ -11823,11 +11879,11 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11823
11879
  };
11824
11880
  const handlePartialDateNavigator = (operator) => {
11825
11881
  // Calculate 20% of the current period
11826
- const durationInMs = moment$f(timeScopeEnd).diff(moment$f(timeScopeStart));
11882
+ const durationInMs = moment$g(timeScopeEnd).diff(moment$g(timeScopeStart));
11827
11883
  const partialDuration = Math.round(durationInMs * 0.2);
11828
- const newStartDate = moment$f(timeScopeStart)[operator](partialDuration, "milliseconds")
11884
+ const newStartDate = moment$g(timeScopeStart)[operator](partialDuration, "milliseconds")
11829
11885
  .toDate();
11830
- const newEndDate = moment$f(timeScopeEnd)[operator](partialDuration, "milliseconds")
11886
+ const newEndDate = moment$g(timeScopeEnd)[operator](partialDuration, "milliseconds")
11831
11887
  .toDate();
11832
11888
  setTotalScope({
11833
11889
  start: newStartDate,
@@ -11836,7 +11892,7 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11836
11892
  });
11837
11893
  };
11838
11894
  const handleDateChange = (newValue, key) => {
11839
- const newDate = moment$f(newValue).toDate();
11895
+ const newDate = moment$g(newValue).toDate();
11840
11896
  // If scope is "custom", just update the changed date
11841
11897
  if (scope === "custom") {
11842
11898
  setTotalScope({ [key]: newDate });
@@ -11943,7 +11999,7 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11943
11999
  React__default.createElement(FastRewind, { fontSize: "medium", sx: { color: "black" } })))),
11944
12000
  React__default.createElement(Grid2, { size: { md: 3.5 } },
11945
12001
  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) => {
12002
+ React__default.createElement(DateTimePicker, { label: "Start", format: "MM/DD/YYYY HH:mm:ss", value: moment$g(timeScopeStart), onChange: (newValue) => {
11947
12003
  if (newValue) {
11948
12004
  handleDateChange(newValue.toDate(), "start");
11949
12005
  }
@@ -11966,7 +12022,7 @@ const HeaderSectionV2 = React__default.memo(({ autoRefresh, setAutoRefresh, setC
11966
12022
  React__default.createElement(MenuItem, { value: "custom" }, "Custom")))),
11967
12023
  React__default.createElement(Grid2, { size: { md: 3.5 } },
11968
12024
  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) => {
12025
+ React__default.createElement(DateTimePicker, { label: "End", format: "MM/DD/YYYY HH:mm:ss", value: autoRefresh ? null : moment$g(timeScopeEnd), onChange: (newValue) => {
11970
12026
  if (newValue) {
11971
12027
  handleDateChange(newValue.toDate(), "end");
11972
12028
  }
@@ -15757,7 +15813,7 @@ const TrendingsPageV2 = () => {
15757
15813
  display: "flex",
15758
15814
  width: "100%",
15759
15815
  } },
15760
- React__default.createElement(Group$1, { orientation: "vertical", style: { width: "100%", height: "100%" } },
15816
+ React__default.createElement(Group, { orientation: "vertical", style: { width: "100%", height: "100%" } },
15761
15817
  React__default.createElement(Panel, { defaultSize: 80, minSize: 20 },
15762
15818
  React__default.createElement("div", { style: { height: "100%", width: "100%" } },
15763
15819
  React__default.createElement(TrendingChartV2, { customOptions: chartOptions, series: filteredSeries, isLoading: seriesLoading && seriesFetching, onChartReady: setChartInstance, dataLoadedTrigger: dataLoadedTrigger }))),
@@ -15855,7 +15911,7 @@ const ProvidersLoader = ({ children, }) => {
15855
15911
  };
15856
15912
 
15857
15913
  const timezone = TimeService.getInstance().getServerTimeZone();
15858
- moment$g.tz.setDefault(timezone);
15914
+ moment$h.tz.setDefault(timezone);
15859
15915
  const base = document.getElementsByTagName("base")[0].getAttribute("href") || "/";
15860
15916
  const queryClient = new QueryClient({
15861
15917
  defaultOptions: {
@@ -15881,7 +15937,7 @@ function MESFMain({ authentication, routes, navbar, navbarTitle = "MESF", config
15881
15937
  React__default.createElement(HelmetDexteelProvider, { navbarTitle: navbarTitle },
15882
15938
  React__default.createElement(QueryClientProvider, { client: queryClient },
15883
15939
  React__default.createElement(AuthProvider, { authConfig: authentication },
15884
- React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, dateLibInstance: moment$g },
15940
+ React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, dateLibInstance: moment$h },
15885
15941
  React__default.createElement(UserProvider, null,
15886
15942
  React__default.createElement(UTLSettingsProvider, null,
15887
15943
  React__default.createElement(ProvidersLoader, null,
@@ -17370,7 +17426,7 @@ const Logbook$3 = () => {
17370
17426
  fontWeight: 600,
17371
17427
  userSelect: "none",
17372
17428
  } }, "LOGBOOK")),
17373
- React__default.createElement(Group$1, { id: "logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
17429
+ React__default.createElement(Group, { id: "logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
17374
17430
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
17375
17431
  React__default.createElement(Box, { sx: {
17376
17432
  display: "flex",
@@ -17981,7 +18037,7 @@ const Logbook$2 = () => {
17981
18037
  fontWeight: 600,
17982
18038
  userSelect: "none",
17983
18039
  } }, "LOGBOOK REPORT")),
17984
- React__default.createElement(Group$1, { id: "logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
18040
+ React__default.createElement(Group, { id: "logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
17985
18041
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
17986
18042
  React__default.createElement(Box, { sx: {
17987
18043
  display: "flex",
@@ -19713,7 +19769,7 @@ const Logbook$1 = () => {
19713
19769
  fontWeight: 600,
19714
19770
  userSelect: "none",
19715
19771
  } }, "LOGBOOK")),
19716
- React__default.createElement(Group$1, { id: "section-logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
19772
+ React__default.createElement(Group, { id: "section-logbook-entry-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
19717
19773
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
19718
19774
  React__default.createElement(Box, { sx: {
19719
19775
  display: "flex",
@@ -20292,7 +20348,7 @@ const Logbook = () => {
20292
20348
  fontWeight: 600,
20293
20349
  userSelect: "none",
20294
20350
  } }, "LOGBOOK REPORT")),
20295
- React__default.createElement(Group$1, { id: "section-logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
20351
+ React__default.createElement(Group, { id: "section-logbook-report-group", orientation: "horizontal", defaultLayout: resolvedLayout, onLayoutChange: onLayoutChange, style: { flex: 1, width: "100%" } },
20296
20352
  React__default.createElement(Panel, { id: "left", defaultSize: 42, minSize: 25, style: { paddingBottom: 5 } },
20297
20353
  React__default.createElement(Box, { sx: {
20298
20354
  display: "flex",
@@ -20531,7 +20587,16 @@ const AreaSelector = () => {
20531
20587
  borderRadius: "2px",
20532
20588
  overflowY: "auto",
20533
20589
  } },
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%" } },
20590
+ 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: {
20591
+ "&.Mui-selected": {
20592
+ backgroundColor: (theme) => alpha(theme.palette.info.main, 0.2),
20593
+ "&:hover": {
20594
+ backgroundColor: (theme) => alpha(theme.palette.info.main, 0.4),
20595
+ },
20596
+ },
20597
+ cursor: "pointer",
20598
+ width: "100%",
20599
+ } },
20535
20600
  React__default.createElement(ListItemText, { primary: area === null || area === void 0 ? void 0 : area.AssetName })))))))))),
20536
20601
  React__default.createElement(DialogActions$1, null,
20537
20602
  React__default.createElement(Button, { autoFocus: true, onClick: handleCancel, color: "primary" }, "Cancel"),