From fd5014b0416db8193118d816798884394a82ea76 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 09:51:03 +0330 Subject: [PATCH 01/14] add form create inquiryPrivacyFencing --- src/app/template.js | 6 +- .../Create/Form/index.jsx | 120 +++++++++--------- .../inquiryPrivacyFencing/Create/index.jsx | 2 +- 3 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/app/template.js b/src/app/template.js index 3e14053..dc647c5 100644 --- a/src/app/template.js +++ b/src/app/template.js @@ -16,15 +16,15 @@ const Template = ({ children }) => { scrollbarColor: `#155175 transparent`, }, "*&::-webkit-scrollbar": { - width: "5px", + width: "4px", }, "*&::-webkit-scrollbar-track": { boxShadow: "inset 0 0 5px #fff", - borderRadius: "5px", + borderRadius: "4px", }, "*&::-webkit-scrollbar-thumb": { background: "#155175", - borderRadius: "5px", + borderRadius: "4px", }, }} /> diff --git a/src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx index 9fff4da..523d509 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx @@ -9,66 +9,66 @@ import moment from "jalali-moment"; import { Controller, useForm } from "react-hook-form"; import LocationOnMap from "./LocationOnMap"; +const initValues = { + dabirkhaneh_number: '', + nameh_date: moment(), + nameh_date_fa: '', + marjae_pasokh: '', + motaghazi_is_legal_id: null, + motaghazi_is_legal: '', + motaghazi_type_id: '', + motaghazi_type: null, + motaghazi_firstname: '', + motaghazi_lastname: '', + national_id: '', + shenase_melli: '', + tel_number: '', + mobile_number: '', + address: '', + edare_kol_id: null, + edare_kol: '', + edare_shahri_id: null, + edare_shahri: '', + rah_type_id: null, + rah_type: '', + name_mehvar_id: '', + name_mehvar_fa: null, + mizan_harim: null, + arze_navar: null, + samt_id: null, + samt: '', + kilometr: '', + lat: '', + lon: '', + zone: null, + karbari_type_id: null, + karbari_type: '', + tarh_title: '', + masahat_zirbana: '', + ehdasat_type_id: [], + ehdasat_type: '', + divarkeshi_distance: '', + mostahadesat_distance: '', + mahale_ejra_id: null, + mahale_ejra: '', + traffic_id: null, + traffic: '', + vaziat_eghtesadi_id: null, + vaziat_eghtesadi: '', + has_access_id: null, + has_access: '', + shomare_estelam_harim: '', + max_month: '', + max_day: '', + shomare_tahaodname: '', + shomare_daftarkhaneh: '', + description: '', + ronevesht: '', +} + const CreateForm = ({ handleClose, mutate }) => { - const { control, watch, register, handleSubmit, setValue } = useForm({ - defaultValues: { - dabirkhaneh_number: '', - nameh_date: moment(), - nameh_date_fa: '', - marjae_pasokh: '', - motaghazi_is_legal_id: null, - motaghazi_is_legal: '', - motaghazi_type_id: '', - motaghazi_type: null, - motaghazi_firstname: '', - motaghazi_lastname: '', - national_id: '', - shenase_melli: '', - tel_number: '', - mobile_number: '', - address: '', - edare_kol_id: null, - edare_kol: '', - edare_shahri_id: null, - edare_shahri: '', - rah_type_id: null, - rah_type: '', - name_mehvar_id: '', - name_mehvar_fa: null, - mizan_harim: null, - arze_navar: null, - samt_id: null, - samt: '', - kilometr: '', - lat: '', - lon: '', - zone: null, - karbari_type_id: null, - karbari_type: '', - tarh_title: '', - masahat_zirbana: '', - ehdasat_type_id: [], - ehdasat_type: '', - divarkeshi_distance: '', - mostahadesat_distance: '', - mahale_ejra_id: null, - mahale_ejra: '', - traffic_id: null, - traffic: '', - vaziat_eghtesadi_id: null, - vaziat_eghtesadi: '', - has_access_id: null, - has_access: '', - shomare_estelam_harim: '', - max_month: '', - max_day: '', - shomare_tahaodname: '', - shomare_daftarkhaneh: '', - description: '', - ronevesht: '', - } - }); const request = useRequest() + const { control, watch, register, handleSubmit, setValue, formState: { isSubmitting } } = useForm({ defaultValues: initValues }); const onSubmit = async (data) => { const formData = new FormData() @@ -561,8 +561,8 @@ const CreateForm = ({ handleClose, mutate }) => { - - + + ); diff --git a/src/components/dashboard/inquiryPrivacyFencing/Create/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Create/index.jsx index 9010277..6a3032c 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Create/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Create/index.jsx @@ -9,7 +9,7 @@ const InquiryPrivacyFencingCreate = ({ open, handleClose, mutate }) => { return ( <> - + ایجاد پاسخ به استعلام Date: Sun, 14 Jul 2024 10:22:38 +0330 Subject: [PATCH 02/14] fixed bug background datatable on firefox --- .../DataTable/body/TableBodyCell.js | 59 ++++++++++--------- .../components/DataTable/body/TableBodyRow.js | 42 +++++++------ .../DataTable/head/TableHeadCell.js | 39 ++++++------ .../components/DataTable/head/TableHeadRow.js | 2 +- 4 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/core/components/DataTable/body/TableBodyCell.js b/src/core/components/DataTable/body/TableBodyCell.js index 4c1804b..902f9c7 100644 --- a/src/core/components/DataTable/body/TableBodyCell.js +++ b/src/core/components/DataTable/body/TableBodyCell.js @@ -22,7 +22,7 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta enableColumnPinning, enableGrouping, layoutMode, - mrtTheme: { draggingBorderColor }, + mrtTheme: { draggingBorderColor, baseBackgroundColor }, muiSkeletonProps, muiTableBodyCellProps, }, @@ -83,10 +83,10 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta const borderStyle = showResizeBorder ? `2px solid ${draggingBorderColor} !important` : isDraggingColumn || isDraggingRow - ? `1px dashed ${theme.palette.grey[500]} !important` - : isHoveredColumn || isHoveredRow || isResizingColumn - ? `2px dashed ${draggingBorderColor} !important` - : undefined; + ? `1px dashed ${theme.palette.grey[500]} !important` + : isHoveredColumn || isHoveredRow || isResizingColumn + ? `2px dashed ${draggingBorderColor} !important` + : undefined; if (showResizeBorder) { return columnResizeDirection === "ltr" ? { borderRight: borderStyle } : { borderLeft: borderStyle }; @@ -94,18 +94,18 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta return borderStyle ? { - borderBottom: - isDraggingRow || isHoveredRow || (isLastRow && !isResizingColumn) ? borderStyle : undefined, - borderLeft: - isDraggingColumn || isHoveredColumn || ((isDraggingRow || isHoveredRow) && isFirstColumn) - ? borderStyle - : undefined, - borderRight: - isDraggingColumn || isHoveredColumn || ((isDraggingRow || isHoveredRow) && isLastColumn) - ? borderStyle - : undefined, - borderTop: isDraggingRow || isHoveredRow ? borderStyle : undefined, - } + borderBottom: + isDraggingRow || isHoveredRow || (isLastRow && !isResizingColumn) ? borderStyle : undefined, + borderLeft: + isDraggingColumn || isHoveredColumn || ((isDraggingRow || isHoveredRow) && isFirstColumn) + ? borderStyle + : undefined, + borderRight: + isDraggingColumn || isHoveredColumn || ((isDraggingRow || isHoveredRow) && isLastColumn) + ? borderStyle + : undefined, + borderTop: isDraggingRow || isHoveredRow ? borderStyle : undefined, + } : undefined; }, [columnSizingInfo.isResizingColumn, draggingColumn, draggingRow, hoveredColumn, hoveredRow, staticRowIndex]); @@ -179,8 +179,8 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta "&:hover": { outline: actionCell?.id === cell.id || - (editDisplayMode === "cell" && isEditable) || - (editDisplayMode === "table" && (isCreating || isEditing)) + (editDisplayMode === "cell" && isEditable) || + (editDisplayMode === "table" && (isCreating || isEditing)) ? `1px solid ${theme.palette.grey[500]}` : undefined, textOverflow: "clip", @@ -189,8 +189,8 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta cursor: isRightClickable ? "context-menu" : isEditable && editDisplayMode === "cell" - ? "pointer" - : "inherit", + ? "pointer" + : "inherit", outline: actionCell?.id === cell.id ? `1px solid ${theme.palette.grey[500]}` : undefined, outlineOffset: "-1px", overflow: "hidden", @@ -200,12 +200,12 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta ? "0 0.5rem" : "0.5rem" : density === "comfortable" - ? columnDefType === "display" - ? "0.5rem 0.75rem" - : "1rem" - : columnDefType === "display" - ? "1rem 1.25rem" - : "1.5rem", + ? columnDefType === "display" + ? "0.5rem 0.75rem" + : "1rem" + : columnDefType === "display" + ? "1rem 1.25rem" + : "1.5rem", textOverflow: columnDefType !== "display" ? "ellipsis" : undefined, whiteSpace: row.getIsPinned() || density === "compact" ? "nowrap" : "normal", @@ -216,6 +216,7 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta theme, }), ...draggingBorders, + backgroundColor: baseBackgroundColor })} > {tableCellProps.children ?? ( @@ -225,8 +226,8 @@ const DataTable_TableBodyCell = ({ cell, numRows, rowRef, staticColumnIndex, sta ) : showSkeletons !== false && (isLoading || showSkeletons) ? ( ) : columnDefType === "display" && - (["mrt-row-expand", "mrt-row-numbers", "mrt-row-select"].includes(column.id) || - !row.getIsGrouped()) ? ( + (["mrt-row-expand", "mrt-row-numbers", "mrt-row-select"].includes(column.id) || + !row.getIsGrouped()) ? ( columnDef.Cell?.({ cell, column, diff --git a/src/core/components/DataTable/body/TableBodyRow.js b/src/core/components/DataTable/body/TableBodyRow.js index a041d66..e35f29a 100644 --- a/src/core/components/DataTable/body/TableBodyRow.js +++ b/src/core/components/DataTable/body/TableBodyRow.js @@ -91,16 +91,16 @@ const DataTable_TableBodyRow = ({ const cellHighlightColor = isRowSelected ? selectedRowBackgroundColor : isRowPinned - ? pinnedRowBackgroundColor - : undefined; + ? pinnedRowBackgroundColor + : undefined; const cellHighlightColorHover = tableRowProps?.hover !== false ? isRowSelected ? cellHighlightColor : theme.palette.mode === "dark" - ? `${lighten(baseBackgroundColor, 0.3)}` - : `${darken(baseBackgroundColor, 0.3)}` + ? `${lighten(baseBackgroundColor, 0.2)}` + : `${darken(baseBackgroundColor, 0.2)}` : undefined; return ( @@ -126,11 +126,10 @@ const DataTable_TableBodyRow = ({ sx={(theme) => ({ "&:hover td:after": cellHighlightColorHover ? { - backgroundColor: alpha(cellHighlightColorHover, 0.3), - ...commonCellBeforeAfterStyles, - } + backgroundColor: alpha(cellHighlightColorHover, 0.3), + ...commonCellBeforeAfterStyles, + } : undefined, - backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isRowPinned ? `${bottomPinnedIndex * rowHeight + (enableStickyFooter ? tableFooterHeight - 1 : 0)}px` @@ -141,25 +140,24 @@ const DataTable_TableBodyRow = ({ position: virtualRow ? "absolute" : rowPinningDisplayMode?.includes("sticky") && isRowPinned - ? "sticky" - : "relative", + ? "sticky" + : "relative", td: { ...getCommonPinnedCellStyles({ table, theme }), }, "td:after": cellHighlightColor ? { - backgroundColor: cellHighlightColor, - ...commonCellBeforeAfterStyles, - } + backgroundColor: cellHighlightColor, + ...commonCellBeforeAfterStyles, + } : undefined, top: virtualRow ? 0 : topPinnedIndex !== undefined && isRowPinned - ? `${ - topPinnedIndex * rowHeight + - (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0) + ? `${topPinnedIndex * rowHeight + + (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0) }px` - : undefined, + : undefined, transition: virtualRow ? "none" : "all 150ms ease-in-out", width: "100%", zIndex: rowPinningDisplayMode?.includes("sticky") && isRowPinned ? 2 : 0, @@ -183,11 +181,11 @@ const DataTable_TableBodyRow = ({ }; return cell ? ( memoMode === "cells" && - cell.column.columnDef.columnDefType === "data" && - !draggingColumn && - !draggingRow && - editingCell?.id !== cell.id && - editingRow?.id !== row.id ? ( + cell.column.columnDef.columnDefType === "data" && + !draggingColumn && + !draggingRow && + editingCell?.id !== cell.id && + editingRow?.id !== row.id ? ( ) : ( diff --git a/src/core/components/DataTable/head/TableHeadCell.js b/src/core/components/DataTable/head/TableHeadCell.js index 9bc98b5..7a7498b 100644 --- a/src/core/components/DataTable/head/TableHeadCell.js +++ b/src/core/components/DataTable/head/TableHeadCell.js @@ -4,7 +4,7 @@ import { Box, TableCell } from "@mui/material"; import { MRT_TableHeadCellSortLabel } from "material-react-table"; import { useMemo } from "react"; -const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex, table, ...rest }) => { +const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex, backgroundColor, table, ...rest }) => { const theme = useTheme(); const { getState, @@ -67,20 +67,20 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex, const borderStyle = showResizeBorder ? `2px solid ${draggingBorderColor} !important` : draggingColumn?.id === column.id - ? `1px dashed ${theme.palette.grey[500]}` - : hoveredColumn?.id === column.id - ? `2px dashed ${draggingBorderColor}` - : undefined; + ? `1px dashed ${theme.palette.grey[500]}` + : hoveredColumn?.id === column.id + ? `2px dashed ${draggingBorderColor}` + : undefined; if (showResizeBorder) { return columnResizeDirection === "ltr" ? { borderRight: borderStyle } : { borderLeft: borderStyle }; } const draggingBorders = borderStyle ? { - borderLeft: borderStyle, - borderRight: borderStyle, - borderTop: borderStyle, - } + borderLeft: borderStyle, + borderRight: borderStyle, + borderTop: borderStyle, + } : undefined; return draggingBorders; @@ -151,19 +151,19 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex, density === "compact" ? "0.5rem" : density === "comfortable" - ? columnDefType === "display" - ? "0.75rem" - : "1rem" - : columnDefType === "display" - ? "1rem 1.25rem" - : "1.5rem", + ? columnDefType === "display" + ? "0.75rem" + : "1rem" + : columnDefType === "display" + ? "1rem 1.25rem" + : "1.5rem", pb: columnDefType === "display" ? 0 : showColumnFilters || density === "compact" ? "0.4rem" : "0.6rem", pt: columnDefType === "group" || density === "compact" ? "0.25rem" : density === "comfortable" - ? ".75rem" - : "1.25rem", + ? ".75rem" + : "1.25rem", userSelect: enableMultiSort && column.getCanSort() ? "none" : undefined, verticalAlign: "middle", ...getCommonMRTCellStyles({ @@ -174,6 +174,7 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex, theme, }), ...draggingBorders, + backgroundColor: backgroundColor, })} > {tableCellProps.children ?? ( @@ -187,8 +188,8 @@ const DataTable_TableHeadCell = ({ columnVirtualizer, header, staticColumnIndex, columnDefType === "group" || tableCellProps?.align === "center" ? "center" : column.getCanResize() - ? "space-between" - : "flex-start", + ? "space-between" + : "flex-start", position: "relative", width: "100%", }} diff --git a/src/core/components/DataTable/head/TableHeadRow.js b/src/core/components/DataTable/head/TableHeadRow.js index 512147a..c639ee8 100644 --- a/src/core/components/DataTable/head/TableHeadRow.js +++ b/src/core/components/DataTable/head/TableHeadRow.js @@ -25,7 +25,6 @@ const DataTable_TableHeadRow = ({ sx: (theme) => ({ // Access theme from the sx function ...(parseFromValuesOrFunc(muiTableHeadRowProps?.sx, theme) || {}), - backgroundColor, // Apply background color display: layoutMode?.startsWith("grid") ? "flex" : undefined, position: enableStickyHeader && layoutMode === "semantic" ? "sticky" : "relative", top: 0, @@ -44,6 +43,7 @@ const DataTable_TableHeadRow = ({ Date: Sun, 14 Jul 2024 10:47:36 +0330 Subject: [PATCH 03/14] fixed bug auth --- src/app/(withAuth)/layout.js | 5 +---- src/app/layout.js | 5 ++++- src/core/utils/errorResponse.js | 7 ++++--- src/lib/contexts/auth.js | 14 ++++++++++---- src/lib/hooks/useRequest.js | 4 +++- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/app/(withAuth)/layout.js b/src/app/(withAuth)/layout.js index 400bbc9..b9c3d01 100644 --- a/src/app/(withAuth)/layout.js +++ b/src/app/(withAuth)/layout.js @@ -1,11 +1,8 @@ import WithAuthMiddleware from "@/core/middlewares/withAuth"; -import { AuthProvider } from "@/lib/contexts/auth"; const Layout = ({ children }) => { return ( - - {children} - + {children} ); }; diff --git a/src/app/layout.js b/src/app/layout.js index 1f5a2c5..580ae26 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -1,3 +1,4 @@ +import { AuthProvider } from "@/lib/contexts/auth"; import { TableSettingProvider } from "@/lib/contexts/tableSetting"; export const metadata = { @@ -8,7 +9,9 @@ export default function RootLayout({ children }) { return ( - {children} + + {children} + ); diff --git a/src/core/utils/errorResponse.js b/src/core/utils/errorResponse.js index 47317bd..9eae51c 100644 --- a/src/core/utils/errorResponse.js +++ b/src/core/utils/errorResponse.js @@ -16,9 +16,10 @@ const errorServer = (response, notification, toastContainer) => { if (notification) errorServerToast(toastContainer); }; -const errorClient = (response, notification, toastContainer) => { +const errorClient = (response, notification, toastContainer, logout) => { switch (response.status) { case 401: + logout() if (notification) errorUnauthorizedToast(toastContainer); break; case 422: @@ -50,11 +51,11 @@ const errorClient = (response, notification, toastContainer) => { } }; -export const errorResponse = (response, notification, toastContainer) => { +export const errorResponse = (response, notification, toastContainer, logout) => { if (notification) toast.dismiss({ container: toastContainer }); if (isServerError(response.status)) { errorServer(response, notification, toastContainer); } else if (isClientError(response.status)) { - errorClient(response, notification, toastContainer); + errorClient(response, notification, toastContainer, logout); } }; diff --git a/src/lib/contexts/auth.js b/src/lib/contexts/auth.js index f2df0e6..074c8db 100644 --- a/src/lib/contexts/auth.js +++ b/src/lib/contexts/auth.js @@ -1,7 +1,7 @@ "use client"; -import { createContext, useCallback, useContext, useEffect, useReducer } from "react"; -import useRequest from "../hooks/useRequest"; import { GET_USER_ROUTE } from "@/core/utils/routes"; +import axios from "axios"; +import { createContext, useCallback, useContext, useEffect, useReducer } from "react"; const initAuth = { initAuthState: false, @@ -28,7 +28,6 @@ const AuthContext = createContext(); export const AuthProvider = ({ children }) => { const [state, dispatch] = useReducer(authReducer, initAuth); - const request = useRequest(); const clearUser = useCallback(() => { dispatch({ type: "CLEAR_USER" }); @@ -46,9 +45,15 @@ export const AuthProvider = ({ children }) => { dispatch({ type: "CHANGE_INIT_AUTH", initAuthState }); }, []); + const logout = () => { + clearUser(); + changeAuthState(false); + changeInitAuth(true); + } + const getUser = useCallback(async () => { try { - const { data } = await request(GET_USER_ROUTE, "get"); + const { data } = await axios.get(GET_USER_ROUTE, { withCredentials: true }); changeUser(data); changeAuthState(true); changeInitAuth(true); @@ -72,6 +77,7 @@ export const AuthProvider = ({ children }) => { isAuth: state.isAuth, initAuthState: state.initAuthState, getUser, + logout }} > {children} diff --git a/src/lib/hooks/useRequest.js b/src/lib/hooks/useRequest.js index 8805a56..477128e 100644 --- a/src/lib/hooks/useRequest.js +++ b/src/lib/hooks/useRequest.js @@ -2,6 +2,7 @@ import { errorResponse } from "@/core/utils/errorResponse"; import { GET_CSRF } from "@/core/utils/routes"; import { successRequest } from "@/core/utils/successRequest"; import axios from "axios"; +import { useAuth } from "../contexts/auth"; const getCsrfToken = async () => { try { @@ -26,6 +27,7 @@ const defaultOptions = { }; const useRequest = (initOptions) => { + const { logout } = useAuth() const instance = axios.create(); instance.interceptors.request.use( async function (config) { @@ -60,7 +62,7 @@ const useRequest = (initOptions) => { errorResponse( error.response, mergedOptions.notification.show && mergedOptions.notification.failed, - "request_data" + "request_data", logout ); } throw error; From 05220421d1918b418247e174bd152a3b6439cb4e Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 10:50:21 +0330 Subject: [PATCH 04/14] fixed bug scroll --- src/components/layouts/dashboard/headerWithSidebar/index.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/layouts/dashboard/headerWithSidebar/index.jsx b/src/components/layouts/dashboard/headerWithSidebar/index.jsx index c1b9e9f..68f4bc6 100644 --- a/src/components/layouts/dashboard/headerWithSidebar/index.jsx +++ b/src/components/layouts/dashboard/headerWithSidebar/index.jsx @@ -85,13 +85,12 @@ const HeaderWithSidebar = ({ children }) => { width: drawerWidth, flexShrink: 0, "& .MuiDrawer-paper": { - height: "-webkit-fill-available", overflow: "hidden", width: drawerWidth, boxSizing: "border-box", borderTop: 1, borderTopColor: "divider", - top: "unset", + position: 'inherit' }, }} variant="persistent" From f063a4abd1fc2152a801e61a3c7de24e82b16d05 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 11:15:34 +0330 Subject: [PATCH 05/14] fixed bug lfwd --- src/app/lfwd/page.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/lfwd/page.js b/src/app/lfwd/page.js index b3456a3..7728b19 100644 --- a/src/app/lfwd/page.js +++ b/src/app/lfwd/page.js @@ -1,12 +1,14 @@ "use client"; import { GET_LOGIN_ROUTE } from "@/core/utils/routes"; +import { useAuth } from "@/lib/contexts/auth"; import useRequest from "@/lib/hooks/useRequest"; import { Button, Stack, Typography, Zoom } from "@mui/material"; import Link from "next/link"; import { useEffect, useState } from "react"; const Page = ({ searchParams }) => { + const { getUser } = useAuth() const { username } = searchParams; const [login, setLogin] = useState(0); const request = useRequest(); @@ -15,6 +17,7 @@ const Page = ({ searchParams }) => { const login = async () => { try { await request(`${GET_LOGIN_ROUTE}?username=${username}`); + getUser() setLogin(1); } catch (error) { setLogin(2); @@ -28,6 +31,7 @@ const Page = ({ searchParams }) => { setLogin(0); try { await request(`${GET_LOGIN_ROUTE}?username=${username}`); + getUser() setLogin(1); } catch (error) { setLogin(2); @@ -40,8 +44,8 @@ const Page = ({ searchParams }) => { {login === 0 ? "درحال دریافت مجوز برای ارتباط با سرور..." : login === 1 - ? "ارتباط با سرور برقرار شد." - : "ارتباط با سرور برقرار نشد. مشکلی وجود دارد."} + ? "ارتباط با سرور برقرار شد." + : "ارتباط با سرور برقرار نشد. مشکلی وجود دارد."} ); diff --git a/src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx similarity index 99% rename from src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx rename to src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx index 523d509..9d8761b 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Create/Form/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx @@ -66,9 +66,9 @@ const initValues = { ronevesht: '', } -const CreateForm = ({ handleClose, mutate }) => { +const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues }) => { const request = useRequest() - const { control, watch, register, handleSubmit, setValue, formState: { isSubmitting } } = useForm({ defaultValues: initValues }); + const { control, watch, register, handleSubmit, setValue, formState: { isSubmitting } } = useForm({ defaultValues: defaultValues || initValues }); const onSubmit = async (data) => { const formData = new FormData() @@ -567,4 +567,4 @@ const CreateForm = ({ handleClose, mutate }) => { ); }; -export default CreateForm; +export default CreateOrUpdateForm; diff --git a/src/core/components/MapLayer/MarkerLocation/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/MarkerLocation/index.jsx similarity index 100% rename from src/core/components/MapLayer/MarkerLocation/index.jsx rename to src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/MarkerLocation/index.jsx diff --git a/src/components/dashboard/inquiryPrivacyFencing/Create/Form/LocationOnMap/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx similarity index 86% rename from src/components/dashboard/inquiryPrivacyFencing/Create/Form/LocationOnMap/index.jsx rename to src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx index be24704..e5b9860 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Create/Form/LocationOnMap/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx @@ -1,8 +1,7 @@ import MapLoading from "@/core/components/MapLayer/Loading"; -import MarkerLocation from "@/core/components/MapLayer/MarkerLocation"; import { Paper, Stack } from "@mui/material"; -import { useFormikContext } from "formik"; import dynamic from "next/dynamic"; +import MarkerLocation from "./MarkerLocation"; const MapLayer = dynamic(() => import("@/core/components/MapLayer"), { loading: () => , diff --git a/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx b/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx index 9646db4..2c8b3e9 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx @@ -1,7 +1,7 @@ import { Button } from "@mui/material"; import AddCircleIcon from "@mui/icons-material/AddCircle"; import { useState } from "react"; -import InquiryPrivacyFencingCreate from "@/components/dashboard/inquiryPrivacyFencing/Create"; +import InquiryPrivacyFencingCreate from "./Actions/Create"; const Toolbar = ({ mutate }) => { const [open, setOpen] = useState(false); diff --git a/src/core/utils/routes.js b/src/core/utils/routes.js index 7c0f4dc..d33fa7d 100644 --- a/src/core/utils/routes.js +++ b/src/core/utils/routes.js @@ -1,7 +1,5 @@ const api = process.env.NEXT_PUBLIC_API_URL; -export const GET_CSRF = api + "/csrf"; - export const GET_USER_ROUTE = api + "/webapi/user/get-permission"; export const GET_LOGIN_ROUTE = api + "/login_dev"; export const GET_INQUIRY_PRIVACY_FENCING_ROUTE = api + "/api/v3/harim/divarkeshi"; diff --git a/src/lib/hooks/useRequest.js b/src/lib/hooks/useRequest.js index 477128e..48a2080 100644 --- a/src/lib/hooks/useRequest.js +++ b/src/lib/hooks/useRequest.js @@ -1,19 +1,8 @@ import { errorResponse } from "@/core/utils/errorResponse"; -import { GET_CSRF } from "@/core/utils/routes"; import { successRequest } from "@/core/utils/successRequest"; import axios from "axios"; import { useAuth } from "../contexts/auth"; -const getCsrfToken = async () => { - try { - const response = await axios.get(GET_CSRF); - return response.data.data; - } catch (error) { - console.error("Error fetching CSRF token:", error); - throw error; - } -}; - const defaultOptions = { data: {}, requestOptions: { @@ -28,19 +17,6 @@ const defaultOptions = { const useRequest = (initOptions) => { const { logout } = useAuth() - const instance = axios.create(); - instance.interceptors.request.use( - async function (config) { - if (config.method !== 'get') { - const csrfToken = await getCsrfToken(); - config.headers['X-CSRF-TOKEN'] = csrfToken; - } - return config; - }, - function (error) { - return Promise.reject(error); - } - ); const _options = Object.assign({}, defaultOptions, initOptions); @@ -48,7 +24,7 @@ const useRequest = (initOptions) => { const mergedOptions = Object.assign({}, _options, options); try { - const response = await instance({ + const response = await axios({ url, method, data: method === "get" ? null : mergedOptions.data, From 26955f964ab8e11d940099a127368b896e135531 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 14:10:35 +0330 Subject: [PATCH 10/14] update --- .../inquiryPrivacyFencing/Actions/Create/index.jsx | 3 ++- .../inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx | 7 +++---- .../Forms/LocationOnMap/MarkerLocation/index.jsx | 5 +++-- .../inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx index 88dbb53..0a4e331 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx @@ -3,6 +3,7 @@ import DialogTransition from "@/core/components/DialogTransition"; import { Close } from "@mui/icons-material"; import { Dialog, DialogTitle, IconButton } from "@mui/material"; import CreateOrUpdateForm from "../../Forms/CreateOrUpdate"; +import { SET_INQUIRE_PRIVACY_FENCING } from "@/core/utils/routes"; const InquiryPrivacyFencingCreate = ({ open, handleClose, mutate }) => { @@ -24,7 +25,7 @@ const InquiryPrivacyFencingCreate = ({ open, handleClose, mutate }) => { > - + ); diff --git a/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx index 9d8761b..18e511c 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx @@ -1,6 +1,5 @@ import LtrTextField from "@/core/components/LtrTextField"; import StyledForm from "@/core/components/StyledForm"; -import { SET_INQUIRE_PRIVACY_FENCING } from "@/core/utils/routes"; import useRequest from "@/lib/hooks/useRequest"; import { Autocomplete, Box, Button, Chip, DialogActions, DialogContent, Fade, Grid, InputAdornment, Stack, TextField, Typography } from "@mui/material"; import { DatePicker, LocalizationProvider, faIR } from "@mui/x-date-pickers"; @@ -66,7 +65,7 @@ const initValues = { ronevesht: '', } -const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues }) => { +const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues, url }) => { const request = useRequest() const { control, watch, register, handleSubmit, setValue, formState: { isSubmitting } } = useForm({ defaultValues: defaultValues || initValues }); @@ -128,7 +127,7 @@ const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues }) => { formData.append('ronevesht', data.ronevesht) try { - await request(SET_INQUIRE_PRIVACY_FENCING, 'post', { data: formData }) + await request(url, 'post', { data: formData }) handleClose() mutate() } catch (error) { @@ -374,7 +373,7 @@ const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues }) => { - + diff --git a/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/MarkerLocation/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/MarkerLocation/index.jsx index a75d191..0219c9e 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/MarkerLocation/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/MarkerLocation/index.jsx @@ -9,7 +9,7 @@ const locationMarker = L.icon({ iconAnchor: [25, 50], }); -const MarkerLocation = ({ setValue }) => { +const MarkerLocation = ({ setValue, defaultLatLon }) => { const location = useRef(); const map = useMapEvents({ move: (e) => { @@ -25,8 +25,9 @@ const MarkerLocation = ({ setValue }) => { setValue('lon', latlon.lng) }, }); + return ( - + ) } export default MarkerLocation \ No newline at end of file diff --git a/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx index e5b9860..fe65106 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/LocationOnMap/index.jsx @@ -8,12 +8,12 @@ const MapLayer = dynamic(() => import("@/core/components/MapLayer"), { ssr: false, }); -const LocationOnMap = ({ setValue }) => { +const LocationOnMap = ({ setValue, defaultLatLon }) => { return ( - + From c7098dd410b4fd174e050cc829101d34ef9cc827 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 14:46:08 +0330 Subject: [PATCH 11/14] fixed bug --- .../Forms/CreateOrUpdate.jsx | 810 +++++++++--------- src/lib/contexts/DataTable.js | 8 +- 2 files changed, 410 insertions(+), 408 deletions(-) diff --git a/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx index 18e511c..b589b05 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx @@ -1,7 +1,7 @@ import LtrTextField from "@/core/components/LtrTextField"; import StyledForm from "@/core/components/StyledForm"; import useRequest from "@/lib/hooks/useRequest"; -import { Autocomplete, Box, Button, Chip, DialogActions, DialogContent, Fade, Grid, InputAdornment, Stack, TextField, Typography } from "@mui/material"; +import { Autocomplete, Box, Button, Chip, Container, DialogActions, DialogContent, Fade, Grid, InputAdornment, Stack, TextField, Typography } from "@mui/material"; import { DatePicker, LocalizationProvider, faIR } from "@mui/x-date-pickers"; import { AdapterDateFnsJalali } from "@mui/x-date-pickers/AdapterDateFnsJalali"; import moment from "jalali-moment"; @@ -141,246 +141,34 @@ const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues, url }) => { localeText={faIR.components.MuiLocalizationProvider.defaultProps.localeText} > - - - - - - - ( - onChange(moment(newValue))} - label="تاریخ نامه درخواست *" - slotProps={{ - textField: { fullWidth: true, size: "small", autoComplete: 'off' }, - }} - /> - )} - /> - - - - - - ( - { - onChange(newValue) - }} - options={["حقوقی", "حقیقی"]} - renderInput={(params) => } - /> - )} - /> - - - - - ( - { - onChange(newValue) - }} - options={["دولتی", "خصوصی"]} - renderInput={(params) => } - /> - )} - /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( - { - onChange(newValue) - }} - options={["تهران"]} - renderInput={(params) => ( - - )} - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["تهران"]} - renderInput={(params) => } - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["آزاد راه", "بزرگراه", 'راه فرعی درجه 3']} - renderInput={(params) => } - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["سایر"]} - renderInput={(params) => } - /> - )} - /> - - - - - - - - ( - { - onChange(newValue) - }} - options={["چپ", "راست"]} - renderInput={(params) => } - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["12.5", "17.5"]} - renderInput={(params) => } - /> - )} - /> - - - - - ( - { - onChange(newValue) - }} - options={["15", "30"]} - renderInput={(params) => } - /> - )} - /> - - - - - - - - - - - - - + + + + + + + ( + onChange(moment(newValue))} + label="تاریخ نامه درخواست *" + slotProps={{ + textField: { fullWidth: true, size: "small", autoComplete: 'off' }, + }} + /> + )} + /> + + + + + + ( { onChange={(event, newValue) => { onChange(newValue) }} - options={["38", "39"]} - renderInput={(params) => } + options={["حقوقی", "حقیقی"]} + renderInput={(params) => } /> )} /> - - - - ( - { - onChange(newValue) - }} - options={["اتاقک نگهبانی", "دولتی"]} - renderInput={(params) => } + + + + + ( + { + onChange(newValue) + }} + options={["دولتی", "خصوصی"]} + renderInput={(params) => } + /> + )} + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( + { + onChange(newValue) + }} + options={["تهران"]} + renderInput={(params) => ( + + )} + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["تهران"]} + renderInput={(params) => } + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["آزاد راه", "بزرگراه", 'راه فرعی درجه 3']} + renderInput={(params) => } + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["سایر"]} + renderInput={(params) => } + /> + )} + /> + + + + + + + + ( + { + onChange(newValue) + }} + options={["چپ", "راست"]} + renderInput={(params) => } + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["12.5", "17.5"]} + renderInput={(params) => } + /> + )} + /> + + + + + ( + { + onChange(newValue) + }} + options={["15", "30"]} + renderInput={(params) => } + /> + )} + /> + + + + + + + + + + + + + + ( + { + onChange(newValue) + }} + options={["38", "39"]} + renderInput={(params) => } + /> + )} /> - )} - /> + + + + ( + { + onChange(newValue) + }} + options={["اتاقک نگهبانی", "دولتی"]} + renderInput={(params) => } + /> + )} + /> + + + + + + + مترمربع, + }} /> + + + ( + { + onChange(newValue) + }} + renderTags={(value, getTagProps) => + value.map((option, index) => { + const { key, ...tagProps } = getTagProps({ index }); + return ( + + ); + }) + } + options={["تعمیرات", "احداث بنا"]} + renderInput={(params) => } + /> + )} + /> + + + متر, + }} /> + + + متر, + }} /> + + + ( + { + onChange(newValue) + }} + options={["داخل حریم"]} + renderInput={(params) => } + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["سبک (ضریب ۱)"]} + renderInput={(params) => } + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["تست"]} + renderInput={(params) => } + /> + )} + /> + + + ( + { + onChange(newValue) + }} + options={["بله", "خیر"]} + renderInput={(params) => } + /> + )} + /> + + + + + + + حداکثر مدت زمان شروع عملیات: * + + + + + + + + + + + + + + + + + + - - - - - - مترمربع, - }} /> - - - ( - { - onChange(newValue) - }} - renderTags={(value, getTagProps) => - value.map((option, index) => { - const { key, ...tagProps } = getTagProps({ index }); - return ( - - ); - }) - } - options={["تعمیرات", "احداث بنا"]} - renderInput={(params) => } - /> - )} - /> - - - متر, - }} /> - - - متر, - }} /> - - - ( - { - onChange(newValue) - }} - options={["داخل حریم"]} - renderInput={(params) => } - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["سبک (ضریب ۱)"]} - renderInput={(params) => } - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["تست"]} - renderInput={(params) => } - /> - )} - /> - - - ( - { - onChange(newValue) - }} - options={["بله", "خیر"]} - renderInput={(params) => } - /> - )} - /> - - - - - - - حداکثر مدت زمان شروع عملیات: * - - - - - - - - - - - - - - - - - - - - + + diff --git a/src/lib/contexts/DataTable.js b/src/lib/contexts/DataTable.js index 34e90e4..3ada093 100644 --- a/src/lib/contexts/DataTable.js +++ b/src/lib/contexts/DataTable.js @@ -14,8 +14,8 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns } const [filterData, setFilterData] = useState({}); const [initSort, setInitSort] = useState([]); const [sortData, setSortData] = useState([]); - const [initHide, setInitHide] = useState([]); - const [hideData, setHideData] = useState([]); + const [initHide, setInitHide] = useState({}); + const [hideData, setHideData] = useState({}); useEffect(() => { if (!settingStore) return; @@ -52,8 +52,8 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns } setInitFilter(values); setSortData(settingStore?.[user_id]?.[page_name]?.[table_name]?.["sorts"] || []); setInitSort(settingStore?.[user_id]?.[page_name]?.[table_name]?.["sorts"] || []); - setHideData(settingStore?.[user_id]?.[page_name]?.[table_name]?.["hides"] || []); - setInitHide(settingStore?.[user_id]?.[page_name]?.[table_name]?.["hides"] || []); + setHideData(settingStore?.[user_id]?.[page_name]?.[table_name]?.["hides"] || {}); + setInitHide(settingStore?.[user_id]?.[page_name]?.[table_name]?.["hides"] || {}); setInitStates(true); }, [settingStore, isInitStates]); From 45e712bf5ac248383ee600986144c976e1078244 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 14:59:17 +0330 Subject: [PATCH 12/14] update --- .../Actions/Create/index.jsx | 19 ++++++++++++++++--- .../inquiryPrivacyFencing/Toolbar.jsx | 17 +---------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx b/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx index 0a4e331..db8c5c0 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Actions/Create/index.jsx @@ -1,14 +1,27 @@ "use client"; import DialogTransition from "@/core/components/DialogTransition"; -import { Close } from "@mui/icons-material"; -import { Dialog, DialogTitle, IconButton } from "@mui/material"; +import { AddCircle, Close } from "@mui/icons-material"; +import { Button, Dialog, DialogTitle, IconButton } from "@mui/material"; import CreateOrUpdateForm from "../../Forms/CreateOrUpdate"; import { SET_INQUIRE_PRIVACY_FENCING } from "@/core/utils/routes"; +import { useState } from "react"; -const InquiryPrivacyFencingCreate = ({ open, handleClose, mutate }) => { +const InquiryPrivacyFencingCreate = ({ mutate }) => { + const [open, setOpen] = useState(false); + + const handleOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; return ( <> + ایجاد پاسخ به استعلام diff --git a/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx b/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx index 2c8b3e9..73cee6d 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Toolbar.jsx @@ -1,25 +1,10 @@ -import { Button } from "@mui/material"; -import AddCircleIcon from "@mui/icons-material/AddCircle"; -import { useState } from "react"; import InquiryPrivacyFencingCreate from "./Actions/Create"; const Toolbar = ({ mutate }) => { - const [open, setOpen] = useState(false); - - const handleOpen = () => { - setOpen(true); - }; - - const handleClose = () => { - setOpen(false); - }; return ( <> - - + ); }; From 41e8d55735db44443b1933c0c4741329e9aa26be Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 15:39:49 +0330 Subject: [PATCH 13/14] update --- .../dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx index b589b05..386bbd4 100644 --- a/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx +++ b/src/components/dashboard/inquiryPrivacyFencing/Forms/CreateOrUpdate.jsx @@ -442,7 +442,7 @@ const CreateOrUpdateForm = ({ handleClose, mutate, defaultValues, url }) => { value.map((option, index) => { const { key, ...tagProps } = getTagProps({ index }); return ( - + ); }) } From c70ce2a584019c448ed1daf206332d7c887bcf05 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Sun, 14 Jul 2024 15:40:40 +0330 Subject: [PATCH 14/14] change version --- .env.local.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.local.example b/.env.local.example index d8dc0a8..fa7066f 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,3 +1,3 @@ -NEXT_PUBLIC_VERSION="0.3.3" +NEXT_PUBLIC_VERSION="0.3.8" NEXT_PUBLIC_API_URL="https://rms.witel.ir" NEXT_PUBLIC_MAPTILE_ENDPOINT="https://rmsmap.rmto.ir/141map" \ No newline at end of file