From 522215690df383cdd8bc62fceac3fb19d6d08021 Mon Sep 17 00:00:00 2001 From: baslani Date: Tue, 18 Nov 2025 14:39:02 +0330 Subject: [PATCH] implemented form rendering logic --- .../RowActions/ActionsDialog.jsx | 2 +- .../RowActions/RenderActionForm.jsx | 60 +++---------------- 2 files changed, 9 insertions(+), 53 deletions(-) diff --git a/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/ActionsDialog.jsx b/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/ActionsDialog.jsx index 92afece..75fe025 100644 --- a/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/ActionsDialog.jsx +++ b/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/ActionsDialog.jsx @@ -12,7 +12,7 @@ const ActionDialog = ({ open, type, rowData, onClose, mutate }) => { {actionLabel} - + ); }; diff --git a/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/RenderActionForm.jsx b/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/RenderActionForm.jsx index d901c13..874916c 100644 --- a/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/RenderActionForm.jsx +++ b/src/components/dashboard/inquiryPrivacy/privacy-office/RowActions/RenderActionForm.jsx @@ -6,71 +6,27 @@ import ReferForm from "./Forms/ReferForm"; import RejectFileForm from "./Forms/RejectFileForm"; import RejectRequestForm from "./Forms/RejectRequestForm"; -export default function RenderActionForm({ type, rowData, mutate }) { +export default function RenderActionForm({ type, rowData, mutate, onClose }) { const formType = `${type}_${rowData?.state_id}`; - console.log(formType); - function renderForm() { switch (formType) { case "refer_request_2": - return ; + return ; case "reject_request_2": - return ; + return ; case "reject_request_5": - return ; + return ; case "confirm_request_2": - return ; + return ; case "confirm_request_5": - return ; + return ; case "confirm_request_13": - return ; + return ; default: return <>; } } - return {renderForm(formType)}; + return {renderForm()}; } - -/* - - } - /> - {type === "confirm_request" && ( - <> - ( - } - label="نیاز به پرداخت وجه خزانه" - /> - )} - /> - setNeedsAccessRoad(e.target.checked)} - /> - } - label="نیاز به راه دسترسی" - /> - - )} - - - - - - -*/