From 30ce8485261b1a3f6cadc4174faa65d9cc4feb82 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Tue, 7 Nov 2023 15:55:05 +0330 Subject: [PATCH 1/5] Fixed bug toast network --- src/core/components/NetworkComponent.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/components/NetworkComponent.jsx b/src/core/components/NetworkComponent.jsx index 8ebbb68..9610b1c 100644 --- a/src/core/components/NetworkComponent.jsx +++ b/src/core/components/NetworkComponent.jsx @@ -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,9 @@ const NetworkComponent = () => { }); return } - toast.dismiss() - toastId.current = toast.warn(t('offline_message'), { + networkToastId.current = toast.warn(t('offline_message'), { + containerId: 'connection', + draggable: false, autoClose: false, closeButton: false, closeOnClick: false, icon: }) }, [network.online]); From 4faa579c9116b85805519a895aa4942733e31ff3 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Tue, 7 Nov 2023 15:58:55 +0330 Subject: [PATCH 2/5] Fixed bug toast container --- src/layouts/AppLayout.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/layouts/AppLayout.jsx b/src/layouts/AppLayout.jsx index 4fc5e1d..5c01881 100644 --- a/src/layouts/AppLayout.jsx +++ b/src/layouts/AppLayout.jsx @@ -47,7 +47,16 @@ function AppLayout({children, isBot}) { color={theme.palette.secondary.dark} options={{showSpinner: false}} /> - + + {children} ); From 720dc78a10b74dbdbd3a36dbea2924bf1ac93c9e Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sat, 11 Nov 2023 12:04:43 +0330 Subject: [PATCH 3/5] LFFE-23 Change direction style in price component to LTR --- src/core/components/LtrTextField.jsx | 11 +++++++++++ src/core/components/PriceField.jsx | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/core/components/LtrTextField.jsx diff --git a/src/core/components/LtrTextField.jsx b/src/core/components/LtrTextField.jsx new file mode 100644 index 0000000..aa9efcb --- /dev/null +++ b/src/core/components/LtrTextField.jsx @@ -0,0 +1,11 @@ +import {styled, TextField} from "@mui/material"; + +const LtrTextField = styled(TextField)` + .MuiInputBase-input { + /* @noflip */ + direction: ltr; + text-align: left; + } +`; + +export default LtrTextField \ No newline at end of file diff --git a/src/core/components/PriceField.jsx b/src/core/components/PriceField.jsx index e62e4e1..1df1ba2 100644 --- a/src/core/components/PriceField.jsx +++ b/src/core/components/PriceField.jsx @@ -1,12 +1,13 @@ -import {Stack, TextField, Typography} from "@mui/material"; +import {Stack, Typography} from "@mui/material"; import {useTranslations} from "next-intl"; +import LtrTextField from "@/core/components/LtrTextField"; const PriceField = (props) => { const t = useTranslations(); return ( - From 87dd2844cc0517f30c732130e84825cd58c2ea2c Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Mon, 13 Nov 2023 14:15:00 +0330 Subject: [PATCH 4/5] LFFE-24 Change unit price from (Toman, Rial) to (Milion Toman, Milion Rial) --- public/locales/fa/app.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json index 87ae5d6..0ec9394 100644 --- a/public/locales/fa/app.json +++ b/public/locales/fa/app.json @@ -331,14 +331,14 @@ "button-confirm": "ارجاع", "description_error": "وارد کردن توضیحات الزامی است!", "optional": " (اختیاری)", - "unit": " (ریال)", + "unit": " (میلیون ریال)", "description": "توضیحات خود را وارد نمائید", "choose_file": "انتخاب فایل", "approved_amount": "مبلغ تصویب شده", "approved_amount_error": "وارد کردن مبلغ تصویب شده الزامیست", "approved_amount_positive": "مبلغ تصویب شده باید مثبت باشد", "approved_amount_number": "مبلغ تصویب شده باید عدد باشد", - "toman": "تومان", + "toman": "میلیون تومان", "proposed_amount_error": "وارد کردن مقدار پیشنهادی الزامیست", "proposed_amount": "مقدار پیشنهادی", "proposed_amount_positive": "مقدار پیشنهادی باید مثبت باشد", From ff6a9607596114461a86e14804e4f98954f94f8b Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Mon, 13 Nov 2023 15:55:17 +0330 Subject: [PATCH 5/5] change style list sidebar --- src/components/layouts/Dashboard/Sidebar/SidebarList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layouts/Dashboard/Sidebar/SidebarList.jsx b/src/components/layouts/Dashboard/Sidebar/SidebarList.jsx index 3a2eb44..1c76f07 100644 --- a/src/components/layouts/Dashboard/Sidebar/SidebarList.jsx +++ b/src/components/layouts/Dashboard/Sidebar/SidebarList.jsx @@ -87,7 +87,7 @@ export default function SidebarList({handleDrawerToggle}) { }, [selectedKey]); return ( - + {itemMenu.map((itemArr, index) => ( {itemArr.map((item) =>