@dexteel/mesf-core 6.0.1 → 6.0.3
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +27 -0
- package/dist/controls/asset-tree-picker/AssetTreePicker.d.ts +2 -1
- package/dist/index.esm.js +81 -111
- package/dist/index.esm.js.map +1 -1
- package/dist/pages/logbook/entry/components/entry-viewer/EntryViewer.d.ts +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [6.0.3](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v6.0.2...@dexteel/mesf-core-v6.0.3) (2025-10-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **asset-tree-picker:** Add filterAssets prop | Remove useStyles ([39ec87e](https://github.com/dexteel/mesf-core-frontend/commit/39ec87e4530e92ede44681a664a983dd02df3d20))
|
|
9
|
+
* **entry-viewer:** Use tree and selector | Preselect assetId ([c792f29](https://github.com/dexteel/mesf-core-frontend/commit/c792f29db40e95ab1a434900bdf3fef4b3ab6da9))
|
|
10
|
+
|
|
11
|
+
## [6.0.2] - 2025-09-30
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Changelog
|
|
16
|
+
|
|
17
|
+
## [6.0.2](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v6.0.1...@dexteel/mesf-core-v6.0.2) (2025-09-30)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **Asset Filter:** remove infinite errors in console.log. Remove vertical scrolling ([d7127ab](https://github.com/dexteel/mesf-core-frontend/commit/d7127ab39a20bc63f6f33e2d8a5ba043d944d5fd))
|
|
23
|
+
|
|
24
|
+
## [6.0.1] - 2025-09-30
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
1
28
|
# Changelog
|
|
2
29
|
|
|
3
30
|
## [6.0.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v6.0.0...@dexteel/mesf-core-v6.0.1) (2025-09-30)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FieldError } from "react-hook-form";
|
|
3
|
-
export declare const AssetTreePicker: ({ label, value, onChange, disabled, fieldError, }: {
|
|
3
|
+
export declare const AssetTreePicker: ({ label, value, onChange, disabled, fieldError, filterAssets, }: {
|
|
4
4
|
label?: String;
|
|
5
5
|
value: number | null;
|
|
6
6
|
onChange: (value: number | null) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
fieldError?: FieldError | undefined;
|
|
9
|
+
filterAssets?: boolean;
|
|
9
10
|
}) => React.JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -952,7 +952,7 @@ var ModalTreeFilterControl = function (props) {
|
|
|
952
952
|
React__default.createElement(Button, { onClick: function () { return handleOk(); }, color: "primary" }, "OK"))));
|
|
953
953
|
};
|
|
954
954
|
|
|
955
|
-
var useStyles$
|
|
955
|
+
var useStyles$G = makeStyles(function (theme) { return ({
|
|
956
956
|
root: {
|
|
957
957
|
width: "100%",
|
|
958
958
|
backgroundColor: theme.palette.background.paper,
|
|
@@ -968,7 +968,7 @@ var useStyles$H = makeStyles(function (theme) { return ({
|
|
|
968
968
|
},
|
|
969
969
|
}); });
|
|
970
970
|
var TreePickerControl = function (props) {
|
|
971
|
-
var classes = useStyles$
|
|
971
|
+
var classes = useStyles$G();
|
|
972
972
|
var onSelect = props.onSelect, value = props.value; props.styleLabel; var dataSource = props.dataSource, _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, _d = props.showClearButton, showClearButton = _d === void 0 ? false : _d, showAssetTree = props.showAssetTree, onHide = props.onHide, _e = props.listAssetDrawings, listAssetDrawings = _e === void 0 ? [] : _e, onSuccess = props.onSuccess, isLoading = props.isLoading, _f = props.allowSearch, allowSearch = _f === void 0 ? false : _f, other = __rest(props, ["onSelect", "value", "styleLabel", "dataSource", "inputTitle", "showPath", "multipleSelectNodes", "showClearButton", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading", "allowSearch"]);
|
|
973
973
|
var _g = useState(showAssetTree || false), open = _g[0], setOpen = _g[1];
|
|
974
974
|
var handleClickListItem = function (e) {
|
|
@@ -1052,7 +1052,7 @@ var TreePickerControl = function (props) {
|
|
|
1052
1052
|
}, onHide: onHide, id: "modal-treeview-filters", title: props.title, keepMounted: true, open: open, onClose: handleClose, isLoading: isLoading, value: value, data: dataSource, onBackdropClick: function () { return setOpen(false); }, multipleSelectNodes: multipleSelectNodes, listAssetDrawings: listAssetDrawings, setListAssetDrawings: listAssetDrawings, onSuccess: onSuccess, allowSearch: allowSearch }, other)))));
|
|
1053
1053
|
};
|
|
1054
1054
|
|
|
1055
|
-
var useStyles$
|
|
1055
|
+
var useStyles$F = makeStyles(function (theme) { return ({
|
|
1056
1056
|
root: {
|
|
1057
1057
|
width: "100%",
|
|
1058
1058
|
backgroundColor: theme.palette.background.paper,
|
|
@@ -1103,7 +1103,7 @@ function getNodePath(node, nodeId, parentPath, isRoot) {
|
|
|
1103
1103
|
return null;
|
|
1104
1104
|
}
|
|
1105
1105
|
var TreePickerControlV2 = function (props) {
|
|
1106
|
-
var classes = useStyles$
|
|
1106
|
+
var classes = useStyles$F();
|
|
1107
1107
|
var value = props.value, onSelect = props.onSelect; props.styleLabel; var dataSource = props.dataSource; props.getOptionName; var _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, _d = props.showClearButton, showClearButton = _d === void 0 ? false : _d, _e = props.showFullPath, showFullPath = _e === void 0 ? false : _e, showAssetTree = props.showAssetTree, onHide = props.onHide, _f = props.listAssetDrawings, listAssetDrawings = _f === void 0 ? [] : _f, onSuccess = props.onSuccess, isLoading = props.isLoading, _g = props.disabled, disabled = _g === void 0 ? false : _g, _h = props.mostUsedCount, mostUsedCount = _h === void 0 ? 0 : _h, _j = props.itemsWithParent, itemsWithParent = _j === void 0 ? [] : _j, _k = props.dialogMaxWidth, dialogMaxWidth = _k === void 0 ? "sm" : _k, _l = props.allowSearch, allowSearch = _l === void 0 ? false : _l, other = __rest(props, ["value", "onSelect", "styleLabel", "dataSource", "getOptionName", "inputTitle", "showPath", "multipleSelectNodes", "showClearButton", "showFullPath", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading", "disabled", "mostUsedCount", "itemsWithParent", "dialogMaxWidth", "allowSearch"]);
|
|
1108
1108
|
var _m = useState(false), open = _m[0], setOpen = _m[1];
|
|
1109
1109
|
var handleClickListItem = function (event) {
|
|
@@ -1295,7 +1295,7 @@ DataGridControl.propTypes = {
|
|
|
1295
1295
|
rows: PropTypes.array,
|
|
1296
1296
|
};
|
|
1297
1297
|
|
|
1298
|
-
var useStyles$
|
|
1298
|
+
var useStyles$E = makeStyles(function (theme) { return ({
|
|
1299
1299
|
contentWrapper: {
|
|
1300
1300
|
padding: theme.spacing(2),
|
|
1301
1301
|
},
|
|
@@ -1372,7 +1372,7 @@ var useStyles$F = makeStyles(function (theme) { return ({
|
|
|
1372
1372
|
}); });
|
|
1373
1373
|
var Alert$1 = function (_a) {
|
|
1374
1374
|
var show = _a.show, variant = _a.variant, dismissible = _a.dismissible, onClose = _a.onClose, children = _a.children;
|
|
1375
|
-
var classes = useStyles$
|
|
1375
|
+
var classes = useStyles$E();
|
|
1376
1376
|
return (React__default.createElement(Collapse, { in: show },
|
|
1377
1377
|
React__default.createElement(Paper, { className: "".concat(classes.alert, " ").concat(variant === "success" ? classes.success : classes.error), elevation: 0 },
|
|
1378
1378
|
React__default.createElement("div", { className: classes.alertContent },
|
|
@@ -1383,7 +1383,7 @@ var Alert$1 = function (_a) {
|
|
|
1383
1383
|
var GenericPanel = function (_a) {
|
|
1384
1384
|
var _b;
|
|
1385
1385
|
var title = _a.title, _c = _a.description, description = _c === void 0 ? "" : _c, _d = _a.showPromptSuccess, showPromptSuccess = _d === void 0 ? false : _d, _e = _a.showPromptError, showPromptError = _e === void 0 ? false : _e, _f = _a.onDismissSuccess, onDismissSuccess = _f === void 0 ? function () { return null; } : _f, _g = _a.onDismissError, onDismissError = _g === void 0 ? function () { return null; } : _g, successMessage = _a.successMessage, error = _a.error, children = _a.children;
|
|
1386
|
-
var classes = useStyles$
|
|
1386
|
+
var classes = useStyles$E();
|
|
1387
1387
|
return (React__default.createElement(Box, { className: classes.contentWrapper },
|
|
1388
1388
|
React__default.createElement(Box, { className: classes.alertContainer },
|
|
1389
1389
|
React__default.createElement(Alert$1, { show: showPromptError, variant: "danger", dismissible: true, onClose: onDismissError },
|
|
@@ -1402,7 +1402,7 @@ var GenericPanel = function (_a) {
|
|
|
1402
1402
|
};
|
|
1403
1403
|
var MasterDetailPanel = function (_a) {
|
|
1404
1404
|
var title = _a.title, onSave = _a.onSave, onCancel = _a.onCancel, onDelete = _a.onDelete, saveStatus = _a.saveStatus, deleteStatus = _a.deleteStatus, _b = _a.showSave, showSave = _b === void 0 ? true : _b, showDelete = _a.showDelete, children = _a.children;
|
|
1405
|
-
var classes = useStyles$
|
|
1405
|
+
var classes = useStyles$E();
|
|
1406
1406
|
return (React__default.createElement(Box, { className: classes.masterDetailPanel },
|
|
1407
1407
|
React__default.createElement(Card, { variant: "outlined" },
|
|
1408
1408
|
React__default.createElement(CardContent, null,
|
|
@@ -1415,7 +1415,7 @@ var MasterDetailPanel = function (_a) {
|
|
|
1415
1415
|
showDelete && (React__default.createElement(Button, { variant: "contained", color: "primary", className: classes.button, onClick: onDelete, disabled: !deleteStatus }, "Delete")))))));
|
|
1416
1416
|
};
|
|
1417
1417
|
var FilterPanel = function (props) {
|
|
1418
|
-
var classes = useStyles$
|
|
1418
|
+
var classes = useStyles$E();
|
|
1419
1419
|
var onClickExport = props.onClickExport, onClickReset = props.onClickReset, OnClickGo = props.OnClickGo, showButtons = props.showButtons, showExport = props.showExport, _a = props.extraButtons, extraButtons = _a === void 0 ? [] : _a, children = props.children;
|
|
1420
1420
|
var handleExport = function () {
|
|
1421
1421
|
if (onClickExport)
|
|
@@ -1440,7 +1440,7 @@ var FilterPanel = function (props) {
|
|
|
1440
1440
|
showExport && (React__default.createElement(Button, { variant: "contained", className: "".concat(classes.button, " ").concat(classes.exportButton), onClick: handleExport, startIcon: React__default.createElement(GetAppIcon, null) }, "Excel"))))))));
|
|
1441
1441
|
};
|
|
1442
1442
|
var LongFilterPanel = function (props) {
|
|
1443
|
-
var classes = useStyles$
|
|
1443
|
+
var classes = useStyles$E();
|
|
1444
1444
|
var onClickExport = props.onClickExport, onClickReset = props.onClickReset, OnClickGo = props.OnClickGo, showButtons = props.showButtons, showExport = props.showExport, _a = props.extraButtons, extraButtons = _a === void 0 ? [] : _a, children = props.children;
|
|
1445
1445
|
var handleExport = function () {
|
|
1446
1446
|
if (onClickExport)
|
|
@@ -2044,7 +2044,7 @@ var CustomStatusPanel$1 = function (_a) {
|
|
|
2044
2044
|
return (React.createElement(IconButton$1, { onClick: handleNew, color: "primary", style: { marginLeft: -15 } },
|
|
2045
2045
|
React.createElement(PlaylistAddIcon, { style: { width: 30, height: 30 } })));
|
|
2046
2046
|
};
|
|
2047
|
-
var useStyles$
|
|
2047
|
+
var useStyles$D = makeStyles(function (theme) { return ({
|
|
2048
2048
|
root: {
|
|
2049
2049
|
"& .MuiDataGrid-row": {
|
|
2050
2050
|
cursor: "pointer",
|
|
@@ -2056,7 +2056,7 @@ var useStyles$E = makeStyles(function (theme) { return ({
|
|
|
2056
2056
|
},
|
|
2057
2057
|
}); });
|
|
2058
2058
|
var TableJobs = function () {
|
|
2059
|
-
var classes = useStyles$
|
|
2059
|
+
var classes = useStyles$D();
|
|
2060
2060
|
var queryClient = useQueryClient();
|
|
2061
2061
|
var _a = useState(null), jobSelected = _a[0], setJobSelected = _a[1];
|
|
2062
2062
|
var _b = useState(null), gridApi = _b[0], setGridApi = _b[1];
|
|
@@ -2408,7 +2408,7 @@ var useLogTableData = function () {
|
|
|
2408
2408
|
return { columnDefs: columnDefs };
|
|
2409
2409
|
};
|
|
2410
2410
|
|
|
2411
|
-
var useStyles$
|
|
2411
|
+
var useStyles$C = makeStyles(function (theme) { return ({
|
|
2412
2412
|
root: {
|
|
2413
2413
|
"& .MuiDataGrid-row": {
|
|
2414
2414
|
cursor: "pointer",
|
|
@@ -2438,7 +2438,7 @@ var TimezoneSelector = function (_a) {
|
|
|
2438
2438
|
React__default.createElement(MenuItem, { value: "Server" }, "Server"))));
|
|
2439
2439
|
};
|
|
2440
2440
|
|
|
2441
|
-
var useStyles$
|
|
2441
|
+
var useStyles$B = makeStyles(function (theme) { return ({
|
|
2442
2442
|
title: {
|
|
2443
2443
|
fontSize: 15,
|
|
2444
2444
|
},
|
|
@@ -2471,7 +2471,7 @@ var formatTime = function (nowTime) {
|
|
|
2471
2471
|
var ModalLogSelected = function (_a) {
|
|
2472
2472
|
var _b;
|
|
2473
2473
|
var show = _a.show, onHide = _a.onHide, selectedLog = _a.selectedLog, suffixTitle = _a.suffixTitle;
|
|
2474
|
-
var classes = useStyles$
|
|
2474
|
+
var classes = useStyles$B();
|
|
2475
2475
|
return (React__default.createElement(React__default.Fragment, null,
|
|
2476
2476
|
show && (React__default.createElement(HelmetDexteel, { title: "".concat((_b = selectedLog === null || selectedLog === void 0 ? void 0 : selectedLog.Source) !== null && _b !== void 0 ? _b : "", " - Log Details").concat(suffixTitle ? " - ".concat(suffixTitle) : "") })),
|
|
2477
2477
|
React__default.createElement(Grid, { container: true, justifyContent: "center", alignItems: "center" },
|
|
@@ -2541,7 +2541,7 @@ var getLogTypeByCodeId = function (logTypeCodeId) {
|
|
|
2541
2541
|
return get(LOG_TYPE_CODES, "".concat(logTypeCodeId, ".description"), " -");
|
|
2542
2542
|
};
|
|
2543
2543
|
var TableLogs = function () {
|
|
2544
|
-
var classes = useStyles$
|
|
2544
|
+
var classes = useStyles$C();
|
|
2545
2545
|
var _a = useState(moment$8().add(-5, "days").hour(0).minute(0).second(0).toDate()), startDate = _a[0], setStartDate = _a[1];
|
|
2546
2546
|
var _b = useState(moment$8().hour(23).minute(59).second(59).toDate()), endDate = _b[0], setEndDate = _b[1];
|
|
2547
2547
|
var _c = useState("UTC"), timezone = _c[0], setTimezone = _c[1];
|
|
@@ -2883,7 +2883,7 @@ var deleteProfile = function (profileId) { return __awaiter(void 0, void 0, void
|
|
|
2883
2883
|
});
|
|
2884
2884
|
}); };
|
|
2885
2885
|
|
|
2886
|
-
var useStyles$
|
|
2886
|
+
var useStyles$A = makeStyles(function (theme) { return ({
|
|
2887
2887
|
title: {
|
|
2888
2888
|
fontSize: 15,
|
|
2889
2889
|
},
|
|
@@ -2906,7 +2906,7 @@ var CreateProfile = function (_a) {
|
|
|
2906
2906
|
var _d = useState(""), message = _d[0], setMessage = _d[1];
|
|
2907
2907
|
var _e = useState(false), isSubmitLoading = _e[0], setIsSubmitLoading = _e[1];
|
|
2908
2908
|
var _f = useState(""), error = _f[0], setError = _f[1];
|
|
2909
|
-
var classes = useStyles$
|
|
2909
|
+
var classes = useStyles$A();
|
|
2910
2910
|
var _g = useForm({ defaultValues: INITIAL_VALUES$3 }), register = _g.register, handleSubmit = _g.handleSubmit, reset = _g.reset, errors = _g.formState.errors;
|
|
2911
2911
|
var createProfile = useMutation({
|
|
2912
2912
|
mutationFn: upsertProfile,
|
|
@@ -3146,7 +3146,7 @@ var DataTable = function (_a) {
|
|
|
3146
3146
|
React__default.createElement(ErrorModal, { error: error, onHide: function () { return setError(""); } })));
|
|
3147
3147
|
};
|
|
3148
3148
|
|
|
3149
|
-
var useStyles$
|
|
3149
|
+
var useStyles$z = makeStyles(function (theme) { return ({
|
|
3150
3150
|
root: {
|
|
3151
3151
|
"& .MuiFormLabel-asterisk": {
|
|
3152
3152
|
display: "none",
|
|
@@ -3170,7 +3170,7 @@ var searchActionsOfProfile = function (_a) {
|
|
|
3170
3170
|
var ActionsOfProfile = function (_a) {
|
|
3171
3171
|
var _b;
|
|
3172
3172
|
var profileForEdit = _a.profileForEdit, show = _a.show, onHide = _a.onHide, suffixTitle = _a.suffixTitle;
|
|
3173
|
-
var classes = useStyles$
|
|
3173
|
+
var classes = useStyles$z();
|
|
3174
3174
|
var _c = useState(false), showNameSnackbar = _c[0], setShowNameSnackbar = _c[1];
|
|
3175
3175
|
var _d = useState(false), showActionsSnackbar = _d[0], setShowActionsSnackbar = _d[1];
|
|
3176
3176
|
var _e = useState(false), isSubmitLoading = _e[0], setIsSubmitLoading = _e[1];
|
|
@@ -3357,7 +3357,7 @@ var useProfilesOptionsFunctions = function (_a) {
|
|
|
3357
3357
|
};
|
|
3358
3358
|
};
|
|
3359
3359
|
|
|
3360
|
-
var useStyles$
|
|
3360
|
+
var useStyles$y = makeStyles(function (theme) { return ({
|
|
3361
3361
|
buttons: {
|
|
3362
3362
|
opacity: 0,
|
|
3363
3363
|
transition: "opacity 0.1s ease-in-out",
|
|
@@ -3374,7 +3374,7 @@ var useStyles$z = makeStyles(function (theme) { return ({
|
|
|
3374
3374
|
}); });
|
|
3375
3375
|
var useTableData$5 = function (_a) {
|
|
3376
3376
|
var setProfileId = _a.setProfileId, setModalProceduresProfile = _a.setModalProceduresProfile, setModalDeleteProfile = _a.setModalDeleteProfile, showContextMenu = _a.showContextMenu;
|
|
3377
|
-
var classes = useStyles$
|
|
3377
|
+
var classes = useStyles$y();
|
|
3378
3378
|
var columnDefs = [
|
|
3379
3379
|
{
|
|
3380
3380
|
field: "ProfileName",
|
|
@@ -3438,7 +3438,7 @@ var useTableData$5 = function (_a) {
|
|
|
3438
3438
|
return { columnDefs: columnDefs };
|
|
3439
3439
|
};
|
|
3440
3440
|
|
|
3441
|
-
var useStyles$
|
|
3441
|
+
var useStyles$x = makeStyles(function (theme) { return ({
|
|
3442
3442
|
root: {
|
|
3443
3443
|
"& .ag-icon-menu": {
|
|
3444
3444
|
display: "none",
|
|
@@ -3494,7 +3494,7 @@ var useStyles$y = makeStyles(function (theme) { return ({
|
|
|
3494
3494
|
},
|
|
3495
3495
|
}); });
|
|
3496
3496
|
var TableProfiles = function () {
|
|
3497
|
-
var classes = useStyles$
|
|
3497
|
+
var classes = useStyles$x();
|
|
3498
3498
|
var _a = useState(false), modalCreateActive = _a[0], setModalCreateActive = _a[1];
|
|
3499
3499
|
var _b = useState(false), modalProceduresProfile = _b[0], setModalProceduresProfile = _b[1];
|
|
3500
3500
|
var _c = useState(false), modalDeleteProfile = _c[0], setModalDeleteProfile = _c[1];
|
|
@@ -3684,7 +3684,7 @@ var deleteShiftParameters = function (PatternStart) { return __awaiter(void 0, v
|
|
|
3684
3684
|
});
|
|
3685
3685
|
}); };
|
|
3686
3686
|
|
|
3687
|
-
var useStyles$
|
|
3687
|
+
var useStyles$w = makeStyles(function (theme) { return ({
|
|
3688
3688
|
title: {
|
|
3689
3689
|
fontSize: 15,
|
|
3690
3690
|
},
|
|
@@ -3710,7 +3710,7 @@ var CreateShift = function (_a) {
|
|
|
3710
3710
|
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
|
3711
3711
|
var _e = useState(false), isSubmitLoading = _e[0], setIsSubmitLoading = _e[1];
|
|
3712
3712
|
var _f = useState(""), error = _f[0], setError = _f[1];
|
|
3713
|
-
var classes = useStyles$
|
|
3713
|
+
var classes = useStyles$w();
|
|
3714
3714
|
var _g = useForm({
|
|
3715
3715
|
defaultValues: shiftSelected ? shiftSelected : INITIAL_VALUES$2,
|
|
3716
3716
|
}), control = _g.control, handleSubmit = _g.handleSubmit, reset = _g.reset, watch = _g.watch, setValue = _g.setValue, errors = _g.formState.errors;
|
|
@@ -3915,7 +3915,7 @@ var CreateShift = function (_a) {
|
|
|
3915
3915
|
React.createElement(Alert, { severity: "success", onClose: handleClose }, "The shift was created successfully"))));
|
|
3916
3916
|
};
|
|
3917
3917
|
|
|
3918
|
-
var useStyles$
|
|
3918
|
+
var useStyles$v = makeStyles(function (theme) { return ({
|
|
3919
3919
|
title: {
|
|
3920
3920
|
fontSize: 15,
|
|
3921
3921
|
},
|
|
@@ -3938,7 +3938,7 @@ var useStyles$w = makeStyles(function (theme) { return ({
|
|
|
3938
3938
|
var DeleteShift = function (_a) {
|
|
3939
3939
|
var _b;
|
|
3940
3940
|
var shiftSelected = _a.shiftSelected, show = _a.show, onHide = _a.onHide, suffixTitle = _a.suffixTitle;
|
|
3941
|
-
var classes = useStyles$
|
|
3941
|
+
var classes = useStyles$v();
|
|
3942
3942
|
var _c = useState(false), open = _c[0], setOpen = _c[1];
|
|
3943
3943
|
var _d = useState(false), isSubmitLoading = _d[0], setIsSubmitLoading = _d[1];
|
|
3944
3944
|
var _e = useState(false), deleteAlert = _e[0], setDeleteAlert = _e[1];
|
|
@@ -4086,7 +4086,7 @@ var DeleteShift = function (_a) {
|
|
|
4086
4086
|
React.createElement(Alert, { severity: "warning", onClose: handleClose }, "The shift was deleted successfully"))));
|
|
4087
4087
|
};
|
|
4088
4088
|
|
|
4089
|
-
var useStyles$
|
|
4089
|
+
var useStyles$u = makeStyles(function (theme) { return ({
|
|
4090
4090
|
title: {
|
|
4091
4091
|
fontSize: 15,
|
|
4092
4092
|
},
|
|
@@ -4109,7 +4109,7 @@ var useStyles$v = makeStyles(function (theme) { return ({
|
|
|
4109
4109
|
var EditShift = function (_a) {
|
|
4110
4110
|
var _b;
|
|
4111
4111
|
var shiftSelected = _a.shiftSelected, show = _a.show, onHide = _a.onHide, suffixTitle = _a.suffixTitle;
|
|
4112
|
-
var classes = useStyles$
|
|
4112
|
+
var classes = useStyles$u();
|
|
4113
4113
|
var _c = useState(false), open = _c[0], setOpen = _c[1];
|
|
4114
4114
|
var _d = useState(""), error = _d[0], setError = _d[1];
|
|
4115
4115
|
var _e = useState(false), isSubmitLoading = _e[0], setIsSubmitLoading = _e[1];
|
|
@@ -4385,7 +4385,7 @@ var useShiftsOptionsFunctions = function (_a) {
|
|
|
4385
4385
|
};
|
|
4386
4386
|
};
|
|
4387
4387
|
|
|
4388
|
-
var useStyles$
|
|
4388
|
+
var useStyles$t = makeStyles(function (theme) { return ({
|
|
4389
4389
|
root: {
|
|
4390
4390
|
opacity: 0,
|
|
4391
4391
|
transition: "opacity 0.1s ease-in-out",
|
|
@@ -4402,7 +4402,7 @@ var useStyles$u = makeStyles(function (theme) { return ({
|
|
|
4402
4402
|
}); });
|
|
4403
4403
|
var useTableData$4 = function (_a) {
|
|
4404
4404
|
var setShiftSelected = _a.setShiftSelected, setOpenModalEditShift = _a.setOpenModalEditShift, setOpenModalDeleteShift = _a.setOpenModalDeleteShift, showContextMenu = _a.showContextMenu;
|
|
4405
|
-
var classes = useStyles$
|
|
4405
|
+
var classes = useStyles$t();
|
|
4406
4406
|
var columnDefs = [
|
|
4407
4407
|
{
|
|
4408
4408
|
field: "PatternStart",
|
|
@@ -4490,14 +4490,14 @@ var useTableData$4 = function (_a) {
|
|
|
4490
4490
|
return { columnDefs: columnDefs };
|
|
4491
4491
|
};
|
|
4492
4492
|
|
|
4493
|
-
var useStyles$
|
|
4493
|
+
var useStyles$s = makeStyles(function (theme) { return ({
|
|
4494
4494
|
btnModal: {
|
|
4495
4495
|
display: "flex",
|
|
4496
4496
|
justifyContent: "flex-end",
|
|
4497
4497
|
},
|
|
4498
4498
|
}); });
|
|
4499
4499
|
var TableShiftsCrews = function () {
|
|
4500
|
-
var classes = useStyles$
|
|
4500
|
+
var classes = useStyles$s();
|
|
4501
4501
|
var gridRef = useRef(null);
|
|
4502
4502
|
var _a = useState(""); _a[0]; var setError = _a[1];
|
|
4503
4503
|
var _b = useState(false), openModalNew = _b[0], setOpenModalNew = _b[1];
|
|
@@ -5108,22 +5108,7 @@ var AssetSearchInput = function (_a) {
|
|
|
5108
5108
|
} }))); })))));
|
|
5109
5109
|
};
|
|
5110
5110
|
|
|
5111
|
-
var
|
|
5112
|
-
treePickerWrapper: {
|
|
5113
|
-
"& .MuiGrid-root.MuiGrid-container": {
|
|
5114
|
-
"& .MuiGrid-item": {
|
|
5115
|
-
"& .MuiFormControl-root": {
|
|
5116
|
-
"& .MuiInputBase-root": {
|
|
5117
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
5118
|
-
border: "2px solid #3F51B5",
|
|
5119
|
-
},
|
|
5120
|
-
},
|
|
5121
|
-
},
|
|
5122
|
-
},
|
|
5123
|
-
},
|
|
5124
|
-
},
|
|
5125
|
-
}); });
|
|
5126
|
-
var buildTreeAssets$2 = function (nodes) {
|
|
5111
|
+
var buildTreeAssets$1 = function (nodes) {
|
|
5127
5112
|
//tree build functions
|
|
5128
5113
|
var idMapping = nodes.reduce(function (acc, el, i) {
|
|
5129
5114
|
// console.log(acc)
|
|
@@ -5148,11 +5133,12 @@ var buildTreeAssets$2 = function (nodes) {
|
|
|
5148
5133
|
return root;
|
|
5149
5134
|
};
|
|
5150
5135
|
var AssetTreePicker = function (_a) {
|
|
5151
|
-
var _b = _a.label, label = _b === void 0 ? "Asset" : _b, value = _a.value, onChange = _a.onChange, disabled = _a.disabled, fieldError = _a.fieldError;
|
|
5152
|
-
var
|
|
5153
|
-
var
|
|
5154
|
-
var
|
|
5155
|
-
|
|
5136
|
+
var _b = _a.label, label = _b === void 0 ? "Asset" : _b, value = _a.value, onChange = _a.onChange, disabled = _a.disabled, fieldError = _a.fieldError, _c = _a.filterAssets, filterAssets = _c === void 0 ? false : _c;
|
|
5137
|
+
var _d = useState(""), error = _d[0], setError = _d[1];
|
|
5138
|
+
var _e = searchAssets(), data = _e.data, isLoading = _e.isLoading, e = _e.error, isError = _e.isError;
|
|
5139
|
+
var rowsMapped = (Array.isArray(data) ? data : [])
|
|
5140
|
+
.filter(function (a) { return !filterAssets || a.CanBeDefaultAsset; })
|
|
5141
|
+
.map(function (a) {
|
|
5156
5142
|
return ({
|
|
5157
5143
|
id: a.AssetId,
|
|
5158
5144
|
parentId: a.ParentAssetId,
|
|
@@ -5162,7 +5148,7 @@ var AssetTreePicker = function (_a) {
|
|
|
5162
5148
|
children: [],
|
|
5163
5149
|
});
|
|
5164
5150
|
});
|
|
5165
|
-
var assetTree = buildTreeAssets$
|
|
5151
|
+
var assetTree = buildTreeAssets$1(rowsMapped || []);
|
|
5166
5152
|
useEffect(function () {
|
|
5167
5153
|
if (e && isError) {
|
|
5168
5154
|
setError(e.message);
|
|
@@ -5175,12 +5161,11 @@ var AssetTreePicker = function (_a) {
|
|
|
5175
5161
|
}
|
|
5176
5162
|
else {
|
|
5177
5163
|
return (React__default.createElement(React__default.Fragment, null,
|
|
5178
|
-
React__default.createElement(
|
|
5179
|
-
React__default.createElement(
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
fieldError && (React__default.createElement(FormHelperText, null, fieldError.message)))),
|
|
5164
|
+
React__default.createElement(FormControl, { error: !!fieldError, fullWidth: true },
|
|
5165
|
+
React__default.createElement(TreePickerControlV2, { inputTitle: label, title: label, dataSource: assetTree, value: value || 0, onSelect: function (value) {
|
|
5166
|
+
onChange(value);
|
|
5167
|
+
}, allowSearch: true, selectBranch: true, selectActive: false, selectInternal: false, disabled: disabled }),
|
|
5168
|
+
fieldError && React__default.createElement(FormHelperText, null, fieldError.message)),
|
|
5184
5169
|
React__default.createElement(ErrorModal, { error: error, onHide: function () { return setError(""); } })));
|
|
5185
5170
|
}
|
|
5186
5171
|
};
|
|
@@ -15024,7 +15009,7 @@ var upsertEntry = function (_a) { return __awaiter(void 0, [_a], void 0, functio
|
|
|
15024
15009
|
},
|
|
15025
15010
|
{ name: "Author", value: author },
|
|
15026
15011
|
];
|
|
15027
|
-
if (assetId) {
|
|
15012
|
+
if (assetId || assetId === 0) {
|
|
15028
15013
|
parameters.push({ name: "AssetId", value: assetId });
|
|
15029
15014
|
}
|
|
15030
15015
|
return [4 /*yield*/, apiService.callV2("[LB].[UpsertEntry]", parameters)];
|
|
@@ -15326,7 +15311,7 @@ var AssetsFilter = function (_a) {
|
|
|
15326
15311
|
if (newValue) {
|
|
15327
15312
|
onChange((_a = newValue.value) !== null && _a !== void 0 ? _a : null);
|
|
15328
15313
|
}
|
|
15329
|
-
}, getOptionLabel: function (option) { return option.label; }, disabled: isLoading || disabled, disablePortal: true, disableClearable: true, renderInput: function (params) { return (React__default.createElement(TextField$1, __assign({}, params, { label: label, variant: "outlined", size: "small", fullWidth: true }))); } }),
|
|
15314
|
+
}, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { return option.value === value.value; }, renderOption: function (props, option) { return (React__default.createElement("li", __assign({}, props, { key: option.value }), option.label)); }, disabled: isLoading || disabled, disablePortal: true, disableClearable: true, renderInput: function (params) { return (React__default.createElement(TextField$1, __assign({}, params, { label: label, variant: "outlined", size: "small", fullWidth: true }))); } }),
|
|
15330
15315
|
React__default.createElement(ErrorModal, { error: error, onHide: function () { return setError(""); } })));
|
|
15331
15316
|
};
|
|
15332
15317
|
|
|
@@ -16204,11 +16189,12 @@ var useEntryViewerStyles$1 = makeStyles(function (theme) { return ({
|
|
|
16204
16189
|
},
|
|
16205
16190
|
paper: {
|
|
16206
16191
|
width: "100%",
|
|
16207
|
-
height: "
|
|
16192
|
+
height: "101.3%",
|
|
16208
16193
|
display: "flex",
|
|
16209
16194
|
flexDirection: "column",
|
|
16210
16195
|
padding: "20px 20px 10px",
|
|
16211
16196
|
overflowX: "hidden",
|
|
16197
|
+
marginTop: -8,
|
|
16212
16198
|
},
|
|
16213
16199
|
inputEditable: {
|
|
16214
16200
|
"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline": {
|
|
@@ -16220,8 +16206,10 @@ var useEntryViewerStyles$1 = makeStyles(function (theme) { return ({
|
|
|
16220
16206
|
|
|
16221
16207
|
var moment$4 = getMomentTz();
|
|
16222
16208
|
var EntryViewer$1 = function (_a) {
|
|
16223
|
-
var entry = _a.entry, show = _a.show, onChangeShow = _a.onChangeShow, onHide = _a.onHide, canEditAsset = _a.canEditAsset, canEditShift = _a.canEditShift, filterAssets = _a.filterAssets, allowAttachments = _a.allowAttachments, shiftsRange = _a.shiftsRange;
|
|
16209
|
+
var entry = _a.entry, show = _a.show, onChangeShow = _a.onChangeShow, onHide = _a.onHide, preselectedAssetId = _a.preselectedAssetId, withAssetFilter = _a.withAssetFilter, canEditAsset = _a.canEditAsset, canEditShift = _a.canEditShift, filterAssets = _a.filterAssets, allowAttachments = _a.allowAttachments, shiftsRange = _a.shiftsRange;
|
|
16224
16210
|
var classes = useEntryViewerStyles$1();
|
|
16211
|
+
var settings = useUTLSettingsContext().state.settings;
|
|
16212
|
+
var defaultAssetId = Number(get(settings, "DefaultAssetId", 15));
|
|
16225
16213
|
var shiftIdParam = useParams().shiftId;
|
|
16226
16214
|
var searchParams = useSearchParams()[0];
|
|
16227
16215
|
var entryId = searchParams.get("entryId");
|
|
@@ -16307,12 +16295,16 @@ var EntryViewer$1 = function (_a) {
|
|
|
16307
16295
|
});
|
|
16308
16296
|
}); };
|
|
16309
16297
|
useEffect(function () {
|
|
16310
|
-
var _a, _b;
|
|
16298
|
+
var _a, _b, _c;
|
|
16311
16299
|
if (shiftInfo || !isNewEntry) {
|
|
16312
|
-
var newEntry = __assign(__assign({}, ENTRY_INITIAL_VALUES), { ShiftId: shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId, Shift: (_a = shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShift) !== null && _a !== void 0 ? _a : "", Crew: (_b = shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentCrew) !== null && _b !== void 0 ? _b : "", CreateTimestamp: new Date() });
|
|
16300
|
+
var newEntry = __assign(__assign({}, ENTRY_INITIAL_VALUES), { ShiftId: shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId, Shift: (_a = shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShift) !== null && _a !== void 0 ? _a : "", Crew: (_b = shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentCrew) !== null && _b !== void 0 ? _b : "", CreateTimestamp: new Date(), AssetId: (_c = preselectedAssetId !== null && preselectedAssetId !== void 0 ? preselectedAssetId : defaultAssetId) !== null && _c !== void 0 ? _c : null });
|
|
16313
16301
|
reset((isNewEntry ? newEntry : entry) || ENTRY_INITIAL_VALUES);
|
|
16314
16302
|
}
|
|
16315
|
-
}, [entry, shiftInfo, entryId, reset]);
|
|
16303
|
+
}, [entry, shiftInfo, entryId, reset, defaultAssetId]);
|
|
16304
|
+
useEffect(function () {
|
|
16305
|
+
var _a;
|
|
16306
|
+
setValue("AssetId", (_a = preselectedAssetId !== null && preselectedAssetId !== void 0 ? preselectedAssetId : defaultAssetId) !== null && _a !== void 0 ? _a : null);
|
|
16307
|
+
}, [preselectedAssetId, defaultAssetId]);
|
|
16316
16308
|
return (React__default.createElement(React__default.Fragment, null,
|
|
16317
16309
|
(isNewEntry || (entry === null || entry === void 0 ? void 0 : entry.EntryId)) && (React__default.createElement(HelmetDexteel, { title: "".concat(isNewEntry ? "New Entry" : "'".concat(entry === null || entry === void 0 ? void 0 : entry.Title, "' by ").concat(entry === null || entry === void 0 ? void 0 : entry.Author), " - Logbook Entry") })),
|
|
16318
16310
|
isNewEntry || (entry === null || entry === void 0 ? void 0 : entry.EntryId) ? (React__default.createElement(Paper, { elevation: 1, className: classes.paper },
|
|
@@ -16355,7 +16347,7 @@ var EntryViewer$1 = function (_a) {
|
|
|
16355
16347
|
justifyContent: "space-between",
|
|
16356
16348
|
margin: 0,
|
|
16357
16349
|
} },
|
|
16358
|
-
React__default.createElement(Grid, { item: true, xs: 12, md:
|
|
16350
|
+
React__default.createElement(Grid, { item: true, xs: 12, md: 3, style: { paddingLeft: 0 } },
|
|
16359
16351
|
React__default.createElement(Controller, { name: "CreateTimestamp", control: control, render: function (_a) {
|
|
16360
16352
|
var value = _a.field.value;
|
|
16361
16353
|
return (React__default.createElement(DateTimePicker, { label: "Creation Time", timezone: TimeService.getInstance().getServerTimeZone(), format: "MM/DD/YYYY HH:mm", value: value ? moment$4(value) : null, disabled: true, slotProps: {
|
|
@@ -16363,10 +16355,17 @@ var EntryViewer$1 = function (_a) {
|
|
|
16363
16355
|
variant: "outlined",
|
|
16364
16356
|
size: "small",
|
|
16365
16357
|
fullWidth: true,
|
|
16358
|
+
InputLabelProps: {
|
|
16359
|
+
shrink: true,
|
|
16360
|
+
style: {
|
|
16361
|
+
fontSize: ".875rem",
|
|
16362
|
+
marginTop: -2,
|
|
16363
|
+
},
|
|
16364
|
+
},
|
|
16366
16365
|
},
|
|
16367
16366
|
} }));
|
|
16368
16367
|
} })),
|
|
16369
|
-
canEditShift ? (React__default.createElement(Grid, { item: true, xs: 12, md:
|
|
16368
|
+
canEditShift ? (React__default.createElement(Grid, { item: true, xs: 12, md: 3 },
|
|
16370
16369
|
React__default.createElement(Controller, { name: "ShiftId", control: control, render: function (_a) {
|
|
16371
16370
|
var _b;
|
|
16372
16371
|
var field = _a.field;
|
|
@@ -16388,7 +16387,7 @@ var EntryViewer$1 = function (_a) {
|
|
|
16388
16387
|
field.onChange(null);
|
|
16389
16388
|
}
|
|
16390
16389
|
}, value: field.value, disabled: !isNewEntry && show !== "edit", shiftsRange: shiftsRange }));
|
|
16391
|
-
} }))) : (React__default.createElement(Grid, { item: true, xs: 12, md:
|
|
16390
|
+
} }))) : (React__default.createElement(Grid, { item: true, xs: 12, md: 3 },
|
|
16392
16391
|
React__default.createElement(Controller, { name: "ShiftId", control: control, render: function (_a) {
|
|
16393
16392
|
var field = _a.field;
|
|
16394
16393
|
return (React__default.createElement(ShiftSelector, { onChange: field.onChange, value: field.value, disabled: true }));
|
|
@@ -16400,11 +16399,15 @@ var EntryViewer$1 = function (_a) {
|
|
|
16400
16399
|
var _b = _a.field, value = _b.value, onChange = _b.onChange, error = _a.fieldState.error;
|
|
16401
16400
|
return (React__default.createElement(TextField, { label: "Author", variant: "outlined", value: value !== null && value !== void 0 ? value : "", onChange: onChange, fullWidth: true, error: !!error, helperText: error === null || error === void 0 ? void 0 : error.message, disabled: !isNewEntry, size: "small" }));
|
|
16402
16401
|
} })),
|
|
16403
|
-
canEditAsset
|
|
16402
|
+
canEditAsset ? (withAssetFilter === "tree" ? (React__default.createElement(Grid, { item: true, md: 4, xs: 12, style: { marginTop: -8 } },
|
|
16403
|
+
React__default.createElement(Controller, { name: "AssetId", control: control, render: function (_a) {
|
|
16404
|
+
var field = _a.field;
|
|
16405
|
+
return (React__default.createElement(AssetTreePicker, { label: "Asset", value: field.value || 0, onChange: field.onChange }));
|
|
16406
|
+
} }))) : withAssetFilter === "selector" ? (React__default.createElement(Grid, { item: true, md: 4, xs: 12 },
|
|
16404
16407
|
React__default.createElement(Controller, { name: "AssetId", control: control, render: function (_a) {
|
|
16405
16408
|
var field = _a.field;
|
|
16406
16409
|
return (React__default.createElement(AssetsFilter, { value: field.value, onChange: field.onChange, filterAreaAssets: filterAssets === "area" }));
|
|
16407
|
-
} })))),
|
|
16410
|
+
} }))) : null) : null),
|
|
16408
16411
|
React__default.createElement(Grid, { container: true, item: true, xs: 12, className: !isNewEntry ? classes.inputEditable : "", style: {
|
|
16409
16412
|
flexGrow: 1,
|
|
16410
16413
|
height: "calc(100% - 200px)",
|
|
@@ -16445,26 +16448,6 @@ var EntryViewer$1 = function (_a) {
|
|
|
16445
16448
|
React__default.createElement(ErrorModal, { error: error, onHide: function () { return setError(""); } })));
|
|
16446
16449
|
};
|
|
16447
16450
|
|
|
16448
|
-
var buildTreeAssets$1 = function (nodes) {
|
|
16449
|
-
if (nodes === undefined)
|
|
16450
|
-
return;
|
|
16451
|
-
var idMapping = nodes.reduce(function (acc, el, i) {
|
|
16452
|
-
acc[el === null || el === void 0 ? void 0 : el.id] = i;
|
|
16453
|
-
return acc;
|
|
16454
|
-
}, {});
|
|
16455
|
-
var root;
|
|
16456
|
-
nodes.forEach(function (el) {
|
|
16457
|
-
if ((el === null || el === void 0 ? void 0 : el.parentId) === null) {
|
|
16458
|
-
root = el;
|
|
16459
|
-
return;
|
|
16460
|
-
}
|
|
16461
|
-
var parentEl = nodes[idMapping[el.parentId]];
|
|
16462
|
-
if (parentEl) {
|
|
16463
|
-
parentEl.children = __spreadArray(__spreadArray([], ((parentEl === null || parentEl === void 0 ? void 0 : parentEl.children) || []), true), [el], false);
|
|
16464
|
-
}
|
|
16465
|
-
});
|
|
16466
|
-
return root;
|
|
16467
|
-
};
|
|
16468
16451
|
var Filters$1 = function (_a) {
|
|
16469
16452
|
var withAssetFilter = _a.withAssetFilter, filterAssets = _a.filterAssets, assetId = _a.assetId, _b = _a.setAssetId, setAssetId = _b === void 0 ? function () { } : _b, quickFilter = _a.quickFilter, onQuickFilterChange = _a.onQuickFilterChange;
|
|
16470
16453
|
useMesfRealtime({
|
|
@@ -16472,19 +16455,6 @@ var Filters$1 = function (_a) {
|
|
|
16472
16455
|
if (message.replaceAll("[", "").replaceAll("]", "") == "LB.GetEntries") ;
|
|
16473
16456
|
},
|
|
16474
16457
|
});
|
|
16475
|
-
var _c = useAssets(), data = _c.data; _c.isLoading;
|
|
16476
|
-
var rowsMapped = (Array.isArray(data) ? data : [])
|
|
16477
|
-
.filter(function (a) { return filterAssets !== "area" || a.CanBeDefaultAsset; })
|
|
16478
|
-
.map(function (a) {
|
|
16479
|
-
return ({
|
|
16480
|
-
id: a.AssetId,
|
|
16481
|
-
name: a.AssetName,
|
|
16482
|
-
parentId: a.ParentAssetId,
|
|
16483
|
-
isLeaf: a.IsLeaf,
|
|
16484
|
-
isActive: true,
|
|
16485
|
-
});
|
|
16486
|
-
});
|
|
16487
|
-
var assets = buildTreeAssets$1(rowsMapped || []);
|
|
16488
16458
|
return (React__default.createElement(Grid, { container: true, justifyContent: "center", alignItems: "center", component: Paper, spacing: 2, style: {
|
|
16489
16459
|
display: "flex",
|
|
16490
16460
|
width: "100%",
|
|
@@ -16497,12 +16467,12 @@ var Filters$1 = function (_a) {
|
|
|
16497
16467
|
alignItems: "center",
|
|
16498
16468
|
} },
|
|
16499
16469
|
React__default.createElement(ShiftDayNavigatorControl, { preventInit: true, withPaper: false, margin: "0.5rem 1rem 0rem" })),
|
|
16500
|
-
withAssetFilter === "tree" &&
|
|
16470
|
+
withAssetFilter === "tree" && (React__default.createElement(Grid, { item: true, xs: 12, md: 4, style: {
|
|
16501
16471
|
alignItems: "center",
|
|
16502
16472
|
justifyContent: "center",
|
|
16503
16473
|
marginTop: 6,
|
|
16504
16474
|
} },
|
|
16505
|
-
React__default.createElement(
|
|
16475
|
+
React__default.createElement(AssetTreePicker, { label: "Asset", value: assetId || 0, onChange: function (value) { return setAssetId(value !== null && value !== void 0 ? value : null); }, filterAssets: filterAssets === "area" }))),
|
|
16506
16476
|
withAssetFilter === "selector" && (React__default.createElement(Grid, { item: true, xs: 12, md: 4, style: {
|
|
16507
16477
|
alignItems: "center",
|
|
16508
16478
|
justifyContent: "center",
|
|
@@ -16752,7 +16722,7 @@ var Logbook$1 = function () {
|
|
|
16752
16722
|
React__default.createElement(Filters$1, { withAssetFilter: withAssetFilter, filterAssets: filterAssets, quickFilter: quickFilter, onQuickFilterChange: onQuickFilterChange, assetId: assetId, setAssetId: setAssetId })),
|
|
16753
16723
|
React__default.createElement(Grid, { item: true, xs: 12 },
|
|
16754
16724
|
React__default.createElement(Paper, { elevation: 1, style: {
|
|
16755
|
-
height: "
|
|
16725
|
+
height: "62vh",
|
|
16756
16726
|
width: "100%",
|
|
16757
16727
|
} },
|
|
16758
16728
|
React__default.createElement(AgGridReact, { loading: isLoading, rowData: rows, columnDefs: columnDefs, defaultColDef: defaultColDef, rowHeight: 38, headerHeight: 42, loadingOverlayComponent: CenteredLazyLoading, animateRows: true, getContextMenuItems: getContextMenuItems, onRowClicked: rowClicked, onCellKeyDown: onCellKeyDown, onGridReady: function (params) { return (gridApiRef.current = params.api); }, getRowId: function (params) { return "".concat(params.data.EntryId); }, gridOptions: {
|
|
@@ -16790,7 +16760,7 @@ var Logbook$1 = function () {
|
|
|
16790
16760
|
: "/logbook/entry/".concat(shiftId || (shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId), "?entryId=").concat(entryId, "&action=view");
|
|
16791
16761
|
navigate(targetUrl);
|
|
16792
16762
|
}
|
|
16793
|
-
}, canEditAsset: canEditAsset, canEditShift: canEditShift, filterAssets: filterAssets, allowAttachments: allowAttachments, shiftsRange: shiftsRange, onHide: function (entryId, shouldStayInEditMode) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16763
|
+
}, preselectedAssetId: assetId, withAssetFilter: withAssetFilter, canEditAsset: canEditAsset, canEditShift: canEditShift, filterAssets: filterAssets, allowAttachments: allowAttachments, shiftsRange: shiftsRange, onHide: function (entryId, shouldStayInEditMode) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16794
16764
|
var targetUrl;
|
|
16795
16765
|
var _a;
|
|
16796
16766
|
return __generator(this, function (_b) {
|