diff --git a/src/Pages/AccountDeletion/DeletionRequestApprove.jsx b/src/Pages/AccountDeletion/DeletionRequestApprove.jsx
index 1e72564..2ad6c70 100644
--- a/src/Pages/AccountDeletion/DeletionRequestApprove.jsx
+++ b/src/Pages/AccountDeletion/DeletionRequestApprove.jsx
@@ -3,6 +3,7 @@ import {
Box,
Button,
FormControl,
+ FormHelperText,
FormLabel,
Input,
Modal,
@@ -29,8 +30,17 @@ import { useApproveDepositRequestMutation, useGetDeleteRequestByIdQuery } from "
const FILE_TYPES = ["image/jpeg", "image/png", "image/gif"];
+// export const conformModalSchema = yup.object().shape({
+// adminComment: yup.string().notRequired(),
+// });
+
export const conformModalSchema = yup.object().shape({
- adminComment: yup.string().notRequired(),
+ // checkerComment: yup.string().required("Comment is required")
+ // .max(50, "Investment name cannot be more than 50 characters"),
+ adminComment: yup
+ .string()
+ .required("Comment is required")
+ .max(200, "Approve Comment cannot be more than 200 characters"),
});
const DeletionRequestApprove = ({ isOpen, onClose, firstField, id, data:requestData }) => {
@@ -50,6 +60,7 @@ const DeletionRequestApprove = ({ isOpen, onClose, firstField, id, data:requestD
const {
register,
reset,
+ watch,
handleSubmit,
formState: { errors },
} = useForm({
@@ -171,6 +182,10 @@ const DeletionRequestApprove = ({ isOpen, onClose, firstField, id, data:requestD
{errors.adminComment.message}
)}
+
+ Maximum length should be 200 characters. You have entered
+ {watch("adminComment")?.length || 0} characters.
+
@@ -180,9 +195,10 @@ const DeletionRequestApprove = ({ isOpen, onClose, firstField, id, data:requestD
type="submit"
size={"sm"}
rounded={"sm"}
- variant={'ghost'}
+ bg="gray"
onClick={()=> setIsReject(true)}
isLoading={isBtnLoadingReject}
+ fontWeight={500}
>
Reject
diff --git a/src/Pages/FawateerChecker/ApproveRequest/RequestApproveModal.jsx b/src/Pages/FawateerChecker/ApproveRequest/RequestApproveModal.jsx
index 01ed246..a71b932 100644
--- a/src/Pages/FawateerChecker/ApproveRequest/RequestApproveModal.jsx
+++ b/src/Pages/FawateerChecker/ApproveRequest/RequestApproveModal.jsx
@@ -140,7 +140,7 @@ const RequestApproveModal = ({ isOpen, onClose, firstField ,id}) => {
rounded={"md"}
resize={"none"}
maxLength={200}
- />
+ />
{errors.checkerComment && (
{errors.checkerComment.message}