diff --git a/src/components/RecurringExpense/ManageRecurringExpense.jsx b/src/components/RecurringExpense/ManageRecurringExpense.jsx index 4ae96a8f..44232afe 100644 --- a/src/components/RecurringExpense/ManageRecurringExpense.jsx +++ b/src/components/RecurringExpense/ManageRecurringExpense.jsx @@ -7,7 +7,8 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { defaultRecurringExpense, PaymentRecurringExpense } from './RecurringExpenseSchema'; import { FREQUENCY_FOR_RECURRING, INR_CURRENCY_CODE } from '../../utils/constants'; import { useCurrencies, useProjectName } from '../../hooks/useProjects'; -import { useCreateRecurringExpense, useUpdateRecurringExpense } from '../../hooks/useExpense'; +import { useCreateRecurringExpense, usePayee, useUpdateRecurringExpense } from '../../hooks/useExpense'; +import InputSuggestions from '../common/InputSuggestion'; function ManageRecurringExpense({ closeModal, requestToEdit = null }) { @@ -18,8 +19,8 @@ function ManageRecurringExpense({ closeModal, requestToEdit = null }) { const { data: currencyData, isLoading: currencyLoading, isError: currencyError } = useCurrencies(); const { data: statusData, isLoading: statusLoading, isError: statusError } = useRecurringStatus(); + const { data: Payees, isLoading: isPayeeLoaing, isError: isPayeeError, error: payeeError } = usePayee() - const { ExpenseCategories, loading: ExpenseLoading, @@ -238,7 +239,7 @@ function ManageRecurringExpense({ closeModal, requestToEdit = null }) { {/* Payee and Currency */}
-
+ {/*
@@ -254,6 +255,20 @@ function ManageRecurringExpense({ closeModal, requestToEdit = null }) { {errors.payee.message} )} +
*/} + +
+ + + setValue("payee", val, { shouldValidate: true }) + } + error={errors.payee?.message} + />
@@ -289,23 +304,25 @@ function ManageRecurringExpense({ closeModal, requestToEdit = null }) { {/* Notify To and Status Id */}
-
-