diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json index 1ec3d08..81d13a5 100644 --- a/public/locales/fa/app.json +++ b/public/locales/fa/app.json @@ -6,6 +6,7 @@ "first_page": "خوش آمدید", "login": "ورود", "login_expert": "ورود کارشناس", + "update_table": "بروزرسانی", "expert": "کارشناس", "last_updated_at": "آخرین بروزرسانی", "filter_mode": "حالت فیلتر", diff --git a/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx index 02c5348..d63cd63 100644 --- a/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx @@ -169,12 +169,12 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeCl {loading ? : <> diff --git a/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx index 8cc3c4a..96b000d 100644 --- a/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/passenger-boss/Form/ConfirmForm/ConfirmContent.jsx @@ -133,8 +133,8 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, vehicle_type, hand if (values.description != "") formData.append("expert_description", values.description); const attachments = [ - { title: 'فرم الف', file: values.first_img }, - { title: 'فرم ب', file: values.second_img } + {title: 'فرم الف', file: values.first_img}, + {title: 'فرم ب', file: values.second_img} ]; attachments.forEach((attachment, index) => { @@ -142,7 +142,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, vehicle_type, hand formData.append(`attachment[${index}][file]`, attachment.file); }); - requestServer(`${CONFIRM_PASSENGER_BOSS}/${rowId}`, 'post',{ + requestServer(`${CONFIRM_PASSENGER_BOSS}/${rowId}`, 'post', { notification: true, data: formData, }).then((response) => { @@ -220,7 +220,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, vehicle_type, hand {loading ? : <> diff --git a/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx index ae1ceea..825bacc 100644 --- a/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx @@ -2,10 +2,11 @@ import UploadSystem from "@/core/components/UploadSystem"; import useNotification from "@/lib/app/hooks/useNotification"; import useRequest from "@/lib/app/hooks/useRequest"; import { - Box, - Button, Checkbox, + Button, + Checkbox, DialogActions, - DialogContent, FormControlLabel, + DialogContent, + FormControlLabel, FormHelperText, Grid, LinearProgress, @@ -179,12 +180,12 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeCl {loading ? : <> diff --git a/src/core/components/DataTable.jsx b/src/core/components/DataTable.jsx index 8274f96..e56d147 100644 --- a/src/core/components/DataTable.jsx +++ b/src/core/components/DataTable.jsx @@ -3,9 +3,10 @@ import useLanguage from "@/lib/app/hooks/useLanguage"; import {useEffect, useMemo, useState} from "react"; import moment from "moment-jalaali"; import useSWR from "swr"; -import {Typography} from "@mui/material"; +import {IconButton, Tooltip, Typography} from "@mui/material"; import MaterialReactTable from "material-react-table"; import useRequest from "@/lib/app/hooks/useRequest"; +import RefreshIcon from '@mui/icons-material/Refresh'; function DataTable(props) { const requestServer = useRequest({auth: true}) @@ -116,6 +117,11 @@ function DataTable(props) { /* send component */ : } + + mutate()}> + + + )} renderBottomToolbarCustomActions={({table}) => (<> {props.enableLastUpdate /* send condition */ ? (