diff --git a/src/components/RecurringExpense/ManageRecurringExpense.jsx b/src/components/RecurringExpense/ManageRecurringExpense.jsx index aad3c468..a399867d 100644 --- a/src/components/RecurringExpense/ManageRecurringExpense.jsx +++ b/src/components/RecurringExpense/ManageRecurringExpense.jsx @@ -27,6 +27,7 @@ import InputSuggestions from "../common/InputSuggestion"; import { useEmployeesName } from "../../hooks/useEmployees"; import PmsEmployeeInputTag from "../common/PmsEmployeeInputTag"; import HoverPopup from "../common/HoverPopup"; +import { SelectProjectField } from "../common/Forms/SelectFieldServerSide"; const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { const { @@ -131,7 +132,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { } }, [currencyData, requestToEdit, setValue]); - const StrikeDate = watch("strikeDate") + const StrikeDate = watch("strikeDate"); const onSubmit = (fromdata) => { let payload = { @@ -163,10 +164,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { {/* Project and Category */}
- - + */} + + setValue("projectId", val, { + shouldDirty: true, + shouldValidate: true, + }) + } + /> {errors.projectId && ( {errors.projectId.message} )} @@ -235,7 +245,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {
-
+
@@ -243,13 +253,16 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { title="Payment Type" id="payment_type" content={ -

- Choose whether the payment amount varies or remains fixed each cycle. -
- Is Variable: Amount changes per cycle. -
- Fixed: Amount stays constant. -

+
+

+ Choose whether the payment amount varies or remains fixed + each cycle. +
+ Is Variable: Amount changes per cycle. +
+ Fixed: Amount stays constant. +

+
} > @@ -270,7 +283,10 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { checked={field.value === true} onChange={() => field.onChange(true)} /> -
@@ -283,7 +299,10 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { checked={field.value === false} onChange={() => field.onChange(false)} /> -
@@ -295,7 +314,6 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { {errors.isVariable.message} )}
-
{/* Date and Amount */} @@ -391,11 +409,12 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { id="frequency" content={

- Defines how often payments or billing occur, such as monthly, quarterly, or annually. + Defines how often payments or billing occur, such as + monthly, quarterly, or annually.

} > - + @@ -444,10 +463,13 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { {/* Payment Buffer Days and End Date */}
-
-
-
-
-
+
@@ -495,7 +517,7 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => {

} > - +
@@ -510,10 +532,8 @@ const ManageRecurringExpense = ({ closeModal, requestToEdit = null }) => { {errors.endDate.message} )}
-
-