Merge branch 'release/v2.6.1'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
||||
NEXT_PUBLIC_API_VERSION = "2.6.0"
|
||||
NEXT_PUBLIC_API_VERSION = "2.6.1"
|
||||
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
||||
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
||||
|
||||
|
||||
@@ -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")}
|
||||
</Button>
|
||||
{editDisabled === 17 && (
|
||||
{canRequest && (
|
||||
<Button
|
||||
onClick={formik.handleSubmit}
|
||||
endIcon={<BeenhereIcon />}
|
||||
|
||||
@@ -134,6 +134,7 @@ const BuildForm = ({ setFinishRefahiLoanRequest }) => {
|
||||
dispatch={dispatch}
|
||||
handleSubmit={handleSubmit}
|
||||
setFinishRefahiLoanRequest={setFinishRefahiLoanRequest}
|
||||
canRequest={true}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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")}
|
||||
</Button>
|
||||
{editDisabled === 17 && (
|
||||
{canRequest && (
|
||||
<Button
|
||||
onClick={formik.handleSubmit}
|
||||
endIcon={<BeenhereIcon />}
|
||||
|
||||
@@ -135,6 +135,7 @@ const RestoreForm = ({ setFinishRefahiLoanRequest }) => {
|
||||
dispatch={dispatch}
|
||||
submitting={submitting}
|
||||
state={state}
|
||||
canRequest={true}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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 ? (
|
||||
<BuildFormController
|
||||
editDisabled={editDisabled}
|
||||
canRequest={canRequest}
|
||||
submitting={submitting}
|
||||
state={state}
|
||||
dispatch={dispatch}
|
||||
@@ -113,7 +113,7 @@ const ShowLoanForm = ({ defaultData, refahi_type, queryID, editDisabled }) => {
|
||||
/>
|
||||
) : (
|
||||
<RestoreFormController
|
||||
editDisabled={editDisabled}
|
||||
canRequest={canRequest}
|
||||
submitting={submitting}
|
||||
state={state}
|
||||
dispatch={dispatch}
|
||||
|
||||
@@ -90,7 +90,7 @@ const ShowLoan = () => {
|
||||
</CenterLayout>
|
||||
) : (
|
||||
<ShowLoanForm
|
||||
editDisabled={LoanDetails.state_id}
|
||||
canRequest={LoanDetails.state_id === 17}
|
||||
queryID={query.id}
|
||||
refahi_type={LoanDetails.refahi_type}
|
||||
defaultData={_data}
|
||||
|
||||
Reference in New Issue
Block a user