sevago-sso-fe 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +1 -0
- package/dist/components/sidebar/apps-sidebar.component.d.ts +7 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/use-apps.hook.d.ts +1 -1
- package/dist/hooks/user-sidebar.d.ts +1 -0
- package/dist/index.cjs.js +423 -494
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +426 -497
- package/dist/index.esm.js.map +1 -1
- package/dist/pages/dashboard/parts/index.d.ts +1 -1
- package/dist/pages/dashboard/parts/monitor/index.d.ts +1 -0
- package/dist/pages/dashboard/parts/sidebar/index.d.ts +2 -0
- package/dist/pages/dashboard/parts/sidebar/sidebar.context.d.ts +10 -0
- package/dist/pages/dashboard/parts/sidebar/sidebar.provider.d.ts +4 -0
- package/package.json +4 -4
- /package/dist/pages/dashboard/parts/{monitor.part.d.ts → monitor/monitor.part.d.ts} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -2,8 +2,9 @@ import { persistReducer, FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER, pers
|
|
|
2
2
|
import { createAsyncThunk, createSlice, configureStore, combineReducers } from "@reduxjs/toolkit";
|
|
3
3
|
import { useDispatch, useSelector } from "react-redux";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import React__default, { useMemo, createContext, useContext,
|
|
5
|
+
import React__default, { useMemo, useState, createContext, useContext, useEffect, useCallback, forwardRef, useImperativeHandle, createElement, Children, useRef, useLayoutEffect, Fragment as Fragment$1, useId, useInsertionEffect, Component as Component$1 } from "react";
|
|
6
6
|
import { useLocation, useNavigate, Outlet, Route, Navigate } from "react-router-dom";
|
|
7
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
8
|
import { Stack as Stack$1, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Icon, Tooltip, tooltipClasses, Avatar, Typography, ClickAwayListener, Fade, Badge, List, ListItem, FormControl, InputLabel, RadioGroup, FormControlLabel, Radio, Menu, Divider, MenuItem, Button, IconButton, TextField, InputAdornment } from "@mui/material";
|
|
8
9
|
import { unstable_createGetCssVar, createSpacing as createSpacing$1, useTheme as useTheme$1, unstable_memoTheme, Stack as Stack$2, css, keyframes as keyframes$1 } from "@mui/system";
|
|
9
10
|
import emStyled from "@emotion/styled";
|
|
@@ -12787,8 +12788,10 @@ const truncateText = (text, maxLength = 27) => {
|
|
|
12787
12788
|
return `${text.substring(0, maxLength)}...`;
|
|
12788
12789
|
};
|
|
12789
12790
|
const timeUtils = timeUtilsMethods;
|
|
12790
|
-
const useApps = (tab) => {
|
|
12791
|
-
const userType = useSelector(
|
|
12791
|
+
const useApps = (tab = AppCategory.ALL) => {
|
|
12792
|
+
const userType = useSelector(
|
|
12793
|
+
(state) => state.account.user?.type
|
|
12794
|
+
);
|
|
12792
12795
|
const listApp = useMemo(() => {
|
|
12793
12796
|
let filteredApps = SYSTEM_MODULES.filter((app2) => {
|
|
12794
12797
|
return app2.allowUserTypes.includes(userType);
|
|
@@ -12805,8 +12808,21 @@ const useIsSystemMonitor = () => {
|
|
|
12805
12808
|
const normalize = (p) => p.replace(/\/+$/, "");
|
|
12806
12809
|
return normalize(location2.pathname) === normalize(PAGE.DASHBOARD.path);
|
|
12807
12810
|
};
|
|
12811
|
+
const useAllApps = () => {
|
|
12812
|
+
const userType = useSelector(
|
|
12813
|
+
(state) => state.account.user?.type
|
|
12814
|
+
);
|
|
12815
|
+
const allApps = useMemo(() => {
|
|
12816
|
+
return SYSTEM_MODULES.filter((app2) => {
|
|
12817
|
+
return app2.allowUserTypes.includes(userType);
|
|
12818
|
+
});
|
|
12819
|
+
}, [userType]);
|
|
12820
|
+
return allApps;
|
|
12821
|
+
};
|
|
12808
12822
|
const useActiveSidebar = () => {
|
|
12809
|
-
const { user, current_access } = useSelector(
|
|
12823
|
+
const { user, current_access } = useSelector(
|
|
12824
|
+
(state) => state.account
|
|
12825
|
+
);
|
|
12810
12826
|
const activeSidebar = useMemo(() => {
|
|
12811
12827
|
return SYSTEM_MODULES.find(
|
|
12812
12828
|
(it) => it.key === current_access && user && (it.allowUserTypes ? it.allowUserTypes.includes(user?.type) : true)
|
|
@@ -12814,323 +12830,18 @@ const useActiveSidebar = () => {
|
|
|
12814
12830
|
}, [current_access, user]);
|
|
12815
12831
|
return activeSidebar;
|
|
12816
12832
|
};
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
function requireReactJsxRuntime_production() {
|
|
12830
|
-
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
12831
|
-
hasRequiredReactJsxRuntime_production = 1;
|
|
12832
|
-
var REACT_ELEMENT_TYPE2 = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
12833
|
-
function jsxProd(type, config, maybeKey) {
|
|
12834
|
-
var key = null;
|
|
12835
|
-
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
12836
|
-
void 0 !== config.key && (key = "" + config.key);
|
|
12837
|
-
if ("key" in config) {
|
|
12838
|
-
maybeKey = {};
|
|
12839
|
-
for (var propName in config)
|
|
12840
|
-
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
12841
|
-
} else maybeKey = config;
|
|
12842
|
-
config = maybeKey.ref;
|
|
12843
|
-
return {
|
|
12844
|
-
$$typeof: REACT_ELEMENT_TYPE2,
|
|
12845
|
-
type,
|
|
12846
|
-
key,
|
|
12847
|
-
ref: void 0 !== config ? config : null,
|
|
12848
|
-
props: maybeKey
|
|
12849
|
-
};
|
|
12850
|
-
}
|
|
12851
|
-
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
12852
|
-
reactJsxRuntime_production.jsx = jsxProd;
|
|
12853
|
-
reactJsxRuntime_production.jsxs = jsxProd;
|
|
12854
|
-
return reactJsxRuntime_production;
|
|
12855
|
-
}
|
|
12856
|
-
var reactJsxRuntime_development = {};
|
|
12857
|
-
/**
|
|
12858
|
-
* @license React
|
|
12859
|
-
* react-jsx-runtime.development.js
|
|
12860
|
-
*
|
|
12861
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12862
|
-
*
|
|
12863
|
-
* This source code is licensed under the MIT license found in the
|
|
12864
|
-
* LICENSE file in the root directory of this source tree.
|
|
12865
|
-
*/
|
|
12866
|
-
var hasRequiredReactJsxRuntime_development;
|
|
12867
|
-
function requireReactJsxRuntime_development() {
|
|
12868
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
12869
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
12870
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
12871
|
-
function getComponentNameFromType(type) {
|
|
12872
|
-
if (null == type) return null;
|
|
12873
|
-
if ("function" === typeof type)
|
|
12874
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
12875
|
-
if ("string" === typeof type) return type;
|
|
12876
|
-
switch (type) {
|
|
12877
|
-
case REACT_FRAGMENT_TYPE:
|
|
12878
|
-
return "Fragment";
|
|
12879
|
-
case REACT_PROFILER_TYPE:
|
|
12880
|
-
return "Profiler";
|
|
12881
|
-
case REACT_STRICT_MODE_TYPE:
|
|
12882
|
-
return "StrictMode";
|
|
12883
|
-
case REACT_SUSPENSE_TYPE:
|
|
12884
|
-
return "Suspense";
|
|
12885
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
12886
|
-
return "SuspenseList";
|
|
12887
|
-
case REACT_ACTIVITY_TYPE:
|
|
12888
|
-
return "Activity";
|
|
12889
|
-
}
|
|
12890
|
-
if ("object" === typeof type)
|
|
12891
|
-
switch ("number" === typeof type.tag && console.error(
|
|
12892
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
12893
|
-
), type.$$typeof) {
|
|
12894
|
-
case REACT_PORTAL_TYPE:
|
|
12895
|
-
return "Portal";
|
|
12896
|
-
case REACT_CONTEXT_TYPE:
|
|
12897
|
-
return type.displayName || "Context";
|
|
12898
|
-
case REACT_CONSUMER_TYPE:
|
|
12899
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
12900
|
-
case REACT_FORWARD_REF_TYPE:
|
|
12901
|
-
var innerType = type.render;
|
|
12902
|
-
type = type.displayName;
|
|
12903
|
-
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
12904
|
-
return type;
|
|
12905
|
-
case REACT_MEMO_TYPE:
|
|
12906
|
-
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
12907
|
-
case REACT_LAZY_TYPE:
|
|
12908
|
-
innerType = type._payload;
|
|
12909
|
-
type = type._init;
|
|
12910
|
-
try {
|
|
12911
|
-
return getComponentNameFromType(type(innerType));
|
|
12912
|
-
} catch (x) {
|
|
12913
|
-
}
|
|
12914
|
-
}
|
|
12915
|
-
return null;
|
|
12916
|
-
}
|
|
12917
|
-
function testStringCoercion(value2) {
|
|
12918
|
-
return "" + value2;
|
|
12919
|
-
}
|
|
12920
|
-
function checkKeyStringCoercion(value2) {
|
|
12921
|
-
try {
|
|
12922
|
-
testStringCoercion(value2);
|
|
12923
|
-
var JSCompiler_inline_result = false;
|
|
12924
|
-
} catch (e) {
|
|
12925
|
-
JSCompiler_inline_result = true;
|
|
12926
|
-
}
|
|
12927
|
-
if (JSCompiler_inline_result) {
|
|
12928
|
-
JSCompiler_inline_result = console;
|
|
12929
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
12930
|
-
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value2[Symbol.toStringTag] || value2.constructor.name || "Object";
|
|
12931
|
-
JSCompiler_temp_const.call(
|
|
12932
|
-
JSCompiler_inline_result,
|
|
12933
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
12934
|
-
JSCompiler_inline_result$jscomp$0
|
|
12935
|
-
);
|
|
12936
|
-
return testStringCoercion(value2);
|
|
12937
|
-
}
|
|
12938
|
-
}
|
|
12939
|
-
function getTaskName(type) {
|
|
12940
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
12941
|
-
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
12942
|
-
return "<...>";
|
|
12943
|
-
try {
|
|
12944
|
-
var name2 = getComponentNameFromType(type);
|
|
12945
|
-
return name2 ? "<" + name2 + ">" : "<...>";
|
|
12946
|
-
} catch (x) {
|
|
12947
|
-
return "<...>";
|
|
12948
|
-
}
|
|
12949
|
-
}
|
|
12950
|
-
function getOwner() {
|
|
12951
|
-
var dispatcher = ReactSharedInternals.A;
|
|
12952
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
12953
|
-
}
|
|
12954
|
-
function UnknownOwner() {
|
|
12955
|
-
return Error("react-stack-top-frame");
|
|
12956
|
-
}
|
|
12957
|
-
function hasValidKey(config) {
|
|
12958
|
-
if (hasOwnProperty2.call(config, "key")) {
|
|
12959
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
12960
|
-
if (getter && getter.isReactWarning) return false;
|
|
12961
|
-
}
|
|
12962
|
-
return void 0 !== config.key;
|
|
12963
|
-
}
|
|
12964
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
12965
|
-
function warnAboutAccessingKey() {
|
|
12966
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
12967
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
12968
|
-
displayName
|
|
12969
|
-
));
|
|
12970
|
-
}
|
|
12971
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
12972
|
-
Object.defineProperty(props, "key", {
|
|
12973
|
-
get: warnAboutAccessingKey,
|
|
12974
|
-
configurable: true
|
|
12975
|
-
});
|
|
12976
|
-
}
|
|
12977
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
12978
|
-
var componentName = getComponentNameFromType(this.type);
|
|
12979
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
12980
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
12981
|
-
));
|
|
12982
|
-
componentName = this.props.ref;
|
|
12983
|
-
return void 0 !== componentName ? componentName : null;
|
|
12984
|
-
}
|
|
12985
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
12986
|
-
var refProp = props.ref;
|
|
12987
|
-
type = {
|
|
12988
|
-
$$typeof: REACT_ELEMENT_TYPE2,
|
|
12989
|
-
type,
|
|
12990
|
-
key,
|
|
12991
|
-
props,
|
|
12992
|
-
_owner: owner
|
|
12993
|
-
};
|
|
12994
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
12995
|
-
enumerable: false,
|
|
12996
|
-
get: elementRefGetterWithDeprecationWarning
|
|
12997
|
-
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
12998
|
-
type._store = {};
|
|
12999
|
-
Object.defineProperty(type._store, "validated", {
|
|
13000
|
-
configurable: false,
|
|
13001
|
-
enumerable: false,
|
|
13002
|
-
writable: true,
|
|
13003
|
-
value: 0
|
|
13004
|
-
});
|
|
13005
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
13006
|
-
configurable: false,
|
|
13007
|
-
enumerable: false,
|
|
13008
|
-
writable: true,
|
|
13009
|
-
value: null
|
|
13010
|
-
});
|
|
13011
|
-
Object.defineProperty(type, "_debugStack", {
|
|
13012
|
-
configurable: false,
|
|
13013
|
-
enumerable: false,
|
|
13014
|
-
writable: true,
|
|
13015
|
-
value: debugStack
|
|
13016
|
-
});
|
|
13017
|
-
Object.defineProperty(type, "_debugTask", {
|
|
13018
|
-
configurable: false,
|
|
13019
|
-
enumerable: false,
|
|
13020
|
-
writable: true,
|
|
13021
|
-
value: debugTask
|
|
13022
|
-
});
|
|
13023
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
13024
|
-
return type;
|
|
13025
|
-
}
|
|
13026
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
13027
|
-
var children = config.children;
|
|
13028
|
-
if (void 0 !== children)
|
|
13029
|
-
if (isStaticChildren)
|
|
13030
|
-
if (isArrayImpl(children)) {
|
|
13031
|
-
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
|
|
13032
|
-
validateChildKeys(children[isStaticChildren]);
|
|
13033
|
-
Object.freeze && Object.freeze(children);
|
|
13034
|
-
} else
|
|
13035
|
-
console.error(
|
|
13036
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
13037
|
-
);
|
|
13038
|
-
else validateChildKeys(children);
|
|
13039
|
-
if (hasOwnProperty2.call(config, "key")) {
|
|
13040
|
-
children = getComponentNameFromType(type);
|
|
13041
|
-
var keys2 = Object.keys(config).filter(function(k) {
|
|
13042
|
-
return "key" !== k;
|
|
13043
|
-
});
|
|
13044
|
-
isStaticChildren = 0 < keys2.length ? "{key: someKey, " + keys2.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
13045
|
-
didWarnAboutKeySpread[children + isStaticChildren] || (keys2 = 0 < keys2.length ? "{" + keys2.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
13046
|
-
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
13047
|
-
isStaticChildren,
|
|
13048
|
-
children,
|
|
13049
|
-
keys2,
|
|
13050
|
-
children
|
|
13051
|
-
), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
13052
|
-
}
|
|
13053
|
-
children = null;
|
|
13054
|
-
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
13055
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
13056
|
-
if ("key" in config) {
|
|
13057
|
-
maybeKey = {};
|
|
13058
|
-
for (var propName in config)
|
|
13059
|
-
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
13060
|
-
} else maybeKey = config;
|
|
13061
|
-
children && defineKeyPropWarningGetter(
|
|
13062
|
-
maybeKey,
|
|
13063
|
-
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
13064
|
-
);
|
|
13065
|
-
return ReactElement(
|
|
13066
|
-
type,
|
|
13067
|
-
children,
|
|
13068
|
-
maybeKey,
|
|
13069
|
-
getOwner(),
|
|
13070
|
-
debugStack,
|
|
13071
|
-
debugTask
|
|
13072
|
-
);
|
|
13073
|
-
}
|
|
13074
|
-
function validateChildKeys(node) {
|
|
13075
|
-
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
13076
|
-
}
|
|
13077
|
-
function isValidElement(object2) {
|
|
13078
|
-
return "object" === typeof object2 && null !== object2 && object2.$$typeof === REACT_ELEMENT_TYPE2;
|
|
13079
|
-
}
|
|
13080
|
-
var React2 = React__default, REACT_ELEMENT_TYPE2 = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty2 = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
13081
|
-
return null;
|
|
13082
|
-
};
|
|
13083
|
-
React2 = {
|
|
13084
|
-
react_stack_bottom_frame: function(callStackForError) {
|
|
13085
|
-
return callStackForError();
|
|
13086
|
-
}
|
|
13087
|
-
};
|
|
13088
|
-
var specialPropKeyWarningShown;
|
|
13089
|
-
var didWarnAboutElementRef = {};
|
|
13090
|
-
var unknownOwnerDebugStack = React2.react_stack_bottom_frame.bind(
|
|
13091
|
-
React2,
|
|
13092
|
-
UnknownOwner
|
|
13093
|
-
)();
|
|
13094
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
13095
|
-
var didWarnAboutKeySpread = {};
|
|
13096
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
13097
|
-
reactJsxRuntime_development.jsx = function(type, config, maybeKey) {
|
|
13098
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
13099
|
-
return jsxDEVImpl(
|
|
13100
|
-
type,
|
|
13101
|
-
config,
|
|
13102
|
-
maybeKey,
|
|
13103
|
-
false,
|
|
13104
|
-
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
13105
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
13106
|
-
);
|
|
13107
|
-
};
|
|
13108
|
-
reactJsxRuntime_development.jsxs = function(type, config, maybeKey) {
|
|
13109
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
13110
|
-
return jsxDEVImpl(
|
|
13111
|
-
type,
|
|
13112
|
-
config,
|
|
13113
|
-
maybeKey,
|
|
13114
|
-
true,
|
|
13115
|
-
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
13116
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
13117
|
-
);
|
|
13118
|
-
};
|
|
13119
|
-
})();
|
|
13120
|
-
return reactJsxRuntime_development;
|
|
13121
|
-
}
|
|
13122
|
-
var hasRequiredJsxRuntime;
|
|
13123
|
-
function requireJsxRuntime() {
|
|
13124
|
-
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
13125
|
-
hasRequiredJsxRuntime = 1;
|
|
13126
|
-
if (process.env.NODE_ENV === "production") {
|
|
13127
|
-
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
13128
|
-
} else {
|
|
13129
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
13130
|
-
}
|
|
13131
|
-
return jsxRuntime.exports;
|
|
13132
|
-
}
|
|
13133
|
-
var jsxRuntimeExports = requireJsxRuntime();
|
|
12833
|
+
const useSidebarState = () => {
|
|
12834
|
+
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
|
12835
|
+
const openSidebar = () => setIsSidebarOpen(true);
|
|
12836
|
+
const closeSidebar = () => setIsSidebarOpen(false);
|
|
12837
|
+
const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);
|
|
12838
|
+
return {
|
|
12839
|
+
isSidebarOpen,
|
|
12840
|
+
openSidebar,
|
|
12841
|
+
closeSidebar,
|
|
12842
|
+
toggleSidebar
|
|
12843
|
+
};
|
|
12844
|
+
};
|
|
13134
12845
|
var propTypes = { exports: {} };
|
|
13135
12846
|
var reactIs$2 = { exports: {} };
|
|
13136
12847
|
var reactIs_production_min$1 = {};
|
|
@@ -18209,7 +17920,7 @@ const useVersionCheck = (options) => {
|
|
|
18209
17920
|
}, [options?.interval]);
|
|
18210
17921
|
};
|
|
18211
17922
|
const AuthLayout = ({ children }) => {
|
|
18212
|
-
return /* @__PURE__ */
|
|
17923
|
+
return /* @__PURE__ */ jsx(
|
|
18213
17924
|
Stack$1,
|
|
18214
17925
|
{
|
|
18215
17926
|
sx: {
|
|
@@ -18361,7 +18072,7 @@ var StatusAvatar = /* @__PURE__ */ ((StatusAvatar2) => {
|
|
|
18361
18072
|
return StatusAvatar2;
|
|
18362
18073
|
})(StatusAvatar || {});
|
|
18363
18074
|
const ImageWrapper = ({ isWrap = false, children }) => {
|
|
18364
|
-
return isWrap ? /* @__PURE__ */
|
|
18075
|
+
return isWrap ? /* @__PURE__ */ jsx(StackRow, { alignItems: "center", className: "jsdsdj", children }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
18365
18076
|
};
|
|
18366
18077
|
const ImageElement = ({
|
|
18367
18078
|
url: url2,
|
|
@@ -18377,8 +18088,8 @@ const ImageElement = ({
|
|
|
18377
18088
|
const [loaded, setLoaded] = useState(false);
|
|
18378
18089
|
if (onClick) sx = { ...sx, cursor: "pointer" };
|
|
18379
18090
|
const borderRadius2 = sizeType === ImageSizeType.CIRCLE ? "50%" : sizeType === ImageSizeType.SQUARE ? STYLE.BORDER_RADIUS_ELEMENT_SMALL : 0;
|
|
18380
|
-
return /* @__PURE__ */
|
|
18381
|
-
!loaded && /* @__PURE__ */
|
|
18091
|
+
return /* @__PURE__ */ jsxs(ImageWrapper, { isWrap, children: [
|
|
18092
|
+
!loaded && /* @__PURE__ */ jsx(
|
|
18382
18093
|
Skeleton,
|
|
18383
18094
|
{
|
|
18384
18095
|
variant: "rectangular",
|
|
@@ -18388,7 +18099,7 @@ const ImageElement = ({
|
|
|
18388
18099
|
}
|
|
18389
18100
|
}
|
|
18390
18101
|
),
|
|
18391
|
-
/* @__PURE__ */
|
|
18102
|
+
/* @__PURE__ */ jsx(
|
|
18392
18103
|
Box,
|
|
18393
18104
|
{
|
|
18394
18105
|
...rest,
|
|
@@ -18419,7 +18130,7 @@ const LogoComponent = ({
|
|
|
18419
18130
|
}) => {
|
|
18420
18131
|
const navigate = useNavigate();
|
|
18421
18132
|
const toHome = () => navigate(PAGE.DASHBOARD.path);
|
|
18422
|
-
return /* @__PURE__ */
|
|
18133
|
+
return /* @__PURE__ */ jsx(Box, { onClick: toHome, sx: { cursor: "pointer", height: height2, ...sx }, children: /* @__PURE__ */ jsx(
|
|
18423
18134
|
ImageElement,
|
|
18424
18135
|
{
|
|
18425
18136
|
url: url2,
|
|
@@ -18455,7 +18166,7 @@ const IconElement = ({
|
|
|
18455
18166
|
},
|
|
18456
18167
|
...sx
|
|
18457
18168
|
};
|
|
18458
|
-
return /* @__PURE__ */
|
|
18169
|
+
return /* @__PURE__ */ jsx(
|
|
18459
18170
|
Icon,
|
|
18460
18171
|
{
|
|
18461
18172
|
onClick,
|
|
@@ -18472,7 +18183,7 @@ const IconElement = ({
|
|
|
18472
18183
|
}
|
|
18473
18184
|
);
|
|
18474
18185
|
};
|
|
18475
|
-
const ArrowTooltip = emStyled(({ className, ...props }) => /* @__PURE__ */
|
|
18186
|
+
const ArrowTooltip = emStyled(({ className, ...props }) => /* @__PURE__ */ jsx(Tooltip, { ...props, arrow: true, classes: { popper: className } }))(() => ({
|
|
18476
18187
|
[`& .${tooltipClasses.arrow}`]: {
|
|
18477
18188
|
color: "white"
|
|
18478
18189
|
}
|
|
@@ -18485,7 +18196,7 @@ const AvatarElement = ({
|
|
|
18485
18196
|
...rest
|
|
18486
18197
|
}) => {
|
|
18487
18198
|
if (tooltipContent) {
|
|
18488
|
-
return /* @__PURE__ */
|
|
18199
|
+
return /* @__PURE__ */ jsx(ArrowTooltip, { title: tooltipContent, arrow: true, children: /* @__PURE__ */ jsx(
|
|
18489
18200
|
Avatar,
|
|
18490
18201
|
{
|
|
18491
18202
|
...rest,
|
|
@@ -18494,13 +18205,13 @@ const AvatarElement = ({
|
|
|
18494
18205
|
}
|
|
18495
18206
|
) });
|
|
18496
18207
|
}
|
|
18497
|
-
return /* @__PURE__ */
|
|
18208
|
+
return /* @__PURE__ */ jsx(Avatar, { ...rest, src: url2 || "", sx: { ...MAP_SIZE[size], bgcolor: "primary.main", ...sx, cursor: "pointer" } });
|
|
18498
18209
|
};
|
|
18499
18210
|
const TimeAgoComponent = ({
|
|
18500
18211
|
time: time2,
|
|
18501
18212
|
hasText
|
|
18502
18213
|
}) => {
|
|
18503
|
-
return /* @__PURE__ */
|
|
18214
|
+
return /* @__PURE__ */ jsx(
|
|
18504
18215
|
Typography,
|
|
18505
18216
|
{
|
|
18506
18217
|
variant: "caption",
|
|
@@ -18510,7 +18221,7 @@ const TimeAgoComponent = ({
|
|
|
18510
18221
|
);
|
|
18511
18222
|
};
|
|
18512
18223
|
const TimeAgoContentComponent = ({ time: time2, content, height: height2 = STYLE.HEIGHT_IMAGE_DEFAULT }) => {
|
|
18513
|
-
return /* @__PURE__ */
|
|
18224
|
+
return /* @__PURE__ */ jsxs(
|
|
18514
18225
|
Stack$2,
|
|
18515
18226
|
{
|
|
18516
18227
|
sx: {
|
|
@@ -18520,7 +18231,7 @@ const TimeAgoContentComponent = ({ time: time2, content, height: height2 = STYLE
|
|
|
18520
18231
|
alignItems: "flex-start"
|
|
18521
18232
|
},
|
|
18522
18233
|
children: [
|
|
18523
|
-
/* @__PURE__ */
|
|
18234
|
+
/* @__PURE__ */ jsx(
|
|
18524
18235
|
Typography,
|
|
18525
18236
|
{
|
|
18526
18237
|
sx: {
|
|
@@ -18529,7 +18240,7 @@ const TimeAgoContentComponent = ({ time: time2, content, height: height2 = STYLE
|
|
|
18529
18240
|
children: content
|
|
18530
18241
|
}
|
|
18531
18242
|
),
|
|
18532
|
-
/* @__PURE__ */
|
|
18243
|
+
/* @__PURE__ */ jsx(TimeAgoComponent, { time: time2 })
|
|
18533
18244
|
]
|
|
18534
18245
|
}
|
|
18535
18246
|
);
|
|
@@ -18540,9 +18251,9 @@ const ImageContentTimeComponent = ({
|
|
|
18540
18251
|
time: time2,
|
|
18541
18252
|
sizeType = "medium"
|
|
18542
18253
|
}) => {
|
|
18543
|
-
return /* @__PURE__ */
|
|
18544
|
-
/* @__PURE__ */
|
|
18545
|
-
/* @__PURE__ */
|
|
18254
|
+
return /* @__PURE__ */ jsxs(StackRow, { alignItems: "center", children: [
|
|
18255
|
+
/* @__PURE__ */ jsx(AvatarElement, { url: url2, size: sizeType }),
|
|
18256
|
+
/* @__PURE__ */ jsx(TimeAgoContentComponent, { content, time: time2 })
|
|
18546
18257
|
] });
|
|
18547
18258
|
};
|
|
18548
18259
|
const TooltipOnClickElement = ({
|
|
@@ -18557,7 +18268,7 @@ const TooltipOnClickElement = ({
|
|
|
18557
18268
|
}) => {
|
|
18558
18269
|
return (
|
|
18559
18270
|
// Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
|
|
18560
|
-
/* @__PURE__ */
|
|
18271
|
+
/* @__PURE__ */ jsx(ClickAwayListener, { onClickAway, children: /* @__PURE__ */ jsx(
|
|
18561
18272
|
Tooltip,
|
|
18562
18273
|
{
|
|
18563
18274
|
PopperProps: { disablePortal: true },
|
|
@@ -18570,13 +18281,13 @@ const TooltipOnClickElement = ({
|
|
|
18570
18281
|
placement,
|
|
18571
18282
|
title: content,
|
|
18572
18283
|
...rest,
|
|
18573
|
-
children: /* @__PURE__ */
|
|
18284
|
+
children: /* @__PURE__ */ jsx("span", { children })
|
|
18574
18285
|
}
|
|
18575
18286
|
) })
|
|
18576
18287
|
);
|
|
18577
18288
|
};
|
|
18578
18289
|
const EmptyComponent = ({}) => {
|
|
18579
|
-
return /* @__PURE__ */
|
|
18290
|
+
return /* @__PURE__ */ jsx(Fade, { in: true, timeout: STYLE.ANIMATION_TIME, children: /* @__PURE__ */ jsx(
|
|
18580
18291
|
Stack$1,
|
|
18581
18292
|
{
|
|
18582
18293
|
direction: "column",
|
|
@@ -18587,7 +18298,7 @@ const EmptyComponent = ({}) => {
|
|
|
18587
18298
|
justifyContent: "center",
|
|
18588
18299
|
padding: STYLE.PADDING_GAP_ITEM
|
|
18589
18300
|
},
|
|
18590
|
-
children: /* @__PURE__ */
|
|
18301
|
+
children: /* @__PURE__ */ jsx(Box, { component: "img", sx: { width: 70 }, src: "/images/empty.svg" })
|
|
18591
18302
|
}
|
|
18592
18303
|
) });
|
|
18593
18304
|
};
|
|
@@ -18789,7 +18500,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
18789
18500
|
circleStyle.strokeDashoffset = `${((100 - value2) / 100 * circumference).toFixed(3)}px`;
|
|
18790
18501
|
rootStyle.transform = "rotate(-90deg)";
|
|
18791
18502
|
}
|
|
18792
|
-
return /* @__PURE__ */
|
|
18503
|
+
return /* @__PURE__ */ jsx(CircularProgressRoot, {
|
|
18793
18504
|
className: clsx(classes.root, className),
|
|
18794
18505
|
style: {
|
|
18795
18506
|
width: size,
|
|
@@ -18802,11 +18513,11 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
18802
18513
|
role: "progressbar",
|
|
18803
18514
|
...rootProps,
|
|
18804
18515
|
...other,
|
|
18805
|
-
children: /* @__PURE__ */
|
|
18516
|
+
children: /* @__PURE__ */ jsxs(CircularProgressSVG, {
|
|
18806
18517
|
className: classes.svg,
|
|
18807
18518
|
ownerState,
|
|
18808
18519
|
viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
|
|
18809
|
-
children: [enableTrackSlot ? /* @__PURE__ */
|
|
18520
|
+
children: [enableTrackSlot ? /* @__PURE__ */ jsx(CircularProgressTrack, {
|
|
18810
18521
|
className: classes.track,
|
|
18811
18522
|
ownerState,
|
|
18812
18523
|
cx: SIZE,
|
|
@@ -18815,7 +18526,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
18815
18526
|
fill: "none",
|
|
18816
18527
|
strokeWidth: thickness,
|
|
18817
18528
|
"aria-hidden": "true"
|
|
18818
|
-
}) : null, /* @__PURE__ */
|
|
18529
|
+
}) : null, /* @__PURE__ */ jsx(CircularProgressCircle, {
|
|
18819
18530
|
className: classes.circle,
|
|
18820
18531
|
style: circleStyle,
|
|
18821
18532
|
ownerState,
|
|
@@ -18899,7 +18610,7 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes = {
|
|
|
18899
18610
|
variant: PropTypes.oneOf(["determinate", "indeterminate"])
|
|
18900
18611
|
} : void 0;
|
|
18901
18612
|
const LoadingComponent = ({ color: color2, size = "medium", sx = {} }) => {
|
|
18902
|
-
return /* @__PURE__ */
|
|
18613
|
+
return /* @__PURE__ */ jsx(
|
|
18903
18614
|
Stack$1,
|
|
18904
18615
|
{
|
|
18905
18616
|
sx: {
|
|
@@ -18908,7 +18619,7 @@ const LoadingComponent = ({ color: color2, size = "medium", sx = {} }) => {
|
|
|
18908
18619
|
alignItems: "center",
|
|
18909
18620
|
justifyContent: "center"
|
|
18910
18621
|
},
|
|
18911
|
-
children: /* @__PURE__ */
|
|
18622
|
+
children: /* @__PURE__ */ jsx(CircularProgress, { size: STYLE.FONT_SIZE_LOADING[size], sx: { color: color2 } })
|
|
18912
18623
|
}
|
|
18913
18624
|
);
|
|
18914
18625
|
};
|
|
@@ -18960,13 +18671,13 @@ const BellComponent = ({}) => {
|
|
|
18960
18671
|
showSnackbar({ message: getErrorMessage(error), type: SnackbarType.ERROR });
|
|
18961
18672
|
}
|
|
18962
18673
|
};
|
|
18963
|
-
return /* @__PURE__ */
|
|
18674
|
+
return /* @__PURE__ */ jsx(
|
|
18964
18675
|
TooltipOnClickElement,
|
|
18965
18676
|
{
|
|
18966
18677
|
open,
|
|
18967
18678
|
onClickAway: () => setOpen(false),
|
|
18968
18679
|
placement: "bottom-end",
|
|
18969
|
-
content: /* @__PURE__ */
|
|
18680
|
+
content: /* @__PURE__ */ jsxs(
|
|
18970
18681
|
List,
|
|
18971
18682
|
{
|
|
18972
18683
|
sx: {
|
|
@@ -18979,7 +18690,7 @@ const BellComponent = ({}) => {
|
|
|
18979
18690
|
width: "300px"
|
|
18980
18691
|
},
|
|
18981
18692
|
children: [
|
|
18982
|
-
/* @__PURE__ */
|
|
18693
|
+
/* @__PURE__ */ jsxs(
|
|
18983
18694
|
ListItem,
|
|
18984
18695
|
{
|
|
18985
18696
|
sx: {
|
|
@@ -18994,9 +18705,9 @@ const BellComponent = ({}) => {
|
|
|
18994
18705
|
zIndex: 1
|
|
18995
18706
|
},
|
|
18996
18707
|
children: [
|
|
18997
|
-
/* @__PURE__ */
|
|
18998
|
-
/* @__PURE__ */
|
|
18999
|
-
/* @__PURE__ */
|
|
18708
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", children: "Thông báo" }),
|
|
18709
|
+
/* @__PURE__ */ jsxs(StackRow, { children: [
|
|
18710
|
+
/* @__PURE__ */ jsx(
|
|
19000
18711
|
IconElement,
|
|
19001
18712
|
{
|
|
19002
18713
|
sx: { cursor: "pointer" },
|
|
@@ -19014,7 +18725,7 @@ const BellComponent = ({}) => {
|
|
|
19014
18725
|
}
|
|
19015
18726
|
}
|
|
19016
18727
|
),
|
|
19017
|
-
/* @__PURE__ */
|
|
18728
|
+
/* @__PURE__ */ jsx(
|
|
19018
18729
|
IconElement,
|
|
19019
18730
|
{
|
|
19020
18731
|
icon: "settings",
|
|
@@ -19027,7 +18738,7 @@ const BellComponent = ({}) => {
|
|
|
19027
18738
|
]
|
|
19028
18739
|
}
|
|
19029
18740
|
),
|
|
19030
|
-
loading ? /* @__PURE__ */
|
|
18741
|
+
loading ? /* @__PURE__ */ jsx(StackRowAlignCenter, { sx: { height: 50 }, children: /* @__PURE__ */ jsx(LoadingComponent, {}) }) : list.length === 0 ? /* @__PURE__ */ jsx(EmptyComponent, {}) : list.map((notification) => /* @__PURE__ */ jsx(
|
|
19031
18742
|
ListItem,
|
|
19032
18743
|
{
|
|
19033
18744
|
onClick: () => clickNotification(notification),
|
|
@@ -19045,8 +18756,8 @@ const BellComponent = ({}) => {
|
|
|
19045
18756
|
color: palette.primary.main
|
|
19046
18757
|
}
|
|
19047
18758
|
},
|
|
19048
|
-
children: /* @__PURE__ */
|
|
19049
|
-
/* @__PURE__ */
|
|
18759
|
+
children: /* @__PURE__ */ jsxs(Stack$1, { gap: 1, children: [
|
|
18760
|
+
/* @__PURE__ */ jsx(
|
|
19050
18761
|
ImageContentTimeComponent,
|
|
19051
18762
|
{
|
|
19052
18763
|
url: notification.createdBy?.url || "",
|
|
@@ -19054,7 +18765,7 @@ const BellComponent = ({}) => {
|
|
|
19054
18765
|
time: notification.createdAt
|
|
19055
18766
|
}
|
|
19056
18767
|
),
|
|
19057
|
-
/* @__PURE__ */
|
|
18768
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", sx: { ...getLimitLineCss(2) }, children: notification.content })
|
|
19058
18769
|
] })
|
|
19059
18770
|
},
|
|
19060
18771
|
notification.id
|
|
@@ -19062,7 +18773,7 @@ const BellComponent = ({}) => {
|
|
|
19062
18773
|
]
|
|
19063
18774
|
}
|
|
19064
18775
|
),
|
|
19065
|
-
children: /* @__PURE__ */
|
|
18776
|
+
children: /* @__PURE__ */ jsx(
|
|
19066
18777
|
Badge,
|
|
19067
18778
|
{
|
|
19068
18779
|
onClick: async () => {
|
|
@@ -19072,7 +18783,7 @@ const BellComponent = ({}) => {
|
|
|
19072
18783
|
badgeContent: notificationCount,
|
|
19073
18784
|
color: "error",
|
|
19074
18785
|
sx: { cursor: "pointer" },
|
|
19075
|
-
children: /* @__PURE__ */
|
|
18786
|
+
children: /* @__PURE__ */ jsx(
|
|
19076
18787
|
IconElement,
|
|
19077
18788
|
{
|
|
19078
18789
|
icon: "notifications",
|
|
@@ -19101,10 +18812,10 @@ const AvatarUserInfo = ({
|
|
|
19101
18812
|
}) => {
|
|
19102
18813
|
const { palette } = useTheme$2();
|
|
19103
18814
|
const isSystemMonitor = useIsSystemMonitor();
|
|
19104
|
-
return /* @__PURE__ */
|
|
19105
|
-
/* @__PURE__ */
|
|
19106
|
-
positions.length > 0 ? /* @__PURE__ */
|
|
19107
|
-
/* @__PURE__ */
|
|
18815
|
+
return /* @__PURE__ */ jsxs(StackRow, { sx: { alignItems: "center", gap: STYLE.PADDING_GAP_ITEM }, children: [
|
|
18816
|
+
/* @__PURE__ */ jsx(AvatarElement, { url: url2, size: sizeAvatar }),
|
|
18817
|
+
positions.length > 0 ? /* @__PURE__ */ jsxs(Stack$1, { sx: { gap: 0 }, children: [
|
|
18818
|
+
/* @__PURE__ */ jsx(
|
|
19108
18819
|
Typography,
|
|
19109
18820
|
{
|
|
19110
18821
|
sx: {
|
|
@@ -19118,7 +18829,7 @@ const AvatarUserInfo = ({
|
|
|
19118
18829
|
children: name2
|
|
19119
18830
|
}
|
|
19120
18831
|
),
|
|
19121
|
-
/* @__PURE__ */
|
|
18832
|
+
/* @__PURE__ */ jsx(
|
|
19122
18833
|
Typography,
|
|
19123
18834
|
{
|
|
19124
18835
|
variant: "caption",
|
|
@@ -19142,7 +18853,7 @@ const AvatarUserInfo = ({
|
|
|
19142
18853
|
children: positions.join(" / ")
|
|
19143
18854
|
}
|
|
19144
18855
|
)
|
|
19145
|
-
] }) : /* @__PURE__ */
|
|
18856
|
+
] }) : /* @__PURE__ */ jsx(Typography, { sx: { ...TYPOGRAPHY_STYLES.textSm.semiBold, ...getLimitLineCss(1), ...sxName }, children: name2 })
|
|
19146
18857
|
] });
|
|
19147
18858
|
};
|
|
19148
18859
|
const IconContentElement = ({
|
|
@@ -19164,15 +18875,15 @@ const IconContentElement = ({
|
|
|
19164
18875
|
...sx,
|
|
19165
18876
|
cursor: "pointer"
|
|
19166
18877
|
};
|
|
19167
|
-
return /* @__PURE__ */
|
|
18878
|
+
return /* @__PURE__ */ jsxs(
|
|
19168
18879
|
StackRowAlignCenter,
|
|
19169
18880
|
{
|
|
19170
18881
|
onClick,
|
|
19171
18882
|
sx: { gap: STYLE.GAP_ICON_CONTENT_BY_SIZE[size || "medium"], ...sx },
|
|
19172
18883
|
id: id2,
|
|
19173
18884
|
children: [
|
|
19174
|
-
icon && /* @__PURE__ */
|
|
19175
|
-
content && /* @__PURE__ */
|
|
18885
|
+
icon && /* @__PURE__ */ jsx(IconElement, { icon, sx: sxIcon, color: color2, fill }),
|
|
18886
|
+
content && /* @__PURE__ */ jsx(
|
|
19176
18887
|
Typography,
|
|
19177
18888
|
{
|
|
19178
18889
|
color: color2,
|
|
@@ -19205,8 +18916,8 @@ const RadioGroupElement = ({
|
|
|
19205
18916
|
const change = (event) => {
|
|
19206
18917
|
onChange && onChange({ target: { name: name2, value: event.target.value || void 0 } });
|
|
19207
18918
|
};
|
|
19208
|
-
return /* @__PURE__ */
|
|
19209
|
-
label && /* @__PURE__ */
|
|
18919
|
+
return /* @__PURE__ */ jsxs(FormControl, { disabled, sx: { gap: STYLE.PADDING_GAP_ITEM }, onChange: change, children: [
|
|
18920
|
+
label && /* @__PURE__ */ jsx(
|
|
19210
18921
|
InputLabel,
|
|
19211
18922
|
{
|
|
19212
18923
|
shrink: true,
|
|
@@ -19216,13 +18927,13 @@ const RadioGroupElement = ({
|
|
|
19216
18927
|
zIndex: 2,
|
|
19217
18928
|
display: "flex"
|
|
19218
18929
|
},
|
|
19219
|
-
children: /* @__PURE__ */
|
|
19220
|
-
/* @__PURE__ */
|
|
18930
|
+
children: /* @__PURE__ */ jsxs(StackLabel, { children: [
|
|
18931
|
+
/* @__PURE__ */ jsx(IconElement, { icon: iconLabel, sx: { fontSize: STYLE.TEXT_FIELD.FONT_SIZE_LABEL } }),
|
|
19221
18932
|
label
|
|
19222
18933
|
] })
|
|
19223
18934
|
}
|
|
19224
18935
|
),
|
|
19225
|
-
/* @__PURE__ */
|
|
18936
|
+
/* @__PURE__ */ jsx(
|
|
19226
18937
|
RadioGroup,
|
|
19227
18938
|
{
|
|
19228
18939
|
name: name2,
|
|
@@ -19241,13 +18952,13 @@ const RadioGroupElement = ({
|
|
|
19241
18952
|
] });
|
|
19242
18953
|
};
|
|
19243
18954
|
const RadioElement = ({ name: name2, label, ...rest }) => {
|
|
19244
|
-
return /* @__PURE__ */
|
|
18955
|
+
return /* @__PURE__ */ jsx(
|
|
19245
18956
|
FormControlLabel,
|
|
19246
18957
|
{
|
|
19247
18958
|
name: name2,
|
|
19248
18959
|
label,
|
|
19249
18960
|
sx: { alignItems: "center", mr: 0 },
|
|
19250
|
-
control: /* @__PURE__ */
|
|
18961
|
+
control: /* @__PURE__ */ jsx(
|
|
19251
18962
|
Radio,
|
|
19252
18963
|
{
|
|
19253
18964
|
...rest,
|
|
@@ -19320,10 +19031,10 @@ const AvatarUserComponent = ({}) => {
|
|
|
19320
19031
|
const handleClose = () => {
|
|
19321
19032
|
setAnchorEl(null);
|
|
19322
19033
|
};
|
|
19323
|
-
return /* @__PURE__ */
|
|
19324
|
-
/* @__PURE__ */
|
|
19325
|
-
/* @__PURE__ */
|
|
19326
|
-
/* @__PURE__ */
|
|
19034
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19035
|
+
/* @__PURE__ */ jsxs(Box, { onClick: handleClick, sx: { cursor: "pointer", display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
19036
|
+
/* @__PURE__ */ jsx(AvatarUserInfo, { url: account.user?.url, name: account.user?.name ?? "", positions, isTag: true }),
|
|
19037
|
+
/* @__PURE__ */ jsx(
|
|
19327
19038
|
IconElement,
|
|
19328
19039
|
{
|
|
19329
19040
|
icon: "arrow_drop_down",
|
|
@@ -19339,7 +19050,7 @@ const AvatarUserComponent = ({}) => {
|
|
|
19339
19050
|
}
|
|
19340
19051
|
)
|
|
19341
19052
|
] }),
|
|
19342
|
-
/* @__PURE__ */
|
|
19053
|
+
/* @__PURE__ */ jsxs(
|
|
19343
19054
|
Menu,
|
|
19344
19055
|
{
|
|
19345
19056
|
anchorEl,
|
|
@@ -19378,10 +19089,10 @@ const AvatarUserComponent = ({}) => {
|
|
|
19378
19089
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
19379
19090
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
19380
19091
|
children: [
|
|
19381
|
-
/* @__PURE__ */
|
|
19382
|
-
/* @__PURE__ */
|
|
19383
|
-
/* @__PURE__ */
|
|
19384
|
-
/* @__PURE__ */
|
|
19092
|
+
/* @__PURE__ */ jsxs(Box, { sx: { p: 2 }, children: [
|
|
19093
|
+
/* @__PURE__ */ jsxs(StackRowAlignStartJustBetween, { children: [
|
|
19094
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", sx: { lineHeight: 1 }, children: account.user?.name }),
|
|
19095
|
+
/* @__PURE__ */ jsx(
|
|
19385
19096
|
IconElement,
|
|
19386
19097
|
{
|
|
19387
19098
|
icon: "settings",
|
|
@@ -19389,9 +19100,9 @@ const AvatarUserComponent = ({}) => {
|
|
|
19389
19100
|
}
|
|
19390
19101
|
)
|
|
19391
19102
|
] }),
|
|
19392
|
-
account.user?.userOrgUnitPositions && account.user.userOrgUnitPositions.length > 0 && /* @__PURE__ */
|
|
19393
|
-
/* @__PURE__ */
|
|
19394
|
-
/* @__PURE__ */
|
|
19103
|
+
account.user?.userOrgUnitPositions && account.user.userOrgUnitPositions.length > 0 && /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
19104
|
+
/* @__PURE__ */ jsx(IconContentElement, { icon: "admin_panel_settings", content: "Vai trò" }),
|
|
19105
|
+
/* @__PURE__ */ jsx(
|
|
19395
19106
|
RadioGroupElement,
|
|
19396
19107
|
{
|
|
19397
19108
|
direction: "column",
|
|
@@ -19401,14 +19112,14 @@ const AvatarUserComponent = ({}) => {
|
|
|
19401
19112
|
dispatch(ACTION_ACCOUNT.updatePositionOrgUnit(event.target.value));
|
|
19402
19113
|
window.location.reload();
|
|
19403
19114
|
},
|
|
19404
|
-
children: account.user.userOrgUnitPositions.map((e) => /* @__PURE__ */
|
|
19115
|
+
children: account.user.userOrgUnitPositions.map((e) => /* @__PURE__ */ jsx(
|
|
19405
19116
|
RadioElement,
|
|
19406
19117
|
{
|
|
19407
19118
|
value: e.id,
|
|
19408
19119
|
size: "small",
|
|
19409
|
-
label: /* @__PURE__ */
|
|
19410
|
-
/* @__PURE__ */
|
|
19411
|
-
/* @__PURE__ */
|
|
19120
|
+
label: /* @__PURE__ */ jsxs(Stack$2, { gap: 0, children: [
|
|
19121
|
+
/* @__PURE__ */ jsx(Typography, { children: e.orgUnit.name }),
|
|
19122
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", sx: { ...getLimitLineCss(1), color: "text.disabled" }, children: e.position.name })
|
|
19412
19123
|
] })
|
|
19413
19124
|
},
|
|
19414
19125
|
e.id
|
|
@@ -19417,10 +19128,10 @@ const AvatarUserComponent = ({}) => {
|
|
|
19417
19128
|
)
|
|
19418
19129
|
] })
|
|
19419
19130
|
] }),
|
|
19420
|
-
/* @__PURE__ */
|
|
19421
|
-
menu.map((item, index) => /* @__PURE__ */
|
|
19422
|
-
/* @__PURE__ */
|
|
19423
|
-
/* @__PURE__ */
|
|
19131
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
19132
|
+
menu.map((item, index) => /* @__PURE__ */ jsxs(MenuItem, { onClick: item.onClick, children: [
|
|
19133
|
+
/* @__PURE__ */ jsx(IconElement, { icon: item.icon, size: "small", sx: { mr: 1 } }),
|
|
19134
|
+
/* @__PURE__ */ jsx(Typography, { children: item.content })
|
|
19424
19135
|
] }, index))
|
|
19425
19136
|
]
|
|
19426
19137
|
}
|
|
@@ -19430,7 +19141,7 @@ const AvatarUserComponent = ({}) => {
|
|
|
19430
19141
|
const MonitorPart = ({
|
|
19431
19142
|
children
|
|
19432
19143
|
}) => {
|
|
19433
|
-
return /* @__PURE__ */
|
|
19144
|
+
return /* @__PURE__ */ jsx(
|
|
19434
19145
|
Stack$2,
|
|
19435
19146
|
{
|
|
19436
19147
|
sx: {
|
|
@@ -19442,18 +19153,18 @@ const MonitorPart = ({
|
|
|
19442
19153
|
backgroundPosition: "top",
|
|
19443
19154
|
backgroundRepeat: "no-repeat"
|
|
19444
19155
|
},
|
|
19445
|
-
children: /* @__PURE__ */
|
|
19446
|
-
/* @__PURE__ */
|
|
19447
|
-
/* @__PURE__ */
|
|
19156
|
+
children: /* @__PURE__ */ jsxs(Stack$2, { p: { padding: STYLE.PADDING_GAP_LAYOUT }, children: [
|
|
19157
|
+
/* @__PURE__ */ jsxs(StackRowJustBetween, { children: [
|
|
19158
|
+
/* @__PURE__ */ jsx(StackRowAlignCenter, { children: /* @__PURE__ */ jsx(
|
|
19448
19159
|
LogoComponent,
|
|
19449
19160
|
{
|
|
19450
19161
|
url: "/images/logo/logo-sub-3.svg",
|
|
19451
19162
|
fillColor: "white"
|
|
19452
19163
|
}
|
|
19453
19164
|
) }),
|
|
19454
|
-
/* @__PURE__ */
|
|
19455
|
-
/* @__PURE__ */
|
|
19456
|
-
/* @__PURE__ */
|
|
19165
|
+
/* @__PURE__ */ jsxs(StackRowAlignCenter, { children: [
|
|
19166
|
+
/* @__PURE__ */ jsx(BellComponent, {}),
|
|
19167
|
+
/* @__PURE__ */ jsx(AvatarUserComponent, {})
|
|
19457
19168
|
] })
|
|
19458
19169
|
] }),
|
|
19459
19170
|
children
|
|
@@ -19461,12 +19172,14 @@ const MonitorPart = ({
|
|
|
19461
19172
|
}
|
|
19462
19173
|
);
|
|
19463
19174
|
};
|
|
19464
|
-
const DashboardLayout = ({
|
|
19175
|
+
const DashboardLayout = ({
|
|
19176
|
+
children
|
|
19177
|
+
}) => {
|
|
19465
19178
|
useUpdateCurrentAccess();
|
|
19466
|
-
return /* @__PURE__ */
|
|
19179
|
+
return /* @__PURE__ */ jsx(MonitorPart, { children });
|
|
19467
19180
|
};
|
|
19468
19181
|
const DefaultLayout = ({ children }) => {
|
|
19469
|
-
return /* @__PURE__ */
|
|
19182
|
+
return /* @__PURE__ */ jsx(
|
|
19470
19183
|
Stack$1,
|
|
19471
19184
|
{
|
|
19472
19185
|
sx: {
|
|
@@ -19475,7 +19188,7 @@ const DefaultLayout = ({ children }) => {
|
|
|
19475
19188
|
width: "100%",
|
|
19476
19189
|
overflowY: "auto"
|
|
19477
19190
|
},
|
|
19478
|
-
children: /* @__PURE__ */
|
|
19191
|
+
children: /* @__PURE__ */ jsx(
|
|
19479
19192
|
Stack$1,
|
|
19480
19193
|
{
|
|
19481
19194
|
sx: {
|
|
@@ -21818,13 +21531,13 @@ const ButtonElement = ({
|
|
|
21818
21531
|
...rest
|
|
21819
21532
|
}) => {
|
|
21820
21533
|
const { palette } = useTheme$2();
|
|
21821
|
-
return /* @__PURE__ */
|
|
21534
|
+
return /* @__PURE__ */ jsx(
|
|
21822
21535
|
Button,
|
|
21823
21536
|
{
|
|
21824
21537
|
...rest,
|
|
21825
21538
|
variant,
|
|
21826
|
-
startIcon: !loading && startIcon ? typeof startIcon === "string" ? /* @__PURE__ */
|
|
21827
|
-
endIcon: !loading && endIcon ? typeof endIcon === "string" ? /* @__PURE__ */
|
|
21539
|
+
startIcon: !loading && startIcon ? typeof startIcon === "string" ? /* @__PURE__ */ jsx(IconElement, { icon: startIcon, sx: { cursor: "pointer" } }) : startIcon : void 0,
|
|
21540
|
+
endIcon: !loading && endIcon ? typeof endIcon === "string" ? /* @__PURE__ */ jsx(IconElement, { icon: endIcon, sx: { cursor: "pointer" } }) : endIcon : void 0,
|
|
21828
21541
|
sx: {
|
|
21829
21542
|
minWidth: 100,
|
|
21830
21543
|
textTransform: "none",
|
|
@@ -21832,14 +21545,14 @@ const ButtonElement = ({
|
|
|
21832
21545
|
...sx
|
|
21833
21546
|
},
|
|
21834
21547
|
disabled,
|
|
21835
|
-
children: loading ? /* @__PURE__ */
|
|
21548
|
+
children: loading ? /* @__PURE__ */ jsx(
|
|
21836
21549
|
LoadingComponent,
|
|
21837
21550
|
{
|
|
21838
21551
|
color: palette.primary.contrastText,
|
|
21839
21552
|
size: "small",
|
|
21840
21553
|
sx: { minHeight: "24.5px" }
|
|
21841
21554
|
}
|
|
21842
|
-
) : /* @__PURE__ */
|
|
21555
|
+
) : /* @__PURE__ */ jsx(
|
|
21843
21556
|
Typography,
|
|
21844
21557
|
{
|
|
21845
21558
|
sx: { ...TYPOGRAPHY_STYLES.textSm.regular, whiteSpace: "nowrap" },
|
|
@@ -21857,7 +21570,7 @@ const TextFieldLabelElement = ({
|
|
|
21857
21570
|
}) => {
|
|
21858
21571
|
const { palette } = useTheme$2();
|
|
21859
21572
|
if (!label) return null;
|
|
21860
|
-
return /* @__PURE__ */
|
|
21573
|
+
return /* @__PURE__ */ jsxs(
|
|
21861
21574
|
Typography,
|
|
21862
21575
|
{
|
|
21863
21576
|
variant: "subtitle1",
|
|
@@ -21868,15 +21581,15 @@ const TextFieldLabelElement = ({
|
|
|
21868
21581
|
gap: PADDING_GAP_ITEM_SMALL
|
|
21869
21582
|
},
|
|
21870
21583
|
children: [
|
|
21871
|
-
iconLabel && /* @__PURE__ */
|
|
21584
|
+
iconLabel && /* @__PURE__ */ jsx(IconElement, { icon: iconLabel, sx: { fontSize: STYLE.TEXT_FIELD.FONT_SIZE_LABEL } }),
|
|
21872
21585
|
label,
|
|
21873
|
-
required && /* @__PURE__ */
|
|
21586
|
+
required && /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
21874
21587
|
]
|
|
21875
21588
|
}
|
|
21876
21589
|
);
|
|
21877
21590
|
};
|
|
21878
21591
|
const IconButtonElement = ({ icon, onClick, sx, size = 16 }) => {
|
|
21879
|
-
return /* @__PURE__ */
|
|
21592
|
+
return /* @__PURE__ */ jsx(
|
|
21880
21593
|
IconButton,
|
|
21881
21594
|
{
|
|
21882
21595
|
onClick,
|
|
@@ -21892,7 +21605,7 @@ const IconButtonElement = ({ icon, onClick, sx, size = 16 }) => {
|
|
|
21892
21605
|
},
|
|
21893
21606
|
...sx
|
|
21894
21607
|
},
|
|
21895
|
-
children: /* @__PURE__ */
|
|
21608
|
+
children: /* @__PURE__ */ jsx(IconElement, { icon, sx: { fontSize: size } })
|
|
21896
21609
|
}
|
|
21897
21610
|
);
|
|
21898
21611
|
};
|
|
@@ -21921,8 +21634,8 @@ const TextFieldElement = ({
|
|
|
21921
21634
|
onChange({ target: { name: name2, value: event.target.value || null } });
|
|
21922
21635
|
};
|
|
21923
21636
|
const { palette, typography } = useTheme$2();
|
|
21924
|
-
return /* @__PURE__ */
|
|
21925
|
-
/* @__PURE__ */
|
|
21637
|
+
return /* @__PURE__ */ jsxs(Box, { sx: { position: "relative", width: "100%" }, children: [
|
|
21638
|
+
/* @__PURE__ */ jsx(
|
|
21926
21639
|
TextFieldLabelElement,
|
|
21927
21640
|
{
|
|
21928
21641
|
label,
|
|
@@ -21931,7 +21644,7 @@ const TextFieldElement = ({
|
|
|
21931
21644
|
required: rest.required
|
|
21932
21645
|
}
|
|
21933
21646
|
),
|
|
21934
|
-
/* @__PURE__ */
|
|
21647
|
+
/* @__PURE__ */ jsx(
|
|
21935
21648
|
TextField,
|
|
21936
21649
|
{
|
|
21937
21650
|
error: Boolean(error),
|
|
@@ -21942,7 +21655,7 @@ const TextFieldElement = ({
|
|
|
21942
21655
|
name: name2,
|
|
21943
21656
|
InputProps: {
|
|
21944
21657
|
...InputProps,
|
|
21945
|
-
endAdornment: showResetButton && value2 && onReset ? /* @__PURE__ */
|
|
21658
|
+
endAdornment: showResetButton && value2 && onReset ? /* @__PURE__ */ jsx(IconButtonElement, { icon: "close", onClick: onReset }) : InputProps?.endAdornment,
|
|
21946
21659
|
sx: {
|
|
21947
21660
|
...InputProps?.sx
|
|
21948
21661
|
}
|
|
@@ -21954,7 +21667,7 @@ const TextFieldElement = ({
|
|
|
21954
21667
|
...rest
|
|
21955
21668
|
}
|
|
21956
21669
|
),
|
|
21957
|
-
description && /* @__PURE__ */
|
|
21670
|
+
description && /* @__PURE__ */ jsxs(
|
|
21958
21671
|
Typography,
|
|
21959
21672
|
{
|
|
21960
21673
|
variant: "body2",
|
|
@@ -21970,7 +21683,7 @@ const TextFieldElement = ({
|
|
|
21970
21683
|
gap: GAP_ICON_CONTENT_BY_SIZE.small
|
|
21971
21684
|
},
|
|
21972
21685
|
children: [
|
|
21973
|
-
/* @__PURE__ */
|
|
21686
|
+
/* @__PURE__ */ jsx(Box, { sx: { fontWeight: typography.h2.fontWeight }, children: "Ghi chú:" }),
|
|
21974
21687
|
" ",
|
|
21975
21688
|
description
|
|
21976
21689
|
]
|
|
@@ -24107,15 +23820,15 @@ const OtpPart = ({ setAuthProcess }) => {
|
|
|
24107
23820
|
const timer = setTimeout(() => setSecond(second - 1), 1e3);
|
|
24108
23821
|
return () => clearTimeout(timer);
|
|
24109
23822
|
}, [second]);
|
|
24110
|
-
return /* @__PURE__ */
|
|
24111
|
-
/* @__PURE__ */
|
|
23823
|
+
return /* @__PURE__ */ jsxs(Stack$1, { flex: 1, children: [
|
|
23824
|
+
/* @__PURE__ */ jsx(
|
|
24112
23825
|
Typography,
|
|
24113
23826
|
{
|
|
24114
23827
|
sx: { textAlign: "center" },
|
|
24115
23828
|
children: `Mã OTP đã gửi đến ${formik.values.phone}. Mã có giá trị trong vòng ${second}s`
|
|
24116
23829
|
}
|
|
24117
23830
|
),
|
|
24118
|
-
/* @__PURE__ */
|
|
23831
|
+
/* @__PURE__ */ jsx(StackRow, { children: Array.from({ length: lengthOtp }, (_, index) => /* @__PURE__ */ jsx(
|
|
24119
23832
|
Stack$1,
|
|
24120
23833
|
{
|
|
24121
23834
|
component: "input",
|
|
@@ -24138,7 +23851,7 @@ const OtpPart = ({ setAuthProcess }) => {
|
|
|
24138
23851
|
},
|
|
24139
23852
|
index
|
|
24140
23853
|
)) }),
|
|
24141
|
-
/* @__PURE__ */
|
|
23854
|
+
/* @__PURE__ */ jsx(
|
|
24142
23855
|
IconContentElement,
|
|
24143
23856
|
{
|
|
24144
23857
|
icon: "send",
|
|
@@ -24204,7 +23917,7 @@ const AuthPage = ({}) => {
|
|
|
24204
23917
|
}
|
|
24205
23918
|
};
|
|
24206
23919
|
const [showPassword, setShowPassword] = useState(false);
|
|
24207
|
-
return /* @__PURE__ */
|
|
23920
|
+
return /* @__PURE__ */ jsx(
|
|
24208
23921
|
Stack$1,
|
|
24209
23922
|
{
|
|
24210
23923
|
sx: {
|
|
@@ -24215,7 +23928,7 @@ const AuthPage = ({}) => {
|
|
|
24215
23928
|
width: "100%",
|
|
24216
23929
|
height: "100%"
|
|
24217
23930
|
},
|
|
24218
|
-
children: /* @__PURE__ */
|
|
23931
|
+
children: /* @__PURE__ */ jsx(
|
|
24219
23932
|
Formik,
|
|
24220
23933
|
{
|
|
24221
23934
|
initialValues: {
|
|
@@ -24230,7 +23943,7 @@ const AuthPage = ({}) => {
|
|
|
24230
23943
|
validateOnChange: false,
|
|
24231
23944
|
enableReinitialize: true,
|
|
24232
23945
|
children: (formik) => {
|
|
24233
|
-
return /* @__PURE__ */
|
|
23946
|
+
return /* @__PURE__ */ jsx(Form, { noValidate: true, children: /* @__PURE__ */ jsxs(
|
|
24234
23947
|
Stack$1,
|
|
24235
23948
|
{
|
|
24236
23949
|
sx: {
|
|
@@ -24244,9 +23957,9 @@ const AuthPage = ({}) => {
|
|
|
24244
23957
|
},
|
|
24245
23958
|
gap: 3,
|
|
24246
23959
|
children: [
|
|
24247
|
-
/* @__PURE__ */
|
|
24248
|
-
authProcess === AuthProcess.LOGIN && /* @__PURE__ */
|
|
24249
|
-
/* @__PURE__ */
|
|
23960
|
+
/* @__PURE__ */ jsx(LogoComponent, { url: "/images/logo/logo-sub-4.svg" }),
|
|
23961
|
+
authProcess === AuthProcess.LOGIN && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
23962
|
+
/* @__PURE__ */ jsx(
|
|
24250
23963
|
TextFieldElement,
|
|
24251
23964
|
{
|
|
24252
23965
|
iconLabel: "mail",
|
|
@@ -24262,7 +23975,7 @@ const AuthPage = ({}) => {
|
|
|
24262
23975
|
required: true
|
|
24263
23976
|
}
|
|
24264
23977
|
),
|
|
24265
|
-
/* @__PURE__ */
|
|
23978
|
+
/* @__PURE__ */ jsx(
|
|
24266
23979
|
TextFieldElement,
|
|
24267
23980
|
{
|
|
24268
23981
|
iconLabel: "vpn_key",
|
|
@@ -24278,7 +23991,7 @@ const AuthPage = ({}) => {
|
|
|
24278
23991
|
"& fieldset": { borderColor: palette.primary.light }
|
|
24279
23992
|
},
|
|
24280
23993
|
InputProps: {
|
|
24281
|
-
endAdornment: /* @__PURE__ */
|
|
23994
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
24282
23995
|
IconElement,
|
|
24283
23996
|
{
|
|
24284
23997
|
icon: showPassword ? "visibility" : "visibility_off",
|
|
@@ -24290,7 +24003,7 @@ const AuthPage = ({}) => {
|
|
|
24290
24003
|
}
|
|
24291
24004
|
)
|
|
24292
24005
|
] }),
|
|
24293
|
-
authProcess === AuthProcess.FORGOT_PASSWORD && /* @__PURE__ */
|
|
24006
|
+
authProcess === AuthProcess.FORGOT_PASSWORD && /* @__PURE__ */ jsx(
|
|
24294
24007
|
TextFieldElement,
|
|
24295
24008
|
{
|
|
24296
24009
|
iconLabel: "mail",
|
|
@@ -24306,8 +24019,8 @@ const AuthPage = ({}) => {
|
|
|
24306
24019
|
required: true
|
|
24307
24020
|
}
|
|
24308
24021
|
),
|
|
24309
|
-
authProcess === AuthProcess.VERIFY_OTP && /* @__PURE__ */
|
|
24310
|
-
authProcess === AuthProcess.RESET_PASSWORD && /* @__PURE__ */
|
|
24022
|
+
authProcess === AuthProcess.VERIFY_OTP && /* @__PURE__ */ jsx(OtpPart, { setAuthProcess }),
|
|
24023
|
+
authProcess === AuthProcess.RESET_PASSWORD && /* @__PURE__ */ jsx(
|
|
24311
24024
|
TextFieldElement,
|
|
24312
24025
|
{
|
|
24313
24026
|
label: "Mật khẩu",
|
|
@@ -24322,7 +24035,7 @@ const AuthPage = ({}) => {
|
|
|
24322
24035
|
},
|
|
24323
24036
|
type: showPassword ? "text" : "password",
|
|
24324
24037
|
InputProps: {
|
|
24325
|
-
endAdornment: /* @__PURE__ */
|
|
24038
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
24326
24039
|
IconElement,
|
|
24327
24040
|
{
|
|
24328
24041
|
icon: showPassword ? "visibility" : "visibility_off",
|
|
@@ -24332,7 +24045,7 @@ const AuthPage = ({}) => {
|
|
|
24332
24045
|
}
|
|
24333
24046
|
}
|
|
24334
24047
|
),
|
|
24335
|
-
/* @__PURE__ */
|
|
24048
|
+
/* @__PURE__ */ jsx(
|
|
24336
24049
|
IconContentElement,
|
|
24337
24050
|
{
|
|
24338
24051
|
icon: BUTTON_BACK_ICON_CONTENT[authProcess].backIcon,
|
|
@@ -24341,7 +24054,7 @@ const AuthPage = ({}) => {
|
|
|
24341
24054
|
onClick: () => authProcess === AuthProcess.LOGIN ? setAuthProcess(AuthProcess.FORGOT_PASSWORD) : setAuthProcess(AuthProcess.LOGIN)
|
|
24342
24055
|
}
|
|
24343
24056
|
),
|
|
24344
|
-
/* @__PURE__ */
|
|
24057
|
+
/* @__PURE__ */ jsx(
|
|
24345
24058
|
ButtonElement,
|
|
24346
24059
|
{
|
|
24347
24060
|
loading,
|
|
@@ -24360,17 +24073,17 @@ const AuthPage = ({}) => {
|
|
|
24360
24073
|
);
|
|
24361
24074
|
};
|
|
24362
24075
|
const DashboardPage = () => {
|
|
24363
|
-
return /* @__PURE__ */
|
|
24076
|
+
return /* @__PURE__ */ jsx(Outlet, {});
|
|
24364
24077
|
};
|
|
24365
24078
|
const ErrorPage = ({}) => {
|
|
24366
24079
|
const dispatch = useAppDispatch();
|
|
24367
24080
|
const navigate = useNavigate();
|
|
24368
24081
|
const account = useSelector((state) => state.account);
|
|
24369
24082
|
const [loading, setLoading] = React__default.useState(false);
|
|
24370
|
-
return /* @__PURE__ */
|
|
24371
|
-
/* @__PURE__ */
|
|
24372
|
-
/* @__PURE__ */
|
|
24373
|
-
/* @__PURE__ */
|
|
24083
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
24084
|
+
/* @__PURE__ */ jsxs(StackRowAlignCenter, { children: [
|
|
24085
|
+
/* @__PURE__ */ jsx(Typography, { color: "primary", variant: "h1", fontSize: 90, children: "5" }),
|
|
24086
|
+
/* @__PURE__ */ jsx(
|
|
24374
24087
|
Stack$1,
|
|
24375
24088
|
{
|
|
24376
24089
|
component: "img",
|
|
@@ -24381,7 +24094,7 @@ const ErrorPage = ({}) => {
|
|
|
24381
24094
|
loading: "lazy"
|
|
24382
24095
|
}
|
|
24383
24096
|
),
|
|
24384
|
-
/* @__PURE__ */
|
|
24097
|
+
/* @__PURE__ */ jsx(
|
|
24385
24098
|
Stack$1,
|
|
24386
24099
|
{
|
|
24387
24100
|
component: "img",
|
|
@@ -24393,8 +24106,8 @@ const ErrorPage = ({}) => {
|
|
|
24393
24106
|
}
|
|
24394
24107
|
)
|
|
24395
24108
|
] }),
|
|
24396
|
-
/* @__PURE__ */
|
|
24397
|
-
/* @__PURE__ */
|
|
24109
|
+
/* @__PURE__ */ jsx(Typography, { sx: { width: 450, textAlign: "center", lineHeight: 2 }, children: "TÀI KHOẢN CỦA BẠN KHÔNG ĐỦ QUYỀN TRUY CẬP HOẶC HỆ THỐNG ĐÃ GẶP SỰ CỐ!" }),
|
|
24110
|
+
/* @__PURE__ */ jsx(
|
|
24398
24111
|
ButtonElement,
|
|
24399
24112
|
{
|
|
24400
24113
|
content: "Đăng nhập lại",
|
|
@@ -24420,10 +24133,10 @@ const ErrorPage = ({}) => {
|
|
|
24420
24133
|
};
|
|
24421
24134
|
const NotFoundPage = ({}) => {
|
|
24422
24135
|
const navigate = useNavigate();
|
|
24423
|
-
return /* @__PURE__ */
|
|
24424
|
-
/* @__PURE__ */
|
|
24425
|
-
/* @__PURE__ */
|
|
24426
|
-
/* @__PURE__ */
|
|
24136
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
24137
|
+
/* @__PURE__ */ jsxs(StackRowAlignCenter, { children: [
|
|
24138
|
+
/* @__PURE__ */ jsx(Typography, { color: "primary", variant: "h1", fontSize: 90, children: "4" }),
|
|
24139
|
+
/* @__PURE__ */ jsx(
|
|
24427
24140
|
Stack$1,
|
|
24428
24141
|
{
|
|
24429
24142
|
component: "img",
|
|
@@ -24434,10 +24147,10 @@ const NotFoundPage = ({}) => {
|
|
|
24434
24147
|
loading: "lazy"
|
|
24435
24148
|
}
|
|
24436
24149
|
),
|
|
24437
|
-
/* @__PURE__ */
|
|
24150
|
+
/* @__PURE__ */ jsx(Typography, { color: "primary", variant: "h1", fontSize: 90, children: "4" })
|
|
24438
24151
|
] }),
|
|
24439
|
-
/* @__PURE__ */
|
|
24440
|
-
/* @__PURE__ */
|
|
24152
|
+
/* @__PURE__ */ jsx(Typography, { sx: { width: 450, textAlign: "center", lineHeight: 2 }, children: "XIN LỖI, TRANG BẠN TÌM KIẾM KHÔNG TỒN TẠI!" }),
|
|
24153
|
+
/* @__PURE__ */ jsx(ButtonElement, { content: "Quay lại trang chủ", fullWidth: false, onClick: () => navigate(PAGE.AUTH.path) })
|
|
24441
24154
|
] });
|
|
24442
24155
|
};
|
|
24443
24156
|
const LayoutGroupContext = createContext({});
|
|
@@ -27682,7 +27395,7 @@ function useRender(Component2, props, ref, { latestValues }, isStatic, forwardMo
|
|
|
27682
27395
|
const useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
|
|
27683
27396
|
const visualProps = useVisualProps(props, latestValues, isStatic, Component2);
|
|
27684
27397
|
const filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
|
|
27685
|
-
const elementProps = Component2 !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};
|
|
27398
|
+
const elementProps = Component2 !== Fragment$1 ? { ...filteredProps, ...visualProps, ref } : {};
|
|
27686
27399
|
const { children } = props;
|
|
27687
27400
|
const renderedChildren = useMemo(() => isMotionValue(children) ? children.get() : children, [children]);
|
|
27688
27401
|
return createElement(Component2, {
|
|
@@ -27937,7 +27650,7 @@ function createMotionComponent(Component2, { forwardMotionProps = false } = {},
|
|
|
27937
27650
|
MeasureLayout2 = layoutProjection.MeasureLayout;
|
|
27938
27651
|
context.visualElement = useVisualElement(Component2, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);
|
|
27939
27652
|
}
|
|
27940
|
-
return
|
|
27653
|
+
return jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout2 && context.visualElement ? jsx(MeasureLayout2, { visualElement: context.visualElement, ...configAndProps }) : null, useRender(Component2, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps)] });
|
|
27941
27654
|
}
|
|
27942
27655
|
MotionDOMComponent.displayName = `motion.${typeof Component2 === "string" ? Component2 : `create(${Component2.displayName ?? Component2.name ?? ""})`}`;
|
|
27943
27656
|
const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);
|
|
@@ -28663,7 +28376,7 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
28663
28376
|
}
|
|
28664
28377
|
const createDomVisualElement = (Component2, options) => {
|
|
28665
28378
|
return isSVGComponent(Component2) ? new SVGVisualElement(options) : new HTMLVisualElement(options, {
|
|
28666
|
-
allowProjection: Component2 !== Fragment
|
|
28379
|
+
allowProjection: Component2 !== Fragment$1
|
|
28667
28380
|
});
|
|
28668
28381
|
};
|
|
28669
28382
|
function resolveVariant(visualElement, definition, custom) {
|
|
@@ -30056,7 +29769,7 @@ class MeasureLayoutWithContext extends Component$1 {
|
|
|
30056
29769
|
function MeasureLayout(props) {
|
|
30057
29770
|
const [isPresent, safeToRemove] = usePresence();
|
|
30058
29771
|
const layoutGroup = useContext(LayoutGroupContext);
|
|
30059
|
-
return
|
|
29772
|
+
return jsx(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove });
|
|
30060
29773
|
}
|
|
30061
29774
|
const defaultScaleCorrectors = {
|
|
30062
29775
|
borderRadius: {
|
|
@@ -31713,9 +31426,9 @@ const MotionBox = ({
|
|
|
31713
31426
|
transition: { duration: 0.2 }
|
|
31714
31427
|
}
|
|
31715
31428
|
} : {};
|
|
31716
|
-
return /* @__PURE__ */
|
|
31429
|
+
return /* @__PURE__ */ jsx(motion.div, { ...motionProps, ...getAnimationProps(), ...hoverProps, onClick, style: { ...sx }, children });
|
|
31717
31430
|
};
|
|
31718
|
-
const IconRight = (props) => /* @__PURE__ */
|
|
31431
|
+
const IconRight = (props) => /* @__PURE__ */ jsx(
|
|
31719
31432
|
"svg",
|
|
31720
31433
|
{
|
|
31721
31434
|
width: "20",
|
|
@@ -31724,7 +31437,7 @@ const IconRight = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
|
31724
31437
|
fill: "none",
|
|
31725
31438
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31726
31439
|
...props,
|
|
31727
|
-
children: /* @__PURE__ */
|
|
31440
|
+
children: /* @__PURE__ */ jsx(
|
|
31728
31441
|
"path",
|
|
31729
31442
|
{
|
|
31730
31443
|
d: "M12 1L19 8M19 8L12 15M19 8L1 8",
|
|
@@ -31736,7 +31449,7 @@ const IconRight = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
|
31736
31449
|
)
|
|
31737
31450
|
}
|
|
31738
31451
|
);
|
|
31739
|
-
const IconLeft = (props) => /* @__PURE__ */
|
|
31452
|
+
const IconLeft = (props) => /* @__PURE__ */ jsx(
|
|
31740
31453
|
"svg",
|
|
31741
31454
|
{
|
|
31742
31455
|
width: "20",
|
|
@@ -31745,7 +31458,7 @@ const IconLeft = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
|
31745
31458
|
fill: "none",
|
|
31746
31459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31747
31460
|
...props,
|
|
31748
|
-
children: /* @__PURE__ */
|
|
31461
|
+
children: /* @__PURE__ */ jsx(
|
|
31749
31462
|
"path",
|
|
31750
31463
|
{
|
|
31751
31464
|
d: "M8 15L1 8M1 8L8 1M1 8L19 8",
|
|
@@ -31783,8 +31496,8 @@ const AppGrid = ({
|
|
|
31783
31496
|
const start = page * pageSize;
|
|
31784
31497
|
const end = start + pageSize;
|
|
31785
31498
|
const visibleApps = totalPages > 1 ? apps.slice(start, end) : apps;
|
|
31786
|
-
return /* @__PURE__ */
|
|
31787
|
-
/* @__PURE__ */
|
|
31499
|
+
return /* @__PURE__ */ jsxs(Box, { sx: { position: "relative" }, children: [
|
|
31500
|
+
/* @__PURE__ */ jsx(
|
|
31788
31501
|
Box,
|
|
31789
31502
|
{
|
|
31790
31503
|
sx: {
|
|
@@ -31794,7 +31507,7 @@ const AppGrid = ({
|
|
|
31794
31507
|
},
|
|
31795
31508
|
children: visibleApps.map((app2, index) => {
|
|
31796
31509
|
const isSelected = selectedAppId === app2.key;
|
|
31797
|
-
return /* @__PURE__ */
|
|
31510
|
+
return /* @__PURE__ */ jsxs(
|
|
31798
31511
|
MotionBox,
|
|
31799
31512
|
{
|
|
31800
31513
|
preset: "staggerItem",
|
|
@@ -31809,7 +31522,7 @@ const AppGrid = ({
|
|
|
31809
31522
|
flexDirection: "column"
|
|
31810
31523
|
},
|
|
31811
31524
|
children: [
|
|
31812
|
-
/* @__PURE__ */
|
|
31525
|
+
/* @__PURE__ */ jsx(
|
|
31813
31526
|
Box,
|
|
31814
31527
|
{
|
|
31815
31528
|
sx: {
|
|
@@ -31823,7 +31536,7 @@ const AppGrid = ({
|
|
|
31823
31536
|
background: getAppColor(app2.category),
|
|
31824
31537
|
boxShadow: isSelected ? `0 0 0 1px ${theme.palette.primary.main}, ${iconShadow}` : iconShadow
|
|
31825
31538
|
},
|
|
31826
|
-
children: app2.icon.startsWith("/") && /* @__PURE__ */
|
|
31539
|
+
children: app2.icon.startsWith("/") && /* @__PURE__ */ jsx(
|
|
31827
31540
|
ImageElement,
|
|
31828
31541
|
{
|
|
31829
31542
|
sx: { width: iconSize * 0.56, height: iconSize * 0.56 },
|
|
@@ -31833,7 +31546,7 @@ const AppGrid = ({
|
|
|
31833
31546
|
)
|
|
31834
31547
|
}
|
|
31835
31548
|
),
|
|
31836
|
-
/* @__PURE__ */
|
|
31549
|
+
/* @__PURE__ */ jsx(
|
|
31837
31550
|
Typography,
|
|
31838
31551
|
{
|
|
31839
31552
|
variant: titleVariant,
|
|
@@ -31841,7 +31554,7 @@ const AppGrid = ({
|
|
|
31841
31554
|
children: app2.title
|
|
31842
31555
|
}
|
|
31843
31556
|
),
|
|
31844
|
-
/* @__PURE__ */
|
|
31557
|
+
/* @__PURE__ */ jsx(
|
|
31845
31558
|
Typography,
|
|
31846
31559
|
{
|
|
31847
31560
|
variant: captionVariant,
|
|
@@ -31856,8 +31569,8 @@ const AppGrid = ({
|
|
|
31856
31569
|
})
|
|
31857
31570
|
}
|
|
31858
31571
|
),
|
|
31859
|
-
showPagination && totalPages > 1 && /* @__PURE__ */
|
|
31860
|
-
page === totalPages - 1 && /* @__PURE__ */
|
|
31572
|
+
showPagination && totalPages > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31573
|
+
page === totalPages - 1 && /* @__PURE__ */ jsx(
|
|
31861
31574
|
IconButton,
|
|
31862
31575
|
{
|
|
31863
31576
|
size: "small",
|
|
@@ -31870,10 +31583,10 @@ const AppGrid = ({
|
|
|
31870
31583
|
transform: "translateY(-120%)",
|
|
31871
31584
|
color: theme.palette.divider
|
|
31872
31585
|
},
|
|
31873
|
-
children: /* @__PURE__ */
|
|
31586
|
+
children: /* @__PURE__ */ jsx(IconLeft, {})
|
|
31874
31587
|
}
|
|
31875
31588
|
),
|
|
31876
|
-
page !== totalPages - 1 && /* @__PURE__ */
|
|
31589
|
+
page !== totalPages - 1 && /* @__PURE__ */ jsx(
|
|
31877
31590
|
IconButton,
|
|
31878
31591
|
{
|
|
31879
31592
|
size: "small",
|
|
@@ -31886,10 +31599,10 @@ const AppGrid = ({
|
|
|
31886
31599
|
transform: "translateY(-120%)",
|
|
31887
31600
|
color: theme.palette.divider
|
|
31888
31601
|
},
|
|
31889
|
-
children: /* @__PURE__ */
|
|
31602
|
+
children: /* @__PURE__ */ jsx(IconRight, {})
|
|
31890
31603
|
}
|
|
31891
31604
|
),
|
|
31892
|
-
/* @__PURE__ */
|
|
31605
|
+
/* @__PURE__ */ jsx(
|
|
31893
31606
|
Box,
|
|
31894
31607
|
{
|
|
31895
31608
|
sx: {
|
|
@@ -31898,7 +31611,7 @@ const AppGrid = ({
|
|
|
31898
31611
|
alignItems: "center",
|
|
31899
31612
|
justifyContent: "center"
|
|
31900
31613
|
},
|
|
31901
|
-
children: /* @__PURE__ */
|
|
31614
|
+
children: /* @__PURE__ */ jsx(
|
|
31902
31615
|
Box,
|
|
31903
31616
|
{
|
|
31904
31617
|
sx: {
|
|
@@ -31910,7 +31623,7 @@ const AppGrid = ({
|
|
|
31910
31623
|
borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
|
|
31911
31624
|
backgroundColor: "rgba(255,255,255,0.15)"
|
|
31912
31625
|
},
|
|
31913
|
-
children: Array.from({ length: totalPages }).map((_, i) => /* @__PURE__ */
|
|
31626
|
+
children: Array.from({ length: totalPages }).map((_, i) => /* @__PURE__ */ jsx(
|
|
31914
31627
|
Box,
|
|
31915
31628
|
{
|
|
31916
31629
|
onClick: () => setPage(i),
|
|
@@ -31939,7 +31652,7 @@ const SystemMonitorScreen = () => {
|
|
|
31939
31652
|
const [tab, setTab] = useState(AppCategory.ALL);
|
|
31940
31653
|
const listApp = useApps(tab);
|
|
31941
31654
|
const currentApp = useActiveSidebar();
|
|
31942
|
-
return /* @__PURE__ */
|
|
31655
|
+
return /* @__PURE__ */ jsx(
|
|
31943
31656
|
MotionBox,
|
|
31944
31657
|
{
|
|
31945
31658
|
preset: "fadeInUp",
|
|
@@ -31950,7 +31663,7 @@ const SystemMonitorScreen = () => {
|
|
|
31950
31663
|
position: "relative",
|
|
31951
31664
|
top: 150
|
|
31952
31665
|
},
|
|
31953
|
-
children: /* @__PURE__ */
|
|
31666
|
+
children: /* @__PURE__ */ jsxs(
|
|
31954
31667
|
Box,
|
|
31955
31668
|
{
|
|
31956
31669
|
sx: {
|
|
@@ -31961,7 +31674,7 @@ const SystemMonitorScreen = () => {
|
|
|
31961
31674
|
justifyContent: "flex-start"
|
|
31962
31675
|
},
|
|
31963
31676
|
children: [
|
|
31964
|
-
/* @__PURE__ */
|
|
31677
|
+
/* @__PURE__ */ jsx(
|
|
31965
31678
|
Box,
|
|
31966
31679
|
{
|
|
31967
31680
|
sx: {
|
|
@@ -31975,13 +31688,13 @@ const SystemMonitorScreen = () => {
|
|
|
31975
31688
|
{ key: AppCategory.HRM, label: "HRM" },
|
|
31976
31689
|
{ key: AppCategory.WORKFLOW, label: "Workflow Engine" },
|
|
31977
31690
|
{ key: AppCategory.PLATFORM_INFO, label: "Platform & Info" }
|
|
31978
|
-
].map((t) => /* @__PURE__ */
|
|
31691
|
+
].map((t) => /* @__PURE__ */ jsxs(
|
|
31979
31692
|
MotionBox,
|
|
31980
31693
|
{
|
|
31981
31694
|
sx: { position: "relative" },
|
|
31982
31695
|
preset: "tabUnderline",
|
|
31983
31696
|
children: [
|
|
31984
|
-
/* @__PURE__ */
|
|
31697
|
+
/* @__PURE__ */ jsx(
|
|
31985
31698
|
Typography,
|
|
31986
31699
|
{
|
|
31987
31700
|
onClick: () => setTab(t.key),
|
|
@@ -31992,7 +31705,7 @@ const SystemMonitorScreen = () => {
|
|
|
31992
31705
|
children: t.label
|
|
31993
31706
|
}
|
|
31994
31707
|
),
|
|
31995
|
-
tab === t.key && /* @__PURE__ */
|
|
31708
|
+
tab === t.key && /* @__PURE__ */ jsx(
|
|
31996
31709
|
MotionBox,
|
|
31997
31710
|
{
|
|
31998
31711
|
preset: "tabUnderline",
|
|
@@ -32004,7 +31717,7 @@ const SystemMonitorScreen = () => {
|
|
|
32004
31717
|
backgroundColor: theme.palette.common.white,
|
|
32005
31718
|
transformOrigin: "left"
|
|
32006
31719
|
},
|
|
32007
|
-
children: /* @__PURE__ */
|
|
31720
|
+
children: /* @__PURE__ */ jsx("div", {})
|
|
32008
31721
|
}
|
|
32009
31722
|
)
|
|
32010
31723
|
]
|
|
@@ -32013,7 +31726,7 @@ const SystemMonitorScreen = () => {
|
|
|
32013
31726
|
))
|
|
32014
31727
|
}
|
|
32015
31728
|
),
|
|
32016
|
-
/* @__PURE__ */
|
|
31729
|
+
/* @__PURE__ */ jsx(MotionBox, { preset: "tabContent", children: /* @__PURE__ */ jsx(
|
|
32017
31730
|
AppGrid,
|
|
32018
31731
|
{
|
|
32019
31732
|
apps: listApp,
|
|
@@ -32039,17 +31752,17 @@ const renderRoutes = (routes2, account) => routes2.map((route) => {
|
|
|
32039
31752
|
const { path, layout: layout2, element, type, allowUserTypes = [], children } = route;
|
|
32040
31753
|
const Layout = layout2 || React__default.Fragment;
|
|
32041
31754
|
let Element2 = element;
|
|
32042
|
-
if (path === PAGE.AUTH.path && account.isLogin) Element2 = () => /* @__PURE__ */
|
|
31755
|
+
if (path === PAGE.AUTH.path && account.isLogin) Element2 = () => /* @__PURE__ */ jsx(Navigate, { to: PAGE.DASHBOARD.path });
|
|
32043
31756
|
if (type === RouteType.PROTECTED) {
|
|
32044
|
-
if (!account.isLogin) Element2 = () => /* @__PURE__ */
|
|
31757
|
+
if (!account.isLogin) Element2 = () => /* @__PURE__ */ jsx(Navigate, { to: PAGE.AUTH.path });
|
|
32045
31758
|
else if (allowUserTypes.length && !allowUserTypes.includes(account.user.type) && account.user.type !== UserType.ROOT)
|
|
32046
|
-
Element2 = () => /* @__PURE__ */
|
|
31759
|
+
Element2 = () => /* @__PURE__ */ jsx(Navigate, { to: PAGE.ERROR.path });
|
|
32047
31760
|
}
|
|
32048
|
-
return /* @__PURE__ */
|
|
31761
|
+
return /* @__PURE__ */ jsx(
|
|
32049
31762
|
Route,
|
|
32050
31763
|
{
|
|
32051
31764
|
path,
|
|
32052
|
-
element: /* @__PURE__ */
|
|
31765
|
+
element: /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx(Element2, {}) }),
|
|
32053
31766
|
children: children && renderRoutes(children, account)
|
|
32054
31767
|
},
|
|
32055
31768
|
path
|
|
@@ -32069,6 +31782,217 @@ const routes = [
|
|
|
32069
31782
|
]
|
|
32070
31783
|
}
|
|
32071
31784
|
];
|
|
31785
|
+
const SidebarContext = createContext(
|
|
31786
|
+
void 0
|
|
31787
|
+
);
|
|
31788
|
+
const useSidebar = () => {
|
|
31789
|
+
const context = useContext(SidebarContext);
|
|
31790
|
+
if (context === void 0) {
|
|
31791
|
+
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
31792
|
+
}
|
|
31793
|
+
return context;
|
|
31794
|
+
};
|
|
31795
|
+
const AppsSidebar = ({
|
|
31796
|
+
isOpen,
|
|
31797
|
+
onClose
|
|
31798
|
+
}) => {
|
|
31799
|
+
const theme = useTheme();
|
|
31800
|
+
const navigate = useNavigate();
|
|
31801
|
+
const allApps = useApps();
|
|
31802
|
+
const dispatch = useAppDispatch();
|
|
31803
|
+
const currentApp = useActiveSidebar();
|
|
31804
|
+
const { setActiveExpandMenu } = useSidebar();
|
|
31805
|
+
const { palette } = useTheme();
|
|
31806
|
+
if (!isOpen) return null;
|
|
31807
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31808
|
+
/* @__PURE__ */ jsx(
|
|
31809
|
+
Box,
|
|
31810
|
+
{
|
|
31811
|
+
onClick: onClose,
|
|
31812
|
+
sx: {
|
|
31813
|
+
position: "fixed",
|
|
31814
|
+
top: 0,
|
|
31815
|
+
left: 0,
|
|
31816
|
+
right: 0,
|
|
31817
|
+
bottom: 0,
|
|
31818
|
+
backgroundColor: palette.action.selected,
|
|
31819
|
+
zIndex: 100
|
|
31820
|
+
}
|
|
31821
|
+
}
|
|
31822
|
+
),
|
|
31823
|
+
/* @__PURE__ */ jsxs(
|
|
31824
|
+
MotionBox,
|
|
31825
|
+
{
|
|
31826
|
+
preset: "fadeInLeft",
|
|
31827
|
+
sx: {
|
|
31828
|
+
position: "fixed",
|
|
31829
|
+
top: 0,
|
|
31830
|
+
left: 0,
|
|
31831
|
+
height: "100vh",
|
|
31832
|
+
backgroundColor: theme.palette.common.white,
|
|
31833
|
+
zIndex: 100,
|
|
31834
|
+
padding: PADDING_GAP_LAYOUT,
|
|
31835
|
+
gap: PADDING_GAP_ITEM,
|
|
31836
|
+
display: "flex",
|
|
31837
|
+
flexDirection: "column"
|
|
31838
|
+
},
|
|
31839
|
+
children: [
|
|
31840
|
+
/* @__PURE__ */ jsxs(
|
|
31841
|
+
Box,
|
|
31842
|
+
{
|
|
31843
|
+
sx: {
|
|
31844
|
+
display: "flex",
|
|
31845
|
+
justifyContent: "space-between",
|
|
31846
|
+
alignItems: "center"
|
|
31847
|
+
},
|
|
31848
|
+
children: [
|
|
31849
|
+
/* @__PURE__ */ jsx(
|
|
31850
|
+
IconButton,
|
|
31851
|
+
{
|
|
31852
|
+
onClick: onClose,
|
|
31853
|
+
sx: {
|
|
31854
|
+
color: theme.palette.grey[600],
|
|
31855
|
+
"&:hover": { backgroundColor: theme.palette.grey[100] }
|
|
31856
|
+
},
|
|
31857
|
+
children: /* @__PURE__ */ jsx(IconElement, { icon: "close" })
|
|
31858
|
+
}
|
|
31859
|
+
),
|
|
31860
|
+
/* @__PURE__ */ jsx(
|
|
31861
|
+
IconButton,
|
|
31862
|
+
{
|
|
31863
|
+
sx: {
|
|
31864
|
+
color: theme.palette.grey[600],
|
|
31865
|
+
"&:hover": { backgroundColor: theme.palette.grey[100] }
|
|
31866
|
+
},
|
|
31867
|
+
children: /* @__PURE__ */ jsx(
|
|
31868
|
+
IconElement,
|
|
31869
|
+
{
|
|
31870
|
+
icon: "home",
|
|
31871
|
+
onClick: () => {
|
|
31872
|
+
onClose();
|
|
31873
|
+
navigate(PAGE.DASHBOARD.path);
|
|
31874
|
+
}
|
|
31875
|
+
}
|
|
31876
|
+
)
|
|
31877
|
+
}
|
|
31878
|
+
)
|
|
31879
|
+
]
|
|
31880
|
+
}
|
|
31881
|
+
),
|
|
31882
|
+
/* @__PURE__ */ jsxs(
|
|
31883
|
+
Box,
|
|
31884
|
+
{
|
|
31885
|
+
sx: {
|
|
31886
|
+
gap: PADDING_GAP_ITEM,
|
|
31887
|
+
display: "flex",
|
|
31888
|
+
flexDirection: "column"
|
|
31889
|
+
},
|
|
31890
|
+
children: [
|
|
31891
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "Workflow Engine" }),
|
|
31892
|
+
/* @__PURE__ */ jsx(
|
|
31893
|
+
AppGrid,
|
|
31894
|
+
{
|
|
31895
|
+
apps: allApps.filter(
|
|
31896
|
+
(app2) => app2.category === AppCategory.WORKFLOW
|
|
31897
|
+
),
|
|
31898
|
+
columns: 4,
|
|
31899
|
+
iconSize: 60,
|
|
31900
|
+
iconRadius: 5.5,
|
|
31901
|
+
gap: PADDING_GAP_ITEM,
|
|
31902
|
+
titleVariant: "body1",
|
|
31903
|
+
captionVariant: "caption",
|
|
31904
|
+
titleColor: theme.palette.grey[800],
|
|
31905
|
+
captionColor: theme.palette.grey[600],
|
|
31906
|
+
selectedAppId: currentApp?.key,
|
|
31907
|
+
onClickItem: async (app2) => {
|
|
31908
|
+
await dispatch(
|
|
31909
|
+
ACTION_ACCOUNT.updateCurrentAccess(app2.key)
|
|
31910
|
+
).unwrap();
|
|
31911
|
+
setActiveExpandMenu(null);
|
|
31912
|
+
onClose();
|
|
31913
|
+
}
|
|
31914
|
+
}
|
|
31915
|
+
)
|
|
31916
|
+
]
|
|
31917
|
+
}
|
|
31918
|
+
),
|
|
31919
|
+
/* @__PURE__ */ jsxs(
|
|
31920
|
+
Box,
|
|
31921
|
+
{
|
|
31922
|
+
sx: {
|
|
31923
|
+
gap: PADDING_GAP_ITEM,
|
|
31924
|
+
display: "flex",
|
|
31925
|
+
flexDirection: "column"
|
|
31926
|
+
},
|
|
31927
|
+
children: [
|
|
31928
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "HRM" }),
|
|
31929
|
+
/* @__PURE__ */ jsx(
|
|
31930
|
+
AppGrid,
|
|
31931
|
+
{
|
|
31932
|
+
apps: allApps.filter((app2) => app2.category === AppCategory.HRM),
|
|
31933
|
+
columns: 4,
|
|
31934
|
+
iconSize: 60,
|
|
31935
|
+
iconRadius: 5.5,
|
|
31936
|
+
gap: PADDING_GAP_ITEM,
|
|
31937
|
+
titleVariant: "body1",
|
|
31938
|
+
captionVariant: "caption",
|
|
31939
|
+
titleColor: theme.palette.grey[800],
|
|
31940
|
+
captionColor: theme.palette.grey[600],
|
|
31941
|
+
selectedAppId: currentApp?.key,
|
|
31942
|
+
onClickItem: async (app2) => {
|
|
31943
|
+
await dispatch(
|
|
31944
|
+
ACTION_ACCOUNT.updateCurrentAccess(app2.key)
|
|
31945
|
+
).unwrap();
|
|
31946
|
+
setActiveExpandMenu(null);
|
|
31947
|
+
onClose();
|
|
31948
|
+
}
|
|
31949
|
+
}
|
|
31950
|
+
)
|
|
31951
|
+
]
|
|
31952
|
+
}
|
|
31953
|
+
),
|
|
31954
|
+
/* @__PURE__ */ jsxs(
|
|
31955
|
+
Box,
|
|
31956
|
+
{
|
|
31957
|
+
sx: {
|
|
31958
|
+
gap: PADDING_GAP_ITEM,
|
|
31959
|
+
display: "flex",
|
|
31960
|
+
flexDirection: "column"
|
|
31961
|
+
},
|
|
31962
|
+
children: [
|
|
31963
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "Platform Info" }),
|
|
31964
|
+
/* @__PURE__ */ jsx(
|
|
31965
|
+
AppGrid,
|
|
31966
|
+
{
|
|
31967
|
+
apps: allApps.filter(
|
|
31968
|
+
(app2) => app2.category === AppCategory.PLATFORM_INFO
|
|
31969
|
+
),
|
|
31970
|
+
columns: 4,
|
|
31971
|
+
iconSize: 60,
|
|
31972
|
+
iconRadius: 5.5,
|
|
31973
|
+
gap: PADDING_GAP_ITEM,
|
|
31974
|
+
titleVariant: "body1",
|
|
31975
|
+
captionVariant: "caption",
|
|
31976
|
+
titleColor: theme.palette.grey[800],
|
|
31977
|
+
captionColor: theme.palette.grey[600],
|
|
31978
|
+
selectedAppId: currentApp?.key,
|
|
31979
|
+
onClickItem: async (app2) => {
|
|
31980
|
+
await dispatch(
|
|
31981
|
+
ACTION_ACCOUNT.updateCurrentAccess(app2.key)
|
|
31982
|
+
).unwrap();
|
|
31983
|
+
setActiveExpandMenu(null);
|
|
31984
|
+
onClose();
|
|
31985
|
+
}
|
|
31986
|
+
}
|
|
31987
|
+
)
|
|
31988
|
+
]
|
|
31989
|
+
}
|
|
31990
|
+
)
|
|
31991
|
+
]
|
|
31992
|
+
}
|
|
31993
|
+
)
|
|
31994
|
+
] });
|
|
31995
|
+
};
|
|
32072
31996
|
const TypographyContentCaption = ({
|
|
32073
31997
|
content,
|
|
32074
31998
|
caption,
|
|
@@ -32076,8 +32000,8 @@ const TypographyContentCaption = ({
|
|
|
32076
32000
|
sxContent,
|
|
32077
32001
|
sxCaption
|
|
32078
32002
|
}) => {
|
|
32079
|
-
return /* @__PURE__ */
|
|
32080
|
-
/* @__PURE__ */
|
|
32003
|
+
return /* @__PURE__ */ jsxs(Stack$1, { gap: 0, sx: { ...sx }, children: [
|
|
32004
|
+
/* @__PURE__ */ jsx(
|
|
32081
32005
|
Typography,
|
|
32082
32006
|
{
|
|
32083
32007
|
sx: {
|
|
@@ -32087,7 +32011,7 @@ const TypographyContentCaption = ({
|
|
|
32087
32011
|
children: content || "#"
|
|
32088
32012
|
}
|
|
32089
32013
|
),
|
|
32090
|
-
caption && /* @__PURE__ */
|
|
32014
|
+
caption && /* @__PURE__ */ jsx(
|
|
32091
32015
|
Typography,
|
|
32092
32016
|
{
|
|
32093
32017
|
sx: {
|
|
@@ -32116,6 +32040,7 @@ export {
|
|
|
32116
32040
|
AppCategory,
|
|
32117
32041
|
AppGrid,
|
|
32118
32042
|
AppType,
|
|
32043
|
+
AppsSidebar,
|
|
32119
32044
|
AuthLayout,
|
|
32120
32045
|
AuthPage,
|
|
32121
32046
|
AuthProcess,
|
|
@@ -32319,7 +32244,11 @@ export {
|
|
|
32319
32244
|
updateNotification,
|
|
32320
32245
|
updateNotificationSetting,
|
|
32321
32246
|
updateUser,
|
|
32247
|
+
useActiveSidebar,
|
|
32248
|
+
useAllApps,
|
|
32322
32249
|
useApps,
|
|
32250
|
+
useIsSystemMonitor,
|
|
32251
|
+
useSidebarState,
|
|
32323
32252
|
useSnackbar,
|
|
32324
32253
|
useTagSelector,
|
|
32325
32254
|
useUpdateCurrentAccess,
|