sevago-sso-fe 1.0.31 → 1.0.33
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 +0 -1
- package/dist/index.cjs.js +829 -1069
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +830 -1070
- package/dist/index.esm.js.map +1 -1
- package/dist/pages/dashboard/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/bell/bell.component.d.ts +0 -4
- package/dist/components/bell/index.d.ts +0 -1
- package/dist/pages/dashboard/parts/index.d.ts +0 -1
- package/dist/pages/dashboard/parts/monitor/index.d.ts +0 -1
- package/dist/pages/dashboard/parts/monitor/monitor.part.d.ts +0 -2
- package/dist/scripts/generate.script.d.ts +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import React__default, { useMemo, useState, createContext, useContext, useEffect, useCallback, forwardRef, useImperativeHandle, createElement, Children, useRef, useLayoutEffect, Fragment as Fragment$1, useId, useInsertionEffect, Component } from "react";
|
|
6
6
|
import { useLocation, useNavigate, Outlet, Route, Navigate } from "react-router-dom";
|
|
7
7
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
8
|
-
import { Alert, Stack as Stack$1, useTheme as useTheme$2, Icon, Button, Typography, IconButton, Box, TextField, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, Skeleton, InputAdornment, Tooltip, tooltipClasses, Avatar,
|
|
8
|
+
import { Alert, Stack as Stack$1, useTheme as useTheme$2, Icon, Button, Typography, IconButton, Box, TextField, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, Skeleton, InputAdornment, Tooltip, tooltipClasses, Avatar, FormControl, InputLabel, RadioGroup, FormControlLabel, Radio, Menu, Divider, MenuItem, Fade, ClickAwayListener as ClickAwayListener$1 } from "@mui/material";
|
|
9
9
|
import { unstable_createGetCssVar, createSpacing as createSpacing$1, useTheme as useTheme$1, unstable_memoTheme, css, keyframes as keyframes$1, Stack as Stack$2 } from "@mui/system";
|
|
10
10
|
import emStyled from "@emotion/styled";
|
|
11
11
|
import "@emotion/react";
|
|
@@ -21732,9 +21732,6 @@ const ErrorPage = ({}) => {
|
|
|
21732
21732
|
type: LogoutType.THIS_DEVICE,
|
|
21733
21733
|
refreshToken: account.refreshToken
|
|
21734
21734
|
})
|
|
21735
|
-
).unwrap(),
|
|
21736
|
-
dispatch(
|
|
21737
|
-
ACTION_ACCOUNT.unsubscribeTopic({ fcmToken: account.fcmToken })
|
|
21738
21735
|
).unwrap()
|
|
21739
21736
|
]);
|
|
21740
21737
|
navigate(PAGE.AUTH.path);
|
|
@@ -21768,781 +21765,91 @@ const NotFoundPage = ({}) => {
|
|
|
21768
21765
|
/* @__PURE__ */ jsx(ButtonElement, { content: "Quay lại trang chủ", fullWidth: false, onClick: () => navigate(PAGE.AUTH.path) })
|
|
21769
21766
|
] });
|
|
21770
21767
|
};
|
|
21771
|
-
const
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
|
|
21775
|
-
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
|
|
21782
|
-
}) => {
|
|
21783
|
-
if (tooltipContent) {
|
|
21784
|
-
return /* @__PURE__ */ jsx(ArrowTooltip, { title: tooltipContent, arrow: true, children: /* @__PURE__ */ jsx(
|
|
21785
|
-
Avatar,
|
|
21768
|
+
const IconLeft = (props) => /* @__PURE__ */ jsx(
|
|
21769
|
+
"svg",
|
|
21770
|
+
{
|
|
21771
|
+
width: "20",
|
|
21772
|
+
height: "16",
|
|
21773
|
+
viewBox: "0 0 20 16",
|
|
21774
|
+
fill: "none",
|
|
21775
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21776
|
+
...props,
|
|
21777
|
+
children: /* @__PURE__ */ jsx(
|
|
21778
|
+
"path",
|
|
21786
21779
|
{
|
|
21787
|
-
|
|
21788
|
-
|
|
21789
|
-
|
|
21780
|
+
d: "M8 15L1 8M1 8L8 1M1 8L19 8",
|
|
21781
|
+
stroke: "currentColor",
|
|
21782
|
+
"stroke-width": "2",
|
|
21783
|
+
"stroke-linecap": "round",
|
|
21784
|
+
"stroke-linejoin": "round"
|
|
21790
21785
|
}
|
|
21791
|
-
)
|
|
21786
|
+
)
|
|
21792
21787
|
}
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
}
|
|
21806
|
-
);
|
|
21807
|
-
};
|
|
21808
|
-
const TimeAgoContentComponent = ({ time: time2, content, height: height2 = HEIGHT_IMAGE_DEFAULT }) => {
|
|
21809
|
-
return /* @__PURE__ */ jsxs(
|
|
21810
|
-
Stack$2,
|
|
21811
|
-
{
|
|
21812
|
-
sx: {
|
|
21813
|
-
height: height2,
|
|
21814
|
-
gap: 0,
|
|
21815
|
-
justifyContent: "space-between",
|
|
21816
|
-
alignItems: "flex-start"
|
|
21817
|
-
},
|
|
21818
|
-
children: [
|
|
21819
|
-
/* @__PURE__ */ jsx(
|
|
21820
|
-
Typography,
|
|
21821
|
-
{
|
|
21822
|
-
sx: {
|
|
21823
|
-
...getLimitLineCss(1)
|
|
21824
|
-
},
|
|
21825
|
-
children: content
|
|
21826
|
-
}
|
|
21827
|
-
),
|
|
21828
|
-
/* @__PURE__ */ jsx(TimeAgoComponent, { time: time2 })
|
|
21829
|
-
]
|
|
21830
|
-
}
|
|
21831
|
-
);
|
|
21832
|
-
};
|
|
21833
|
-
const ImageContentTimeComponent = ({
|
|
21834
|
-
url: url2,
|
|
21835
|
-
content,
|
|
21836
|
-
time: time2,
|
|
21837
|
-
sizeType = "medium"
|
|
21838
|
-
}) => {
|
|
21839
|
-
return /* @__PURE__ */ jsxs(StackRow, { alignItems: "center", children: [
|
|
21840
|
-
/* @__PURE__ */ jsx(AvatarElement, { url: url2, size: sizeType }),
|
|
21841
|
-
/* @__PURE__ */ jsx(TimeAgoContentComponent, { content, time: time2 })
|
|
21842
|
-
] });
|
|
21843
|
-
};
|
|
21844
|
-
const TooltipOnClickElement = ({
|
|
21845
|
-
open,
|
|
21846
|
-
placement = "top",
|
|
21847
|
-
content,
|
|
21848
|
-
children,
|
|
21849
|
-
onOpen,
|
|
21850
|
-
onClose,
|
|
21851
|
-
onClickAway,
|
|
21852
|
-
...rest
|
|
21853
|
-
}) => {
|
|
21854
|
-
return (
|
|
21855
|
-
// Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
|
|
21856
|
-
/* @__PURE__ */ jsx(ClickAwayListener$1, { onClickAway, children: /* @__PURE__ */ jsx(
|
|
21857
|
-
Tooltip,
|
|
21788
|
+
);
|
|
21789
|
+
const IconRight = (props) => /* @__PURE__ */ jsx(
|
|
21790
|
+
"svg",
|
|
21791
|
+
{
|
|
21792
|
+
width: "20",
|
|
21793
|
+
height: "16",
|
|
21794
|
+
viewBox: "0 0 20 16",
|
|
21795
|
+
fill: "none",
|
|
21796
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21797
|
+
...props,
|
|
21798
|
+
children: /* @__PURE__ */ jsx(
|
|
21799
|
+
"path",
|
|
21858
21800
|
{
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
disableHoverListener: true,
|
|
21865
|
-
disableTouchListener: true,
|
|
21866
|
-
placement,
|
|
21867
|
-
title: content,
|
|
21868
|
-
...rest,
|
|
21869
|
-
children: /* @__PURE__ */ jsx("span", { children })
|
|
21801
|
+
d: "M12 1L19 8M19 8L12 15M19 8L1 8",
|
|
21802
|
+
stroke: "currentColor",
|
|
21803
|
+
"stroke-width": "2",
|
|
21804
|
+
"stroke-linecap": "round",
|
|
21805
|
+
"stroke-linejoin": "round"
|
|
21870
21806
|
}
|
|
21871
|
-
)
|
|
21872
|
-
|
|
21807
|
+
)
|
|
21808
|
+
}
|
|
21809
|
+
);
|
|
21810
|
+
const LayoutGroupContext = createContext({});
|
|
21811
|
+
function useConstant(init) {
|
|
21812
|
+
const ref = useRef(null);
|
|
21813
|
+
if (ref.current === null) {
|
|
21814
|
+
ref.current = init();
|
|
21815
|
+
}
|
|
21816
|
+
return ref.current;
|
|
21817
|
+
}
|
|
21818
|
+
const isBrowser = typeof window !== "undefined";
|
|
21819
|
+
const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
|
|
21820
|
+
const PresenceContext = /* @__PURE__ */ createContext(null);
|
|
21821
|
+
function addUniqueItem(arr, item) {
|
|
21822
|
+
if (arr.indexOf(item) === -1)
|
|
21823
|
+
arr.push(item);
|
|
21824
|
+
}
|
|
21825
|
+
function removeItem(arr, item) {
|
|
21826
|
+
const index = arr.indexOf(item);
|
|
21827
|
+
if (index > -1)
|
|
21828
|
+
arr.splice(index, 1);
|
|
21829
|
+
}
|
|
21830
|
+
const clamp = (min, max, v) => {
|
|
21831
|
+
if (v > max)
|
|
21832
|
+
return max;
|
|
21833
|
+
if (v < min)
|
|
21834
|
+
return min;
|
|
21835
|
+
return v;
|
|
21873
21836
|
};
|
|
21874
|
-
|
|
21875
|
-
return
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
direction: "column",
|
|
21879
|
-
sx: {
|
|
21880
|
-
flex: 1,
|
|
21881
|
-
height: "100%",
|
|
21882
|
-
alignItems: "center",
|
|
21883
|
-
justifyContent: "center",
|
|
21884
|
-
padding: PADDING_GAP_ITEM
|
|
21885
|
-
},
|
|
21886
|
-
children: /* @__PURE__ */ jsx(Box, { component: "img", sx: { width: 70 }, src: "/images/empty.svg" })
|
|
21887
|
-
}
|
|
21888
|
-
) });
|
|
21837
|
+
function formatErrorMessage(message, errorCode) {
|
|
21838
|
+
return errorCode ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` : message;
|
|
21839
|
+
}
|
|
21840
|
+
let warning = () => {
|
|
21889
21841
|
};
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
|
|
21894
|
-
|
|
21895
|
-
|
|
21896
|
-
const dispatch = useAppDispatch();
|
|
21897
|
-
const navigate = useNavigate();
|
|
21898
|
-
const { palette } = useTheme$2();
|
|
21899
|
-
const { showSnackbar } = useSnackbar();
|
|
21900
|
-
const [open, setOpen] = useState(false);
|
|
21901
|
-
const [list, setList] = useState([]);
|
|
21902
|
-
const [loading, setLoading] = useState(false);
|
|
21903
|
-
const handleGetListNotification = async () => {
|
|
21904
|
-
setLoading(true);
|
|
21905
|
-
try {
|
|
21906
|
-
const res = await notificationApi.getListNotification({
|
|
21907
|
-
status: NotificationStatus.NOT_VIEWED,
|
|
21908
|
-
page: 0,
|
|
21909
|
-
take: 0
|
|
21910
|
-
});
|
|
21911
|
-
setList(res.list);
|
|
21912
|
-
dispatch(ACTION_ACCOUNT.changeNotificationCount(res.total));
|
|
21913
|
-
} catch (error) {
|
|
21914
|
-
showSnackbar({
|
|
21915
|
-
message: getErrorMessage(error),
|
|
21916
|
-
type: SnackbarType.ERROR
|
|
21917
|
-
});
|
|
21918
|
-
} finally {
|
|
21919
|
-
setLoading(false);
|
|
21842
|
+
let invariant = () => {
|
|
21843
|
+
};
|
|
21844
|
+
if (process.env.NODE_ENV !== "production") {
|
|
21845
|
+
warning = (check, message, errorCode) => {
|
|
21846
|
+
if (!check && typeof console !== "undefined") {
|
|
21847
|
+
console.warn(formatErrorMessage(message, errorCode));
|
|
21920
21848
|
}
|
|
21921
21849
|
};
|
|
21922
|
-
|
|
21923
|
-
|
|
21924
|
-
|
|
21925
|
-
const clickNotification = async (notification) => {
|
|
21926
|
-
setOpen(false);
|
|
21927
|
-
const isMyProposal = notification?.createdById === account.user.id;
|
|
21928
|
-
try {
|
|
21929
|
-
await notificationApi.updateNotification({
|
|
21930
|
-
updateNotificationAction: UpdateNotificationAction.VIEW_ONE,
|
|
21931
|
-
id: notification.id
|
|
21932
|
-
});
|
|
21933
|
-
dispatch(ACTION_ACCOUNT.changeNotificationCount(notificationCount - 1));
|
|
21934
|
-
navigate(notification.path || PAGE.DASHBOARD.path, {
|
|
21935
|
-
state: {
|
|
21936
|
-
searchType: isMyProposal ? UserMovementSearchType.MY_PROPOSAL : UserMovementSearchType.NEED_APPROVE
|
|
21937
|
-
}
|
|
21938
|
-
});
|
|
21939
|
-
} catch (error) {
|
|
21940
|
-
showSnackbar({
|
|
21941
|
-
message: getErrorMessage(error),
|
|
21942
|
-
type: SnackbarType.ERROR
|
|
21943
|
-
});
|
|
21944
|
-
}
|
|
21945
|
-
};
|
|
21946
|
-
return /* @__PURE__ */ jsx(
|
|
21947
|
-
TooltipOnClickElement,
|
|
21948
|
-
{
|
|
21949
|
-
open,
|
|
21950
|
-
onClickAway: () => setOpen(false),
|
|
21951
|
-
placement: "bottom-end",
|
|
21952
|
-
content: /* @__PURE__ */ jsxs(
|
|
21953
|
-
List,
|
|
21954
|
-
{
|
|
21955
|
-
sx: {
|
|
21956
|
-
display: "flex",
|
|
21957
|
-
flexDirection: "column",
|
|
21958
|
-
padding: 0,
|
|
21959
|
-
maxHeight: 500,
|
|
21960
|
-
overflowY: "auto",
|
|
21961
|
-
flex: 1,
|
|
21962
|
-
width: "300px"
|
|
21963
|
-
},
|
|
21964
|
-
children: [
|
|
21965
|
-
/* @__PURE__ */ jsxs(
|
|
21966
|
-
ListItem,
|
|
21967
|
-
{
|
|
21968
|
-
sx: {
|
|
21969
|
-
padding: PADDING_GAP_ITEM,
|
|
21970
|
-
display: "flex",
|
|
21971
|
-
flexDirection: "row",
|
|
21972
|
-
justifyContent: "space-between",
|
|
21973
|
-
alignItems: "center",
|
|
21974
|
-
position: "sticky",
|
|
21975
|
-
top: 0,
|
|
21976
|
-
backgroundColor: palette.background.paper,
|
|
21977
|
-
zIndex: 1
|
|
21978
|
-
},
|
|
21979
|
-
children: [
|
|
21980
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", children: "Thông báo" }),
|
|
21981
|
-
/* @__PURE__ */ jsxs(StackRow, { children: [
|
|
21982
|
-
/* @__PURE__ */ jsx(
|
|
21983
|
-
IconElement,
|
|
21984
|
-
{
|
|
21985
|
-
sx: { cursor: "pointer" },
|
|
21986
|
-
icon: "mark_email_read",
|
|
21987
|
-
onClick: async (e) => {
|
|
21988
|
-
e.stopPropagation();
|
|
21989
|
-
try {
|
|
21990
|
-
await notificationApi.updateNotification({
|
|
21991
|
-
updateNotificationAction: UpdateNotificationAction.VIEW_ALL
|
|
21992
|
-
});
|
|
21993
|
-
dispatch(ACTION_ACCOUNT.changeNotificationCount(0));
|
|
21994
|
-
} catch (error) {
|
|
21995
|
-
showSnackbar({
|
|
21996
|
-
message: getErrorMessage(error),
|
|
21997
|
-
type: SnackbarType.ERROR
|
|
21998
|
-
});
|
|
21999
|
-
}
|
|
22000
|
-
}
|
|
22001
|
-
}
|
|
22002
|
-
),
|
|
22003
|
-
/* @__PURE__ */ jsx(
|
|
22004
|
-
IconElement,
|
|
22005
|
-
{
|
|
22006
|
-
icon: "settings",
|
|
22007
|
-
onClick: (e) => {
|
|
22008
|
-
e.stopPropagation();
|
|
22009
|
-
}
|
|
22010
|
-
}
|
|
22011
|
-
)
|
|
22012
|
-
] })
|
|
22013
|
-
]
|
|
22014
|
-
}
|
|
22015
|
-
),
|
|
22016
|
-
loading ? /* @__PURE__ */ jsx(StackRowAlignCenter, { sx: { height: 50 }, children: /* @__PURE__ */ jsx(LoadingComponent, {}) }) : list.length === 0 ? /* @__PURE__ */ jsx(EmptyComponent, {}) : list.map((notification) => /* @__PURE__ */ jsx(
|
|
22017
|
-
ListItem,
|
|
22018
|
-
{
|
|
22019
|
-
onClick: () => clickNotification(notification),
|
|
22020
|
-
id: notification.id,
|
|
22021
|
-
sx: {
|
|
22022
|
-
borderRadius: BORDER_RADIUS_ELEMENT,
|
|
22023
|
-
padding: PADDING_GAP_ITEM,
|
|
22024
|
-
display: "flex",
|
|
22025
|
-
flexDirection: "row",
|
|
22026
|
-
alignItems: "center",
|
|
22027
|
-
cursor: "pointer",
|
|
22028
|
-
transition: TRANSITION_TIME,
|
|
22029
|
-
"&:hover": {
|
|
22030
|
-
backgroundColor: palette.action.hover,
|
|
22031
|
-
color: palette.primary.main
|
|
22032
|
-
}
|
|
22033
|
-
},
|
|
22034
|
-
children: /* @__PURE__ */ jsxs(Stack$1, { gap: 1, children: [
|
|
22035
|
-
/* @__PURE__ */ jsx(
|
|
22036
|
-
ImageContentTimeComponent,
|
|
22037
|
-
{
|
|
22038
|
-
url: notification.createdBy?.url || "",
|
|
22039
|
-
content: notification.title,
|
|
22040
|
-
time: notification.createdAt
|
|
22041
|
-
}
|
|
22042
|
-
),
|
|
22043
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", sx: { ...getLimitLineCss(2) }, children: notification.content })
|
|
22044
|
-
] })
|
|
22045
|
-
},
|
|
22046
|
-
notification.id
|
|
22047
|
-
))
|
|
22048
|
-
]
|
|
22049
|
-
}
|
|
22050
|
-
),
|
|
22051
|
-
children: /* @__PURE__ */ jsx(
|
|
22052
|
-
Badge,
|
|
22053
|
-
{
|
|
22054
|
-
onClick: async () => {
|
|
22055
|
-
setOpen(!open);
|
|
22056
|
-
await handleGetListNotification();
|
|
22057
|
-
},
|
|
22058
|
-
badgeContent: notificationCount,
|
|
22059
|
-
color: "error",
|
|
22060
|
-
sx: { cursor: "pointer" },
|
|
22061
|
-
children: /* @__PURE__ */ jsx(
|
|
22062
|
-
IconElement,
|
|
22063
|
-
{
|
|
22064
|
-
icon: "notifications",
|
|
22065
|
-
onClick: () => setOpen(!open),
|
|
22066
|
-
size: "large",
|
|
22067
|
-
sx: {
|
|
22068
|
-
color: isSystemMonitor ? palette.background.default : palette.primary.main,
|
|
22069
|
-
"&:hover": {
|
|
22070
|
-
color: isSystemMonitor ? palette.background.default : palette.primary.main
|
|
22071
|
-
}
|
|
22072
|
-
}
|
|
22073
|
-
}
|
|
22074
|
-
)
|
|
22075
|
-
}
|
|
22076
|
-
)
|
|
22077
|
-
}
|
|
22078
|
-
);
|
|
22079
|
-
};
|
|
22080
|
-
const AvatarUserInfo = ({
|
|
22081
|
-
name,
|
|
22082
|
-
url: url2,
|
|
22083
|
-
positions = [],
|
|
22084
|
-
maxWidth: maxWidth2 = "440px",
|
|
22085
|
-
isTag = false,
|
|
22086
|
-
sxName,
|
|
22087
|
-
sxPosition,
|
|
22088
|
-
sizeAvatar = "large"
|
|
22089
|
-
}) => {
|
|
22090
|
-
const { palette } = useTheme$2();
|
|
22091
|
-
const isSystemMonitor = useIsSystemMonitor();
|
|
22092
|
-
return /* @__PURE__ */ jsxs(StackRow, { sx: { alignItems: "center", gap: PADDING_GAP_ITEM }, children: [
|
|
22093
|
-
/* @__PURE__ */ jsx(AvatarElement, { url: url2, size: sizeAvatar }),
|
|
22094
|
-
positions.length > 0 ? /* @__PURE__ */ jsxs(Stack$1, { sx: { gap: 0 }, children: [
|
|
22095
|
-
/* @__PURE__ */ jsx(
|
|
22096
|
-
Typography,
|
|
22097
|
-
{
|
|
22098
|
-
sx: {
|
|
22099
|
-
color: isSystemMonitor ? palette.primary.contrastText : palette.text.secondary,
|
|
22100
|
-
fontWeight: "600",
|
|
22101
|
-
fontSize: "14px",
|
|
22102
|
-
lineHeight: "20px",
|
|
22103
|
-
...getLimitLineCss(1),
|
|
22104
|
-
...sxName
|
|
22105
|
-
},
|
|
22106
|
-
children: name
|
|
22107
|
-
}
|
|
22108
|
-
),
|
|
22109
|
-
/* @__PURE__ */ jsx(
|
|
22110
|
-
Typography,
|
|
22111
|
-
{
|
|
22112
|
-
variant: "caption",
|
|
22113
|
-
sx: {
|
|
22114
|
-
...getLimitLineCss(1),
|
|
22115
|
-
color: palette.text.disabled,
|
|
22116
|
-
maxWidth: maxWidth2,
|
|
22117
|
-
...isTag && {
|
|
22118
|
-
display: "flex",
|
|
22119
|
-
padding: "2px 4px",
|
|
22120
|
-
justifyContent: "center",
|
|
22121
|
-
alignItems: "center",
|
|
22122
|
-
gap: "10px",
|
|
22123
|
-
borderRadius: "4px",
|
|
22124
|
-
background: " #EFF8FF",
|
|
22125
|
-
color: " #035388",
|
|
22126
|
-
width: "fit-content",
|
|
22127
|
-
...sxPosition
|
|
22128
|
-
}
|
|
22129
|
-
},
|
|
22130
|
-
children: positions.join(" / ")
|
|
22131
|
-
}
|
|
22132
|
-
)
|
|
22133
|
-
] }) : /* @__PURE__ */ jsx(
|
|
22134
|
-
Typography,
|
|
22135
|
-
{
|
|
22136
|
-
sx: {
|
|
22137
|
-
...TYPOGRAPHY_STYLES.textSm.semiBold,
|
|
22138
|
-
...getLimitLineCss(1),
|
|
22139
|
-
...sxName
|
|
22140
|
-
},
|
|
22141
|
-
children: name
|
|
22142
|
-
}
|
|
22143
|
-
)
|
|
22144
|
-
] });
|
|
22145
|
-
};
|
|
22146
|
-
const RadioGroupElement = ({
|
|
22147
|
-
name,
|
|
22148
|
-
direction = "row",
|
|
22149
|
-
label,
|
|
22150
|
-
disabled,
|
|
22151
|
-
iconLabel = "event_list",
|
|
22152
|
-
defaultValue,
|
|
22153
|
-
value: value2,
|
|
22154
|
-
onChange,
|
|
22155
|
-
children,
|
|
22156
|
-
required = false,
|
|
22157
|
-
sx = {}
|
|
22158
|
-
}) => {
|
|
22159
|
-
const change = (event) => {
|
|
22160
|
-
onChange && onChange({ target: { name, value: event.target.value || void 0 } });
|
|
22161
|
-
};
|
|
22162
|
-
return /* @__PURE__ */ jsxs(FormControl, { disabled, sx: { gap: PADDING_GAP_ITEM }, onChange: change, children: [
|
|
22163
|
-
label && /* @__PURE__ */ jsx(
|
|
22164
|
-
InputLabel,
|
|
22165
|
-
{
|
|
22166
|
-
shrink: true,
|
|
22167
|
-
required,
|
|
22168
|
-
sx: {
|
|
22169
|
-
transform: "translate(0px , -9px) scale(0.75)",
|
|
22170
|
-
zIndex: 2,
|
|
22171
|
-
display: "flex"
|
|
22172
|
-
},
|
|
22173
|
-
children: /* @__PURE__ */ jsxs(StackLabel, { children: [
|
|
22174
|
-
/* @__PURE__ */ jsx(IconElement, { icon: iconLabel, sx: { fontSize: TEXT_FIELD.FONT_SIZE_LABEL } }),
|
|
22175
|
-
label
|
|
22176
|
-
] })
|
|
22177
|
-
}
|
|
22178
|
-
),
|
|
22179
|
-
/* @__PURE__ */ jsx(
|
|
22180
|
-
RadioGroup,
|
|
22181
|
-
{
|
|
22182
|
-
name,
|
|
22183
|
-
defaultValue,
|
|
22184
|
-
value: value2,
|
|
22185
|
-
sx: {
|
|
22186
|
-
flexDirection: direction,
|
|
22187
|
-
paddingTop: label ? "calc(8.5px + 1.5px)" : 0,
|
|
22188
|
-
// 8.5 lấy từ default theme không phải tự nhiên mà có
|
|
22189
|
-
gap: PADDING_GAP_LAYOUT,
|
|
22190
|
-
...sx
|
|
22191
|
-
},
|
|
22192
|
-
children
|
|
22193
|
-
}
|
|
22194
|
-
)
|
|
22195
|
-
] });
|
|
22196
|
-
};
|
|
22197
|
-
const RadioElement = ({ name, label, ...rest }) => {
|
|
22198
|
-
return /* @__PURE__ */ jsx(
|
|
22199
|
-
FormControlLabel,
|
|
22200
|
-
{
|
|
22201
|
-
name,
|
|
22202
|
-
label,
|
|
22203
|
-
sx: { alignItems: "center", mr: 0 },
|
|
22204
|
-
control: /* @__PURE__ */ jsx(
|
|
22205
|
-
Radio,
|
|
22206
|
-
{
|
|
22207
|
-
...rest,
|
|
22208
|
-
sx: {
|
|
22209
|
-
paddingTop: 0,
|
|
22210
|
-
paddingBottom: 0,
|
|
22211
|
-
paddingRight: PADDING_GAP_ITEM,
|
|
22212
|
-
marginLeft: "2px",
|
|
22213
|
-
"&:hover": { backgroundColor: "unset" },
|
|
22214
|
-
"& .MuiSvgIcon-root": { fontSize: "18px" }
|
|
22215
|
-
}
|
|
22216
|
-
}
|
|
22217
|
-
)
|
|
22218
|
-
}
|
|
22219
|
-
);
|
|
22220
|
-
};
|
|
22221
|
-
const AvatarUserComponent = ({}) => {
|
|
22222
|
-
const account = useSelector((state) => state.account);
|
|
22223
|
-
const { showSnackbar } = useSnackbar();
|
|
22224
|
-
const dispatch = useAppDispatch();
|
|
22225
|
-
const navigate = useNavigate();
|
|
22226
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
22227
|
-
const positions = account?.user?.managedOrgUnits?.map((e) => e.name) || [];
|
|
22228
|
-
const menu = [
|
|
22229
|
-
{
|
|
22230
|
-
content: "Đăng xuất khỏi thiết bị",
|
|
22231
|
-
icon: "logout",
|
|
22232
|
-
onClick: async () => {
|
|
22233
|
-
try {
|
|
22234
|
-
await Promise.all([
|
|
22235
|
-
dispatch(
|
|
22236
|
-
ACTION_ACCOUNT.logout({
|
|
22237
|
-
type: LogoutType.THIS_DEVICE,
|
|
22238
|
-
refreshToken: account.refreshToken
|
|
22239
|
-
})
|
|
22240
|
-
).unwrap()
|
|
22241
|
-
]);
|
|
22242
|
-
navigate(PAGE.AUTH.path);
|
|
22243
|
-
} catch (error) {
|
|
22244
|
-
showSnackbar({
|
|
22245
|
-
message: getErrorMessage(error),
|
|
22246
|
-
type: SnackbarType.ERROR
|
|
22247
|
-
});
|
|
22248
|
-
}
|
|
22249
|
-
}
|
|
22250
|
-
},
|
|
22251
|
-
{
|
|
22252
|
-
content: "Đăng xuất khỏi tất cả thiết bị",
|
|
22253
|
-
icon: "exit_to_app",
|
|
22254
|
-
onClick: async () => {
|
|
22255
|
-
if ("serviceWorker" in navigator) {
|
|
22256
|
-
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
|
22257
|
-
registrations.forEach((registration) => {
|
|
22258
|
-
registration.unregister();
|
|
22259
|
-
});
|
|
22260
|
-
}).catch((error) => {
|
|
22261
|
-
console.error("Error unregistering Service Workers: ", error);
|
|
22262
|
-
});
|
|
22263
|
-
} else {
|
|
22264
|
-
console.warn("Service Worker is not supported in this browser.");
|
|
22265
|
-
}
|
|
22266
|
-
await dispatch(
|
|
22267
|
-
ACTION_ACCOUNT.logout({
|
|
22268
|
-
type: LogoutType.THIS_DEVICE,
|
|
22269
|
-
refreshToken: account.refreshToken
|
|
22270
|
-
})
|
|
22271
|
-
).unwrap();
|
|
22272
|
-
navigate(PAGE.AUTH.path);
|
|
22273
|
-
}
|
|
22274
|
-
}
|
|
22275
|
-
];
|
|
22276
|
-
const handleClick = (event) => {
|
|
22277
|
-
setAnchorEl(event.currentTarget);
|
|
22278
|
-
};
|
|
22279
|
-
const handleClose = () => {
|
|
22280
|
-
setAnchorEl(null);
|
|
22281
|
-
};
|
|
22282
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22283
|
-
/* @__PURE__ */ jsxs(
|
|
22284
|
-
Box,
|
|
22285
|
-
{
|
|
22286
|
-
onClick: handleClick,
|
|
22287
|
-
sx: {
|
|
22288
|
-
cursor: "pointer",
|
|
22289
|
-
display: "flex",
|
|
22290
|
-
alignItems: "center",
|
|
22291
|
-
gap: 1
|
|
22292
|
-
},
|
|
22293
|
-
children: [
|
|
22294
|
-
/* @__PURE__ */ jsx(
|
|
22295
|
-
AvatarUserInfo,
|
|
22296
|
-
{
|
|
22297
|
-
url: account.user?.url,
|
|
22298
|
-
name: account.user?.name ?? "",
|
|
22299
|
-
positions,
|
|
22300
|
-
isTag: true
|
|
22301
|
-
}
|
|
22302
|
-
),
|
|
22303
|
-
/* @__PURE__ */ jsx(
|
|
22304
|
-
IconElement,
|
|
22305
|
-
{
|
|
22306
|
-
icon: "arrow_drop_down",
|
|
22307
|
-
size: "medium",
|
|
22308
|
-
sx: {
|
|
22309
|
-
color: "text.secondary",
|
|
22310
|
-
transition: "transform 0.2s ease-in-out",
|
|
22311
|
-
transform: anchorEl ? "rotate(180deg)" : "rotate(0deg)",
|
|
22312
|
-
fontVariationSettings: "'wght' 600, 'FILL' 0",
|
|
22313
|
-
willChange: "transform",
|
|
22314
|
-
backfaceVisibility: "hidden"
|
|
22315
|
-
}
|
|
22316
|
-
}
|
|
22317
|
-
)
|
|
22318
|
-
]
|
|
22319
|
-
}
|
|
22320
|
-
),
|
|
22321
|
-
/* @__PURE__ */ jsxs(
|
|
22322
|
-
Menu,
|
|
22323
|
-
{
|
|
22324
|
-
anchorEl,
|
|
22325
|
-
open: Boolean(anchorEl),
|
|
22326
|
-
onClose: handleClose,
|
|
22327
|
-
onClick: handleClose,
|
|
22328
|
-
disableScrollLock: true,
|
|
22329
|
-
PaperProps: {
|
|
22330
|
-
elevation: 0,
|
|
22331
|
-
sx: {
|
|
22332
|
-
overflow: "visible",
|
|
22333
|
-
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
22334
|
-
mt: 1.5,
|
|
22335
|
-
transform: "translate3d(0, 0, 0)",
|
|
22336
|
-
willChange: "transform",
|
|
22337
|
-
"& .MuiAvatar-root": {
|
|
22338
|
-
width: 32,
|
|
22339
|
-
height: 32,
|
|
22340
|
-
ml: -0.5,
|
|
22341
|
-
mr: 1
|
|
22342
|
-
},
|
|
22343
|
-
"&:before": {
|
|
22344
|
-
content: '""',
|
|
22345
|
-
display: "block",
|
|
22346
|
-
position: "absolute",
|
|
22347
|
-
top: 0,
|
|
22348
|
-
right: 14,
|
|
22349
|
-
width: 10,
|
|
22350
|
-
height: 10,
|
|
22351
|
-
bgcolor: "background.paper",
|
|
22352
|
-
transform: "translateY(-50%) rotate(45deg)",
|
|
22353
|
-
zIndex: 0
|
|
22354
|
-
}
|
|
22355
|
-
}
|
|
22356
|
-
},
|
|
22357
|
-
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
22358
|
-
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
22359
|
-
children: [
|
|
22360
|
-
/* @__PURE__ */ jsxs(Box, { sx: { p: 2 }, children: [
|
|
22361
|
-
/* @__PURE__ */ jsxs(StackRowAlignStartJustBetween, { children: [
|
|
22362
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", sx: { lineHeight: 1 }, children: account.user?.name }),
|
|
22363
|
-
/* @__PURE__ */ jsx(
|
|
22364
|
-
IconElement,
|
|
22365
|
-
{
|
|
22366
|
-
icon: "settings",
|
|
22367
|
-
onClick: () => navigate(PAGE.DASHBOARD.path + DASHBOARD_SCREEN.ACCOUNT.path)
|
|
22368
|
-
}
|
|
22369
|
-
)
|
|
22370
|
-
] }),
|
|
22371
|
-
account.user?.userOrgUnitPositions && account.user.userOrgUnitPositions.length > 0 && /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
22372
|
-
/* @__PURE__ */ jsx(
|
|
22373
|
-
IconContentElement,
|
|
22374
|
-
{
|
|
22375
|
-
icon: "admin_panel_settings",
|
|
22376
|
-
content: "Vai trò"
|
|
22377
|
-
}
|
|
22378
|
-
),
|
|
22379
|
-
/* @__PURE__ */ jsx(
|
|
22380
|
-
RadioGroupElement,
|
|
22381
|
-
{
|
|
22382
|
-
direction: "column",
|
|
22383
|
-
sx: { paddingLeft: "20px" },
|
|
22384
|
-
value: account.userUnitPositionId,
|
|
22385
|
-
onChange: (event) => {
|
|
22386
|
-
dispatch(
|
|
22387
|
-
ACTION_ACCOUNT.updatePositionOrgUnit(event.target.value)
|
|
22388
|
-
);
|
|
22389
|
-
window.location.reload();
|
|
22390
|
-
},
|
|
22391
|
-
children: account.user.userOrgUnitPositions.map((e) => /* @__PURE__ */ jsx(
|
|
22392
|
-
RadioElement,
|
|
22393
|
-
{
|
|
22394
|
-
value: e.id,
|
|
22395
|
-
size: "small",
|
|
22396
|
-
label: /* @__PURE__ */ jsxs(Stack$2, { gap: 0, children: [
|
|
22397
|
-
/* @__PURE__ */ jsx(Typography, { children: e.orgUnit.name }),
|
|
22398
|
-
/* @__PURE__ */ jsx(
|
|
22399
|
-
Typography,
|
|
22400
|
-
{
|
|
22401
|
-
variant: "caption",
|
|
22402
|
-
sx: {
|
|
22403
|
-
...getLimitLineCss(1),
|
|
22404
|
-
color: "text.disabled"
|
|
22405
|
-
},
|
|
22406
|
-
children: e.position.name
|
|
22407
|
-
}
|
|
22408
|
-
)
|
|
22409
|
-
] })
|
|
22410
|
-
},
|
|
22411
|
-
e.id
|
|
22412
|
-
))
|
|
22413
|
-
}
|
|
22414
|
-
)
|
|
22415
|
-
] })
|
|
22416
|
-
] }),
|
|
22417
|
-
/* @__PURE__ */ jsx(Divider, {}),
|
|
22418
|
-
menu.map((item, index) => /* @__PURE__ */ jsxs(MenuItem, { onClick: item.onClick, children: [
|
|
22419
|
-
/* @__PURE__ */ jsx(IconElement, { icon: item.icon, size: "small", sx: { mr: 1 } }),
|
|
22420
|
-
/* @__PURE__ */ jsx(Typography, { children: item.content })
|
|
22421
|
-
] }, index))
|
|
22422
|
-
]
|
|
22423
|
-
}
|
|
22424
|
-
)
|
|
22425
|
-
] });
|
|
22426
|
-
};
|
|
22427
|
-
const MonitorPart = ({
|
|
22428
|
-
children
|
|
22429
|
-
}) => {
|
|
22430
|
-
return /* @__PURE__ */ jsx(
|
|
22431
|
-
Stack$2,
|
|
22432
|
-
{
|
|
22433
|
-
sx: {
|
|
22434
|
-
minHeight: "100vh",
|
|
22435
|
-
width: "100%",
|
|
22436
|
-
overflowY: "auto",
|
|
22437
|
-
backgroundImage: "url('/images/image-dashboard.jpg')",
|
|
22438
|
-
backgroundSize: "cover",
|
|
22439
|
-
backgroundPosition: "top",
|
|
22440
|
-
backgroundRepeat: "no-repeat"
|
|
22441
|
-
},
|
|
22442
|
-
children: /* @__PURE__ */ jsxs(Stack$2, { p: { padding: PADDING_GAP_LAYOUT }, children: [
|
|
22443
|
-
/* @__PURE__ */ jsxs(StackRowJustBetween, { children: [
|
|
22444
|
-
/* @__PURE__ */ jsx(StackRowAlignCenter, { children: /* @__PURE__ */ jsx(
|
|
22445
|
-
LogoComponent,
|
|
22446
|
-
{
|
|
22447
|
-
url: "/images/logo/logo-sub-3.svg",
|
|
22448
|
-
fillColor: "white"
|
|
22449
|
-
}
|
|
22450
|
-
) }),
|
|
22451
|
-
/* @__PURE__ */ jsxs(StackRowAlignCenter, { children: [
|
|
22452
|
-
/* @__PURE__ */ jsx(BellComponent, {}),
|
|
22453
|
-
/* @__PURE__ */ jsx(AvatarUserComponent, {})
|
|
22454
|
-
] })
|
|
22455
|
-
] }),
|
|
22456
|
-
children
|
|
22457
|
-
] })
|
|
22458
|
-
}
|
|
22459
|
-
);
|
|
22460
|
-
};
|
|
22461
|
-
const IconLeft = (props) => /* @__PURE__ */ jsx(
|
|
22462
|
-
"svg",
|
|
22463
|
-
{
|
|
22464
|
-
width: "20",
|
|
22465
|
-
height: "16",
|
|
22466
|
-
viewBox: "0 0 20 16",
|
|
22467
|
-
fill: "none",
|
|
22468
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22469
|
-
...props,
|
|
22470
|
-
children: /* @__PURE__ */ jsx(
|
|
22471
|
-
"path",
|
|
22472
|
-
{
|
|
22473
|
-
d: "M8 15L1 8M1 8L8 1M1 8L19 8",
|
|
22474
|
-
stroke: "currentColor",
|
|
22475
|
-
"stroke-width": "2",
|
|
22476
|
-
"stroke-linecap": "round",
|
|
22477
|
-
"stroke-linejoin": "round"
|
|
22478
|
-
}
|
|
22479
|
-
)
|
|
22480
|
-
}
|
|
22481
|
-
);
|
|
22482
|
-
const IconRight = (props) => /* @__PURE__ */ jsx(
|
|
22483
|
-
"svg",
|
|
22484
|
-
{
|
|
22485
|
-
width: "20",
|
|
22486
|
-
height: "16",
|
|
22487
|
-
viewBox: "0 0 20 16",
|
|
22488
|
-
fill: "none",
|
|
22489
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22490
|
-
...props,
|
|
22491
|
-
children: /* @__PURE__ */ jsx(
|
|
22492
|
-
"path",
|
|
22493
|
-
{
|
|
22494
|
-
d: "M12 1L19 8M19 8L12 15M19 8L1 8",
|
|
22495
|
-
stroke: "currentColor",
|
|
22496
|
-
"stroke-width": "2",
|
|
22497
|
-
"stroke-linecap": "round",
|
|
22498
|
-
"stroke-linejoin": "round"
|
|
22499
|
-
}
|
|
22500
|
-
)
|
|
22501
|
-
}
|
|
22502
|
-
);
|
|
22503
|
-
const LayoutGroupContext = createContext({});
|
|
22504
|
-
function useConstant(init) {
|
|
22505
|
-
const ref = useRef(null);
|
|
22506
|
-
if (ref.current === null) {
|
|
22507
|
-
ref.current = init();
|
|
22508
|
-
}
|
|
22509
|
-
return ref.current;
|
|
22510
|
-
}
|
|
22511
|
-
const isBrowser = typeof window !== "undefined";
|
|
22512
|
-
const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
|
|
22513
|
-
const PresenceContext = /* @__PURE__ */ createContext(null);
|
|
22514
|
-
function addUniqueItem(arr, item) {
|
|
22515
|
-
if (arr.indexOf(item) === -1)
|
|
22516
|
-
arr.push(item);
|
|
22517
|
-
}
|
|
22518
|
-
function removeItem(arr, item) {
|
|
22519
|
-
const index = arr.indexOf(item);
|
|
22520
|
-
if (index > -1)
|
|
22521
|
-
arr.splice(index, 1);
|
|
22522
|
-
}
|
|
22523
|
-
const clamp = (min, max, v) => {
|
|
22524
|
-
if (v > max)
|
|
22525
|
-
return max;
|
|
22526
|
-
if (v < min)
|
|
22527
|
-
return min;
|
|
22528
|
-
return v;
|
|
22529
|
-
};
|
|
22530
|
-
function formatErrorMessage(message, errorCode) {
|
|
22531
|
-
return errorCode ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` : message;
|
|
22532
|
-
}
|
|
22533
|
-
let warning = () => {
|
|
22534
|
-
};
|
|
22535
|
-
let invariant = () => {
|
|
22536
|
-
};
|
|
22537
|
-
if (process.env.NODE_ENV !== "production") {
|
|
22538
|
-
warning = (check, message, errorCode) => {
|
|
22539
|
-
if (!check && typeof console !== "undefined") {
|
|
22540
|
-
console.warn(formatErrorMessage(message, errorCode));
|
|
22541
|
-
}
|
|
22542
|
-
};
|
|
22543
|
-
invariant = (check, message, errorCode) => {
|
|
22544
|
-
if (!check) {
|
|
22545
|
-
throw new Error(formatErrorMessage(message, errorCode));
|
|
21850
|
+
invariant = (check, message, errorCode) => {
|
|
21851
|
+
if (!check) {
|
|
21852
|
+
throw new Error(formatErrorMessage(message, errorCode));
|
|
22546
21853
|
}
|
|
22547
21854
|
};
|
|
22548
21855
|
}
|
|
@@ -29660,337 +28967,762 @@ const gestureAnimations = {
|
|
|
29660
28967
|
inView: {
|
|
29661
28968
|
Feature: InViewFeature
|
|
29662
28969
|
},
|
|
29663
|
-
tap: {
|
|
29664
|
-
Feature: PressGesture
|
|
28970
|
+
tap: {
|
|
28971
|
+
Feature: PressGesture
|
|
28972
|
+
},
|
|
28973
|
+
focus: {
|
|
28974
|
+
Feature: FocusGesture
|
|
28975
|
+
},
|
|
28976
|
+
hover: {
|
|
28977
|
+
Feature: HoverGesture
|
|
28978
|
+
}
|
|
28979
|
+
};
|
|
28980
|
+
const layout = {
|
|
28981
|
+
layout: {
|
|
28982
|
+
ProjectionNode: HTMLProjectionNode,
|
|
28983
|
+
MeasureLayout
|
|
28984
|
+
}
|
|
28985
|
+
};
|
|
28986
|
+
const featureBundle = {
|
|
28987
|
+
...animations,
|
|
28988
|
+
...gestureAnimations,
|
|
28989
|
+
...drag,
|
|
28990
|
+
...layout
|
|
28991
|
+
};
|
|
28992
|
+
const motion = /* @__PURE__ */ createMotionProxy(featureBundle, createDomVisualElement);
|
|
28993
|
+
const animationPresets = {
|
|
28994
|
+
fadeInUp: {
|
|
28995
|
+
initial: { opacity: 0, y: 50 },
|
|
28996
|
+
animate: { opacity: 1, y: 0 },
|
|
28997
|
+
transition: { duration: 0.2, ease: "easeOut" }
|
|
28998
|
+
},
|
|
28999
|
+
fadeInDown: {
|
|
29000
|
+
initial: { opacity: 0, y: -50 },
|
|
29001
|
+
animate: { opacity: 1, y: 0 },
|
|
29002
|
+
transition: { duration: 0.3, ease: "easeOut" }
|
|
29665
29003
|
},
|
|
29666
|
-
|
|
29667
|
-
|
|
29004
|
+
fadeInLeft: {
|
|
29005
|
+
initial: { opacity: 0, x: -50 },
|
|
29006
|
+
animate: { opacity: 1, x: 0 },
|
|
29007
|
+
transition: { duration: 0.3, ease: "easeOut" }
|
|
29668
29008
|
},
|
|
29669
|
-
|
|
29670
|
-
|
|
29009
|
+
fadeInRight: {
|
|
29010
|
+
initial: { opacity: 0, x: 50 },
|
|
29011
|
+
animate: { opacity: 1, x: 0 },
|
|
29012
|
+
transition: { duration: 0.3, ease: "easeOut" }
|
|
29013
|
+
},
|
|
29014
|
+
scaleIn: {
|
|
29015
|
+
initial: { opacity: 0, scale: 0.9 },
|
|
29016
|
+
animate: { opacity: 1, scale: 1 },
|
|
29017
|
+
transition: { duration: 0.3, ease: "easeOut" }
|
|
29018
|
+
},
|
|
29019
|
+
slideInUp: {
|
|
29020
|
+
initial: { opacity: 0, y: 20 },
|
|
29021
|
+
animate: { opacity: 1, y: 0 },
|
|
29022
|
+
transition: { duration: 0.4, ease: "easeOut" }
|
|
29023
|
+
},
|
|
29024
|
+
staggerItem: {
|
|
29025
|
+
initial: { opacity: 0, y: 30, scale: 0.9 },
|
|
29026
|
+
animate: { opacity: 1, y: 0, scale: 1 },
|
|
29027
|
+
transition: { duration: 0.4, delay: 0, ease: "easeOut" }
|
|
29028
|
+
},
|
|
29029
|
+
tabContent: {
|
|
29030
|
+
initial: { opacity: 0, y: 20 },
|
|
29031
|
+
animate: { opacity: 1, y: 0 },
|
|
29032
|
+
transition: { duration: 0.4, ease: "easeOut" }
|
|
29033
|
+
},
|
|
29034
|
+
tabUnderline: {
|
|
29035
|
+
initial: { scaleX: 0, opacity: 0 },
|
|
29036
|
+
animate: { scaleX: 1, opacity: 1 },
|
|
29037
|
+
exit: { scaleX: 0, opacity: 0 },
|
|
29038
|
+
transition: { duration: 0.3, ease: "easeInOut" }
|
|
29671
29039
|
}
|
|
29672
29040
|
};
|
|
29673
|
-
const
|
|
29674
|
-
|
|
29675
|
-
|
|
29676
|
-
|
|
29041
|
+
const MotionBox = ({
|
|
29042
|
+
children,
|
|
29043
|
+
sx,
|
|
29044
|
+
onClick,
|
|
29045
|
+
preset = "fadeInUp",
|
|
29046
|
+
delay: delay2,
|
|
29047
|
+
index,
|
|
29048
|
+
hover: hover2 = false,
|
|
29049
|
+
...motionProps
|
|
29050
|
+
}) => {
|
|
29051
|
+
const getAnimationProps = () => {
|
|
29052
|
+
if (preset) {
|
|
29053
|
+
const presetConfig = animationPresets[preset];
|
|
29054
|
+
if (preset === "staggerItem" && index !== void 0) {
|
|
29055
|
+
return {
|
|
29056
|
+
...presetConfig,
|
|
29057
|
+
transition: {
|
|
29058
|
+
...presetConfig.transition,
|
|
29059
|
+
delay: index * 0.05 + (delay2 || 0)
|
|
29060
|
+
}
|
|
29061
|
+
};
|
|
29062
|
+
}
|
|
29063
|
+
if (delay2 !== void 0) {
|
|
29064
|
+
return {
|
|
29065
|
+
...presetConfig,
|
|
29066
|
+
transition: {
|
|
29067
|
+
...presetConfig.transition,
|
|
29068
|
+
delay: delay2
|
|
29069
|
+
}
|
|
29070
|
+
};
|
|
29071
|
+
}
|
|
29072
|
+
return presetConfig;
|
|
29073
|
+
}
|
|
29074
|
+
return {};
|
|
29075
|
+
};
|
|
29076
|
+
const hoverProps = hover2 ? {
|
|
29077
|
+
whileHover: {
|
|
29078
|
+
y: -4,
|
|
29079
|
+
scale: 1.05,
|
|
29080
|
+
transition: { duration: 0.2 }
|
|
29081
|
+
}
|
|
29082
|
+
} : {};
|
|
29083
|
+
return /* @__PURE__ */ jsx(motion.div, { ...motionProps, ...getAnimationProps(), ...hoverProps, onClick, style: { ...sx }, children });
|
|
29084
|
+
};
|
|
29085
|
+
const AppGrid = ({
|
|
29086
|
+
apps,
|
|
29087
|
+
onClickItem,
|
|
29088
|
+
columns = 5,
|
|
29089
|
+
rows = 3,
|
|
29090
|
+
iconSize = 80,
|
|
29091
|
+
iconRadius = 7,
|
|
29092
|
+
iconShadow = `0 ${PADDING_GAP_ITEM_SMALL} ${PADDING_GAP_LAYOUT} ${BORDER_COLOR_CARD}`,
|
|
29093
|
+
gap: gap2 = PADDING_GAP_ITEM,
|
|
29094
|
+
titleVariant = "subtitle1",
|
|
29095
|
+
captionVariant = "caption",
|
|
29096
|
+
titleColor,
|
|
29097
|
+
captionColor,
|
|
29098
|
+
selectedAppId,
|
|
29099
|
+
showPagination = true
|
|
29100
|
+
}) => {
|
|
29101
|
+
const theme = useTheme();
|
|
29102
|
+
const pageSize = Math.max(1, columns * Math.max(1, rows));
|
|
29103
|
+
const totalPages = Math.max(1, Math.ceil(apps.length / pageSize));
|
|
29104
|
+
const [page, setPage] = React__default.useState(0);
|
|
29105
|
+
const { user } = useSelector((state) => state.account);
|
|
29106
|
+
React__default.useEffect(() => {
|
|
29107
|
+
setPage((prev) => prev >= totalPages ? totalPages - 1 : prev);
|
|
29108
|
+
}, [totalPages, columns, rows, apps.length]);
|
|
29109
|
+
const start = page * pageSize;
|
|
29110
|
+
const end = start + pageSize;
|
|
29111
|
+
const visibleApps = totalPages > 1 ? apps.slice(start, end) : apps;
|
|
29112
|
+
const findLink = (app) => {
|
|
29113
|
+
if (!app.children?.length) {
|
|
29114
|
+
return app.path;
|
|
29115
|
+
}
|
|
29116
|
+
for (const i of app.children || []) {
|
|
29117
|
+
if (user?.type && i.allowUserTypes.includes(user?.type)) {
|
|
29118
|
+
if (i.path) {
|
|
29119
|
+
return `${i.path}`;
|
|
29120
|
+
}
|
|
29121
|
+
}
|
|
29122
|
+
}
|
|
29123
|
+
};
|
|
29124
|
+
return /* @__PURE__ */ jsxs(Box, { sx: { position: "relative" }, children: [
|
|
29125
|
+
/* @__PURE__ */ jsx(
|
|
29126
|
+
Box,
|
|
29127
|
+
{
|
|
29128
|
+
sx: {
|
|
29129
|
+
display: "grid",
|
|
29130
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
29131
|
+
gap: gap2
|
|
29132
|
+
},
|
|
29133
|
+
children: visibleApps.map((app, index) => {
|
|
29134
|
+
const isSelected = selectedAppId === app.key;
|
|
29135
|
+
return /* @__PURE__ */ jsx(
|
|
29136
|
+
"a",
|
|
29137
|
+
{
|
|
29138
|
+
href: findLink(app) || "#",
|
|
29139
|
+
target: "_blank",
|
|
29140
|
+
rel: "noopener noreferrer",
|
|
29141
|
+
style: {
|
|
29142
|
+
textDecoration: "none",
|
|
29143
|
+
color: "inherit",
|
|
29144
|
+
width: "100%",
|
|
29145
|
+
display: "block"
|
|
29146
|
+
},
|
|
29147
|
+
onClick: (e) => {
|
|
29148
|
+
const url2 = findLink(app);
|
|
29149
|
+
e.preventDefault();
|
|
29150
|
+
onClickItem?.(app);
|
|
29151
|
+
if (url2 && url2 !== "#") {
|
|
29152
|
+
try {
|
|
29153
|
+
window.open(url2, "_blank", "noopener");
|
|
29154
|
+
} catch (err) {
|
|
29155
|
+
const newWindow = window.open("about:blank");
|
|
29156
|
+
if (newWindow) newWindow.location.href = url2;
|
|
29157
|
+
}
|
|
29158
|
+
}
|
|
29159
|
+
},
|
|
29160
|
+
children: /* @__PURE__ */ jsxs(
|
|
29161
|
+
MotionBox,
|
|
29162
|
+
{
|
|
29163
|
+
preset: "staggerItem",
|
|
29164
|
+
index,
|
|
29165
|
+
hover: true,
|
|
29166
|
+
sx: {
|
|
29167
|
+
cursor: "pointer",
|
|
29168
|
+
display: "flex",
|
|
29169
|
+
flex: 1,
|
|
29170
|
+
alignItems: "center",
|
|
29171
|
+
flexDirection: "column"
|
|
29172
|
+
},
|
|
29173
|
+
onClick: () => {
|
|
29174
|
+
},
|
|
29175
|
+
children: [
|
|
29176
|
+
/* @__PURE__ */ jsx(
|
|
29177
|
+
Box,
|
|
29178
|
+
{
|
|
29179
|
+
sx: {
|
|
29180
|
+
width: iconSize,
|
|
29181
|
+
height: iconSize,
|
|
29182
|
+
borderRadius: iconRadius,
|
|
29183
|
+
mb: 1.5,
|
|
29184
|
+
display: "flex",
|
|
29185
|
+
alignItems: "center",
|
|
29186
|
+
justifyContent: "center",
|
|
29187
|
+
background: getAppColor(app.category),
|
|
29188
|
+
boxShadow: isSelected ? `0 0 0 1px ${theme.palette.primary.main}, ${iconShadow}` : iconShadow
|
|
29189
|
+
},
|
|
29190
|
+
children: typeof app.icon === "string" && app.icon && /* @__PURE__ */ jsx(
|
|
29191
|
+
ImageElement,
|
|
29192
|
+
{
|
|
29193
|
+
sx: { width: iconSize * 0.56, height: iconSize * 0.56 },
|
|
29194
|
+
url: app.icon,
|
|
29195
|
+
sizeType: ImageSizeType.SQUARE
|
|
29196
|
+
}
|
|
29197
|
+
)
|
|
29198
|
+
}
|
|
29199
|
+
),
|
|
29200
|
+
/* @__PURE__ */ jsx(
|
|
29201
|
+
Typography,
|
|
29202
|
+
{
|
|
29203
|
+
variant: titleVariant,
|
|
29204
|
+
sx: { color: titleColor ?? theme.palette.common.white },
|
|
29205
|
+
children: app.title
|
|
29206
|
+
}
|
|
29207
|
+
),
|
|
29208
|
+
/* @__PURE__ */ jsx(
|
|
29209
|
+
Typography,
|
|
29210
|
+
{
|
|
29211
|
+
variant: captionVariant,
|
|
29212
|
+
sx: { color: captionColor ?? theme.palette.common.white },
|
|
29213
|
+
children: app.caption
|
|
29214
|
+
}
|
|
29215
|
+
)
|
|
29216
|
+
]
|
|
29217
|
+
}
|
|
29218
|
+
)
|
|
29219
|
+
},
|
|
29220
|
+
app.key
|
|
29221
|
+
);
|
|
29222
|
+
})
|
|
29223
|
+
}
|
|
29224
|
+
),
|
|
29225
|
+
showPagination && totalPages > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29226
|
+
page === totalPages - 1 && /* @__PURE__ */ jsx(
|
|
29227
|
+
IconButton,
|
|
29228
|
+
{
|
|
29229
|
+
size: "small",
|
|
29230
|
+
onClick: () => setPage((p) => Math.max(0, p - 1)),
|
|
29231
|
+
disabled: page === 0,
|
|
29232
|
+
sx: {
|
|
29233
|
+
position: "absolute",
|
|
29234
|
+
top: "50%",
|
|
29235
|
+
left: -30,
|
|
29236
|
+
transform: "translateY(-120%)",
|
|
29237
|
+
color: theme.palette.divider
|
|
29238
|
+
},
|
|
29239
|
+
children: /* @__PURE__ */ jsx(IconLeft, {})
|
|
29240
|
+
}
|
|
29241
|
+
),
|
|
29242
|
+
page !== totalPages - 1 && /* @__PURE__ */ jsx(
|
|
29243
|
+
IconButton,
|
|
29244
|
+
{
|
|
29245
|
+
size: "small",
|
|
29246
|
+
onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
|
|
29247
|
+
disabled: page === totalPages - 1,
|
|
29248
|
+
sx: {
|
|
29249
|
+
position: "absolute",
|
|
29250
|
+
top: "50%",
|
|
29251
|
+
right: -30,
|
|
29252
|
+
transform: "translateY(-120%)",
|
|
29253
|
+
color: theme.palette.divider
|
|
29254
|
+
},
|
|
29255
|
+
children: /* @__PURE__ */ jsx(IconRight, {})
|
|
29256
|
+
}
|
|
29257
|
+
),
|
|
29258
|
+
/* @__PURE__ */ jsx(
|
|
29259
|
+
Box,
|
|
29260
|
+
{
|
|
29261
|
+
sx: {
|
|
29262
|
+
mt: 2,
|
|
29263
|
+
display: "flex",
|
|
29264
|
+
alignItems: "center",
|
|
29265
|
+
justifyContent: "center"
|
|
29266
|
+
},
|
|
29267
|
+
children: /* @__PURE__ */ jsx(
|
|
29268
|
+
Box,
|
|
29269
|
+
{
|
|
29270
|
+
sx: {
|
|
29271
|
+
display: "flex",
|
|
29272
|
+
alignItems: "center",
|
|
29273
|
+
gap: PADDING_GAP_BUTTON,
|
|
29274
|
+
px: PADDING_GAP_BUTTON,
|
|
29275
|
+
py: PADDING_GAP_ITEM_SMALL,
|
|
29276
|
+
borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
|
|
29277
|
+
backgroundColor: "rgba(255,255,255,0.15)"
|
|
29278
|
+
},
|
|
29279
|
+
children: Array.from({ length: totalPages }).map((_, i) => /* @__PURE__ */ jsx(
|
|
29280
|
+
Box,
|
|
29281
|
+
{
|
|
29282
|
+
onClick: () => setPage(i),
|
|
29283
|
+
sx: {
|
|
29284
|
+
height: 10,
|
|
29285
|
+
borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
|
|
29286
|
+
cursor: "pointer",
|
|
29287
|
+
transition: "width 0.3s ease",
|
|
29288
|
+
width: i === page ? "40px" : "10px",
|
|
29289
|
+
backgroundColor: i === page ? theme.palette.common.white : "rgba(255,255,255,0.35)"
|
|
29290
|
+
}
|
|
29291
|
+
},
|
|
29292
|
+
i
|
|
29293
|
+
))
|
|
29294
|
+
}
|
|
29295
|
+
)
|
|
29296
|
+
}
|
|
29297
|
+
)
|
|
29298
|
+
] })
|
|
29299
|
+
] });
|
|
29300
|
+
};
|
|
29301
|
+
const ArrowTooltip = emStyled(({ className, ...props }) => /* @__PURE__ */ jsx(Tooltip, { ...props, arrow: true, classes: { popper: className } }))(() => ({
|
|
29302
|
+
[`& .${tooltipClasses.arrow}`]: {
|
|
29303
|
+
color: "white"
|
|
29677
29304
|
}
|
|
29678
|
-
};
|
|
29679
|
-
const
|
|
29680
|
-
|
|
29681
|
-
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
|
|
29695
|
-
transition: { duration: 0.3, ease: "easeOut" }
|
|
29696
|
-
},
|
|
29697
|
-
fadeInLeft: {
|
|
29698
|
-
initial: { opacity: 0, x: -50 },
|
|
29699
|
-
animate: { opacity: 1, x: 0 },
|
|
29700
|
-
transition: { duration: 0.3, ease: "easeOut" }
|
|
29701
|
-
},
|
|
29702
|
-
fadeInRight: {
|
|
29703
|
-
initial: { opacity: 0, x: 50 },
|
|
29704
|
-
animate: { opacity: 1, x: 0 },
|
|
29705
|
-
transition: { duration: 0.3, ease: "easeOut" }
|
|
29706
|
-
},
|
|
29707
|
-
scaleIn: {
|
|
29708
|
-
initial: { opacity: 0, scale: 0.9 },
|
|
29709
|
-
animate: { opacity: 1, scale: 1 },
|
|
29710
|
-
transition: { duration: 0.3, ease: "easeOut" }
|
|
29711
|
-
},
|
|
29712
|
-
slideInUp: {
|
|
29713
|
-
initial: { opacity: 0, y: 20 },
|
|
29714
|
-
animate: { opacity: 1, y: 0 },
|
|
29715
|
-
transition: { duration: 0.4, ease: "easeOut" }
|
|
29716
|
-
},
|
|
29717
|
-
staggerItem: {
|
|
29718
|
-
initial: { opacity: 0, y: 30, scale: 0.9 },
|
|
29719
|
-
animate: { opacity: 1, y: 0, scale: 1 },
|
|
29720
|
-
transition: { duration: 0.4, delay: 0, ease: "easeOut" }
|
|
29721
|
-
},
|
|
29722
|
-
tabContent: {
|
|
29723
|
-
initial: { opacity: 0, y: 20 },
|
|
29724
|
-
animate: { opacity: 1, y: 0 },
|
|
29725
|
-
transition: { duration: 0.4, ease: "easeOut" }
|
|
29726
|
-
},
|
|
29727
|
-
tabUnderline: {
|
|
29728
|
-
initial: { scaleX: 0, opacity: 0 },
|
|
29729
|
-
animate: { scaleX: 1, opacity: 1 },
|
|
29730
|
-
exit: { scaleX: 0, opacity: 0 },
|
|
29731
|
-
transition: { duration: 0.3, ease: "easeInOut" }
|
|
29305
|
+
}));
|
|
29306
|
+
const AvatarElement = ({
|
|
29307
|
+
url: url2,
|
|
29308
|
+
sx = {},
|
|
29309
|
+
size = "medium",
|
|
29310
|
+
tooltipContent,
|
|
29311
|
+
...rest
|
|
29312
|
+
}) => {
|
|
29313
|
+
if (tooltipContent) {
|
|
29314
|
+
return /* @__PURE__ */ jsx(ArrowTooltip, { title: tooltipContent, arrow: true, children: /* @__PURE__ */ jsx(
|
|
29315
|
+
Avatar,
|
|
29316
|
+
{
|
|
29317
|
+
...rest,
|
|
29318
|
+
src: url2 || "",
|
|
29319
|
+
sx: { ...MAP_SIZE[size], bgcolor: "primary.main", ...sx, cursor: "pointer" }
|
|
29320
|
+
}
|
|
29321
|
+
) });
|
|
29732
29322
|
}
|
|
29323
|
+
return /* @__PURE__ */ jsx(Avatar, { ...rest, src: url2 || "", sx: { ...MAP_SIZE[size], bgcolor: "primary.main", ...sx, cursor: "pointer" } });
|
|
29733
29324
|
};
|
|
29734
|
-
const
|
|
29325
|
+
const AvatarUserInfo = ({
|
|
29326
|
+
name,
|
|
29327
|
+
url: url2,
|
|
29328
|
+
positions = [],
|
|
29329
|
+
maxWidth: maxWidth2 = "440px",
|
|
29330
|
+
isTag = false,
|
|
29331
|
+
sxName,
|
|
29332
|
+
sxPosition,
|
|
29333
|
+
sizeAvatar = "large"
|
|
29334
|
+
}) => {
|
|
29335
|
+
const { palette } = useTheme$2();
|
|
29336
|
+
const isSystemMonitor = useIsSystemMonitor();
|
|
29337
|
+
return /* @__PURE__ */ jsxs(StackRow, { sx: { alignItems: "center", gap: PADDING_GAP_ITEM }, children: [
|
|
29338
|
+
/* @__PURE__ */ jsx(AvatarElement, { url: url2, size: sizeAvatar }),
|
|
29339
|
+
positions.length > 0 ? /* @__PURE__ */ jsxs(Stack$1, { sx: { gap: 0 }, children: [
|
|
29340
|
+
/* @__PURE__ */ jsx(
|
|
29341
|
+
Typography,
|
|
29342
|
+
{
|
|
29343
|
+
sx: {
|
|
29344
|
+
color: isSystemMonitor ? palette.primary.contrastText : palette.text.secondary,
|
|
29345
|
+
fontWeight: "600",
|
|
29346
|
+
fontSize: "14px",
|
|
29347
|
+
lineHeight: "20px",
|
|
29348
|
+
...getLimitLineCss(1),
|
|
29349
|
+
...sxName
|
|
29350
|
+
},
|
|
29351
|
+
children: name
|
|
29352
|
+
}
|
|
29353
|
+
),
|
|
29354
|
+
/* @__PURE__ */ jsx(
|
|
29355
|
+
Typography,
|
|
29356
|
+
{
|
|
29357
|
+
variant: "caption",
|
|
29358
|
+
sx: {
|
|
29359
|
+
...getLimitLineCss(1),
|
|
29360
|
+
color: palette.text.disabled,
|
|
29361
|
+
maxWidth: maxWidth2,
|
|
29362
|
+
...isTag && {
|
|
29363
|
+
display: "flex",
|
|
29364
|
+
padding: "2px 4px",
|
|
29365
|
+
justifyContent: "center",
|
|
29366
|
+
alignItems: "center",
|
|
29367
|
+
gap: "10px",
|
|
29368
|
+
borderRadius: "4px",
|
|
29369
|
+
background: " #EFF8FF",
|
|
29370
|
+
color: " #035388",
|
|
29371
|
+
width: "fit-content",
|
|
29372
|
+
...sxPosition
|
|
29373
|
+
}
|
|
29374
|
+
},
|
|
29375
|
+
children: positions.join(" / ")
|
|
29376
|
+
}
|
|
29377
|
+
)
|
|
29378
|
+
] }) : /* @__PURE__ */ jsx(
|
|
29379
|
+
Typography,
|
|
29380
|
+
{
|
|
29381
|
+
sx: {
|
|
29382
|
+
...TYPOGRAPHY_STYLES.textSm.semiBold,
|
|
29383
|
+
...getLimitLineCss(1),
|
|
29384
|
+
...sxName
|
|
29385
|
+
},
|
|
29386
|
+
children: name
|
|
29387
|
+
}
|
|
29388
|
+
)
|
|
29389
|
+
] });
|
|
29390
|
+
};
|
|
29391
|
+
const RadioGroupElement = ({
|
|
29392
|
+
name,
|
|
29393
|
+
direction = "row",
|
|
29394
|
+
label,
|
|
29395
|
+
disabled,
|
|
29396
|
+
iconLabel = "event_list",
|
|
29397
|
+
defaultValue,
|
|
29398
|
+
value: value2,
|
|
29399
|
+
onChange,
|
|
29735
29400
|
children,
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
preset = "fadeInUp",
|
|
29739
|
-
delay: delay2,
|
|
29740
|
-
index,
|
|
29741
|
-
hover: hover2 = false,
|
|
29742
|
-
...motionProps
|
|
29401
|
+
required = false,
|
|
29402
|
+
sx = {}
|
|
29743
29403
|
}) => {
|
|
29744
|
-
const
|
|
29745
|
-
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29404
|
+
const change = (event) => {
|
|
29405
|
+
onChange && onChange({ target: { name, value: event.target.value || void 0 } });
|
|
29406
|
+
};
|
|
29407
|
+
return /* @__PURE__ */ jsxs(FormControl, { disabled, sx: { gap: PADDING_GAP_ITEM }, onChange: change, children: [
|
|
29408
|
+
label && /* @__PURE__ */ jsx(
|
|
29409
|
+
InputLabel,
|
|
29410
|
+
{
|
|
29411
|
+
shrink: true,
|
|
29412
|
+
required,
|
|
29413
|
+
sx: {
|
|
29414
|
+
transform: "translate(0px , -9px) scale(0.75)",
|
|
29415
|
+
zIndex: 2,
|
|
29416
|
+
display: "flex"
|
|
29417
|
+
},
|
|
29418
|
+
children: /* @__PURE__ */ jsxs(StackLabel, { children: [
|
|
29419
|
+
/* @__PURE__ */ jsx(IconElement, { icon: iconLabel, sx: { fontSize: TEXT_FIELD.FONT_SIZE_LABEL } }),
|
|
29420
|
+
label
|
|
29421
|
+
] })
|
|
29422
|
+
}
|
|
29423
|
+
),
|
|
29424
|
+
/* @__PURE__ */ jsx(
|
|
29425
|
+
RadioGroup,
|
|
29426
|
+
{
|
|
29427
|
+
name,
|
|
29428
|
+
defaultValue,
|
|
29429
|
+
value: value2,
|
|
29430
|
+
sx: {
|
|
29431
|
+
flexDirection: direction,
|
|
29432
|
+
paddingTop: label ? "calc(8.5px + 1.5px)" : 0,
|
|
29433
|
+
// 8.5 lấy từ default theme không phải tự nhiên mà có
|
|
29434
|
+
gap: PADDING_GAP_LAYOUT,
|
|
29435
|
+
...sx
|
|
29436
|
+
},
|
|
29437
|
+
children
|
|
29755
29438
|
}
|
|
29756
|
-
|
|
29757
|
-
|
|
29758
|
-
|
|
29759
|
-
|
|
29760
|
-
|
|
29761
|
-
|
|
29439
|
+
)
|
|
29440
|
+
] });
|
|
29441
|
+
};
|
|
29442
|
+
const RadioElement = ({ name, label, ...rest }) => {
|
|
29443
|
+
return /* @__PURE__ */ jsx(
|
|
29444
|
+
FormControlLabel,
|
|
29445
|
+
{
|
|
29446
|
+
name,
|
|
29447
|
+
label,
|
|
29448
|
+
sx: { alignItems: "center", mr: 0 },
|
|
29449
|
+
control: /* @__PURE__ */ jsx(
|
|
29450
|
+
Radio,
|
|
29451
|
+
{
|
|
29452
|
+
...rest,
|
|
29453
|
+
sx: {
|
|
29454
|
+
paddingTop: 0,
|
|
29455
|
+
paddingBottom: 0,
|
|
29456
|
+
paddingRight: PADDING_GAP_ITEM,
|
|
29457
|
+
marginLeft: "2px",
|
|
29458
|
+
"&:hover": { backgroundColor: "unset" },
|
|
29459
|
+
"& .MuiSvgIcon-root": { fontSize: "18px" }
|
|
29762
29460
|
}
|
|
29763
|
-
}
|
|
29764
|
-
|
|
29765
|
-
return presetConfig;
|
|
29766
|
-
}
|
|
29767
|
-
return {};
|
|
29768
|
-
};
|
|
29769
|
-
const hoverProps = hover2 ? {
|
|
29770
|
-
whileHover: {
|
|
29771
|
-
y: -4,
|
|
29772
|
-
scale: 1.05,
|
|
29773
|
-
transition: { duration: 0.2 }
|
|
29461
|
+
}
|
|
29462
|
+
)
|
|
29774
29463
|
}
|
|
29775
|
-
|
|
29776
|
-
return /* @__PURE__ */ jsx(motion.div, { ...motionProps, ...getAnimationProps(), ...hoverProps, onClick, style: { ...sx }, children });
|
|
29464
|
+
);
|
|
29777
29465
|
};
|
|
29778
|
-
const
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
29787
|
-
|
|
29788
|
-
|
|
29789
|
-
|
|
29790
|
-
|
|
29791
|
-
|
|
29792
|
-
|
|
29793
|
-
|
|
29794
|
-
|
|
29795
|
-
|
|
29796
|
-
|
|
29797
|
-
|
|
29798
|
-
|
|
29799
|
-
|
|
29800
|
-
|
|
29801
|
-
|
|
29802
|
-
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
|
|
29807
|
-
|
|
29808
|
-
|
|
29809
|
-
|
|
29810
|
-
|
|
29811
|
-
|
|
29812
|
-
|
|
29466
|
+
const AvatarUserComponent = ({}) => {
|
|
29467
|
+
const account = useSelector((state) => state.account);
|
|
29468
|
+
const { showSnackbar } = useSnackbar();
|
|
29469
|
+
const dispatch = useAppDispatch();
|
|
29470
|
+
const navigate = useNavigate();
|
|
29471
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
29472
|
+
const positions = account?.user?.managedOrgUnits?.map((e) => e.name) || [];
|
|
29473
|
+
const menu = [
|
|
29474
|
+
{
|
|
29475
|
+
content: "Đăng xuất khỏi thiết bị",
|
|
29476
|
+
icon: "logout",
|
|
29477
|
+
onClick: async () => {
|
|
29478
|
+
try {
|
|
29479
|
+
await Promise.all([
|
|
29480
|
+
dispatch(
|
|
29481
|
+
ACTION_ACCOUNT.logout({
|
|
29482
|
+
type: LogoutType.THIS_DEVICE,
|
|
29483
|
+
refreshToken: account.refreshToken
|
|
29484
|
+
})
|
|
29485
|
+
).unwrap()
|
|
29486
|
+
]);
|
|
29487
|
+
navigate(PAGE.AUTH.path);
|
|
29488
|
+
} catch (error) {
|
|
29489
|
+
showSnackbar({
|
|
29490
|
+
message: getErrorMessage(error),
|
|
29491
|
+
type: SnackbarType.ERROR
|
|
29492
|
+
});
|
|
29493
|
+
}
|
|
29494
|
+
}
|
|
29495
|
+
},
|
|
29496
|
+
{
|
|
29497
|
+
content: "Đăng xuất khỏi tất cả thiết bị",
|
|
29498
|
+
icon: "exit_to_app",
|
|
29499
|
+
onClick: async () => {
|
|
29500
|
+
if ("serviceWorker" in navigator) {
|
|
29501
|
+
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
|
29502
|
+
registrations.forEach((registration) => {
|
|
29503
|
+
registration.unregister();
|
|
29504
|
+
});
|
|
29505
|
+
}).catch((error) => {
|
|
29506
|
+
console.error("Error unregistering Service Workers: ", error);
|
|
29507
|
+
});
|
|
29508
|
+
} else {
|
|
29509
|
+
console.warn("Service Worker is not supported in this browser.");
|
|
29813
29510
|
}
|
|
29511
|
+
await dispatch(
|
|
29512
|
+
ACTION_ACCOUNT.logout({
|
|
29513
|
+
type: LogoutType.THIS_DEVICE,
|
|
29514
|
+
refreshToken: account.refreshToken
|
|
29515
|
+
})
|
|
29516
|
+
).unwrap();
|
|
29517
|
+
navigate(PAGE.AUTH.path);
|
|
29814
29518
|
}
|
|
29815
29519
|
}
|
|
29520
|
+
];
|
|
29521
|
+
const handleClick = (event) => {
|
|
29522
|
+
setAnchorEl(event.currentTarget);
|
|
29816
29523
|
};
|
|
29817
|
-
|
|
29818
|
-
|
|
29524
|
+
const handleClose = () => {
|
|
29525
|
+
setAnchorEl(null);
|
|
29526
|
+
};
|
|
29527
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29528
|
+
/* @__PURE__ */ jsxs(
|
|
29819
29529
|
Box,
|
|
29820
29530
|
{
|
|
29531
|
+
onClick: handleClick,
|
|
29821
29532
|
sx: {
|
|
29822
|
-
|
|
29823
|
-
|
|
29824
|
-
|
|
29533
|
+
cursor: "pointer",
|
|
29534
|
+
display: "flex",
|
|
29535
|
+
alignItems: "center",
|
|
29536
|
+
gap: 1
|
|
29825
29537
|
},
|
|
29826
|
-
children:
|
|
29827
|
-
|
|
29828
|
-
|
|
29829
|
-
"a",
|
|
29538
|
+
children: [
|
|
29539
|
+
/* @__PURE__ */ jsx(
|
|
29540
|
+
AvatarUserInfo,
|
|
29830
29541
|
{
|
|
29831
|
-
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
|
|
29835
|
-
|
|
29836
|
-
|
|
29837
|
-
|
|
29838
|
-
|
|
29839
|
-
|
|
29840
|
-
|
|
29841
|
-
|
|
29842
|
-
|
|
29843
|
-
|
|
29844
|
-
|
|
29845
|
-
|
|
29846
|
-
|
|
29847
|
-
|
|
29848
|
-
|
|
29849
|
-
|
|
29850
|
-
|
|
29542
|
+
url: account.user?.url,
|
|
29543
|
+
name: account.user?.name ?? "",
|
|
29544
|
+
positions,
|
|
29545
|
+
isTag: true
|
|
29546
|
+
}
|
|
29547
|
+
),
|
|
29548
|
+
/* @__PURE__ */ jsx(
|
|
29549
|
+
IconElement,
|
|
29550
|
+
{
|
|
29551
|
+
icon: "arrow_drop_down",
|
|
29552
|
+
size: "medium",
|
|
29553
|
+
sx: {
|
|
29554
|
+
color: "text.secondary",
|
|
29555
|
+
transition: "transform 0.2s ease-in-out",
|
|
29556
|
+
transform: anchorEl ? "rotate(180deg)" : "rotate(0deg)",
|
|
29557
|
+
fontVariationSettings: "'wght' 600, 'FILL' 0",
|
|
29558
|
+
willChange: "transform",
|
|
29559
|
+
backfaceVisibility: "hidden"
|
|
29560
|
+
}
|
|
29561
|
+
}
|
|
29562
|
+
)
|
|
29563
|
+
]
|
|
29564
|
+
}
|
|
29565
|
+
),
|
|
29566
|
+
/* @__PURE__ */ jsxs(
|
|
29567
|
+
Menu,
|
|
29568
|
+
{
|
|
29569
|
+
anchorEl,
|
|
29570
|
+
open: Boolean(anchorEl),
|
|
29571
|
+
onClose: handleClose,
|
|
29572
|
+
onClick: handleClose,
|
|
29573
|
+
disableScrollLock: true,
|
|
29574
|
+
PaperProps: {
|
|
29575
|
+
elevation: 0,
|
|
29576
|
+
sx: {
|
|
29577
|
+
overflow: "visible",
|
|
29578
|
+
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
29579
|
+
mt: 1.5,
|
|
29580
|
+
transform: "translate3d(0, 0, 0)",
|
|
29581
|
+
willChange: "transform",
|
|
29582
|
+
"& .MuiAvatar-root": {
|
|
29583
|
+
width: 32,
|
|
29584
|
+
height: 32,
|
|
29585
|
+
ml: -0.5,
|
|
29586
|
+
mr: 1
|
|
29587
|
+
},
|
|
29588
|
+
"&:before": {
|
|
29589
|
+
content: '""',
|
|
29590
|
+
display: "block",
|
|
29591
|
+
position: "absolute",
|
|
29592
|
+
top: 0,
|
|
29593
|
+
right: 14,
|
|
29594
|
+
width: 10,
|
|
29595
|
+
height: 10,
|
|
29596
|
+
bgcolor: "background.paper",
|
|
29597
|
+
transform: "translateY(-50%) rotate(45deg)",
|
|
29598
|
+
zIndex: 0
|
|
29599
|
+
}
|
|
29600
|
+
}
|
|
29601
|
+
},
|
|
29602
|
+
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
29603
|
+
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
29604
|
+
children: [
|
|
29605
|
+
/* @__PURE__ */ jsxs(Box, { sx: { p: 2 }, children: [
|
|
29606
|
+
/* @__PURE__ */ jsxs(StackRowAlignStartJustBetween, { children: [
|
|
29607
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", sx: { lineHeight: 1 }, children: account.user?.name }),
|
|
29608
|
+
/* @__PURE__ */ jsx(
|
|
29609
|
+
IconElement,
|
|
29610
|
+
{
|
|
29611
|
+
icon: "settings",
|
|
29612
|
+
onClick: () => navigate(PAGE.DASHBOARD.path + DASHBOARD_SCREEN.ACCOUNT.path)
|
|
29613
|
+
}
|
|
29614
|
+
)
|
|
29615
|
+
] }),
|
|
29616
|
+
account.user?.userOrgUnitPositions && account.user.userOrgUnitPositions.length > 0 && /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
29617
|
+
/* @__PURE__ */ jsx(
|
|
29618
|
+
IconContentElement,
|
|
29619
|
+
{
|
|
29620
|
+
icon: "admin_panel_settings",
|
|
29621
|
+
content: "Vai trò"
|
|
29851
29622
|
}
|
|
29852
|
-
|
|
29853
|
-
|
|
29854
|
-
|
|
29623
|
+
),
|
|
29624
|
+
/* @__PURE__ */ jsx(
|
|
29625
|
+
RadioGroupElement,
|
|
29855
29626
|
{
|
|
29856
|
-
|
|
29857
|
-
|
|
29858
|
-
|
|
29859
|
-
|
|
29860
|
-
|
|
29861
|
-
|
|
29862
|
-
|
|
29863
|
-
|
|
29864
|
-
flexDirection: "column"
|
|
29865
|
-
},
|
|
29866
|
-
onClick: () => {
|
|
29627
|
+
direction: "column",
|
|
29628
|
+
sx: { paddingLeft: "20px" },
|
|
29629
|
+
value: account.userUnitPositionId,
|
|
29630
|
+
onChange: (event) => {
|
|
29631
|
+
dispatch(
|
|
29632
|
+
ACTION_ACCOUNT.updatePositionOrgUnit(event.target.value)
|
|
29633
|
+
);
|
|
29634
|
+
window.location.reload();
|
|
29867
29635
|
},
|
|
29868
|
-
children:
|
|
29869
|
-
|
|
29870
|
-
|
|
29871
|
-
|
|
29872
|
-
|
|
29873
|
-
|
|
29874
|
-
|
|
29875
|
-
|
|
29876
|
-
|
|
29877
|
-
display: "flex",
|
|
29878
|
-
alignItems: "center",
|
|
29879
|
-
justifyContent: "center",
|
|
29880
|
-
background: getAppColor(app.category),
|
|
29881
|
-
boxShadow: isSelected ? `0 0 0 1px ${theme.palette.primary.main}, ${iconShadow}` : iconShadow
|
|
29882
|
-
},
|
|
29883
|
-
children: typeof app.icon === "string" && app.icon && /* @__PURE__ */ jsx(
|
|
29884
|
-
ImageElement,
|
|
29636
|
+
children: account.user.userOrgUnitPositions.map((e) => /* @__PURE__ */ jsx(
|
|
29637
|
+
RadioElement,
|
|
29638
|
+
{
|
|
29639
|
+
value: e.id,
|
|
29640
|
+
size: "small",
|
|
29641
|
+
label: /* @__PURE__ */ jsxs(Stack$2, { gap: 0, children: [
|
|
29642
|
+
/* @__PURE__ */ jsx(Typography, { children: e.orgUnit.name }),
|
|
29643
|
+
/* @__PURE__ */ jsx(
|
|
29644
|
+
Typography,
|
|
29885
29645
|
{
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29646
|
+
variant: "caption",
|
|
29647
|
+
sx: {
|
|
29648
|
+
...getLimitLineCss(1),
|
|
29649
|
+
color: "text.disabled"
|
|
29650
|
+
},
|
|
29651
|
+
children: e.position.name
|
|
29889
29652
|
}
|
|
29890
29653
|
)
|
|
29891
|
-
}
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29895
|
-
{
|
|
29896
|
-
variant: titleVariant,
|
|
29897
|
-
sx: { color: titleColor ?? theme.palette.common.white },
|
|
29898
|
-
children: app.title
|
|
29899
|
-
}
|
|
29900
|
-
),
|
|
29901
|
-
/* @__PURE__ */ jsx(
|
|
29902
|
-
Typography,
|
|
29903
|
-
{
|
|
29904
|
-
variant: captionVariant,
|
|
29905
|
-
sx: { color: captionColor ?? theme.palette.common.white },
|
|
29906
|
-
children: app.caption
|
|
29907
|
-
}
|
|
29908
|
-
)
|
|
29909
|
-
]
|
|
29654
|
+
] })
|
|
29655
|
+
},
|
|
29656
|
+
e.id
|
|
29657
|
+
))
|
|
29910
29658
|
}
|
|
29911
29659
|
)
|
|
29912
|
-
}
|
|
29913
|
-
|
|
29914
|
-
)
|
|
29915
|
-
|
|
29660
|
+
] })
|
|
29661
|
+
] }),
|
|
29662
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
29663
|
+
menu.map((item, index) => /* @__PURE__ */ jsxs(MenuItem, { onClick: item.onClick, children: [
|
|
29664
|
+
/* @__PURE__ */ jsx(IconElement, { icon: item.icon, size: "small", sx: { mr: 1 } }),
|
|
29665
|
+
/* @__PURE__ */ jsx(Typography, { children: item.content })
|
|
29666
|
+
] }, index))
|
|
29667
|
+
]
|
|
29916
29668
|
}
|
|
29917
|
-
)
|
|
29918
|
-
showPagination && totalPages > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29919
|
-
page === totalPages - 1 && /* @__PURE__ */ jsx(
|
|
29920
|
-
IconButton,
|
|
29921
|
-
{
|
|
29922
|
-
size: "small",
|
|
29923
|
-
onClick: () => setPage((p) => Math.max(0, p - 1)),
|
|
29924
|
-
disabled: page === 0,
|
|
29925
|
-
sx: {
|
|
29926
|
-
position: "absolute",
|
|
29927
|
-
top: "50%",
|
|
29928
|
-
left: -30,
|
|
29929
|
-
transform: "translateY(-120%)",
|
|
29930
|
-
color: theme.palette.divider
|
|
29931
|
-
},
|
|
29932
|
-
children: /* @__PURE__ */ jsx(IconLeft, {})
|
|
29933
|
-
}
|
|
29934
|
-
),
|
|
29935
|
-
page !== totalPages - 1 && /* @__PURE__ */ jsx(
|
|
29936
|
-
IconButton,
|
|
29937
|
-
{
|
|
29938
|
-
size: "small",
|
|
29939
|
-
onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
|
|
29940
|
-
disabled: page === totalPages - 1,
|
|
29941
|
-
sx: {
|
|
29942
|
-
position: "absolute",
|
|
29943
|
-
top: "50%",
|
|
29944
|
-
right: -30,
|
|
29945
|
-
transform: "translateY(-120%)",
|
|
29946
|
-
color: theme.palette.divider
|
|
29947
|
-
},
|
|
29948
|
-
children: /* @__PURE__ */ jsx(IconRight, {})
|
|
29949
|
-
}
|
|
29950
|
-
),
|
|
29951
|
-
/* @__PURE__ */ jsx(
|
|
29952
|
-
Box,
|
|
29953
|
-
{
|
|
29954
|
-
sx: {
|
|
29955
|
-
mt: 2,
|
|
29956
|
-
display: "flex",
|
|
29957
|
-
alignItems: "center",
|
|
29958
|
-
justifyContent: "center"
|
|
29959
|
-
},
|
|
29960
|
-
children: /* @__PURE__ */ jsx(
|
|
29961
|
-
Box,
|
|
29962
|
-
{
|
|
29963
|
-
sx: {
|
|
29964
|
-
display: "flex",
|
|
29965
|
-
alignItems: "center",
|
|
29966
|
-
gap: PADDING_GAP_BUTTON,
|
|
29967
|
-
px: PADDING_GAP_BUTTON,
|
|
29968
|
-
py: PADDING_GAP_ITEM_SMALL,
|
|
29969
|
-
borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
|
|
29970
|
-
backgroundColor: "rgba(255,255,255,0.15)"
|
|
29971
|
-
},
|
|
29972
|
-
children: Array.from({ length: totalPages }).map((_, i) => /* @__PURE__ */ jsx(
|
|
29973
|
-
Box,
|
|
29974
|
-
{
|
|
29975
|
-
onClick: () => setPage(i),
|
|
29976
|
-
sx: {
|
|
29977
|
-
height: 10,
|
|
29978
|
-
borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
|
|
29979
|
-
cursor: "pointer",
|
|
29980
|
-
transition: "width 0.3s ease",
|
|
29981
|
-
width: i === page ? "40px" : "10px",
|
|
29982
|
-
backgroundColor: i === page ? theme.palette.common.white : "rgba(255,255,255,0.35)"
|
|
29983
|
-
}
|
|
29984
|
-
},
|
|
29985
|
-
i
|
|
29986
|
-
))
|
|
29987
|
-
}
|
|
29988
|
-
)
|
|
29989
|
-
}
|
|
29990
|
-
)
|
|
29991
|
-
] })
|
|
29669
|
+
)
|
|
29992
29670
|
] });
|
|
29993
29671
|
};
|
|
29672
|
+
const EmptyComponent = ({}) => {
|
|
29673
|
+
return /* @__PURE__ */ jsx(Fade, { in: true, timeout: ANIMATION_TIME, children: /* @__PURE__ */ jsx(
|
|
29674
|
+
Stack$1,
|
|
29675
|
+
{
|
|
29676
|
+
direction: "column",
|
|
29677
|
+
sx: {
|
|
29678
|
+
flex: 1,
|
|
29679
|
+
height: "100%",
|
|
29680
|
+
alignItems: "center",
|
|
29681
|
+
justifyContent: "center",
|
|
29682
|
+
padding: PADDING_GAP_ITEM
|
|
29683
|
+
},
|
|
29684
|
+
children: /* @__PURE__ */ jsx(Box, { component: "img", sx: { width: 70 }, src: "/images/empty.svg" })
|
|
29685
|
+
}
|
|
29686
|
+
) });
|
|
29687
|
+
};
|
|
29688
|
+
const TimeAgoComponent = ({
|
|
29689
|
+
time: time2,
|
|
29690
|
+
hasText
|
|
29691
|
+
}) => {
|
|
29692
|
+
return /* @__PURE__ */ jsx(
|
|
29693
|
+
Typography,
|
|
29694
|
+
{
|
|
29695
|
+
variant: "caption",
|
|
29696
|
+
sx: { ...getLimitLineCss(1), color: "text.disabled", lineHeight: 1.2 },
|
|
29697
|
+
children: (hasText ? "Cập nhật lúc " : "") + timeUtils.getTimeAgo(time2)
|
|
29698
|
+
}
|
|
29699
|
+
);
|
|
29700
|
+
};
|
|
29701
|
+
const TimeAgoContentComponent = ({ time: time2, content, height: height2 = HEIGHT_IMAGE_DEFAULT }) => {
|
|
29702
|
+
return /* @__PURE__ */ jsxs(
|
|
29703
|
+
Stack$2,
|
|
29704
|
+
{
|
|
29705
|
+
sx: {
|
|
29706
|
+
height: height2,
|
|
29707
|
+
gap: 0,
|
|
29708
|
+
justifyContent: "space-between",
|
|
29709
|
+
alignItems: "flex-start"
|
|
29710
|
+
},
|
|
29711
|
+
children: [
|
|
29712
|
+
/* @__PURE__ */ jsx(
|
|
29713
|
+
Typography,
|
|
29714
|
+
{
|
|
29715
|
+
sx: {
|
|
29716
|
+
...getLimitLineCss(1)
|
|
29717
|
+
},
|
|
29718
|
+
children: content
|
|
29719
|
+
}
|
|
29720
|
+
),
|
|
29721
|
+
/* @__PURE__ */ jsx(TimeAgoComponent, { time: time2 })
|
|
29722
|
+
]
|
|
29723
|
+
}
|
|
29724
|
+
);
|
|
29725
|
+
};
|
|
29994
29726
|
const AppsSidebar = ({
|
|
29995
29727
|
isOpen,
|
|
29996
29728
|
onClose,
|
|
@@ -30225,6 +29957,36 @@ const TypographyContentCaption = ({
|
|
|
30225
29957
|
)
|
|
30226
29958
|
] });
|
|
30227
29959
|
};
|
|
29960
|
+
const TooltipOnClickElement = ({
|
|
29961
|
+
open,
|
|
29962
|
+
placement = "top",
|
|
29963
|
+
content,
|
|
29964
|
+
children,
|
|
29965
|
+
onOpen,
|
|
29966
|
+
onClose,
|
|
29967
|
+
onClickAway,
|
|
29968
|
+
...rest
|
|
29969
|
+
}) => {
|
|
29970
|
+
return (
|
|
29971
|
+
// Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
|
|
29972
|
+
/* @__PURE__ */ jsx(ClickAwayListener$1, { onClickAway, children: /* @__PURE__ */ jsx(
|
|
29973
|
+
Tooltip,
|
|
29974
|
+
{
|
|
29975
|
+
PopperProps: { disablePortal: true },
|
|
29976
|
+
open,
|
|
29977
|
+
onOpen,
|
|
29978
|
+
onClose,
|
|
29979
|
+
disableFocusListener: true,
|
|
29980
|
+
disableHoverListener: true,
|
|
29981
|
+
disableTouchListener: true,
|
|
29982
|
+
placement,
|
|
29983
|
+
title: content,
|
|
29984
|
+
...rest,
|
|
29985
|
+
children: /* @__PURE__ */ jsx("span", { children })
|
|
29986
|
+
}
|
|
29987
|
+
) })
|
|
29988
|
+
);
|
|
29989
|
+
};
|
|
30228
29990
|
const TypographyFilter = styled$2(Typography)(({ theme }) => ({
|
|
30229
29991
|
height: HEIGHT_ELEMENT_OTHER,
|
|
30230
29992
|
border: `1px solid ${theme.palette.divider}`,
|
|
@@ -30510,7 +30272,6 @@ export {
|
|
|
30510
30272
|
AvatarUserInfo,
|
|
30511
30273
|
BOOKING_SCREEN,
|
|
30512
30274
|
BUTTON_BACK_ICON_CONTENT,
|
|
30513
|
-
BellComponent,
|
|
30514
30275
|
BorderLinearProgress,
|
|
30515
30276
|
ButtonElement,
|
|
30516
30277
|
DASHBOARD_BASE,
|
|
@@ -30531,7 +30292,6 @@ export {
|
|
|
30531
30292
|
MAP_SIZE,
|
|
30532
30293
|
MODE,
|
|
30533
30294
|
Mode,
|
|
30534
|
-
MonitorPart,
|
|
30535
30295
|
MotionBox,
|
|
30536
30296
|
NotFoundPage,
|
|
30537
30297
|
NotificationStatus,
|