@dexteel/mesf-core 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/MESFMain.d.ts +3 -1
- package/dist/context/LogbookSettingsContext.d.ts +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +130 -52
- package/dist/index.esm.js.map +1 -1
- package/dist/pages/logbook/entry/LogbookPage.d.ts +1 -11
- package/dist/pages/logbook/entry/components/Logbook.d.ts +1 -11
- package/dist/pages/logbook/entry/index.d.ts +1 -11
- package/dist/pages/logbook/index.d.ts +14 -0
- package/dist/pages/logbook/report/LogbookPage.d.ts +1 -8
- package/dist/pages/logbook/report/components/Logbook.d.ts +1 -8
- package/dist/pages/logbook/report/index.d.ts +1 -8
- package/dist/reducers/LogbookSettingsReducer.d.ts +24 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **logbook:** simplify settings context and remove duplicate providers ([#482](https://github.com/dexteel/mesf-core-frontend/issues/482)) ([20c0dec](https://github.com/dexteel/mesf-core-frontend/commit/20c0dec12c13173a8ea75a76fd1817adc0662947))
|
|
9
|
+
|
|
10
|
+
## [6.0.0] - 2025-09-30
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
# Changelog
|
|
2
15
|
|
|
3
16
|
## [6.0.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v5.14.1...@dexteel/mesf-core-v6.0.0) (2025-09-30)
|
package/dist/MESFMain.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
2
|
import { ConfigurationsType } from "./configurationMenu";
|
|
3
|
+
import type { LogbookSettingsState } from "./reducers/LogbookSettingsReducer";
|
|
3
4
|
interface Props {
|
|
4
5
|
authentication: any;
|
|
5
6
|
routes: ReactNode;
|
|
@@ -11,6 +12,7 @@ interface Props {
|
|
|
11
12
|
byPassHeaderRoutes?: string[];
|
|
12
13
|
plantAssetId?: number;
|
|
13
14
|
theme?: any;
|
|
15
|
+
logbookSettings?: Partial<LogbookSettingsState>;
|
|
14
16
|
}
|
|
15
|
-
declare function MESFMain({ authentication, routes, navbar, navbarTitle, configurations, showAreaSelector, showTrendingsIcon, byPassHeaderRoutes, plantAssetId, theme, }: Props): React.JSX.Element;
|
|
17
|
+
declare function MESFMain({ authentication, routes, navbar, navbarTitle, configurations, showAreaSelector, showTrendingsIcon, byPassHeaderRoutes, plantAssetId, theme, logbookSettings, }: Props): React.JSX.Element;
|
|
16
18
|
export { MESFMain };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React, type ReactNode } from "react";
|
|
2
|
+
import { type LogbookSettingsState } from "../reducers/LogbookSettingsReducer";
|
|
3
|
+
export declare const useLogbookSettings: () => LogbookSettingsState;
|
|
4
|
+
export declare const LogbookSettingsProvider: ({ children, logbookSettings, }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
logbookSettings?: Partial<LogbookSettingsState>;
|
|
7
|
+
}) => React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,10 @@ export * from "./configuration/pages/users/models/User";
|
|
|
10
10
|
export * from "./configuration/pages/users/repositories/UsersRepository";
|
|
11
11
|
export * from "./context/assetContext";
|
|
12
12
|
export * from "./context/axiosInstance";
|
|
13
|
+
export * from "./context/LogbookSettingsContext";
|
|
13
14
|
export * from "./context/userContext";
|
|
14
15
|
export * from "./context/UTLSettingContext";
|
|
16
|
+
export * from "./reducers/LogbookSettingsReducer";
|
|
15
17
|
export * from "./controls";
|
|
16
18
|
export * from "./css/themeMESF";
|
|
17
19
|
export { HelmetDexteel } from "./helmet/HelmetDexteel";
|
|
@@ -21,6 +23,7 @@ export { MESFLogbookEntry } from "./pages/logbook/entry/index";
|
|
|
21
23
|
export { routeLogbookEntry } from "./pages/logbook/entry/LogbookPage";
|
|
22
24
|
export { MESFLogbookReport } from "./pages/logbook/report/index";
|
|
23
25
|
export { routeLogbookReport } from "./pages/logbook/report/LogbookPage";
|
|
26
|
+
export { logbookRoutesMESF, logbookNavbar } from "./pages/logbook";
|
|
24
27
|
export * from "./pages/trendings/TrendingsPage";
|
|
25
28
|
export * from "./services";
|
|
26
29
|
export * from "./utils";
|
package/dist/index.esm.js
CHANGED
|
@@ -10180,6 +10180,39 @@ var ButtonWithLoading = function (_a) {
|
|
|
10180
10180
|
children));
|
|
10181
10181
|
};
|
|
10182
10182
|
|
|
10183
|
+
var LogbookSettingsInitialState = {
|
|
10184
|
+
entry: {
|
|
10185
|
+
withAssetFilter: "tree",
|
|
10186
|
+
filterAssets: undefined,
|
|
10187
|
+
canEditAsset: true,
|
|
10188
|
+
allowAttachments: true,
|
|
10189
|
+
canEditShift: true,
|
|
10190
|
+
showShiftCrew: true,
|
|
10191
|
+
exportToExcel: true,
|
|
10192
|
+
shiftsRange: 7,
|
|
10193
|
+
},
|
|
10194
|
+
report: {
|
|
10195
|
+
withAssetFilter: "tree",
|
|
10196
|
+
filterAssets: undefined,
|
|
10197
|
+
showAttachments: true,
|
|
10198
|
+
showAsset: true,
|
|
10199
|
+
showShiftCrew: true,
|
|
10200
|
+
exportToExcel: true,
|
|
10201
|
+
},
|
|
10202
|
+
};
|
|
10203
|
+
|
|
10204
|
+
var LogbookSettingsContext = createContext(LogbookSettingsInitialState);
|
|
10205
|
+
var useLogbookSettings = function () { return useContext(LogbookSettingsContext); };
|
|
10206
|
+
var LogbookSettingsProvider = function (_a) {
|
|
10207
|
+
var children = _a.children, _b = _a.logbookSettings, logbookSettings = _b === void 0 ? {} : _b;
|
|
10208
|
+
// Merge default settings with provided settings
|
|
10209
|
+
var settings = useMemo(function () { return ({
|
|
10210
|
+
entry: __assign(__assign({}, LogbookSettingsInitialState.entry), (logbookSettings.entry || {})),
|
|
10211
|
+
report: __assign(__assign({}, LogbookSettingsInitialState.report), (logbookSettings.report || {})),
|
|
10212
|
+
}); }, [logbookSettings]);
|
|
10213
|
+
return (React__default.createElement(LogbookSettingsContext.Provider, { value: settings }, children));
|
|
10214
|
+
};
|
|
10215
|
+
|
|
10183
10216
|
var useSettingsOptionsFunctions = function (_a) {
|
|
10184
10217
|
var setSettingId = _a.setSettingId, setShowDeleteModal = _a.setShowDeleteModal, setShowCreateModal = _a.setShowCreateModal, setShowEditModal = _a.setShowEditModal;
|
|
10185
10218
|
var getMenuOptions = function (data) {
|
|
@@ -14691,7 +14724,7 @@ var queryClient = new QueryClient({
|
|
|
14691
14724
|
},
|
|
14692
14725
|
});
|
|
14693
14726
|
function MESFMain(_a) {
|
|
14694
|
-
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, _e = _a.byPassHeaderRoutes, byPassHeaderRoutes = _e === void 0 ? [] : _e, _f = _a.plantAssetId, plantAssetId = _f === void 0 ? 1 : _f, _g = _a.theme, theme = _g === void 0 ? themeMESF : _g;
|
|
14727
|
+
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, _e = _a.byPassHeaderRoutes, byPassHeaderRoutes = _e === void 0 ? [] : _e, _f = _a.plantAssetId, plantAssetId = _f === void 0 ? 1 : _f, _g = _a.theme, theme = _g === void 0 ? themeMESF : _g, _h = _a.logbookSettings, logbookSettings = _h === void 0 ? {} : _h;
|
|
14695
14728
|
return (React__default.createElement(React__default.Fragment, null,
|
|
14696
14729
|
React__default.createElement(CssBaseline, null),
|
|
14697
14730
|
React__default.createElement(HelmetProvider, null,
|
|
@@ -14703,16 +14736,17 @@ function MESFMain(_a) {
|
|
|
14703
14736
|
React__default.createElement(UserProvider, null,
|
|
14704
14737
|
React__default.createElement(UTLSettingsProvider, null,
|
|
14705
14738
|
React__default.createElement(ProvidersLoader, null,
|
|
14706
|
-
React__default.createElement(
|
|
14707
|
-
React__default.createElement(
|
|
14708
|
-
React__default.createElement(
|
|
14709
|
-
React__default.createElement(
|
|
14710
|
-
React__default.createElement(
|
|
14711
|
-
React__default.createElement(
|
|
14712
|
-
React__default.createElement(
|
|
14713
|
-
React__default.createElement(
|
|
14714
|
-
React__default.createElement(
|
|
14715
|
-
|
|
14739
|
+
React__default.createElement(LogbookSettingsProvider, { logbookSettings: logbookSettings },
|
|
14740
|
+
React__default.createElement(AssetProvider, { plantAssetId: plantAssetId },
|
|
14741
|
+
React__default.createElement(RouterContext.Provider, { value: routes },
|
|
14742
|
+
React__default.createElement(NavbarContext.Provider, { value: navbar },
|
|
14743
|
+
React__default.createElement(ConfigurationContext.Provider, { value: configurations },
|
|
14744
|
+
React__default.createElement(ShiftNavigatorProvider, null,
|
|
14745
|
+
React__default.createElement(ContextMenuMESFProvider, null,
|
|
14746
|
+
React__default.createElement(BrowserRouter, { basename: base },
|
|
14747
|
+
React__default.createElement(Routes, null,
|
|
14748
|
+
React__default.createElement(Route, { path: "/logout", element: React__default.createElement(Logout, null) })),
|
|
14749
|
+
React__default.createElement(Navigation, { showAreaSelector: showAreaSelector, showTrendingsIcon: showTrendingsIcon, navbarTitle: navbarTitle, byPassHeaderRoutes: byPassHeaderRoutes }))))))))))))))))))));
|
|
14716
14750
|
}
|
|
14717
14751
|
|
|
14718
14752
|
var ExcelButton = function (_a) {
|
|
@@ -15377,7 +15411,7 @@ var getShiftsAroundCurrent = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
15377
15411
|
if (shiftsRange) {
|
|
15378
15412
|
parameters.push({ name: "ShiftsRange", value: shiftsRange });
|
|
15379
15413
|
}
|
|
15380
|
-
return [4 /*yield*/, apiService.callV2("[
|
|
15414
|
+
return [4 /*yield*/, apiService.callV2("[MES].[GetShiftsAroundCurrent]", parameters)];
|
|
15381
15415
|
case 1:
|
|
15382
15416
|
resp = _c.sent();
|
|
15383
15417
|
if (resp.ok) {
|
|
@@ -16488,28 +16522,37 @@ var Filters$1 = function (_a) {
|
|
|
16488
16522
|
};
|
|
16489
16523
|
|
|
16490
16524
|
var moment$3 = getMomentTz();
|
|
16491
|
-
var Logbook$1 = function (
|
|
16492
|
-
var
|
|
16525
|
+
var Logbook$1 = function () {
|
|
16526
|
+
var entry = useLogbookSettings().entry;
|
|
16527
|
+
var withAssetFilter = entry.withAssetFilter;
|
|
16528
|
+
var filterAssets = entry.filterAssets;
|
|
16529
|
+
var canEditAsset = entry.canEditAsset;
|
|
16530
|
+
var presetAssetId = entry.presetAssetId;
|
|
16531
|
+
var allowAttachments = entry.allowAttachments;
|
|
16532
|
+
var canEditShift = entry.canEditShift;
|
|
16533
|
+
var showShiftCrew = entry.showShiftCrew;
|
|
16534
|
+
var exportToExcel = entry.exportToExcel;
|
|
16535
|
+
var shiftsRange = entry.shiftsRange;
|
|
16493
16536
|
var navigate = useNavigate();
|
|
16494
16537
|
var searchParams = useSearchParams()[0];
|
|
16495
16538
|
var entryId = searchParams.get("entryId");
|
|
16496
16539
|
var action = searchParams.get("action");
|
|
16497
16540
|
var shiftId = useParams().shiftId;
|
|
16498
|
-
var
|
|
16541
|
+
var _a = useShiftNavigator(), shiftInfo = _a.shiftInfo, getShiftDataFromAPI = _a.getShiftDataFromAPI;
|
|
16499
16542
|
var isEditMode = action === "edit";
|
|
16500
16543
|
var shiftIdRef = useRef(null);
|
|
16501
16544
|
var gridApiRef = useRef(null);
|
|
16502
|
-
var
|
|
16503
|
-
var
|
|
16504
|
-
var
|
|
16505
|
-
var
|
|
16506
|
-
var
|
|
16507
|
-
var
|
|
16508
|
-
var
|
|
16509
|
-
var
|
|
16545
|
+
var _b = useState(""), error = _b[0], setError = _b[1];
|
|
16546
|
+
var _c = useState(""), show = _c[0], setShow = _c[1];
|
|
16547
|
+
var _d = useState(""), quickFilter = _d[0], setQuickFilter = _d[1];
|
|
16548
|
+
var _e = useState(presetAssetId !== null && presetAssetId !== void 0 ? presetAssetId : null), assetId = _e[0], setAssetId = _e[1];
|
|
16549
|
+
var _f = useState(null), selectedRowData = _f[0], setSelectedRowData = _f[1];
|
|
16550
|
+
var _g = useState(false), showRemoveDialog = _g[0], setShowRemoveDialog = _g[1];
|
|
16551
|
+
var _h = useContextMenuMESF(), registerConfig = _h.registerConfig, showContextMenu = _h.showContextMenu;
|
|
16552
|
+
var _j = useEntries({
|
|
16510
16553
|
shiftId: shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId,
|
|
16511
16554
|
assetId: withAssetFilter ? assetId : undefined,
|
|
16512
|
-
}), rows =
|
|
16555
|
+
}), rows = _j.data, isLoading = _j.isLoading, e = _j.error, isError = _j.isError, refetch = _j.refetch;
|
|
16513
16556
|
var columnDefs = useTableData$1({
|
|
16514
16557
|
showContextMenu: showContextMenu,
|
|
16515
16558
|
allowAttachments: allowAttachments,
|
|
@@ -16533,8 +16576,9 @@ var Logbook$1 = function (_a) {
|
|
|
16533
16576
|
};
|
|
16534
16577
|
var rowClicked = function (event) {
|
|
16535
16578
|
var _a;
|
|
16579
|
+
var currentShiftId = shiftId || (shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId);
|
|
16536
16580
|
setSelectedRowData(event === null || event === void 0 ? void 0 : event.data);
|
|
16537
|
-
navigate("".concat(routeLogbookEntry, "/").concat(
|
|
16581
|
+
navigate("".concat(routeLogbookEntry, "/").concat(currentShiftId, "?entryId=").concat((_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.EntryId, "&action=view"));
|
|
16538
16582
|
setShow("view");
|
|
16539
16583
|
};
|
|
16540
16584
|
var onCellKeyDown = useCallback(function (event) {
|
|
@@ -16548,13 +16592,14 @@ var Logbook$1 = function (_a) {
|
|
|
16548
16592
|
var nextRowIndex = key === "ArrowUp" ? currentIndex - 1 : currentIndex + 1;
|
|
16549
16593
|
var nextNode = api.getDisplayedRowAtIndex(nextRowIndex);
|
|
16550
16594
|
if (nextNode) {
|
|
16595
|
+
var currentShiftId = shiftId || (shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId);
|
|
16551
16596
|
nextNode.setSelected(true);
|
|
16552
16597
|
api.ensureIndexVisible(nextRowIndex);
|
|
16553
16598
|
setSelectedRowData(nextNode.data);
|
|
16554
|
-
navigate("".concat(routeLogbookEntry, "/").concat(
|
|
16599
|
+
navigate("".concat(routeLogbookEntry, "/").concat(currentShiftId, "/?entryId=").concat(nextNode.data.EntryId, "&action=view"));
|
|
16555
16600
|
}
|
|
16556
16601
|
}
|
|
16557
|
-
}, [setSelectedRowData]);
|
|
16602
|
+
}, [setSelectedRowData, shiftId, shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentShiftId]);
|
|
16558
16603
|
var getContextMenuItems = useCallback(function (params) {
|
|
16559
16604
|
var _a, _b;
|
|
16560
16605
|
var data = (_a = params.node) === null || _a === void 0 ? void 0 : _a.data;
|
|
@@ -16826,17 +16871,15 @@ var useEntries = function (_a) {
|
|
|
16826
16871
|
});
|
|
16827
16872
|
};
|
|
16828
16873
|
var routeLogbookEntry = "/logbook/entry";
|
|
16829
|
-
var LogbookPage$1 = function (
|
|
16830
|
-
var withAssetFilter = _a.withAssetFilter, filterAssets = _a.filterAssets, canEditAsset = _a.canEditAsset, presetAssetId = _a.presetAssetId, allowAttachments = _a.allowAttachments, canEditShift = _a.canEditShift, showShiftCrew = _a.showShiftCrew, exportToExcel = _a.exportToExcel, shiftsRange = _a.shiftsRange;
|
|
16874
|
+
var LogbookPage$1 = function () {
|
|
16831
16875
|
return (React__default.createElement(React__default.Fragment, null,
|
|
16832
16876
|
React__default.createElement(HelmetDexteel, { title: "Logbook Entry" }),
|
|
16833
16877
|
React__default.createElement(Grid, { container: true, style: { padding: 20 } },
|
|
16834
|
-
React__default.createElement(Logbook$1,
|
|
16878
|
+
React__default.createElement(Logbook$1, null))));
|
|
16835
16879
|
};
|
|
16836
16880
|
|
|
16837
|
-
var MESFLogbookEntry = function (
|
|
16838
|
-
|
|
16839
|
-
return (React__default.createElement(LogbookPage$1, { withAssetFilter: withAssetFilter, filterAssets: filterAssets, canEditAsset: canEditAsset, presetAssetId: presetAssetId, allowAttachments: allowAttachments, canEditShift: canEditShift, showShiftCrew: showShiftCrew, exportToExcel: exportToExcel, shiftsRange: shiftsRange }));
|
|
16881
|
+
var MESFLogbookEntry = function () {
|
|
16882
|
+
return React__default.createElement(LogbookPage$1, null);
|
|
16840
16883
|
};
|
|
16841
16884
|
|
|
16842
16885
|
var useTableData = function (_a) {
|
|
@@ -17150,24 +17193,30 @@ var Filters = function (_a) {
|
|
|
17150
17193
|
};
|
|
17151
17194
|
|
|
17152
17195
|
var moment$1 = getMomentTz();
|
|
17153
|
-
var Logbook = function (
|
|
17154
|
-
var
|
|
17155
|
-
var
|
|
17196
|
+
var Logbook = function () {
|
|
17197
|
+
var report = useLogbookSettings().report;
|
|
17198
|
+
var withAssetFilter = report.withAssetFilter;
|
|
17199
|
+
var filterAssets = report.filterAssets;
|
|
17200
|
+
var showAttachments = report.showAttachments;
|
|
17201
|
+
var showAsset = report.showAsset;
|
|
17202
|
+
var showShiftCrew = report.showShiftCrew;
|
|
17203
|
+
var exportToExcel = report.exportToExcel;
|
|
17204
|
+
var _a = useSearchParams(), searchParams = _a[0], setSearchParams = _a[1];
|
|
17156
17205
|
var entryId = searchParams.get("entryId");
|
|
17157
17206
|
var gridApiRef = useRef(null);
|
|
17158
|
-
var
|
|
17159
|
-
var
|
|
17160
|
-
var
|
|
17161
|
-
var
|
|
17207
|
+
var _b = useState(""), error = _b[0], setError = _b[1];
|
|
17208
|
+
var _c = useState(""), show = _c[0], setShow = _c[1];
|
|
17209
|
+
var _d = useState(null), assetId = _d[0], setAssetId = _d[1];
|
|
17210
|
+
var _e = useState(function () {
|
|
17162
17211
|
var startShiftIdParam = searchParams.get("startShiftId");
|
|
17163
17212
|
var endShiftIdParam = searchParams.get("endShiftId");
|
|
17164
17213
|
return {
|
|
17165
17214
|
StartShiftId: startShiftIdParam ? Number(startShiftIdParam) : null,
|
|
17166
17215
|
EndShiftId: endShiftIdParam ? Number(endShiftIdParam) : null,
|
|
17167
17216
|
};
|
|
17168
|
-
}), shiftPeriod =
|
|
17169
|
-
var
|
|
17170
|
-
var
|
|
17217
|
+
}), shiftPeriod = _e[0], setShiftPeriod = _e[1];
|
|
17218
|
+
var _f = useState(""), quickFilter = _f[0], setQuickFilter = _f[1];
|
|
17219
|
+
var _g = useState(null), selectedRowData = _g[0], setSelectedRowData = _g[1];
|
|
17171
17220
|
var updateUrl = function (_a) {
|
|
17172
17221
|
var startShiftId = _a.startShiftId, endShiftId = _a.endShiftId, period = _a.period, entryId = _a.entryId;
|
|
17173
17222
|
var newParams = new URLSearchParams(searchParams);
|
|
@@ -17197,11 +17246,11 @@ var Logbook = function (_a) {
|
|
|
17197
17246
|
}
|
|
17198
17247
|
setSearchParams(newParams);
|
|
17199
17248
|
};
|
|
17200
|
-
var
|
|
17249
|
+
var _h = useEntriesReport({
|
|
17201
17250
|
startShiftId: shiftPeriod.StartShiftId,
|
|
17202
17251
|
endShiftId: shiftPeriod.EndShiftId,
|
|
17203
17252
|
assetId: assetId,
|
|
17204
|
-
}), rows =
|
|
17253
|
+
}), rows = _h.data, isLoading = _h.isLoading, e = _h.error, isError = _h.isError, refetch = _h.refetch;
|
|
17205
17254
|
var columnDefs = useTableData({
|
|
17206
17255
|
showAttachments: showAttachments,
|
|
17207
17256
|
showAsset: showAsset,
|
|
@@ -17415,19 +17464,48 @@ var useEntriesReport = function (_a) {
|
|
|
17415
17464
|
});
|
|
17416
17465
|
};
|
|
17417
17466
|
var routeLogbookReport = "/logbook/report";
|
|
17418
|
-
var LogbookPage = function (
|
|
17419
|
-
var withAssetFilter = _a.withAssetFilter, filterAssets = _a.filterAssets, showAttachments = _a.showAttachments, showAsset = _a.showAsset, showShiftCrew = _a.showShiftCrew, exportToExcel = _a.exportToExcel;
|
|
17467
|
+
var LogbookPage = function () {
|
|
17420
17468
|
return (React__default.createElement(React__default.Fragment, null,
|
|
17421
17469
|
React__default.createElement(HelmetDexteel, { title: "Logbook Report" }),
|
|
17422
17470
|
React__default.createElement(Grid, { container: true, style: { padding: 20 } },
|
|
17423
|
-
React__default.createElement(Logbook,
|
|
17471
|
+
React__default.createElement(Logbook, null))));
|
|
17424
17472
|
};
|
|
17425
17473
|
|
|
17426
|
-
var MESFLogbookReport = function (
|
|
17427
|
-
|
|
17428
|
-
return (React__default.createElement(LogbookPage, { withAssetFilter: withAssetFilter, filterAssets: filterAssets, showAttachments: showAttachments, showAsset: showAsset, showShiftCrew: showShiftCrew, exportToExcel: exportToExcel }));
|
|
17474
|
+
var MESFLogbookReport = function () {
|
|
17475
|
+
return React__default.createElement(LogbookPage, null);
|
|
17429
17476
|
};
|
|
17430
17477
|
|
|
17478
|
+
var logbookRoutesMESF = [
|
|
17479
|
+
{
|
|
17480
|
+
path: "/logbook/entry",
|
|
17481
|
+
element: React__default.createElement(MESFLogbookEntry),
|
|
17482
|
+
},
|
|
17483
|
+
{
|
|
17484
|
+
path: "/logbook/entry/:shiftId",
|
|
17485
|
+
element: React__default.createElement(MESFLogbookEntry),
|
|
17486
|
+
},
|
|
17487
|
+
{
|
|
17488
|
+
path: "/logbook/report",
|
|
17489
|
+
element: React__default.createElement(MESFLogbookReport),
|
|
17490
|
+
},
|
|
17491
|
+
];
|
|
17492
|
+
var logbookNavbar = [
|
|
17493
|
+
{
|
|
17494
|
+
id: "logbook",
|
|
17495
|
+
label: "Logbook",
|
|
17496
|
+
items: [
|
|
17497
|
+
{
|
|
17498
|
+
label: "Logbook Entry",
|
|
17499
|
+
to: "/logbook/entry",
|
|
17500
|
+
},
|
|
17501
|
+
{
|
|
17502
|
+
label: "Logbook Report",
|
|
17503
|
+
to: "/logbook/report",
|
|
17504
|
+
},
|
|
17505
|
+
],
|
|
17506
|
+
},
|
|
17507
|
+
];
|
|
17508
|
+
|
|
17431
17509
|
var useDefaultAreaId = function (setError) {
|
|
17432
17510
|
var _a = useUserContext(), userId = _a.state.userId, setDefaultAreaId = _a.actions.setDefaultAreaId;
|
|
17433
17511
|
var _b = searchUser({ userId: userId }), rows = _b.data, isError = _b.isError, e = _b.error;
|
|
@@ -17583,5 +17661,5 @@ var areaSelector = /*#__PURE__*/Object.freeze({
|
|
|
17583
17661
|
AreaSelector: AreaSelector
|
|
17584
17662
|
});
|
|
17585
17663
|
|
|
17586
|
-
export { Account, AssetProvider, AuthContext, AuthProvider, BarChartControl, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, ContextMenu$1 as ContextMenu, ContextMenuMESFProvider, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ErrorModal, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HelmetDexteel, IntegerFormatter, Login, Logout, LongFilterPanel, MESApiService, MESFLogbookEntry, MESFLogbookReport, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, ShiftDayNavigatorControl, ShiftNavigatorProvider, ShiftPeriodNavigatorControl, SimplePasswordControl, SimpleSelectorControl, TimeAndUserMenu, TimeFormatter, TimeService, TreePickerControl, TreePickerControlV2, TrendingsPage, USER_LABELS, UTLSettingsProvider, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getError, getMomentTz, getShiftByParameters, getShiftStyle, getShiftsRangeByParameters, getTokenFromLS, getUserPermissionsFromAPI, getUsers, renewToken, routeLogbookEntry, routeLogbookReport, searchSeries, searchTagsTree, searchViewTags, searchViews, setPassword, setProfilesToUser, themeDXT, themeMESF, upsertUser, useAssetContext, useContextMenuMESF, useHasPermission, useHasProfile, useMesfRealtime, useShiftNavigator, useShiftNavigatorManager, useStyles$i as useStyles, useToken, useUTLSettingsContext, useUserContext };
|
|
17664
|
+
export { Account, AssetProvider, AuthContext, AuthProvider, BarChartControl, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, ContextMenu$1 as ContextMenu, ContextMenuMESFProvider, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ErrorModal, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HelmetDexteel, IntegerFormatter, LogbookSettingsInitialState, LogbookSettingsProvider, Login, Logout, LongFilterPanel, MESApiService, MESFLogbookEntry, MESFLogbookReport, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, ShiftDayNavigatorControl, ShiftNavigatorProvider, ShiftPeriodNavigatorControl, SimplePasswordControl, SimpleSelectorControl, TimeAndUserMenu, TimeFormatter, TimeService, TreePickerControl, TreePickerControlV2, TrendingsPage, USER_LABELS, UTLSettingsProvider, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getError, getMomentTz, getShiftByParameters, getShiftStyle, getShiftsRangeByParameters, getTokenFromLS, getUserPermissionsFromAPI, getUsers, logbookNavbar, logbookRoutesMESF, renewToken, routeLogbookEntry, routeLogbookReport, searchSeries, searchTagsTree, searchViewTags, searchViews, setPassword, setProfilesToUser, themeDXT, themeMESF, upsertUser, useAssetContext, useContextMenuMESF, useHasPermission, useHasProfile, useLogbookSettings, useMesfRealtime, useShiftNavigator, useShiftNavigatorManager, useStyles$i as useStyles, useToken, useUTLSettingsContext, useUserContext };
|
|
17587
17665
|
//# sourceMappingURL=index.esm.js.map
|