completed full updation for expnse feature
This commit is contained in:
parent
931147244b
commit
bed3561e98
@ -71,7 +71,6 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
error: EmpError,
|
error: EmpError,
|
||||||
} = useEmployeesByProject(selectedproject);
|
} = useEmployeesByProject(selectedproject);
|
||||||
|
|
||||||
|
|
||||||
const files = watch("billAttachments");
|
const files = watch("billAttachments");
|
||||||
const onFileChange = async (e) => {
|
const onFileChange = async (e) => {
|
||||||
const newFiles = Array.from(e.target.files);
|
const newFiles = Array.from(e.target.files);
|
||||||
|
|||||||
@ -16,8 +16,6 @@ export const useExpenseList = (pageSize, pageNumber, filter) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const useExpense = (ExpenseId) => {
|
export const useExpense = (ExpenseId) => {
|
||||||
|
|
||||||
console.log("ExpenseId:", ExpenseId, "Enabled:", ExpenseId !== undefined && ExpenseId !== null);
|
|
||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: ["Expense", ExpenseId],
|
queryKey: ["Expense", ExpenseId],
|
||||||
queryFn: async () =>
|
queryFn: async () =>
|
||||||
@ -28,7 +26,6 @@ export const useExpense = (ExpenseId) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------Mutation---------------------------------------------
|
// ---------------------------Mutation---------------------------------------------
|
||||||
|
|
||||||
export const useCreateExpnse = (onSuccessCallBack) => {
|
export const useCreateExpnse = (onSuccessCallBack) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user