CFE-4 Merging from develop

This commit is contained in:
2023-10-10 10:01:18 +03:30
54 changed files with 884 additions and 211 deletions

View File

@@ -0,0 +1,6 @@
import {forwardRef} from "react";
import {Slide} from "@mui/material";
export const DialogTransition = forwardRef(function DialogTransition(props, ref) {
return <Slide direction="up" ref={ref} {...props}/>;
});

View File

@@ -6,13 +6,13 @@ import WifiOffIcon from '@mui/icons-material/WifiOff';
import {useTranslations} from "next-intl";
const NetworkComponent = () => {
const toastId = useRef(null);
const networkToastId = useRef(null);
const network = useNetwork()
const t = useTranslations()
useEffect(() => {
if (network.online) {
toast.update(toastId.current, {
toast.update(networkToastId.current, {
type: toast.TYPE.SUCCESS,
render: t('online_message'),
autoClose: 2000,
@@ -22,8 +22,7 @@ const NetworkComponent = () => {
});
return
}
toast.dismiss()
toastId.current = toast.warn(t('offline_message'), {
networkToastId.current = toast.warn(t('offline_message'), {
autoClose: false, closeButton: false, closeOnClick: false, icon: <WifiOffIcon/>
})
}, [network.online]);

View File

@@ -0,0 +1,10 @@
import {Fab, styled} from "@mui/material";
const StyledFab = styled(Fab)`
position: absolute;
bottom: 16px;
/* @noflip */
left: 16px;
`;
export default StyledFab;

View File

@@ -36,4 +36,4 @@ const ErrorNotification = (t, status, message) => {
);
};
export default ErrorNotification;
export default ErrorNotification;

View File

@@ -9,4 +9,4 @@ const PendingNotification = (t) => {
});
};
export default PendingNotification;
export default PendingNotification;

View File

@@ -39,4 +39,4 @@ const SuccessNotification = (t, status) => {
);
};
export default SuccessNotification;
export default SuccessNotification;

View File

@@ -35,4 +35,4 @@ const UploadFileNotification = (t) => {
);
};
export default UploadFileNotification;
export default UploadFileNotification;

View File

@@ -37,4 +37,4 @@ const WarningNotification = (t, status) => {
);
};
export default WarningNotification;
export default WarningNotification;