@dexteel/mesf-core 4.14.0 → 4.16.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/.github/workflows/release-please.yml +50 -13
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +43 -0
- package/dist/MESFMain.d.ts +5 -4
- package/dist/controls/filters/dialogFilter.d.ts +27 -1
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/shift-navigator/component/shift-navigator.control.d.ts +6 -0
- package/dist/controls/shift-navigator/context/ShiftNavigatorProvider.d.ts +4 -0
- package/dist/controls/shift-navigator/hook/useShiftNavigator.d.ts +14 -0
- package/dist/controls/shift-navigator/index.d.ts +5 -0
- package/dist/controls/shift-navigator/models/shift-navigator.model.d.ts +30 -0
- package/dist/controls/shift-navigator/repositories/ShiftsRepository.d.ts +13 -0
- package/dist/globalContext.d.ts +2 -2
- package/dist/index.esm.js +562 -209
- package/dist/index.esm.js.map +1 -1
- package/dist/pages/trendings/components/chart/context/TrendingContext.d.ts +7 -7
- package/package.json +2 -1
- package/release-please-config.json +21 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
export { LicenseManager } from 'ag-grid-enterprise';
|
|
2
|
-
import { Typography, Checkbox, TextField, makeStyles as makeStyles$1, Button as Button$1, Grid as Grid$1, Dialog as Dialog$1, DialogTitle as DialogTitle$2, DialogContent as DialogContent$2, DialogContentText, DialogActions as DialogActions$2, FormHelperText, CircularProgress as CircularProgress$1, Badge, FormControlLabel, Snackbar as Snackbar$1, Paper as Paper$1, MenuItem as MenuItem$1, useTheme as useTheme$1,
|
|
2
|
+
import { Typography, Checkbox, TextField, makeStyles as makeStyles$1, Button as Button$1, Grid as Grid$1, Dialog as Dialog$1, DialogTitle as DialogTitle$2, DialogContent as DialogContent$2, DialogContentText, DialogActions as DialogActions$2, FormHelperText, CircularProgress as CircularProgress$1, Badge, FormControlLabel, Snackbar as Snackbar$1, Paper as Paper$1, MenuItem as MenuItem$1, useTheme as useTheme$1, IconButton as IconButton$1, Tooltip as Tooltip$1, Divider, Box, FormControl as FormControl$1, Select as Select$1, debounce, createStyles as createStyles$1, List, ListItem, ListItemText } from '@material-ui/core';
|
|
3
3
|
import { values, get, isNil as isNil$1, isEmpty, round, isNaN, isNumber } from 'lodash-es';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default, { useState, useRef, useEffect, useMemo, Component, createContext, useContext, useCallback, lazy, Suspense } from 'react';
|
|
6
|
+
import Paper from '@material-ui/core/Paper';
|
|
7
|
+
import Grid from '@material-ui/core/Grid';
|
|
8
|
+
import { ArrowRight, ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight } from '@material-ui/icons';
|
|
9
|
+
import { DatePicker } from '@mui/x-date-pickers/DatePicker/DatePicker';
|
|
10
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
11
|
+
import { Outlet, useParams, useNavigate, useSearchParams, Link, Navigate, Routes, Route, BrowserRouter } from 'react-router-dom';
|
|
6
12
|
import { Alert as Alert$1, Modal as Modal$1, Navbar, Container, Nav, NavDropdown } from 'react-bootstrap';
|
|
7
13
|
import DialogTitle$1 from '@material-ui/core/DialogTitle';
|
|
8
14
|
import DialogContent$1 from '@material-ui/core/DialogContent';
|
|
9
15
|
import DialogActions$1 from '@material-ui/core/DialogActions';
|
|
10
16
|
import Dialog from '@material-ui/core/Dialog';
|
|
11
17
|
import Button from '@material-ui/core/Button';
|
|
12
|
-
import { Outlet, useNavigate, useSearchParams, Link, useParams, Navigate, Routes, Route, BrowserRouter } from 'react-router-dom';
|
|
13
18
|
import { useMsal, MsalProvider } from '@azure/msal-react';
|
|
14
19
|
import { LogLevel, PublicClientApplication } from '@azure/msal-browser';
|
|
15
20
|
import { useComplexState } from 'use-complex-state';
|
|
@@ -17,14 +22,12 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
17
22
|
import ShowChartIcon from '@material-ui/icons/ShowChart';
|
|
18
23
|
import MenuItem from '@material-ui/core/MenuItem';
|
|
19
24
|
import MenuList from '@material-ui/core/MenuList';
|
|
20
|
-
import Paper from '@material-ui/core/Paper';
|
|
21
|
-
import Grid from '@material-ui/core/Grid';
|
|
22
25
|
import { isNil, get as get$1 } from 'lodash';
|
|
23
26
|
import { DndProvider } from 'react-dnd';
|
|
24
27
|
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
25
|
-
import moment from 'moment';
|
|
28
|
+
import moment$2 from 'moment';
|
|
26
29
|
import axios from 'axios';
|
|
27
|
-
import { _adapters, Chart, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip as Tooltip$
|
|
30
|
+
import { _adapters, Chart, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip as Tooltip$2, Legend, TimeScale } from 'chart.js';
|
|
28
31
|
import zoomPlugin from 'chartjs-plugin-zoom';
|
|
29
32
|
import SaveIcon from '@material-ui/icons/Save';
|
|
30
33
|
import LockIcon from '@material-ui/icons/Lock';
|
|
@@ -35,10 +38,12 @@ import DeleteIcon from '@material-ui/icons/Delete';
|
|
|
35
38
|
import { isAncestor, Tree, DndProvider as DndProvider$1 } from '@minoru/react-dnd-treeview';
|
|
36
39
|
import FolderIcon from '@material-ui/icons/Folder';
|
|
37
40
|
import InsertChartIcon from '@material-ui/icons/InsertChart';
|
|
38
|
-
import { ArrowRight, ChevronLeft, ChevronRight } from '@material-ui/icons';
|
|
39
41
|
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
|
|
40
42
|
import SkipNextIcon from '@material-ui/icons/SkipNext';
|
|
41
43
|
import { Line } from 'react-chartjs-2';
|
|
44
|
+
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
45
|
+
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
|
|
46
|
+
import moment$3 from 'moment-timezone';
|
|
42
47
|
import PersonPinCircleIcon from '@material-ui/icons/PersonPinCircle';
|
|
43
48
|
import PropTypes from 'prop-types';
|
|
44
49
|
import { ResponsiveBar } from '@nivo/bar';
|
|
@@ -79,7 +84,8 @@ import ListAltIcon from '@material-ui/icons/ListAlt';
|
|
|
79
84
|
import DescriptionIcon from '@material-ui/icons/Description';
|
|
80
85
|
import { format, fromZonedTime, formatInTimeZone } from 'date-fns-tz';
|
|
81
86
|
import { findIana } from 'windows-iana';
|
|
82
|
-
import
|
|
87
|
+
import FindInPageIcon from '@material-ui/icons/FindInPage';
|
|
88
|
+
import AddBoxIcon from '@material-ui/icons/AddBox';
|
|
83
89
|
import FormControlLabel$1 from '@material-ui/core/FormControlLabel';
|
|
84
90
|
import Checkbox$1 from '@material-ui/core/Checkbox';
|
|
85
91
|
import Input from '@material-ui/core/Input';
|
|
@@ -290,8 +296,6 @@ var LazyLoading = function () {
|
|
|
290
296
|
React__default.createElement("div", null))));
|
|
291
297
|
};
|
|
292
298
|
|
|
293
|
-
/**********************MATERIAL UI STYLES********************** */
|
|
294
|
-
/*************************************************************** */
|
|
295
299
|
function MinusSquare(props) {
|
|
296
300
|
return (React__default.createElement(SvgIcon, __assign({ fontSize: "inherit", style: { width: 14, height: 14 } }, props),
|
|
297
301
|
React__default.createElement("path", { d: "M22.047 22.074v0 0-20.147 0h-20.12v0 20.147 0h20.12zM22.047 24h-20.12q-.803 0-1.365-.562t-.562-1.365v-20.147q0-.776.562-1.351t1.365-.575h20.147q.776 0 1.351.575t.575 1.351v20.147q0 .803-.575 1.365t-1.378.562v0zM17.873 11.023h-11.826q-.375 0-.669.281t-.294.682v0q0 .401.294 .682t.669.281h11.826q.375 0 .669-.281t.294-.682v0q0-.401-.294-.682t-.669-.281z" })));
|
|
@@ -312,9 +316,6 @@ function TransitionComponent(props) {
|
|
|
312
316
|
React__default.createElement(Collapse, __assign({}, props))));
|
|
313
317
|
}
|
|
314
318
|
TransitionComponent.propTypes = {
|
|
315
|
-
/**
|
|
316
|
-
* Show the component; triggers the enter or exit states
|
|
317
|
-
*/
|
|
318
319
|
"in": PropTypes.bool
|
|
319
320
|
};
|
|
320
321
|
var StyledTreeItem = withStyles(function (theme) { return ({
|
|
@@ -336,7 +337,7 @@ var StyledTreeItem = withStyles(function (theme) { return ({
|
|
|
336
337
|
}); })(function (props) { return (React__default.createElement(TreeItem, __assign({}, props, { TransitionComponent: TransitionComponent }))); });
|
|
337
338
|
var useTreviewStyle = makeStyles(function (theme) { return ({
|
|
338
339
|
root: {
|
|
339
|
-
|
|
340
|
+
minHeight: 264,
|
|
340
341
|
flexGrow: 1
|
|
341
342
|
},
|
|
342
343
|
treLabelIcon: {
|
|
@@ -365,6 +366,7 @@ var ModalTreeFilterControl = function (props) {
|
|
|
365
366
|
var _b = useState([]), expanded = _b[0], setExpanded = _b[1];
|
|
366
367
|
var treeRef = useRef(null);
|
|
367
368
|
var _c = useState([]), selectedNodes = _c[0], setSelectedNodes = _c[1];
|
|
369
|
+
var classes = useTreviewStyle();
|
|
368
370
|
useEffect(function () {
|
|
369
371
|
if (!open) {
|
|
370
372
|
setValue(valueProp);
|
|
@@ -374,6 +376,34 @@ var ModalTreeFilterControl = function (props) {
|
|
|
374
376
|
expandNode(valueProp);
|
|
375
377
|
}
|
|
376
378
|
}, [valueProp, open]);
|
|
379
|
+
useEffect(function () {
|
|
380
|
+
if (Array.isArray(listAssetDrawings) && listAssetDrawings.length >= 1) {
|
|
381
|
+
setSelectedNodes(listAssetDrawings);
|
|
382
|
+
var expandedBranches = findBranchesWithSelectedNodes(data, listAssetDrawings);
|
|
383
|
+
setExpanded(expandedBranches);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
setSelectedNodes([]);
|
|
387
|
+
setExpanded([]);
|
|
388
|
+
}
|
|
389
|
+
}, [listAssetDrawings, data]);
|
|
390
|
+
var findBranchesWithSelectedNodes = function (node, selectedNodes) {
|
|
391
|
+
var branches = [];
|
|
392
|
+
if (selectedNodes.includes(node.id)) {
|
|
393
|
+
branches.push(node.id.toString());
|
|
394
|
+
}
|
|
395
|
+
if (Array.isArray(node.children)) {
|
|
396
|
+
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
|
|
397
|
+
var child = _a[_i];
|
|
398
|
+
var childBranches = findBranchesWithSelectedNodes(child, selectedNodes);
|
|
399
|
+
if (childBranches.length > 0) {
|
|
400
|
+
branches.push(node.id.toString());
|
|
401
|
+
branches = branches.concat(childBranches);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return branches;
|
|
406
|
+
};
|
|
377
407
|
var handleEntering = function () {
|
|
378
408
|
if (treeRef.current != null) {
|
|
379
409
|
treeRef.current.focus();
|
|
@@ -381,10 +411,11 @@ var ModalTreeFilterControl = function (props) {
|
|
|
381
411
|
};
|
|
382
412
|
var handleCancel = function () {
|
|
383
413
|
onClose();
|
|
384
|
-
onHide
|
|
414
|
+
if (onHide)
|
|
415
|
+
onHide(false);
|
|
385
416
|
};
|
|
386
417
|
var handleOk = function () {
|
|
387
|
-
var findNode = getNodeData(data,
|
|
418
|
+
var findNode = getNodeData(data, value !== undefined ? value : -1);
|
|
388
419
|
if (findNode === null)
|
|
389
420
|
findNode = {};
|
|
390
421
|
var activeFilter = (selectActive && findNode.isActive) || selectActive !== true;
|
|
@@ -393,13 +424,15 @@ var ModalTreeFilterControl = function (props) {
|
|
|
393
424
|
if (findNode.isLeaf) {
|
|
394
425
|
if (activeFilter && internalFilter) {
|
|
395
426
|
onClose(value, findNode.name, findNode);
|
|
396
|
-
onSuccess
|
|
427
|
+
if (onSuccess)
|
|
428
|
+
onSuccess(true);
|
|
397
429
|
}
|
|
398
430
|
}
|
|
399
431
|
else {
|
|
400
432
|
if (branchFilter) {
|
|
401
433
|
onClose(value, findNode.name, findNode);
|
|
402
|
-
onSuccess
|
|
434
|
+
if (onSuccess)
|
|
435
|
+
onSuccess(true);
|
|
403
436
|
}
|
|
404
437
|
}
|
|
405
438
|
};
|
|
@@ -431,13 +464,13 @@ var ModalTreeFilterControl = function (props) {
|
|
|
431
464
|
}
|
|
432
465
|
return [];
|
|
433
466
|
};
|
|
434
|
-
var expandNode = function (
|
|
435
|
-
var expandedNode = getNodeParent(data,
|
|
436
|
-
expandedNode.push(
|
|
467
|
+
var expandNode = function (nodeId) {
|
|
468
|
+
var expandedNode = getNodeParent(data, nodeId, []);
|
|
469
|
+
expandedNode.push(nodeId.toString());
|
|
437
470
|
setExpanded(expandedNode);
|
|
438
471
|
};
|
|
439
472
|
var handleChange = function (event, nodeIds) {
|
|
440
|
-
setValue(nodeIds);
|
|
473
|
+
setValue(parseInt(nodeIds));
|
|
441
474
|
};
|
|
442
475
|
var handleToogle = function (event, nodeIds) {
|
|
443
476
|
setExpanded(nodeIds);
|
|
@@ -457,7 +490,6 @@ var ModalTreeFilterControl = function (props) {
|
|
|
457
490
|
}
|
|
458
491
|
return null;
|
|
459
492
|
};
|
|
460
|
-
var classes = useTreviewStyle();
|
|
461
493
|
var handleCheckboxChange = function (node) {
|
|
462
494
|
if (node) {
|
|
463
495
|
var isSelected = selectedNodes.includes(node.id);
|
|
@@ -469,37 +501,27 @@ var ModalTreeFilterControl = function (props) {
|
|
|
469
501
|
updatedSelectedNodes = __spreadArray(__spreadArray([], selectedNodes, true), [node.id], false);
|
|
470
502
|
}
|
|
471
503
|
setSelectedNodes(updatedSelectedNodes);
|
|
504
|
+
if (setListAssetDrawings) {
|
|
505
|
+
setListAssetDrawings(updatedSelectedNodes);
|
|
506
|
+
}
|
|
507
|
+
var expandedBranches = findBranchesWithSelectedNodes(data, updatedSelectedNodes);
|
|
508
|
+
setExpanded(expandedBranches);
|
|
472
509
|
}
|
|
473
510
|
};
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
}, [selectedNodes]);
|
|
479
|
-
useEffect(function () {
|
|
480
|
-
if ((listAssetDrawings === null || listAssetDrawings === void 0 ? void 0 : listAssetDrawings.length) >= 1) {
|
|
481
|
-
setSelectedNodes(listAssetDrawings);
|
|
482
|
-
}
|
|
483
|
-
}, [listAssetDrawings]);
|
|
484
|
-
var renderTree = function (nodes) { return (
|
|
485
|
-
/* @ts-ignore */
|
|
486
|
-
React__default.createElement(StyledTreeItem, { isChecked: selectedNodes.includes(nodes.id), key: nodes.id, nodeId: nodes.id.toString(), label: React__default.createElement("div", { className: classes.treeLabelRoot },
|
|
487
|
-
nodes.isCode === true && (React__default.createElement(Code, { className: classes.treeLabelIcon, htmlColor: "#1ABC9C" })),
|
|
488
|
-
nodes.isCode === false && (React__default.createElement(FolderIcon, { className: classes.treeLabelIcon, htmlColor: "#F1C40F" })),
|
|
489
|
-
React__default.createElement(Typography, { variant: "body2", className: [
|
|
490
|
-
classes.treeLabelText,
|
|
491
|
-
nodes.isActive ? "" : classes.treeLabelInactive,
|
|
492
|
-
].join(" ") },
|
|
511
|
+
var renderTree = function (nodes) { return (React__default.createElement(StyledTreeItem, { isChecked: selectedNodes.includes(nodes.id), key: nodes.id, nodeId: nodes.id.toString(), label: React__default.createElement("div", { className: classes.treeLabelRoot },
|
|
512
|
+
nodes.isCode === true && (React__default.createElement(Code, { className: classes.treLabelIcon, htmlColor: "#1ABC9C" })),
|
|
513
|
+
nodes.isCode === false && (React__default.createElement(FolderIcon, { className: classes.treLabelIcon, htmlColor: "#F1C40F" })),
|
|
514
|
+
React__default.createElement(Typography, { variant: "body2", className: "".concat(classes.treeLabelText, " ").concat(!nodes.isActive ? classes.treeLabelInactive : '') },
|
|
493
515
|
React__default.createElement("span", null,
|
|
494
516
|
nodes.isCode && (React__default.createElement("i", { className: "fas fa-square mr-2", style: { color: nodes.delayCategoryColor || "#FFFFFF" } })),
|
|
495
517
|
nodes.name)),
|
|
496
518
|
multipleSelectNodes &&
|
|
497
519
|
React__default.createElement(Checkbox, { className: classes.smallCheckbox, size: "small", color: "primary", checked: selectedNodes.includes(nodes.id), onChange: function () {
|
|
498
520
|
handleCheckboxChange(nodes);
|
|
499
|
-
}, onClick: handleCheckboxClick })), className: "delay-item-node", id: nodes.id, "data-isbranch": !nodes.isCode }, Array.isArray(nodes.children)
|
|
521
|
+
}, onClick: handleCheckboxClick })), className: "delay-item-node", id: nodes.id.toString(), "data-isbranch": !nodes.isCode }, Array.isArray(nodes.children)
|
|
500
522
|
? nodes.children.map(function (node) { return renderTree(node); })
|
|
501
523
|
: null)); };
|
|
502
|
-
return (React__default.createElement(Dialog, __assign({ onClose: function (
|
|
524
|
+
return (React__default.createElement(Dialog, __assign({ onClose: onHide ? function () { return onHide(false); } : function () { return null; }, "aria-label": title, maxWidth: "sm", TransitionProps: { onEntering: handleEntering }, "aria-labelledby": "confirmation-dialog-title", open: open }, other, { onKeyDown: handleKeyDown }),
|
|
503
525
|
React__default.createElement(DialogTitle$1, { id: "confirmation-dialog-title" }, title),
|
|
504
526
|
isLoading
|
|
505
527
|
?
|
|
@@ -509,7 +531,7 @@ var ModalTreeFilterControl = function (props) {
|
|
|
509
531
|
React__default.createElement(TreeView, { className: classes.root, defaultCollapseIcon: React__default.createElement(MinusSquare, null), defaultExpandIcon: React__default.createElement(PlusSquare, null), ref: treeRef, selected: value === undefined ? "" : value.toString(), expanded: expanded, onNodeSelect: handleChange, onNodeToggle: handleToogle }, data && data.id !== undefined && renderTree(data)))),
|
|
510
532
|
React__default.createElement(DialogActions$1, null,
|
|
511
533
|
React__default.createElement(Button, { autoFocus: true, onClick: handleCancel, color: "primary" }, "Cancel"),
|
|
512
|
-
React__default.createElement(Button, { onClick: handleOk, color: "primary" }, "
|
|
534
|
+
React__default.createElement(Button, { onClick: handleOk, color: "primary" }, "SAVE"))));
|
|
513
535
|
};
|
|
514
536
|
|
|
515
537
|
var useStyles$t = makeStyles(function (theme) { return ({
|
|
@@ -1248,7 +1270,7 @@ var useJobsTableData = function (_a) {
|
|
|
1248
1270
|
headerName: "Start Time",
|
|
1249
1271
|
valueFormatter: function (_a) {
|
|
1250
1272
|
var value = _a.value;
|
|
1251
|
-
return value === null ? "NULL" : moment(value).format("DD/MM/YYYY HH:mm");
|
|
1273
|
+
return value === null ? "NULL" : moment$2(value).format("DD/MM/YYYY HH:mm");
|
|
1252
1274
|
},
|
|
1253
1275
|
flex: 1
|
|
1254
1276
|
},
|
|
@@ -1259,7 +1281,7 @@ var useJobsTableData = function (_a) {
|
|
|
1259
1281
|
headerName: "Next Execution",
|
|
1260
1282
|
valueFormatter: function (_a) {
|
|
1261
1283
|
var value = _a.value;
|
|
1262
|
-
return value === null ? "NULL" : moment(value).format("DD/MM/YYYY HH:mm");
|
|
1284
|
+
return value === null ? "NULL" : moment$2(value).format("DD/MM/YYYY HH:mm");
|
|
1263
1285
|
},
|
|
1264
1286
|
flex: 1
|
|
1265
1287
|
},
|
|
@@ -1270,7 +1292,7 @@ var useJobsTableData = function (_a) {
|
|
|
1270
1292
|
headerName: "Started",
|
|
1271
1293
|
valueFormatter: function (_a) {
|
|
1272
1294
|
var value = _a.value;
|
|
1273
|
-
return value === null ? "NULL" : moment(value).format("DD/MM/YYYY HH:mm");
|
|
1295
|
+
return value === null ? "NULL" : moment$2(value).format("DD/MM/YYYY HH:mm");
|
|
1274
1296
|
},
|
|
1275
1297
|
flex: 1
|
|
1276
1298
|
},
|
|
@@ -1281,7 +1303,7 @@ var useJobsTableData = function (_a) {
|
|
|
1281
1303
|
headerName: "Last Seen",
|
|
1282
1304
|
valueFormatter: function (_a) {
|
|
1283
1305
|
var value = _a.value;
|
|
1284
|
-
return value === null ? "NULL" : moment(value).format("DD/MM/YYYY HH:mm");
|
|
1306
|
+
return value === null ? "NULL" : moment$2(value).format("DD/MM/YYYY HH:mm");
|
|
1285
1307
|
},
|
|
1286
1308
|
flex: 2
|
|
1287
1309
|
},
|
|
@@ -1623,7 +1645,8 @@ var TableJobs = function () {
|
|
|
1623
1645
|
name: "Enable",
|
|
1624
1646
|
action: function () {
|
|
1625
1647
|
setRowSelected(rowSelectedInGrid);
|
|
1626
|
-
}
|
|
1648
|
+
},
|
|
1649
|
+
icon: '<i class="fas fa-arrow-up"></i>'
|
|
1627
1650
|
});
|
|
1628
1651
|
}
|
|
1629
1652
|
if (rowSelectedInGrid) {
|
|
@@ -1631,7 +1654,8 @@ var TableJobs = function () {
|
|
|
1631
1654
|
name: "Disable",
|
|
1632
1655
|
action: function () {
|
|
1633
1656
|
setRowSelected(rowSelectedInGrid);
|
|
1634
|
-
}
|
|
1657
|
+
},
|
|
1658
|
+
icon: '<i class="fas fa-arrow-down"></i>'
|
|
1635
1659
|
});
|
|
1636
1660
|
}
|
|
1637
1661
|
if (rowSelectedInGrid) {
|
|
@@ -1639,12 +1663,14 @@ var TableJobs = function () {
|
|
|
1639
1663
|
name: "Reset",
|
|
1640
1664
|
action: function () {
|
|
1641
1665
|
setRowSelected(rowSelectedInGrid);
|
|
1642
|
-
}
|
|
1666
|
+
},
|
|
1667
|
+
icon: ' <i class="fas fa-undo"></i>'
|
|
1643
1668
|
});
|
|
1644
1669
|
}
|
|
1645
1670
|
result.push({
|
|
1646
1671
|
name: "Refresh",
|
|
1647
|
-
action: function () { return getJobsFromAPI(); }
|
|
1672
|
+
action: function () { return getJobsFromAPI(); },
|
|
1673
|
+
icon: '<i class="fas fa-sync-alt"></i>'
|
|
1648
1674
|
});
|
|
1649
1675
|
return result;
|
|
1650
1676
|
}, [rows, gridApi]);
|
|
@@ -1726,8 +1752,8 @@ var JobsPage = function (props) {
|
|
|
1726
1752
|
var LogsInitialState = {
|
|
1727
1753
|
logs: [],
|
|
1728
1754
|
searchData: {
|
|
1729
|
-
Start: moment().add(-5, "days").hour(0).minute(0).second(0).toDate(),
|
|
1730
|
-
End: moment().hour(23).minute(59).second(59).toDate(),
|
|
1755
|
+
Start: moment$2().add(-5, "days").hour(0).minute(0).second(0).toDate(),
|
|
1756
|
+
End: moment$2().hour(23).minute(59).second(59).toDate(),
|
|
1731
1757
|
Search: "",
|
|
1732
1758
|
LogTypeCode: "A"
|
|
1733
1759
|
}
|
|
@@ -1763,8 +1789,8 @@ var LogsReducer = createSlice({
|
|
|
1763
1789
|
resetFilters: function (state, _a) {
|
|
1764
1790
|
_a.payload;
|
|
1765
1791
|
state.searchData = {
|
|
1766
|
-
Start: moment().add(-5, "days").hour(0).minute(0).second(0).toDate(),
|
|
1767
|
-
End: moment().hour(23).minute(59).second(59).toDate(),
|
|
1792
|
+
Start: moment$2().add(-5, "days").hour(0).minute(0).second(0).toDate(),
|
|
1793
|
+
End: moment$2().hour(23).minute(59).second(59).toDate(),
|
|
1768
1794
|
Search: "",
|
|
1769
1795
|
LogTypeCode: "A"
|
|
1770
1796
|
};
|
|
@@ -2193,7 +2219,8 @@ var TableLogs = function () {
|
|
|
2193
2219
|
action: function () {
|
|
2194
2220
|
setSelectedLog(data);
|
|
2195
2221
|
setShowLogModal(true);
|
|
2196
|
-
}
|
|
2222
|
+
},
|
|
2223
|
+
icon: '<i class="fas fa-clipboard-list"></i>'
|
|
2197
2224
|
});
|
|
2198
2225
|
}
|
|
2199
2226
|
if (data) {
|
|
@@ -2201,7 +2228,8 @@ var TableLogs = function () {
|
|
|
2201
2228
|
name: "Reset Filters",
|
|
2202
2229
|
action: function () {
|
|
2203
2230
|
handleResetButtonClick();
|
|
2204
|
-
}
|
|
2231
|
+
},
|
|
2232
|
+
icon: '<i class="fas fa-sync-alt"></i>'
|
|
2205
2233
|
});
|
|
2206
2234
|
}
|
|
2207
2235
|
return result;
|
|
@@ -2629,7 +2657,7 @@ var useTableData$2 = function (_a) {
|
|
|
2629
2657
|
React__default.createElement(Button, { onClick: function () {
|
|
2630
2658
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
2631
2659
|
return __generator(this, function (_a) {
|
|
2632
|
-
setProfileForEdit(params.data);
|
|
2660
|
+
setProfileForEdit(params === null || params === void 0 ? void 0 : params.data);
|
|
2633
2661
|
setModalProceduresProfile(true);
|
|
2634
2662
|
return [2 /*return*/];
|
|
2635
2663
|
});
|
|
@@ -2646,7 +2674,7 @@ var useTableData$2 = function (_a) {
|
|
|
2646
2674
|
}); })();
|
|
2647
2675
|
} },
|
|
2648
2676
|
React__default.createElement(DeleteIcon, { color: "secondary" })),
|
|
2649
|
-
React__default.createElement(Button, { style: {}, onClick: function (e) {
|
|
2677
|
+
React__default.createElement(Button, { style: {}, onClick: function (e) { onActionsClick(e, params); } },
|
|
2650
2678
|
React__default.createElement(FormatListBulletedSharpIcon, { style: { height: "auto" }, color: "action" })))));
|
|
2651
2679
|
},
|
|
2652
2680
|
headerName: " ",
|
|
@@ -3002,16 +3030,18 @@ var TableProfiles = function (_a) {
|
|
|
3002
3030
|
name: "New",
|
|
3003
3031
|
action: function () {
|
|
3004
3032
|
setModalCreateActive(!modalCreateActive);
|
|
3005
|
-
}
|
|
3033
|
+
},
|
|
3034
|
+
icon: '<i class="fas fa-plus"></i>'
|
|
3006
3035
|
});
|
|
3007
3036
|
}
|
|
3008
3037
|
if (data) {
|
|
3009
3038
|
result.push({
|
|
3010
3039
|
name: "Edit Profile",
|
|
3011
3040
|
action: function () {
|
|
3012
|
-
|
|
3041
|
+
setProfileForEdit(data);
|
|
3013
3042
|
setModalProceduresProfile(true);
|
|
3014
|
-
}
|
|
3043
|
+
},
|
|
3044
|
+
icon: '<i class="fas fa-edit"></i>'
|
|
3015
3045
|
});
|
|
3016
3046
|
}
|
|
3017
3047
|
if (data) {
|
|
@@ -3020,7 +3050,8 @@ var TableProfiles = function (_a) {
|
|
|
3020
3050
|
action: function () {
|
|
3021
3051
|
setProfileForDelete(data);
|
|
3022
3052
|
setModalDeleteProfile(true);
|
|
3023
|
-
}
|
|
3053
|
+
},
|
|
3054
|
+
icon: '<i class="fas fa-trash"></i>'
|
|
3024
3055
|
});
|
|
3025
3056
|
}
|
|
3026
3057
|
var addNewProfile = [];
|
|
@@ -3029,7 +3060,8 @@ var TableProfiles = function (_a) {
|
|
|
3029
3060
|
name: "New Profile",
|
|
3030
3061
|
action: function () {
|
|
3031
3062
|
setModalCreateActive(!modalCreateActive);
|
|
3032
|
-
}
|
|
3063
|
+
},
|
|
3064
|
+
icon: '<i class="fas fa-plus"></i>'
|
|
3033
3065
|
});
|
|
3034
3066
|
}
|
|
3035
3067
|
return data ? result : addNewProfile;
|
|
@@ -3072,9 +3104,11 @@ var TableProfiles = function (_a) {
|
|
|
3072
3104
|
margin: "20px 0 10px"
|
|
3073
3105
|
} },
|
|
3074
3106
|
React.createElement("div", { style: gridStyle, className: "ag-theme-alpine" },
|
|
3075
|
-
React.createElement(AgGridReact, { rowData: rows, columnDefs: columnDefs, defaultColDef: defaultColDef, rowHeight: 38, headerHeight: 32, loadingOverlayComponent: loadingOverlayComponent, animateRows: true, getContextMenuItems: function (e) { return getContextMenuItems(e); }, pagination: true, rowSelection: "single",
|
|
3107
|
+
React.createElement(AgGridReact, { rowData: rows, columnDefs: columnDefs, defaultColDef: defaultColDef, rowHeight: 38, headerHeight: 32, loadingOverlayComponent: loadingOverlayComponent, animateRows: true, getContextMenuItems: function (e) { return getContextMenuItems(e); }, pagination: true, rowSelection: "single", onRowDoubleClicked: function (event) {
|
|
3076
3108
|
setProfileForEdit(event.data);
|
|
3077
3109
|
setModalProceduresProfile(true);
|
|
3110
|
+
}, onRowClicked: function (event) {
|
|
3111
|
+
setProfileForEdit(event.data);
|
|
3078
3112
|
}, onGridReady: function (params) { return setGridApi(params.api); } }))),
|
|
3079
3113
|
React.createElement(Grid, { container: true, justifyContent: "flex-end" },
|
|
3080
3114
|
React.createElement(Grid, { item: true, md: 2, xs: 12, className: classes.btnModal },
|
|
@@ -3911,7 +3945,7 @@ var useTableData$1 = function (_a) {
|
|
|
3911
3945
|
headerName: "Pattern Start",
|
|
3912
3946
|
valueFormatter: function (_a) {
|
|
3913
3947
|
var value = _a.value;
|
|
3914
|
-
return "".concat(moment(value).format("L"), ", ").concat(moment(value).format("LTS"));
|
|
3948
|
+
return "".concat(moment$2(value).format("L"), ", ").concat(moment$2(value).format("LTS"));
|
|
3915
3949
|
},
|
|
3916
3950
|
minWidth: 180,
|
|
3917
3951
|
flex: 4
|
|
@@ -4070,7 +4104,8 @@ var TableShiftsCrews = function (_a) {
|
|
|
4070
4104
|
name: "New",
|
|
4071
4105
|
action: function () {
|
|
4072
4106
|
setOpenModalNew(!openModalNew);
|
|
4073
|
-
}
|
|
4107
|
+
},
|
|
4108
|
+
icon: '<i class="fas fa-plus"></i>'
|
|
4074
4109
|
});
|
|
4075
4110
|
}
|
|
4076
4111
|
if (data) {
|
|
@@ -4079,7 +4114,8 @@ var TableShiftsCrews = function (_a) {
|
|
|
4079
4114
|
action: function () {
|
|
4080
4115
|
setShiftTableData(data);
|
|
4081
4116
|
setOpenModalEditShift(true);
|
|
4082
|
-
}
|
|
4117
|
+
},
|
|
4118
|
+
icon: '<i class="fas fa-edit"></i>'
|
|
4083
4119
|
});
|
|
4084
4120
|
}
|
|
4085
4121
|
if (data) {
|
|
@@ -4088,19 +4124,21 @@ var TableShiftsCrews = function (_a) {
|
|
|
4088
4124
|
action: function () {
|
|
4089
4125
|
setShiftTableData(data);
|
|
4090
4126
|
setOpenModalDeleteShift(true);
|
|
4091
|
-
}
|
|
4127
|
+
},
|
|
4128
|
+
icon: '<i class="fas fa-trash"></i>'
|
|
4092
4129
|
});
|
|
4093
4130
|
}
|
|
4094
|
-
var
|
|
4131
|
+
var addNewShift = [];
|
|
4095
4132
|
if (!data) {
|
|
4096
|
-
|
|
4097
|
-
name: "New
|
|
4133
|
+
addNewShift.push({
|
|
4134
|
+
name: "New Shift",
|
|
4098
4135
|
action: function () {
|
|
4099
4136
|
setOpenModalNew(!openModalNew);
|
|
4100
|
-
}
|
|
4137
|
+
},
|
|
4138
|
+
icon: '<i class="fas fa-plus"></i>'
|
|
4101
4139
|
});
|
|
4102
4140
|
}
|
|
4103
|
-
return data ? result :
|
|
4141
|
+
return data ? result : addNewShift;
|
|
4104
4142
|
}, [rows]);
|
|
4105
4143
|
return (React.createElement(Grid, { container: true, justifyContent: "center", alignItems: "center", className: classes.root },
|
|
4106
4144
|
React.createElement(Grid, { item: true, md: 12, xs: 12, style: { padding: "0 15px" } },
|
|
@@ -4707,6 +4745,65 @@ var TransformAssetModelData = function (node) {
|
|
|
4707
4745
|
return model;
|
|
4708
4746
|
};
|
|
4709
4747
|
|
|
4748
|
+
var getUser = function (UserId, UserName) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4749
|
+
var apiService, parameters, resp;
|
|
4750
|
+
return __generator(this, function (_a) {
|
|
4751
|
+
switch (_a.label) {
|
|
4752
|
+
case 0:
|
|
4753
|
+
apiService = new MESApiService();
|
|
4754
|
+
parameters = [];
|
|
4755
|
+
parameters.push({ name: "UserId", value: UserId });
|
|
4756
|
+
parameters.push({ name: "UserName", value: UserName });
|
|
4757
|
+
return [4 /*yield*/, apiService.callV2("[SEC].[GetUser]", parameters)];
|
|
4758
|
+
case 1:
|
|
4759
|
+
resp = _a.sent();
|
|
4760
|
+
return [2 /*return*/, resp];
|
|
4761
|
+
}
|
|
4762
|
+
});
|
|
4763
|
+
}); };
|
|
4764
|
+
var getAssets = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
4765
|
+
var apiService, resp;
|
|
4766
|
+
return __generator(this, function (_a) {
|
|
4767
|
+
switch (_a.label) {
|
|
4768
|
+
case 0:
|
|
4769
|
+
apiService = new MESApiService();
|
|
4770
|
+
return [4 /*yield*/, apiService.callV2("[MES].[GetAssets]", [])];
|
|
4771
|
+
case 1:
|
|
4772
|
+
resp = _a.sent();
|
|
4773
|
+
return [2 /*return*/, resp];
|
|
4774
|
+
}
|
|
4775
|
+
});
|
|
4776
|
+
}); };
|
|
4777
|
+
var getUTLSettings = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
4778
|
+
var apiService, resp;
|
|
4779
|
+
return __generator(this, function (_a) {
|
|
4780
|
+
switch (_a.label) {
|
|
4781
|
+
case 0:
|
|
4782
|
+
apiService = new MESApiService();
|
|
4783
|
+
return [4 /*yield*/, apiService.callV2("[UTL].[GetSettings]", [])];
|
|
4784
|
+
case 1:
|
|
4785
|
+
resp = _a.sent();
|
|
4786
|
+
return [2 /*return*/, resp];
|
|
4787
|
+
}
|
|
4788
|
+
});
|
|
4789
|
+
}); };
|
|
4790
|
+
var upsertDefaultAreaId = function (UserId, DefaultAreaId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4791
|
+
var apiService, parameters, resp;
|
|
4792
|
+
return __generator(this, function (_a) {
|
|
4793
|
+
switch (_a.label) {
|
|
4794
|
+
case 0:
|
|
4795
|
+
apiService = new MESApiService();
|
|
4796
|
+
parameters = [];
|
|
4797
|
+
parameters.push({ name: "UserId", value: UserId });
|
|
4798
|
+
parameters.push({ name: "DefaultAssetId", value: DefaultAreaId });
|
|
4799
|
+
return [4 /*yield*/, apiService.callV2("[SEC].[UpsertDefaultAssetId]", parameters)];
|
|
4800
|
+
case 1:
|
|
4801
|
+
resp = _a.sent();
|
|
4802
|
+
return [2 /*return*/, resp];
|
|
4803
|
+
}
|
|
4804
|
+
});
|
|
4805
|
+
}); };
|
|
4806
|
+
|
|
4710
4807
|
var useSearchAssets$1 = function (_a) {
|
|
4711
4808
|
var setSearchError = _a.setSearchError, setAllAssetLoading = _a.setAllAssetLoading;
|
|
4712
4809
|
var _b = useAssetContext().actions, setAllAssets = _b.setAllAssets, setAreasList = _b.setAreasList;
|
|
@@ -5331,16 +5428,31 @@ var EditAssetDialog = function (_a) {
|
|
|
5331
5428
|
var useStyles$7 = makeStyles$1(function (theme) { return ({
|
|
5332
5429
|
root: {},
|
|
5333
5430
|
contextMenu: {
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
padding: "5px 0 5px 0",
|
|
5338
|
-
width: "150px",
|
|
5431
|
+
backgroundColor: "#F8F8F8",
|
|
5432
|
+
borderRadius: "4px",
|
|
5433
|
+
padding: "0",
|
|
5339
5434
|
height: "auto",
|
|
5435
|
+
width: "170px",
|
|
5340
5436
|
margin: "0",
|
|
5341
5437
|
position: "fixed",
|
|
5342
5438
|
listStyle: "none",
|
|
5343
|
-
boxShadow: "0 0
|
|
5439
|
+
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.15)",
|
|
5440
|
+
zIndex: 1000
|
|
5441
|
+
},
|
|
5442
|
+
menuItem: {
|
|
5443
|
+
padding: "6px 12px 6px 10px",
|
|
5444
|
+
cursor: "pointer",
|
|
5445
|
+
display: "flex",
|
|
5446
|
+
alignItems: "center",
|
|
5447
|
+
backgroundColor: "#F8F8F8",
|
|
5448
|
+
fontSize: "12px",
|
|
5449
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
5450
|
+
"&:last-child": {
|
|
5451
|
+
borderBottom: "none"
|
|
5452
|
+
},
|
|
5453
|
+
"&:hover": {
|
|
5454
|
+
backgroundColor: "#d4edff"
|
|
5455
|
+
}
|
|
5344
5456
|
},
|
|
5345
5457
|
storyRoot: {
|
|
5346
5458
|
display: "grid",
|
|
@@ -5531,13 +5643,38 @@ var AssetViewComponent = function () {
|
|
|
5531
5643
|
} }))),
|
|
5532
5644
|
React__default.createElement(Snackbar$1, { open: updatedSuccessfullyMessage, autoHideDuration: 2500, onClose: handleClose },
|
|
5533
5645
|
React__default.createElement(Alert$3, { severity: "success", onClose: handleClose }, "Asset updated successfully"))),
|
|
5534
|
-
showContextMenu && !isDoubleClick ? (React__default.createElement("ul", { className: classes.contextMenu, style: { top: y, left: x } },
|
|
5535
|
-
React__default.createElement(MenuItem$1, { onClick: function () { return setShowViewerAssetDialog(true); } },
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5646
|
+
showContextMenu && !isDoubleClick ? (React__default.createElement("ul", { className: classes.contextMenu, style: { top: y, left: x, padding: "6px 0" } },
|
|
5647
|
+
React__default.createElement(MenuItem$1, { className: classes.menuItem, onClick: function () { return setShowViewerAssetDialog(true); } },
|
|
5648
|
+
React__default.createElement(Grid$1, { container: true, style: { alignItems: "center" } },
|
|
5649
|
+
React__default.createElement(Grid$1, { item: true, md: 2, xs: 3 },
|
|
5650
|
+
React__default.createElement(FindInPageIcon, { style: { width: 18 } })),
|
|
5651
|
+
React__default.createElement(Grid$1, { item: true, md: 9, xs: 9 },
|
|
5652
|
+
React__default.createElement("div", { style: { marginLeft: 5 } }, "View Asset")))),
|
|
5653
|
+
React__default.createElement(MenuItem$1, { className: classes.menuItem, onClick: function () { return setShowEditAssetDialog(true); } },
|
|
5654
|
+
React__default.createElement(Grid$1, { container: true, style: { alignItems: "center" } },
|
|
5655
|
+
React__default.createElement(Grid$1, { item: true, md: 2, xs: 3 },
|
|
5656
|
+
React__default.createElement(EditIcon, { style: { width: 18 } })),
|
|
5657
|
+
React__default.createElement(Grid$1, { item: true, md: 9, xs: 9 },
|
|
5658
|
+
React__default.createElement("div", { style: { marginLeft: 5 } }, "Edit Asset")))),
|
|
5659
|
+
React__default.createElement(MenuItem$1, { className: classes.menuItem, onClick: function () { return setShowCreateNewAssetDialog(true); } },
|
|
5660
|
+
React__default.createElement(Grid$1, { container: true, style: { alignItems: "center" } },
|
|
5661
|
+
React__default.createElement(Grid$1, { item: true, md: 2, xs: 3 },
|
|
5662
|
+
React__default.createElement(AddBoxIcon, { style: { width: 18 } })),
|
|
5663
|
+
React__default.createElement(Grid$1, { item: true, md: 9, xs: 9 },
|
|
5664
|
+
React__default.createElement("div", { style: { marginLeft: 5 } }, "Create Asset")))),
|
|
5665
|
+
(assetNodeSelectedInTree === null || assetNodeSelectedInTree === void 0 ? void 0 : assetNodeSelectedInTree.IsBranch) === false && (React__default.createElement(MenuItem$1, { className: classes.menuItem, onClick: function () { return setShowRemoveAssetDialog(true); } },
|
|
5666
|
+
React__default.createElement(Grid$1, { container: true, style: { alignItems: "center" } },
|
|
5667
|
+
React__default.createElement(Grid$1, { item: true, md: 2, xs: 3 },
|
|
5668
|
+
React__default.createElement(DeleteIcon, { style: { width: 18 } })),
|
|
5669
|
+
React__default.createElement(Grid$1, { item: true, md: 9, xs: 9 },
|
|
5670
|
+
React__default.createElement("div", { style: { marginLeft: 5 } }, "Remove Asset"))))))) : (""),
|
|
5539
5671
|
showCreateNewContextMenu ? (React__default.createElement("ul", { className: classes.contextMenu, style: { top: y, left: x } },
|
|
5540
|
-
React__default.createElement(MenuItem$1, { onClick: function () { return setShowCreateNewAssetDialog(true); } },
|
|
5672
|
+
React__default.createElement(MenuItem$1, { className: classes.menuItem, onClick: function () { return setShowCreateNewAssetDialog(true); } },
|
|
5673
|
+
React__default.createElement(Grid$1, { container: true, style: { alignItems: "center" } },
|
|
5674
|
+
React__default.createElement(Grid$1, { item: true, md: 2, xs: 3 },
|
|
5675
|
+
React__default.createElement(AddBoxIcon, { style: { width: 18 } })),
|
|
5676
|
+
React__default.createElement(Grid$1, { item: true, md: 9, xs: 9 },
|
|
5677
|
+
React__default.createElement("div", { style: { marginLeft: 5 } }, "Create Asset")))))) : (""))),
|
|
5541
5678
|
React__default.createElement(ErrorModal, { error: errorUpdate, onHide: function () { return setErrorUpdate(""); } }),
|
|
5542
5679
|
React__default.createElement(ErrorModal, { error: searchError, onHide: function () { return setSearchError(""); } })));
|
|
5543
5680
|
};
|
|
@@ -6545,10 +6682,11 @@ var TableUsers = function (_a) {
|
|
|
6545
6682
|
var result = [];
|
|
6546
6683
|
if (data) {
|
|
6547
6684
|
result.push({
|
|
6548
|
-
name: "New",
|
|
6685
|
+
name: "New User",
|
|
6549
6686
|
action: function () {
|
|
6550
6687
|
setOpenModalCreate(!openModalCreate);
|
|
6551
|
-
}
|
|
6688
|
+
},
|
|
6689
|
+
icon: '<i class="fas fa-plus"></i>'
|
|
6552
6690
|
});
|
|
6553
6691
|
}
|
|
6554
6692
|
if (data) {
|
|
@@ -6557,7 +6695,8 @@ var TableUsers = function (_a) {
|
|
|
6557
6695
|
action: function () {
|
|
6558
6696
|
setUserIdForEdit(data === null || data === void 0 ? void 0 : data.UserId);
|
|
6559
6697
|
setOpenModalEditDataUser(true);
|
|
6560
|
-
}
|
|
6698
|
+
},
|
|
6699
|
+
icon: '<i class="fas fa-edit"></i>'
|
|
6561
6700
|
});
|
|
6562
6701
|
}
|
|
6563
6702
|
if (data) {
|
|
@@ -6566,7 +6705,8 @@ var TableUsers = function (_a) {
|
|
|
6566
6705
|
action: function () {
|
|
6567
6706
|
setUserIdForDelete(data === null || data === void 0 ? void 0 : data.UserId);
|
|
6568
6707
|
setOpenModalDeleteUser(true);
|
|
6569
|
-
}
|
|
6708
|
+
},
|
|
6709
|
+
icon: '<i class="fas fa-trash"></i>'
|
|
6570
6710
|
});
|
|
6571
6711
|
}
|
|
6572
6712
|
if (data) {
|
|
@@ -6575,7 +6715,8 @@ var TableUsers = function (_a) {
|
|
|
6575
6715
|
action: function () {
|
|
6576
6716
|
setUserForPasswordChange(data === null || data === void 0 ? void 0 : data.UserId);
|
|
6577
6717
|
setOpenModalChangePasswordd(true);
|
|
6578
|
-
}
|
|
6718
|
+
},
|
|
6719
|
+
icon: '<i class="fas fa-lock"></i>'
|
|
6579
6720
|
});
|
|
6580
6721
|
}
|
|
6581
6722
|
var addNewUser = [];
|
|
@@ -6584,7 +6725,8 @@ var TableUsers = function (_a) {
|
|
|
6584
6725
|
name: "New User",
|
|
6585
6726
|
action: function () {
|
|
6586
6727
|
setOpenModalCreate(!openModalCreate);
|
|
6587
|
-
}
|
|
6728
|
+
},
|
|
6729
|
+
icon: '<i class="fas fa-plus"></i>'
|
|
6588
6730
|
});
|
|
6589
6731
|
}
|
|
6590
6732
|
return data ? result : addNewUser;
|
|
@@ -6964,7 +7106,7 @@ var MESApiService = /** @class */ (function () {
|
|
|
6964
7106
|
data.dataBaseName = database;
|
|
6965
7107
|
data.parameters = formattedParameters;
|
|
6966
7108
|
Date.prototype.toJSON = function () {
|
|
6967
|
-
return moment(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7109
|
+
return moment$2(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
6968
7110
|
}; // eslint-disable-line
|
|
6969
7111
|
isError = { ok: true };
|
|
6970
7112
|
return [2 /*return*/, fetch(this.config.API_PROCEDURE_URL + "/Execute", {
|
|
@@ -7023,7 +7165,7 @@ var MESApiService = /** @class */ (function () {
|
|
|
7023
7165
|
data.dataBaseName = database;
|
|
7024
7166
|
data.parameters = formattedParameters;
|
|
7025
7167
|
Date.prototype.toJSON = function () {
|
|
7026
|
-
return moment(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7168
|
+
return moment$2(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7027
7169
|
}; // eslint-disable-line
|
|
7028
7170
|
_a.label = 1;
|
|
7029
7171
|
case 1:
|
|
@@ -7084,7 +7226,7 @@ var MESApiService = /** @class */ (function () {
|
|
|
7084
7226
|
data.dataBaseName = database;
|
|
7085
7227
|
data.parameters = formattedParameters;
|
|
7086
7228
|
Date.prototype.toJSON = function () {
|
|
7087
|
-
return moment(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7229
|
+
return moment$2(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7088
7230
|
}; // eslint-disable-line
|
|
7089
7231
|
isError = { ok: true };
|
|
7090
7232
|
return [2 /*return*/, fetch(this.config.API_PROCEDURE_URL + "/ExecuteJSON", {
|
|
@@ -7139,7 +7281,7 @@ var MESApiService = /** @class */ (function () {
|
|
|
7139
7281
|
formattedParameters.push(formattedParameter);
|
|
7140
7282
|
});
|
|
7141
7283
|
Date.prototype.toJSON = function () {
|
|
7142
|
-
return moment(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7284
|
+
return moment$2(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7143
7285
|
}; // eslint-disable-line
|
|
7144
7286
|
isError = { ok: true };
|
|
7145
7287
|
files.forEach(function (element) {
|
|
@@ -7204,7 +7346,7 @@ var MESApiService = /** @class */ (function () {
|
|
|
7204
7346
|
data.parameters = formattedParameters;
|
|
7205
7347
|
data.fileName = fileName || "Default.xlsx";
|
|
7206
7348
|
Date.prototype.toJSON = function () {
|
|
7207
|
-
return moment(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7349
|
+
return moment$2(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7208
7350
|
}; // eslint-disable-line
|
|
7209
7351
|
isError = { ok: true };
|
|
7210
7352
|
return [2 /*return*/, fetch(this.config.API_PROCEDURE_URL + "/Export", {
|
|
@@ -7280,7 +7422,7 @@ var MESApiService = /** @class */ (function () {
|
|
|
7280
7422
|
data.parameters = formattedParameters;
|
|
7281
7423
|
data.fileName = fileName || "Default.xlsx";
|
|
7282
7424
|
Date.prototype.toJSON = function () {
|
|
7283
|
-
return moment(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7425
|
+
return moment$2(this).format("YYYY-MM-DDTHH:mm:ss");
|
|
7284
7426
|
}; // eslint-disable-line
|
|
7285
7427
|
isError = { ok: true };
|
|
7286
7428
|
return [2 /*return*/, fetch(this.config.API_PROCEDURE_URL + "/ExportExcel", {
|
|
@@ -7367,7 +7509,7 @@ var TimeService = /** @class */ (function () {
|
|
|
7367
7509
|
else {
|
|
7368
7510
|
this.timeZone = timeZone;
|
|
7369
7511
|
}
|
|
7370
|
-
moment$
|
|
7512
|
+
moment$3.tz.setDefault(this.timeZone);
|
|
7371
7513
|
};
|
|
7372
7514
|
TimeService.prototype.toUTC = function (datetime, format$1) {
|
|
7373
7515
|
try {
|
|
@@ -7406,70 +7548,277 @@ var TimeService = /** @class */ (function () {
|
|
|
7406
7548
|
};
|
|
7407
7549
|
return TimeService;
|
|
7408
7550
|
}());
|
|
7409
|
-
var getMomentTz = function () { return moment$
|
|
7551
|
+
var getMomentTz = function () { return moment$3; };
|
|
7410
7552
|
var dxtServerTimeZone = function () { return TimeService.getInstance().getServerTimeZone; };
|
|
7411
7553
|
var dxtToUTC = TimeService.getInstance().toUTC;
|
|
7412
7554
|
var dxtToLocalServerTime = TimeService.getInstance().toLocalServerTime;
|
|
7413
7555
|
|
|
7414
|
-
var
|
|
7415
|
-
var apiService,
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
apiService = new MESApiService();
|
|
7420
|
-
parameters = [];
|
|
7421
|
-
parameters.push({ name: "UserId", value: UserId });
|
|
7422
|
-
parameters.push({ name: "UserName", value: UserName });
|
|
7423
|
-
return [4 /*yield*/, apiService.callV2("[SEC].[GetUser]", parameters)];
|
|
7424
|
-
case 1:
|
|
7425
|
-
resp = _a.sent();
|
|
7426
|
-
return [2 /*return*/, resp];
|
|
7427
|
-
}
|
|
7428
|
-
});
|
|
7429
|
-
}); };
|
|
7430
|
-
var getAssets = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7431
|
-
var apiService, resp;
|
|
7432
|
-
return __generator(this, function (_a) {
|
|
7433
|
-
switch (_a.label) {
|
|
7434
|
-
case 0:
|
|
7435
|
-
apiService = new MESApiService();
|
|
7436
|
-
return [4 /*yield*/, apiService.callV2("[MES].[GetAssets]", [])];
|
|
7437
|
-
case 1:
|
|
7438
|
-
resp = _a.sent();
|
|
7439
|
-
return [2 /*return*/, resp];
|
|
7440
|
-
}
|
|
7441
|
-
});
|
|
7442
|
-
}); };
|
|
7443
|
-
var getUTLSettings = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7444
|
-
var apiService, resp;
|
|
7445
|
-
return __generator(this, function (_a) {
|
|
7446
|
-
switch (_a.label) {
|
|
7556
|
+
var getShiftByParameters = function (parameters) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7557
|
+
var utcString, sqlParameters, apiService, resp, e_1;
|
|
7558
|
+
var _a;
|
|
7559
|
+
return __generator(this, function (_b) {
|
|
7560
|
+
switch (_b.label) {
|
|
7447
7561
|
case 0:
|
|
7448
|
-
|
|
7449
|
-
|
|
7562
|
+
utcString = (_a = parameters.productionDate) === null || _a === void 0 ? void 0 : _a.toISOString();
|
|
7563
|
+
_b.label = 1;
|
|
7450
7564
|
case 1:
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7565
|
+
_b.trys.push([1, 3, , 4]);
|
|
7566
|
+
sqlParameters = [];
|
|
7567
|
+
sqlParameters.push({
|
|
7568
|
+
name: "@ShiftId",
|
|
7569
|
+
value: parameters.shiftId === 0 ? null : parameters.shiftId
|
|
7570
|
+
});
|
|
7571
|
+
sqlParameters.push({
|
|
7572
|
+
name: "@ProductionDate",
|
|
7573
|
+
value: utcString
|
|
7574
|
+
});
|
|
7461
7575
|
apiService = new MESApiService();
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7576
|
+
return [4 /*yield*/, apiService.callV2("[MES].[GetShiftByParameters]", sqlParameters)];
|
|
7577
|
+
case 2:
|
|
7578
|
+
resp = _b.sent();
|
|
7579
|
+
if (resp.ok) {
|
|
7580
|
+
return [2 /*return*/, {
|
|
7581
|
+
ok: true,
|
|
7582
|
+
data: get(resp.data, 'tables[0].rows[0]', {})
|
|
7583
|
+
}];
|
|
7584
|
+
}
|
|
7585
|
+
else {
|
|
7586
|
+
return [2 /*return*/, {
|
|
7587
|
+
ok: false,
|
|
7588
|
+
message: resp.message
|
|
7589
|
+
}];
|
|
7590
|
+
}
|
|
7591
|
+
case 3:
|
|
7592
|
+
e_1 = _b.sent();
|
|
7593
|
+
return [2 /*return*/, { ok: false, message: e_1.toString() }];
|
|
7594
|
+
case 4: return [2 /*return*/];
|
|
7469
7595
|
}
|
|
7470
7596
|
});
|
|
7471
7597
|
}); };
|
|
7472
7598
|
|
|
7599
|
+
var moment$1 = getMomentTz();
|
|
7600
|
+
var useShiftNavigatorManager = function () {
|
|
7601
|
+
var _a = useState(null), shiftInfo = _a[0], setShiftInfo = _a[1];
|
|
7602
|
+
var _b = useState(false); _b[0]; var setIsShiftInfoLoading = _b[1];
|
|
7603
|
+
var _c = useState(''); _c[0]; var setError = _c[1];
|
|
7604
|
+
var moveShift = function (direction) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7605
|
+
var shiftId, resp;
|
|
7606
|
+
return __generator(this, function (_a) {
|
|
7607
|
+
switch (_a.label) {
|
|
7608
|
+
case 0:
|
|
7609
|
+
if (isNil$1(shiftInfo)) {
|
|
7610
|
+
return [2 /*return*/];
|
|
7611
|
+
}
|
|
7612
|
+
setIsShiftInfoLoading(true);
|
|
7613
|
+
shiftId = null;
|
|
7614
|
+
if (direction === "Next" && shiftInfo.NextShiftId !== null) {
|
|
7615
|
+
shiftId = shiftInfo.NextShiftId;
|
|
7616
|
+
}
|
|
7617
|
+
else if (direction === "Previous" && shiftInfo.PreviousShiftId !== null) {
|
|
7618
|
+
shiftId = shiftInfo.PreviousShiftId;
|
|
7619
|
+
}
|
|
7620
|
+
else if (direction === "Last" && shiftInfo.LastShiftId !== null) {
|
|
7621
|
+
shiftId = shiftInfo.LastShiftId;
|
|
7622
|
+
}
|
|
7623
|
+
if (!shiftId) return [3 /*break*/, 2];
|
|
7624
|
+
return [4 /*yield*/, getShiftByParameters({
|
|
7625
|
+
productionDate: null,
|
|
7626
|
+
shiftId: shiftId
|
|
7627
|
+
})];
|
|
7628
|
+
case 1:
|
|
7629
|
+
resp = _a.sent();
|
|
7630
|
+
if (resp.ok) {
|
|
7631
|
+
setShiftInfo(__assign(__assign({}, resp.data), { CurrentProductionDate: moment$1.utc(resp.data.CurrentProductionDate).toDate(), CurrentStart: moment$1.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$1.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$1.utc(resp.data.PreviousProductionDate).toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() }));
|
|
7632
|
+
}
|
|
7633
|
+
_a.label = 2;
|
|
7634
|
+
case 2: return [2 /*return*/];
|
|
7635
|
+
}
|
|
7636
|
+
});
|
|
7637
|
+
}); };
|
|
7638
|
+
var getShiftDataFromAPI = function (productionDate, shiftId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7639
|
+
var resp, e_1;
|
|
7640
|
+
return __generator(this, function (_a) {
|
|
7641
|
+
switch (_a.label) {
|
|
7642
|
+
case 0:
|
|
7643
|
+
setIsShiftInfoLoading(true);
|
|
7644
|
+
_a.label = 1;
|
|
7645
|
+
case 1:
|
|
7646
|
+
_a.trys.push([1, 3, , 4]);
|
|
7647
|
+
return [4 /*yield*/, getShiftByParameters({
|
|
7648
|
+
productionDate: productionDate,
|
|
7649
|
+
shiftId: shiftId
|
|
7650
|
+
})];
|
|
7651
|
+
case 2:
|
|
7652
|
+
resp = _a.sent();
|
|
7653
|
+
if (resp.ok) {
|
|
7654
|
+
setShiftInfo(__assign(__assign({}, resp.data), { CurrentProductionDate: moment$1.utc(resp.data.CurrentProductionDate).toDate(), CurrentStart: moment$1.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$1.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$1.utc(resp.data.PreviousProductionDate).toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() }));
|
|
7655
|
+
}
|
|
7656
|
+
return [3 /*break*/, 4];
|
|
7657
|
+
case 3:
|
|
7658
|
+
e_1 = _a.sent();
|
|
7659
|
+
setError(e_1.toString());
|
|
7660
|
+
return [3 /*break*/, 4];
|
|
7661
|
+
case 4:
|
|
7662
|
+
setIsShiftInfoLoading(false);
|
|
7663
|
+
return [2 /*return*/];
|
|
7664
|
+
}
|
|
7665
|
+
});
|
|
7666
|
+
}); };
|
|
7667
|
+
var initShiftNavigator = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7668
|
+
var resp;
|
|
7669
|
+
return __generator(this, function (_a) {
|
|
7670
|
+
switch (_a.label) {
|
|
7671
|
+
case 0: return [4 /*yield*/, getShiftByParameters({
|
|
7672
|
+
productionDate: new Date(),
|
|
7673
|
+
shiftId: 0
|
|
7674
|
+
})];
|
|
7675
|
+
case 1:
|
|
7676
|
+
resp = _a.sent();
|
|
7677
|
+
if (resp.ok) {
|
|
7678
|
+
setShiftInfo(__assign(__assign({}, resp.data), { CurrentProductionDate: moment$1.utc(resp.data.CurrentProductionDate).toDate(), CurrentStart: moment$1.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$1.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$1.utc(resp.data.PreviousProductionDate).toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() }));
|
|
7679
|
+
}
|
|
7680
|
+
return [2 /*return*/];
|
|
7681
|
+
}
|
|
7682
|
+
});
|
|
7683
|
+
}); };
|
|
7684
|
+
return {
|
|
7685
|
+
shiftInfo: shiftInfo,
|
|
7686
|
+
moveShift: moveShift,
|
|
7687
|
+
getShiftDataFromAPI: getShiftDataFromAPI,
|
|
7688
|
+
initShiftNavigator: initShiftNavigator
|
|
7689
|
+
};
|
|
7690
|
+
};
|
|
7691
|
+
|
|
7692
|
+
var ShiftNavigatorContext = createContext({
|
|
7693
|
+
getShiftDataFromAPI: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7694
|
+
return __generator(this, function (_a) {
|
|
7695
|
+
return [2 /*return*/];
|
|
7696
|
+
});
|
|
7697
|
+
}); },
|
|
7698
|
+
initShiftNavigator: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7699
|
+
return __generator(this, function (_a) {
|
|
7700
|
+
return [2 /*return*/];
|
|
7701
|
+
});
|
|
7702
|
+
}); },
|
|
7703
|
+
moveShift: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7704
|
+
return __generator(this, function (_a) {
|
|
7705
|
+
return [2 /*return*/];
|
|
7706
|
+
});
|
|
7707
|
+
}); },
|
|
7708
|
+
shiftInfo: {
|
|
7709
|
+
CurrentShiftId: 0,
|
|
7710
|
+
CurrentProductionDate: new Date(),
|
|
7711
|
+
CurrentProductionShift: 0,
|
|
7712
|
+
CurrentShift: '',
|
|
7713
|
+
CurrentCrew: '',
|
|
7714
|
+
CurrentStart: new Date(),
|
|
7715
|
+
CurrentEnd: new Date(),
|
|
7716
|
+
PreviousShiftId: 0,
|
|
7717
|
+
PreviousProductionDate: new Date(),
|
|
7718
|
+
PreviousProductionShift: 0,
|
|
7719
|
+
PreviousShift: '',
|
|
7720
|
+
PreviousCrew: '',
|
|
7721
|
+
PreviousStart: new Date(),
|
|
7722
|
+
PreviousEnd: new Date(),
|
|
7723
|
+
NextShiftId: null,
|
|
7724
|
+
NextProductionDate: null,
|
|
7725
|
+
NextProductionShift: null,
|
|
7726
|
+
NextShift: null,
|
|
7727
|
+
NextCrew: null,
|
|
7728
|
+
NextStart: null,
|
|
7729
|
+
NextEnd: null,
|
|
7730
|
+
LastShiftId: 0,
|
|
7731
|
+
LastProductionDate: new Date(),
|
|
7732
|
+
LastProductionShift: 0,
|
|
7733
|
+
LastShift: '',
|
|
7734
|
+
LastCrew: '',
|
|
7735
|
+
LastStart: new Date(),
|
|
7736
|
+
LastEnd: new Date()
|
|
7737
|
+
}
|
|
7738
|
+
});
|
|
7739
|
+
var useShiftNavigator = function () { return useContext(ShiftNavigatorContext); };
|
|
7740
|
+
var ShiftNavigatorProvider = function (_a) {
|
|
7741
|
+
var children = _a.children;
|
|
7742
|
+
var shiftNavigatorManager = useShiftNavigatorManager();
|
|
7743
|
+
return (React__default.createElement(ShiftNavigatorContext.Provider, { value: shiftNavigatorManager }, children));
|
|
7744
|
+
};
|
|
7745
|
+
|
|
7746
|
+
var moment = getMomentTz();
|
|
7747
|
+
var ShiftDayNavigatorControl = function (props) {
|
|
7748
|
+
var _a = useShiftNavigator(), shiftInfo = _a.shiftInfo, initShiftNavigator = _a.initShiftNavigator, moveShift = _a.moveShift, getShiftDataFromAPI = _a.getShiftDataFromAPI;
|
|
7749
|
+
var shiftId = useParams().shiftId;
|
|
7750
|
+
var firstRender = useRef(true);
|
|
7751
|
+
var updateHistory = function (shiftId) {
|
|
7752
|
+
var paths = location.pathname.split("/");
|
|
7753
|
+
window.history.replaceState(null, "", "/".concat(paths[1]) + "/".concat(shiftId));
|
|
7754
|
+
};
|
|
7755
|
+
if (shiftInfo !== null && shiftInfo.CurrentShiftId !== null) {
|
|
7756
|
+
updateHistory(shiftInfo.CurrentShiftId.toString());
|
|
7757
|
+
}
|
|
7758
|
+
useEffect(function () {
|
|
7759
|
+
if (firstRender.current) {
|
|
7760
|
+
firstRender.current = false;
|
|
7761
|
+
if (props.useRouter && shiftId) {
|
|
7762
|
+
getShiftDataFromAPI(null, Number(shiftId))
|
|
7763
|
+
.then(function () {
|
|
7764
|
+
props.onShiftChange && props.onShiftChange(Number(shiftId));
|
|
7765
|
+
});
|
|
7766
|
+
}
|
|
7767
|
+
else {
|
|
7768
|
+
initShiftNavigator()
|
|
7769
|
+
.then(function () {
|
|
7770
|
+
props.onShiftChange && props.onShiftChange(Number(shiftId));
|
|
7771
|
+
});
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7774
|
+
}, []);
|
|
7775
|
+
return (React__default.createElement(Paper, null,
|
|
7776
|
+
React__default.createElement(Grid, { item: true, container: true, style: { minWidth: '0%', margin: '1rem' }, direction: 'row', justifyContent: 'flex-start', alignItems: 'center', spacing: 1 },
|
|
7777
|
+
React__default.createElement(Grid, { item: true },
|
|
7778
|
+
React__default.createElement(Tooltip, { title: 'Previous Shift' },
|
|
7779
|
+
React__default.createElement(IconButton$1, { "aria-label": "Previous Shift", color: 'primary', disabled: !(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.PreviousShiftId), onClick: function () {
|
|
7780
|
+
moveShift("Previous").then(function () {
|
|
7781
|
+
});
|
|
7782
|
+
}, size: "small" },
|
|
7783
|
+
React__default.createElement(ArrowBackRounded, null)))),
|
|
7784
|
+
React__default.createElement(Grid, { item: true },
|
|
7785
|
+
React__default.createElement(DatePicker, { label: "Current Date", timezone: TimeService.getInstance().getServerTimeZone(), format: "MM/DD/YYYY", closeOnSelect: true, formatDensity: 'dense', value: moment(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentProductionDate), onChange: function (date) {
|
|
7786
|
+
if (date) {
|
|
7787
|
+
getShiftDataFromAPI(date.toDate(), 0)
|
|
7788
|
+
.then(function () {
|
|
7789
|
+
});
|
|
7790
|
+
}
|
|
7791
|
+
}, slotProps: {
|
|
7792
|
+
textField: {
|
|
7793
|
+
variant: "outlined",
|
|
7794
|
+
size: "small",
|
|
7795
|
+
inputProps: {
|
|
7796
|
+
style: {
|
|
7797
|
+
fontSize: "small",
|
|
7798
|
+
minWidth: '110px',
|
|
7799
|
+
maxWidth: '110px'
|
|
7800
|
+
}
|
|
7801
|
+
}
|
|
7802
|
+
}
|
|
7803
|
+
} })),
|
|
7804
|
+
React__default.createElement(Grid, { item: true, style: { maxWidth: '100px' } },
|
|
7805
|
+
React__default.createElement(TextField, { label: 'Shift - Crew', value: "".concat((shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShift) || "", " - ").concat((shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentCrew) || ""), placeholder: 'Shift', "aria-readonly": true, variant: "outlined", size: "small" })),
|
|
7806
|
+
React__default.createElement(Grid, { item: true },
|
|
7807
|
+
React__default.createElement(Tooltip, { title: 'Next Shift' },
|
|
7808
|
+
React__default.createElement(IconButton$1, { "aria-label": "next", color: 'primary', disabled: !(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.NextShiftId), onClick: function () {
|
|
7809
|
+
moveShift("Next").then(function () {
|
|
7810
|
+
});
|
|
7811
|
+
}, size: "small" },
|
|
7812
|
+
React__default.createElement(ArrowForwardRounded, null)))),
|
|
7813
|
+
React__default.createElement(Grid, { item: true },
|
|
7814
|
+
React__default.createElement(Tooltip, { title: 'Last Shift' },
|
|
7815
|
+
React__default.createElement(IconButton$1, { "aria-label": "delete", color: 'primary', disabled: !(shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.LastShiftId), onClick: function () {
|
|
7816
|
+
moveShift("Last").then(function () {
|
|
7817
|
+
});
|
|
7818
|
+
}, size: "small" },
|
|
7819
|
+
React__default.createElement(SkipNext, null)))))));
|
|
7820
|
+
};
|
|
7821
|
+
|
|
7473
7822
|
function ChangePassword(props) {
|
|
7474
7823
|
var onClose = props.onClose, userId = props.userId, open = props.open;
|
|
7475
7824
|
//states
|
|
@@ -8217,12 +8566,12 @@ function Logout() {
|
|
|
8217
8566
|
React__default.createElement("div", null, "logging out!!!")));
|
|
8218
8567
|
}
|
|
8219
8568
|
|
|
8220
|
-
var RouterContext =
|
|
8221
|
-
var ConfigurationContext =
|
|
8569
|
+
var RouterContext = createContext(function () { return React__default.createElement(React__default.Fragment, null); });
|
|
8570
|
+
var ConfigurationContext = createContext([
|
|
8222
8571
|
[],
|
|
8223
8572
|
function () { return React__default.createElement(React__default.Fragment, null); },
|
|
8224
8573
|
]);
|
|
8225
|
-
var NavbarContext =
|
|
8574
|
+
var NavbarContext = createContext(function () { return React__default.createElement(React__default.Fragment, null); });
|
|
8226
8575
|
|
|
8227
8576
|
var useSearchAssets = function (setError) {
|
|
8228
8577
|
var _a = useAssetContext().actions, setAllAssets = _a.setAllAssets, setAreasList = _a.setAreasList;
|
|
@@ -8369,7 +8718,7 @@ function Header$1(_a) {
|
|
|
8369
8718
|
React__default.createElement(Nav, { className: "ml-auto", style: { alignItems: "baseline" } },
|
|
8370
8719
|
showTrendingsIcon ? (React__default.createElement(Nav, { className: "mx-2" },
|
|
8371
8720
|
React__default.createElement(Nav.Link, { as: Link, to: "/trendings" },
|
|
8372
|
-
React__default.createElement(Tooltip, { title: 'Trendings', placement: "top", arrow: true, interactive: true, enterDelay: 1500 },
|
|
8721
|
+
React__default.createElement(Tooltip$1, { title: 'Trendings', placement: "top", arrow: true, interactive: true, enterDelay: 1500 },
|
|
8373
8722
|
React__default.createElement(ShowChartIcon, null))))) : null,
|
|
8374
8723
|
React__default.createElement(Nav, null,
|
|
8375
8724
|
React__default.createElement("span", { className: "navbar-text" }, dxtToLocalServerTime(date, 'HH:mm:ss z'))),
|
|
@@ -8464,7 +8813,7 @@ var Home = function () { return (React__default.createElement("div", { style: {
|
|
|
8464
8813
|
} })); };
|
|
8465
8814
|
|
|
8466
8815
|
var TrendingsInitialState = {
|
|
8467
|
-
timeScopeStart: moment(new Date()).subtract(1, "days").toDate(),
|
|
8816
|
+
timeScopeStart: moment$2(new Date()).subtract(1, "days").toDate(),
|
|
8468
8817
|
timeScopeEnd: new Date(),
|
|
8469
8818
|
scope: "1 day",
|
|
8470
8819
|
graphPan: false,
|
|
@@ -8502,32 +8851,32 @@ var TrendingsReducer = createSlice({
|
|
|
8502
8851
|
if (payload.scope !== "custom") {
|
|
8503
8852
|
switch (payload.scope) {
|
|
8504
8853
|
case "10 min":
|
|
8505
|
-
state.timeScopeStart = moment(state.timeScopeEnd)
|
|
8854
|
+
state.timeScopeStart = moment$2(state.timeScopeEnd)
|
|
8506
8855
|
.subtract(10, "minutes")
|
|
8507
8856
|
.toDate();
|
|
8508
8857
|
break;
|
|
8509
8858
|
case "1 hour":
|
|
8510
|
-
state.timeScopeStart = moment(state.timeScopeEnd)
|
|
8859
|
+
state.timeScopeStart = moment$2(state.timeScopeEnd)
|
|
8511
8860
|
.subtract(1, "hours")
|
|
8512
8861
|
.toDate();
|
|
8513
8862
|
break;
|
|
8514
8863
|
case "4 hours":
|
|
8515
|
-
state.timeScopeStart = moment(state.timeScopeEnd)
|
|
8864
|
+
state.timeScopeStart = moment$2(state.timeScopeEnd)
|
|
8516
8865
|
.subtract(4, "hours")
|
|
8517
8866
|
.toDate();
|
|
8518
8867
|
break;
|
|
8519
8868
|
case "12 hours":
|
|
8520
|
-
state.timeScopeStart = moment(state.timeScopeEnd)
|
|
8869
|
+
state.timeScopeStart = moment$2(state.timeScopeEnd)
|
|
8521
8870
|
.subtract(12, "hours")
|
|
8522
8871
|
.toDate();
|
|
8523
8872
|
break;
|
|
8524
8873
|
case "1 day":
|
|
8525
|
-
state.timeScopeStart = moment(state.timeScopeEnd)
|
|
8874
|
+
state.timeScopeStart = moment$2(state.timeScopeEnd)
|
|
8526
8875
|
.subtract(1, "days")
|
|
8527
8876
|
.toDate();
|
|
8528
8877
|
break;
|
|
8529
8878
|
case "10 days":
|
|
8530
|
-
state.timeScopeStart = moment(state.timeScopeEnd)
|
|
8879
|
+
state.timeScopeStart = moment$2(state.timeScopeEnd)
|
|
8531
8880
|
.subtract(10, "days")
|
|
8532
8881
|
.toDate();
|
|
8533
8882
|
break;
|
|
@@ -8554,32 +8903,32 @@ var TrendingsReducer = createSlice({
|
|
|
8554
8903
|
if (state.scope !== "custom") {
|
|
8555
8904
|
switch (state.scope) {
|
|
8556
8905
|
case "10 min":
|
|
8557
|
-
state.timeScopeEnd = moment(payload.start)
|
|
8906
|
+
state.timeScopeEnd = moment$2(payload.start)
|
|
8558
8907
|
.add(10, "minutes")
|
|
8559
8908
|
.toDate();
|
|
8560
8909
|
break;
|
|
8561
8910
|
case "1 hour":
|
|
8562
|
-
state.timeScopeEnd = moment(payload.start)
|
|
8911
|
+
state.timeScopeEnd = moment$2(payload.start)
|
|
8563
8912
|
.add(1, "hours")
|
|
8564
8913
|
.toDate();
|
|
8565
8914
|
break;
|
|
8566
8915
|
case "4 hours":
|
|
8567
|
-
state.timeScopeEnd = moment(payload.start)
|
|
8916
|
+
state.timeScopeEnd = moment$2(payload.start)
|
|
8568
8917
|
.add(4, "hours")
|
|
8569
8918
|
.toDate();
|
|
8570
8919
|
break;
|
|
8571
8920
|
case "12 hours":
|
|
8572
|
-
state.timeScopeEnd = moment(payload.start)
|
|
8921
|
+
state.timeScopeEnd = moment$2(payload.start)
|
|
8573
8922
|
.add(12, "hours")
|
|
8574
8923
|
.toDate();
|
|
8575
8924
|
break;
|
|
8576
8925
|
case "1 day":
|
|
8577
|
-
state.timeScopeEnd = moment(payload.start)
|
|
8926
|
+
state.timeScopeEnd = moment$2(payload.start)
|
|
8578
8927
|
.add(1, "days")
|
|
8579
8928
|
.toDate();
|
|
8580
8929
|
break;
|
|
8581
8930
|
case "10 days":
|
|
8582
|
-
state.timeScopeEnd = moment(payload.start)
|
|
8931
|
+
state.timeScopeEnd = moment$2(payload.start)
|
|
8583
8932
|
.add(10, "days")
|
|
8584
8933
|
.toDate();
|
|
8585
8934
|
break;
|
|
@@ -8592,32 +8941,32 @@ var TrendingsReducer = createSlice({
|
|
|
8592
8941
|
if (state.scope !== "custom") {
|
|
8593
8942
|
switch (state.scope) {
|
|
8594
8943
|
case "10 min":
|
|
8595
|
-
state.timeScopeStart = moment(payload.end)
|
|
8944
|
+
state.timeScopeStart = moment$2(payload.end)
|
|
8596
8945
|
.subtract(10, "minutes")
|
|
8597
8946
|
.toDate();
|
|
8598
8947
|
break;
|
|
8599
8948
|
case "1 hour":
|
|
8600
|
-
state.timeScopeStart = moment(payload.end)
|
|
8949
|
+
state.timeScopeStart = moment$2(payload.end)
|
|
8601
8950
|
.subtract(1, "hours")
|
|
8602
8951
|
.toDate();
|
|
8603
8952
|
break;
|
|
8604
8953
|
case "4 hours":
|
|
8605
|
-
state.timeScopeStart = moment(payload.end)
|
|
8954
|
+
state.timeScopeStart = moment$2(payload.end)
|
|
8606
8955
|
.subtract(4, "hours")
|
|
8607
8956
|
.toDate();
|
|
8608
8957
|
break;
|
|
8609
8958
|
case "12 hours":
|
|
8610
|
-
state.timeScopeStart = moment(payload.end)
|
|
8959
|
+
state.timeScopeStart = moment$2(payload.end)
|
|
8611
8960
|
.subtract(12, "hours")
|
|
8612
8961
|
.toDate();
|
|
8613
8962
|
break;
|
|
8614
8963
|
case "1 day":
|
|
8615
|
-
state.timeScopeStart = moment(payload.end)
|
|
8964
|
+
state.timeScopeStart = moment$2(payload.end)
|
|
8616
8965
|
.subtract(1, "days")
|
|
8617
8966
|
.toDate();
|
|
8618
8967
|
break;
|
|
8619
8968
|
case "10 days":
|
|
8620
|
-
state.timeScopeStart = moment(payload.end)
|
|
8969
|
+
state.timeScopeStart = moment$2(payload.end)
|
|
8621
8970
|
.subtract(10, "days")
|
|
8622
8971
|
.toDate();
|
|
8623
8972
|
break;
|
|
@@ -8689,7 +9038,7 @@ const FORMATS = {
|
|
|
8689
9038
|
year: 'YYYY'
|
|
8690
9039
|
};
|
|
8691
9040
|
|
|
8692
|
-
_adapters._date.override(typeof moment === 'function' ? {
|
|
9041
|
+
_adapters._date.override(typeof moment$2 === 'function' ? {
|
|
8693
9042
|
_id: 'moment', // DEBUG ONLY
|
|
8694
9043
|
|
|
8695
9044
|
formats: function() {
|
|
@@ -8698,27 +9047,27 @@ _adapters._date.override(typeof moment === 'function' ? {
|
|
|
8698
9047
|
|
|
8699
9048
|
parse: function(value, format) {
|
|
8700
9049
|
if (typeof value === 'string' && typeof format === 'string') {
|
|
8701
|
-
value = moment(value, format);
|
|
8702
|
-
} else if (!(value instanceof moment)) {
|
|
8703
|
-
value = moment(value);
|
|
9050
|
+
value = moment$2(value, format);
|
|
9051
|
+
} else if (!(value instanceof moment$2)) {
|
|
9052
|
+
value = moment$2(value);
|
|
8704
9053
|
}
|
|
8705
9054
|
return value.isValid() ? value.valueOf() : null;
|
|
8706
9055
|
},
|
|
8707
9056
|
|
|
8708
9057
|
format: function(time, format) {
|
|
8709
|
-
return moment(time).format(format);
|
|
9058
|
+
return moment$2(time).format(format);
|
|
8710
9059
|
},
|
|
8711
9060
|
|
|
8712
9061
|
add: function(time, amount, unit) {
|
|
8713
|
-
return moment(time).add(amount, unit).valueOf();
|
|
9062
|
+
return moment$2(time).add(amount, unit).valueOf();
|
|
8714
9063
|
},
|
|
8715
9064
|
|
|
8716
9065
|
diff: function(max, min, unit) {
|
|
8717
|
-
return moment(max).diff(moment(min), unit);
|
|
9066
|
+
return moment$2(max).diff(moment$2(min), unit);
|
|
8718
9067
|
},
|
|
8719
9068
|
|
|
8720
9069
|
startOf: function(time, unit, weekday) {
|
|
8721
|
-
time = moment(time);
|
|
9070
|
+
time = moment$2(time);
|
|
8722
9071
|
if (unit === 'isoWeek') {
|
|
8723
9072
|
weekday = Math.trunc(Math.min(Math.max(0, weekday), 6));
|
|
8724
9073
|
return time.isoWeekday(weekday).startOf('day').valueOf();
|
|
@@ -8727,7 +9076,7 @@ _adapters._date.override(typeof moment === 'function' ? {
|
|
|
8727
9076
|
},
|
|
8728
9077
|
|
|
8729
9078
|
endOf: function(time, unit) {
|
|
8730
|
-
return moment(time).endOf(unit).valueOf();
|
|
9079
|
+
return moment$2(time).endOf(unit).valueOf();
|
|
8731
9080
|
}
|
|
8732
9081
|
} : {});
|
|
8733
9082
|
|
|
@@ -9334,7 +9683,7 @@ var LoadViewModal = function (_a) {
|
|
|
9334
9683
|
React__default.createElement("div", { className: classes.iconContainer },
|
|
9335
9684
|
option.IsPublic ? '' :
|
|
9336
9685
|
React__default.createElement(React__default.Fragment, null,
|
|
9337
|
-
React__default.createElement(Tooltip, { title: "Private", arrow: true },
|
|
9686
|
+
React__default.createElement(Tooltip$1, { title: "Private", arrow: true },
|
|
9338
9687
|
React__default.createElement(LockIcon, { fontSize: 'small', style: { color: 'black', height: "18px", width: '18px', cursor: 'auto' } }))),
|
|
9339
9688
|
React__default.createElement(IconButton$1, { onClick: function (e) { return handleEditView(option); } },
|
|
9340
9689
|
React__default.createElement(CreateIcon, { fontSize: 'small', color: 'primary', style: { height: "18px", width: '18px', cursor: 'pointer' } })),
|
|
@@ -9616,7 +9965,7 @@ var TagFolderCustomNode = function (_a) {
|
|
|
9616
9965
|
backgroundColor: ((_f = node.data) === null || _f === void 0 ? void 0 : _f.TagTypeCode) === 'A' ? "#AD48C4" : "#C46F48",
|
|
9617
9966
|
margin: "0 5px"
|
|
9618
9967
|
} }, (_g = node.data) === null || _g === void 0 ? void 0 : _g.TagTypeCode)),
|
|
9619
|
-
React__default.createElement(Tooltip, { title: node.data.TagName, placement: "top", arrow: true },
|
|
9968
|
+
React__default.createElement(Tooltip$1, { title: node.data.TagName, placement: "top", arrow: true },
|
|
9620
9969
|
React__default.createElement(Typography, { variant: "body2" }, ((_h = node.data) === null || _h === void 0 ? void 0 : _h.Alias) || ((_j = node.data) === null || _j === void 0 ? void 0 : _j.TagName))))));
|
|
9621
9970
|
};
|
|
9622
9971
|
|
|
@@ -10423,7 +10772,7 @@ var TableComponent = function (_a) {
|
|
|
10423
10772
|
React__default.createElement("td", { className: "".concat(classes.visible, " ").concat(classes.checkbox) },
|
|
10424
10773
|
React__default.createElement("input", { type: "checkbox", checked: tag.IsVisible, onChange: function (e) { return handleVisibilityChange(tag.TagId, e.target.checked); } })),
|
|
10425
10774
|
React__default.createElement("td", { className: classes.aliasCol },
|
|
10426
|
-
React__default.createElement(Tooltip, { title: tag.TagName, placement: "top", arrow: true, interactive: true, enterDelay: 500 },
|
|
10775
|
+
React__default.createElement(Tooltip$1, { title: tag.TagName, placement: "top", arrow: true, interactive: true, enterDelay: 500 },
|
|
10427
10776
|
React__default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
10428
10777
|
tag.TagType &&
|
|
10429
10778
|
(React__default.createElement("div", { className: classes.dataType, style: { backgroundColor: tag.TagType === "A" ? "#AD48C4" : "#C46F48" } }, tag.TagType)),
|
|
@@ -10639,18 +10988,18 @@ var dateNavigator = function (startDate, endDate, scope, operator, current) {
|
|
|
10639
10988
|
}
|
|
10640
10989
|
else {
|
|
10641
10990
|
var _a = scope.split(" "), quantity = _a[0], duration = _a[1];
|
|
10642
|
-
newStartDate = moment(newEndDate).subtract(quantity, duration[0]).toDate();
|
|
10991
|
+
newStartDate = moment$2(newEndDate).subtract(quantity, duration[0]).toDate();
|
|
10643
10992
|
}
|
|
10644
10993
|
}
|
|
10645
10994
|
else {
|
|
10646
10995
|
if (scope === "custom") {
|
|
10647
|
-
var durationInMs = moment(endDate).diff(moment(startDate));
|
|
10648
|
-
newStartDate = moment(startDate)[operator](durationInMs).toDate();
|
|
10996
|
+
var durationInMs = moment$2(endDate).diff(moment$2(startDate));
|
|
10997
|
+
newStartDate = moment$2(startDate)[operator](durationInMs).toDate();
|
|
10649
10998
|
}
|
|
10650
10999
|
else {
|
|
10651
11000
|
var _b = scope.split(" "), quantity = _b[0], duration = _b[1];
|
|
10652
|
-
newStartDate = moment(startDate)[operator](quantity, duration[0]).toDate();
|
|
10653
|
-
newEndDate = moment(endDate)[operator](quantity, duration[0]).toDate();
|
|
11001
|
+
newStartDate = moment$2(startDate)[operator](quantity, duration[0]).toDate();
|
|
11002
|
+
newEndDate = moment$2(endDate)[operator](quantity, duration[0]).toDate();
|
|
10654
11003
|
}
|
|
10655
11004
|
}
|
|
10656
11005
|
return { newStartDate: newStartDate, newEndDate: newEndDate };
|
|
@@ -10674,7 +11023,7 @@ var Header = function (_a) {
|
|
|
10674
11023
|
var handleDateChange = function (newValue, key) {
|
|
10675
11024
|
var _a;
|
|
10676
11025
|
//@ts-ignore
|
|
10677
|
-
actions.setTotalScope((_a = {}, _a[key] = moment(newValue).toDate(), _a));
|
|
11026
|
+
actions.setTotalScope((_a = {}, _a[key] = moment$2(newValue).toDate(), _a));
|
|
10678
11027
|
};
|
|
10679
11028
|
var handleChangeScope = function (e) {
|
|
10680
11029
|
var newScope = e.target.value;
|
|
@@ -10710,7 +11059,7 @@ var Header = function (_a) {
|
|
|
10710
11059
|
React__default.createElement(IconButton$1, { color: "primary", onClick: function () { return handleDateNavigator("subtract"); }, className: classes.navigatorButton },
|
|
10711
11060
|
React__default.createElement(ChevronLeft, { fontSize: "large" }))),
|
|
10712
11061
|
React__default.createElement(Grid$1, { item: true },
|
|
10713
|
-
React__default.createElement(TextField, { type: "datetime-local", className: classes.datetimePicker, label: "Start", variant: "outlined", value: moment(state.timeScopeStart).format("YYYY-MM-DDTHH:mm:ss"), onChange: function (e) { return handleDateChange(e.target.value, "start"); }, InputLabelProps: {
|
|
11062
|
+
React__default.createElement(TextField, { type: "datetime-local", className: classes.datetimePicker, label: "Start", variant: "outlined", value: moment$2(state.timeScopeStart).format("YYYY-MM-DDTHH:mm:ss"), onChange: function (e) { return handleDateChange(e.target.value, "start"); }, InputLabelProps: {
|
|
10714
11063
|
shrink: true,
|
|
10715
11064
|
style: { marginLeft: "10px" }
|
|
10716
11065
|
}, InputProps: {
|
|
@@ -10727,7 +11076,7 @@ var Header = function (_a) {
|
|
|
10727
11076
|
React__default.createElement(MenuItem$1, { value: "10 days" }, "10 days"),
|
|
10728
11077
|
React__default.createElement(MenuItem$1, { value: "custom" }, "Custom")))),
|
|
10729
11078
|
React__default.createElement(Grid$1, { item: true },
|
|
10730
|
-
React__default.createElement(TextField, { label: "End", variant: "outlined", className: classes.datetimePicker, type: "datetime-local", value: moment(state.timeScopeEnd).format("YYYY-MM-DDTHH:mm:ss"), onChange: function (e) { return handleDateChange(e.target.value, "end"); }, InputLabelProps: {
|
|
11079
|
+
React__default.createElement(TextField, { label: "End", variant: "outlined", className: classes.datetimePicker, type: "datetime-local", value: moment$2(state.timeScopeEnd).format("YYYY-MM-DDTHH:mm:ss"), onChange: function (e) { return handleDateChange(e.target.value, "end"); }, InputLabelProps: {
|
|
10731
11080
|
shrink: true,
|
|
10732
11081
|
style: { marginLeft: "10px" }
|
|
10733
11082
|
} })),
|
|
@@ -11063,7 +11412,7 @@ var TrendingChart = function (_a) {
|
|
|
11063
11412
|
React__default.createElement(Line, { ref: chartRef, data: chartData, options: chartOptions, plugins: [verticalLinePlugin, xAxisDatePlugin, yAxisPlugin] })));
|
|
11064
11413
|
};
|
|
11065
11414
|
|
|
11066
|
-
Chart.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip$
|
|
11415
|
+
Chart.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip$2, Legend, TimeScale, zoomPlugin);
|
|
11067
11416
|
var Trending = function (_a) {
|
|
11068
11417
|
_a.title; var getTagsFromAPI = _a.getTagsFromAPI;
|
|
11069
11418
|
var _b = useTrendingContext(), state = _b.state, _c = _b.state, viewTags = _c.viewTags, shouldRefetchSeries = _c.shouldRefetchSeries;
|
|
@@ -11303,20 +11652,24 @@ var Navigation = function (_a) {
|
|
|
11303
11652
|
var css = "body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-color: #fafbfc !important;\n}\n.container-fluid-main{\n padding-right: 0px !important; \n padding-left: 0px !important;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\n.mes-primary-color {\n background-color: #479dc4 !important;\n}\n.mes-button-primary{\n background-color: #479dc4 !important;\n border-color: #479dc4 !important;\n}\n\n.mes-selectable-datagrid .MuiDataGrid-row{\n cursor: pointer;\n}\n\n.mes-menu-top .navbar-brand{\n color: #FFFF !important;\n}\n.mes-menu-top .nav-link {\n color: #FFFF !important;\n}\n.mes-menu-top .navbar-toggler {\n color: #FFFF !important;\n}\n.mes-menu-top .navbar-text {\n color: #FFFF !important;\n}\n.mes-footer-login{\n position: absolute;\n bottom: 0;\n width: 100%;\n height: 10em;\n line-height: 60px;\n text-align:center;\n}\n.mes-filter-datepicker{\n padding: unset !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n padding-top: 0.375rem !important;\n padding-bottom: 0.375rem !important;\n padding-left: 0.75rem !important;\n cursor: pointer !important;\n max-width: 120px;\n}\n.mes-filter-datetimepicker{\n max-width: 97px;\n}\n.mes-not-rounded{\n border-radius: unset !important;\n}\n\n.mes-numeric{\n text-align: right;\n}\n.mes-drag-over{\n border: 3px dotted #666;\n background-color: #479dc4 !important;\n}\n.mes-drag-start{\n border: 3px solid #666;\n}\n\n.mes-selectable{\n cursor: pointer !important;\n}\n\n.mes-custom-select{\n width: auto !important;\n padding: 0.375rem 0 0.375rem 0 !important;\n background: unset !important;\n font-family: inherit !important;\n}\n.mes-custom-select .MuiSelect-select{\n padding-left: 14px;\n}\n\n.mes-custom-select::before{\n border-bottom: unset !important;\n}\n.mes-custom-select::after{\n border-bottom: unset !important;\n}\n.mes-no-border{\n border: unset;\n}\n.mes-no-border:focus-visible {\n outline: unset;\n}\n.mes-div-submenu{\n border-right: 1px solid #cfdbe2;\n overflow-y: scroll;\n max-height: 80vh;\n}\n.mes-submenu a{\n width: 100% !important;\n /* color: rgba(0, 0, 0, 0.87); */\n color: #479dc4\n}\n.mes-submenu .Mui-selected{\n border-right: 3px solid #479dc4; \n}\n.mes-menu-group{\n font-size: 20px;\n line-height: 1.1;\n color: #929292; \n font-weight: normal; \n}\n\n/********************MUI DATAGRID*****************************/\n.Mui-selected{\n font-weight: bolder !important;\n opacity: 1 !important;\n}\n\n.mes-upload-control{\n\n}\n.mes-upload-control .file-box{\n /* border : 1px solid black; */\n height : 100px;\n position: relative; \n}\n.mes-upload-control .file-detail{\n position: absolute;\n left: 0px;\n top: 0px; \n z-index: 1;\n height: 100%;\n width: 100%;\n}\n\n.mes-upload-control input[type=file]{\n left: 0px;\n top: 0px;\n opacity: 0;\n z-index: 10000;\n height: 100%;\n cursor: pointer;\n}\n.mes-upload-control table{\n width: 100%;\n}\n.mes-upload-control td{\n font-size: 0.8rem !important;\n max-width:0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;\n}\n\n\n.input-group-text{\n background-color: #ced2cc !important;\n /* border: 1px solid #ced4da !important; */\n /* color: #000000 !important; */\n}\n\n\n\n\n.content-wrapper {\n padding: 15px;\n width: 100%;\n border-top: 1px solid rgba(0, 0, 0, 0.15);\n margin-top: -1px;\n}\n.content-wrapper > .unwrap {\n margin: -15px;\n}\n@media only screen and (min-width: 768px) {\n .content-wrapper > .unwrap {\n margin: -20px;\n }\n}\n.content-wrapper > h3,\n.content-wrapper > .content-heading {\n font-size: 24px;\n line-height: 1.1;\n color: #929292;\n margin: -15px;\n margin-bottom: 20px;\n padding: 15px;\n font-weight: normal;\n background-color: #fafbfc;\n border-bottom: 1px solid #cfdbe2;\n}\n.content-wrapper > h3 > small,\n.content-wrapper > .content-heading > small {\n display: block;\n font-size: 12px;\n color: #909fa7;\n}\n.content-wrapper > button,\n.content-wrapper > .btn {\n margin: 10px 10px 0 0;\n}\n.content-wrapper .container,\n.content-wrapper .container-fluid {\n padding-left: 0;\n padding-right: 0;\n}\n@media only screen and (min-width: 768px) {\n .content-wrapper {\n padding: 20px;\n }\n .content-wrapper > h3,\n .content-wrapper > .content-heading {\n margin: -20px;\n margin-bottom: 5px;\n padding: 15px;\n }\n .content-wrapper > button,\n .content-wrapper > .btn {\n margin: 0;\n }\n}\n\n @media print {\n .sidebar,\n .topnavbar,\n .offsidebar,\n .btn {\n display: none !important;\n width: 0 !important;\n height: 0 !important;\n }\n .wrapper,\n .wrapper > section,\n .content-wrapper {\n margin: 0 !important;\n /* remove margin used for sidebar and expand the content */\n padding: 0 !important;\n width: 100% !important;\n }\n .content-wrapper {\n overflow: hidden !important;\n }\n }\n ";
|
|
11304
11653
|
n(css,{});
|
|
11305
11654
|
|
|
11655
|
+
var timezone = TimeService.getInstance().getServerTimeZone();
|
|
11656
|
+
moment$3.tz.setDefault(timezone);
|
|
11306
11657
|
var base = document.getElementsByTagName("base")[0].getAttribute("href") || "/";
|
|
11307
11658
|
function MESFMain(_a) {
|
|
11308
11659
|
var authentication = _a.authentication, routes = _a.routes, navbar = _a.navbar, _b = _a.navbarTitle, navbarTitle = _b === void 0 ? "MESF" : _b, configurations = _a.configurations, _c = _a.showAreaSelector, showAreaSelector = _c === void 0 ? false : _c, _d = _a.showTrendingsIcon, showTrendingsIcon = _d === void 0 ? true : _d;
|
|
11309
11660
|
return (React__default.createElement(AuthProvider, { authConfig: authentication },
|
|
11310
|
-
React__default.createElement(
|
|
11311
|
-
React__default.createElement(
|
|
11312
|
-
React__default.createElement(
|
|
11313
|
-
React__default.createElement(
|
|
11314
|
-
React__default.createElement(
|
|
11315
|
-
React__default.createElement(
|
|
11316
|
-
React__default.createElement(
|
|
11317
|
-
React__default.createElement(
|
|
11318
|
-
React__default.createElement(
|
|
11319
|
-
|
|
11661
|
+
React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, dateLibInstance: moment$3 },
|
|
11662
|
+
React__default.createElement(UserProvider, null,
|
|
11663
|
+
React__default.createElement(AssetProvider, null,
|
|
11664
|
+
React__default.createElement(UTLSettingsProvider, null,
|
|
11665
|
+
React__default.createElement(RouterContext.Provider, { value: routes },
|
|
11666
|
+
React__default.createElement(NavbarContext.Provider, { value: navbar },
|
|
11667
|
+
React__default.createElement(ConfigurationContext.Provider, { value: configurations },
|
|
11668
|
+
React__default.createElement(ShiftNavigatorProvider, null,
|
|
11669
|
+
React__default.createElement(BrowserRouter, { basename: base },
|
|
11670
|
+
React__default.createElement(Routes, null,
|
|
11671
|
+
React__default.createElement(Route, { path: "/logout", element: React__default.createElement(Logout, null) })),
|
|
11672
|
+
React__default.createElement(Navigation, { showAreaSelector: showAreaSelector, showTrendingsIcon: showTrendingsIcon, navbarTitle: navbarTitle }))))))))))));
|
|
11320
11673
|
}
|
|
11321
11674
|
|
|
11322
11675
|
var useDefaultAreaId = function (setError) {
|
|
@@ -11458,5 +11811,5 @@ var areaSelector = /*#__PURE__*/Object.freeze({
|
|
|
11458
11811
|
AreaSelector: AreaSelector
|
|
11459
11812
|
});
|
|
11460
11813
|
|
|
11461
|
-
export { Account, AssetProvider, AuthContext, AuthProvider, BarChartControl, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ErrorModal, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HorizontalTextControl, IntegerFormatter, Login, Logout, LongFilterPanel, MESApiService, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, NumericTextControl, SimplePasswordControl, SimpleSelectorControl, SimpleTextAreaControl, SimpleTextControl, TimeFormatter, TimeService, TreePickerControl, TrendingsPage, USER_LABELS, UTLSettingsProvider, UploadFileControl, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getError, getMomentTz, getProfiles, getShiftStyle, getTokenFromLS, getUsers, renewToken, setPassword, setProfilesToUser, upsertUser, useAssetContext, useToken, useUTLSettingsContext, useUserContext };
|
|
11814
|
+
export { Account, AssetProvider, AuthContext, AuthProvider, BarChartControl, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ErrorModal, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HorizontalTextControl, IntegerFormatter, Login, Logout, LongFilterPanel, MESApiService, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, NumericTextControl, ShiftDayNavigatorControl, ShiftNavigatorProvider, SimplePasswordControl, SimpleSelectorControl, SimpleTextAreaControl, SimpleTextControl, TimeFormatter, TimeService, TreePickerControl, TrendingsPage, USER_LABELS, UTLSettingsProvider, UploadFileControl, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getError, getMomentTz, getProfiles, getShiftByParameters, getShiftStyle, getTokenFromLS, getUsers, renewToken, setPassword, setProfilesToUser, upsertUser, useAssetContext, useShiftNavigator, useShiftNavigatorManager, useToken, useUTLSettingsContext, useUserContext };
|
|
11462
11815
|
//# sourceMappingURL=index.esm.js.map
|