mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
refactoring: invoice form.
refactoring: receipt form. refactoring: bill form. refactoring: estimate form.
This commit is contained in:
@@ -25,7 +25,7 @@ export function useEditBill(props) {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation(
|
||||
(id, values) => ApiService.post(`purchases/bills/${id}`, values),
|
||||
([id, values]) => ApiService.post(`purchases/bills/${id}`, values),
|
||||
{
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries('BILLS');
|
||||
@@ -97,7 +97,10 @@ export function useBill(id, props) {
|
||||
}
|
||||
);
|
||||
|
||||
return defaultTo(states.data, {});
|
||||
return {
|
||||
...states,
|
||||
data: defaultTo(states.data, {}),
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user