diff --git a/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/BuildRequestDetail.jsx b/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/BuildRequestDetail.jsx
index 7e11a0f..f2901c5 100644
--- a/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/BuildRequestDetail.jsx
+++ b/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/BuildRequestDetail.jsx
@@ -9,7 +9,7 @@ import { useFormik } from "formik";
import PickerWithDynamicField from "@/core/components/EditedDatePicker";
import UploadImage from "./UploadImage";
-const BuildRequestDetail = ({ state, handleBack, handleSubmit, submitting, editDisabled }) => {
+const BuildRequestDetail = ({ state, handleBack, handleSubmit, submitting, canRequest }) => {
const t = useTranslations();
const initialValues = {
@@ -386,7 +386,7 @@ const BuildRequestDetail = ({ state, handleBack, handleSubmit, submitting, editD
>
{t("RefahiLoanRequest.back-button")}
- {editDisabled === 17 && (
+ {canRequest && (
}
diff --git a/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/index.jsx b/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/index.jsx
index 84a7d61..6bf55d7 100644
--- a/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/index.jsx
+++ b/src/components/dashboard/refahi/add-request-loan/forms/BuildForm/index.jsx
@@ -134,6 +134,7 @@ const BuildForm = ({ setFinishRefahiLoanRequest }) => {
dispatch={dispatch}
handleSubmit={handleSubmit}
setFinishRefahiLoanRequest={setFinishRefahiLoanRequest}
+ canRequest={true}
/>
>
);
diff --git a/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/RestoreRequestDetail.jsx b/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/RestoreRequestDetail.jsx
index 7e8f7bc..fb45de7 100644
--- a/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/RestoreRequestDetail.jsx
+++ b/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/RestoreRequestDetail.jsx
@@ -9,7 +9,7 @@ import { useFormik } from "formik";
import PickerWithDynamicField from "@/core/components/EditedDatePicker";
import UploadImage from "@/components/dashboard/refahi/add-request-loan/forms/BuildForm/UploadImage";
-const RestoreRequestDetail = ({ state, handleBack, handleSubmit, submitting, editDisabled }) => {
+const RestoreRequestDetail = ({ state, handleBack, handleSubmit, submitting, canRequest }) => {
const t = useTranslations();
const initialValues = {
@@ -332,7 +332,7 @@ const RestoreRequestDetail = ({ state, handleBack, handleSubmit, submitting, edi
>
{t("RefahiLoanRequest.back-button")}
- {editDisabled === 17 && (
+ {canRequest && (
}
diff --git a/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/index.jsx b/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/index.jsx
index 4dfa48a..4cc8351 100644
--- a/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/index.jsx
+++ b/src/components/dashboard/refahi/add-request-loan/forms/RestoreForm/index.jsx
@@ -135,6 +135,7 @@ const RestoreForm = ({ setFinishRefahiLoanRequest }) => {
dispatch={dispatch}
submitting={submitting}
state={state}
+ canRequest={true}
/>
>
);
diff --git a/src/components/dashboard/refahi/show/form/index.jsx b/src/components/dashboard/refahi/show/form/index.jsx
index 41a575e..39a004c 100644
--- a/src/components/dashboard/refahi/show/form/index.jsx
+++ b/src/components/dashboard/refahi/show/form/index.jsx
@@ -20,7 +20,7 @@ const reducer = (state, action) => {
}
};
-const ShowLoanForm = ({ defaultData, refahi_type, queryID, editDisabled }) => {
+const ShowLoanForm = ({ defaultData, refahi_type, queryID, canRequest }) => {
const [submitting, setSubmitting] = useState(false);
const requestServer = useRequest();
const router = useRouter();
@@ -105,7 +105,7 @@ const ShowLoanForm = ({ defaultData, refahi_type, queryID, editDisabled }) => {
<>
{refahi_type === 1 ? (
{
/>
) : (
{
) : (