diff --git a/example.env.local b/example.env.local index b048362..96c7db2 100644 --- a/example.env.local +++ b/example.env.local @@ -1,5 +1,5 @@ NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard" -NEXT_PUBLIC_API_VERSION = "1.31.2" +NEXT_PUBLIC_API_VERSION = "1.31.4" NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa" NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl" diff --git a/src/components/dashboard/bank-management/index.jsx b/src/components/dashboard/bank-management/index.jsx index f89ee8a..94fa758 100644 --- a/src/components/dashboard/bank-management/index.jsx +++ b/src/components/dashboard/bank-management/index.jsx @@ -159,8 +159,8 @@ function DashboardBankManagementComponent() { ), }, { - accessorFn: (row) => row.bank_state, - id: "bank_state", + accessorFn: (row) => row.bank_state_name, + id: "bank_state_name", header: t("BankManagement.bank_state"), enableColumnFilter: true, datatype: "text", diff --git a/src/components/dashboard/machinary-office/Form/ReserveForm/index.jsx b/src/components/dashboard/machinary-office/Form/ReserveForm/index.jsx index 8056abc..e7b08fb 100644 --- a/src/components/dashboard/machinary-office/Form/ReserveForm/index.jsx +++ b/src/components/dashboard/machinary-office/Form/ReserveForm/index.jsx @@ -17,7 +17,7 @@ import {RESERVE_MACHINARY_LOAN} from "@/core/data/apiRoutes"; const ReserveForm = ({rowId, mutate}) => { const t = useTranslations(); const [openConfirmDialog, setOpenConfirmDialog] = useState(false); - const requestServer = useRequest({auth: true, notification: false}); + const requestServer = useRequest({auth: true, notification: true}); const [isSubmitting, setIsSubmitting] = useState(false); const {update_notification} = useNotification() diff --git a/src/components/dashboard/reserve-loan/Form/CanselReserve/index.jsx b/src/components/dashboard/reserve-loan/Form/CanselReserve/index.jsx index 6d6eb70..0af4f2a 100644 --- a/src/components/dashboard/reserve-loan/Form/CanselReserve/index.jsx +++ b/src/components/dashboard/reserve-loan/Form/CanselReserve/index.jsx @@ -12,16 +12,18 @@ import {useState} from "react"; import KeyboardReturnSharpIcon from '@mui/icons-material/KeyboardReturnSharp'; import useRequest from "@/lib/app/hooks/useRequest"; import {CANSEL_RESERVE_MACHINARY_LOAN} from "@/core/data/apiRoutes"; +import useNotification from "@/lib/app/hooks/useNotification"; const CanselReserve = ({rowId, mutate}) => { const t = useTranslations(); const [openConfirmDialog, setOpenConfirmDialog] = useState(false); - const requestServer = useRequest({auth: true, notification: false}); - const [isSubmitting, setIsSubmitting] = useState(false) + const requestServer = useRequest({auth: true, notification: true}); + const [isSubmitting, setIsSubmitting] = useState(false); + const {update_notification} = useNotification() const handleSubmit = () => { setIsSubmitting(true) - requestServer(`${CANSEL_RESERVE_MACHINARY_LOAN}/${rowId}`, 'get').then((response) => { + requestServer(`${CANSEL_RESERVE_MACHINARY_LOAN}/${rowId}`, 'post').then((response) => { setOpenConfirmDialog(false) mutate() update_notification() diff --git a/src/components/dashboard/reserve-loan/TableRowActions.jsx b/src/components/dashboard/reserve-loan/TableRowActions.jsx index 147ff26..207138d 100644 --- a/src/components/dashboard/reserve-loan/TableRowActions.jsx +++ b/src/components/dashboard/reserve-loan/TableRowActions.jsx @@ -4,10 +4,10 @@ import CanselReserve from "./Form/CanselReserve"; const TableRow = ({row, mutate}) => { return ( - {/**/} + ); }; diff --git a/src/core/data/apiRoutes.js b/src/core/data/apiRoutes.js index 8c5e197..3e62565 100644 --- a/src/core/data/apiRoutes.js +++ b/src/core/data/apiRoutes.js @@ -76,12 +76,12 @@ export const EXPORT_MACHINARY_OFFICE = export const GET_RESERVE_MACHINARY_LOAN = - BASE_URL + "/dashboard/machinery_expert/reserved/show"; + BASE_URL + "/dashboard/reserved_loan/show"; export const RESERVE_MACHINARY_LOAN = BASE_URL + "/dashboard/machinery_expert/reserve"; export const CANSEL_RESERVE_MACHINARY_LOAN = - BASE_URL + "/dashboard/machinery_expert/unreserved"; + BASE_URL + "/dashboard/reserved_loan/unreserve"; //machinary office //commercial chief