diff --git a/src/components/PaymentRequest/ManagePaymentRequest.jsx b/src/components/PaymentRequest/ManagePaymentRequest.jsx index b9cc5927..55f18cf0 100644 --- a/src/components/PaymentRequest/ManagePaymentRequest.jsx +++ b/src/components/PaymentRequest/ManagePaymentRequest.jsx @@ -11,8 +11,8 @@ import { formatFileSize, localToUtc } from '../../utils/appUtils'; import { defaultPaymentRequest, PaymentRequestSchema } from './PaymentRequestSchema'; function ManagePaymentRequest({ closeModal, requestToEdit = null }) { - const {data,isLoading,isError,error:requestError}= usePaymentRequestDetail(requestToEdit) -// const data = {} + const { data, isLoading, isError, error: requestError } = usePaymentRequestDetail(requestToEdit) + // const data = {} const { projectNames, loading: projectLoading, error, isError: isProjectError, } = useProjectName(); @@ -25,7 +25,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) { loading: ExpenseLoading, error: ExpenseError, } = useExpenseCategory(); - + const schema = PaymentRequestSchema(ExpenseTypes); const { register, control, watch, handleSubmit, setValue, reset, formState: { errors }, } = useForm({ resolver: zodResolver(schema), @@ -158,6 +158,7 @@ function ManagePaymentRequest({ closeModal, requestToEdit = null }) { {requestToEdit ? "Update Payment Request " : "Create Payment Request"}
+ {/* Project and Category */}
-
-
- - - - {errors.dueDate && ( - - {errors.dueDate.message} - - )} -
- -
- - - {errors.amount && ( - {errors.amount.message} - )} -
-
- -
-
- - - {errors.payee && ( - - {errors.payee.message} - - )} -
- -
- - - {errors.currencyId && ( - {errors.currencyId.message} - )} -
- -
- + {/* Title and Advance Payment */}
+ + {/* Date and Amount */} +
+
+ + + + {errors.dueDate && ( + + {errors.dueDate.message} + + )} +
+ +
+ + + {errors.amount && ( + {errors.amount.message} + )} +
+
+ + {/* Payee and Currency */} +
+
+ + + {errors.payee && ( + + {errors.payee.message} + + )} +
+ +
+ + + {errors.currencyId && ( + {errors.currencyId.message} + )} +
+ +
+ + {/* Description */}
+ {/* Upload Document */}