From 10c2e9dfee33bd7877b34a95e1cdd80333cf32f0 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Sat, 1 Nov 2025 15:08:43 +0530 Subject: [PATCH] Added Submit and Cancel button on Payment Request. --- .../PaymentRequest/ManagePaymentRequest.jsx | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/components/PaymentRequest/ManagePaymentRequest.jsx b/src/components/PaymentRequest/ManagePaymentRequest.jsx index 1a05d673..ca66b6ad 100644 --- a/src/components/PaymentRequest/ManagePaymentRequest.jsx +++ b/src/components/PaymentRequest/ManagePaymentRequest.jsx @@ -5,11 +5,11 @@ import { useForm } from 'react-hook-form'; import { useExpenseType } from '../../hooks/masterHook/useMaster'; import DatePicker from '../common/DatePicker'; -function ManagePaymentRequest({ expenseToEdit = null}) { +function ManagePaymentRequest({ closeModal, expenseToEdit = null }) { const { projectNames, loading: projectLoading, error, isError: isProjectError, } = useProjectName(); - const { register, control, watch, formState: { errors }, } = useForm(); + const { register, control, watch,reset, formState: { errors }, } = useForm(); const { ExpenseTypes, @@ -78,6 +78,11 @@ function ManagePaymentRequest({ expenseToEdit = null}) { } }; + const handleClose = () => { + reset(); + closeModal(); + }; + return (
@@ -316,6 +321,23 @@ function ManagePaymentRequest({ expenseToEdit = null}) { ))}
+
+ + + +
+ )