mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
refactoring: account form.
refactoring: expense form. refactoring: manual journal form. refactoring: invoice form.
This commit is contained in:
@@ -34,6 +34,27 @@ export function useEditEstimate(props) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve sale estimate details.
|
||||
*/
|
||||
export function useEstimate(id, props) {
|
||||
const states = useQuery(
|
||||
['SALE_ESTIMATE', id],
|
||||
() => ApiService.get(`sales/estimates/${id}`),
|
||||
{
|
||||
select: (res) => ({
|
||||
estimate: res.data.sale_estimate,
|
||||
}),
|
||||
...props,
|
||||
},
|
||||
);
|
||||
|
||||
return {
|
||||
...states,
|
||||
data: defaultTo(states.data, {}),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve sale invoices list with pagination meta.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user