mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: dashboard sidebar expanding.
This commit is contained in:
@@ -7,8 +7,29 @@ import { useQueryTenant } from '../useQueryRequest';
|
||||
export function useContact(id, props) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useQueryTenant(['CONTACT', id], () => apiRequest.get(`contacts/${id}`), {
|
||||
select: (res) => res.data.customer,
|
||||
...props,
|
||||
});
|
||||
return useQueryTenant(
|
||||
['CONTACT', id],
|
||||
() => apiRequest.get(`contacts/${id}`),
|
||||
{
|
||||
select: (res) => res.data.customer,
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the auto-complete contacts.
|
||||
*/
|
||||
export function useAutoCompleteContacts(props) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useQueryTenant(
|
||||
['CONTACTS', 'AUTO-COMPLETE'],
|
||||
() => apiRequest.get('contacts/auto-complete'),
|
||||
{
|
||||
select: (res) => res.data.contacts,
|
||||
defaultData: [],
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -96,8 +96,17 @@ const ORGANIZATIONS = {
|
||||
|
||||
const SUBSCRIPTIONS = {
|
||||
SUBSCRIPTIONS: 'SUBSCRIPTIONS',
|
||||
}
|
||||
};
|
||||
|
||||
const EXPENSES = {
|
||||
EXPENSES: 'EXPENSES',
|
||||
EXPENSE: 'EXPENSE',
|
||||
};
|
||||
|
||||
const MANUAL_JOURNALS = {
|
||||
MANUAL_JOURNALS: 'MANUAL_JOURNALS',
|
||||
MANUAL_JOURNAL: 'MANUAL_JOURNAL',
|
||||
};
|
||||
export default {
|
||||
...ACCOUNTS,
|
||||
...BILLS,
|
||||
@@ -115,5 +124,7 @@ export default {
|
||||
...USERS,
|
||||
...SETTING,
|
||||
...ORGANIZATIONS,
|
||||
...SUBSCRIPTIONS
|
||||
...SUBSCRIPTIONS,
|
||||
...EXPENSES,
|
||||
...MANUAL_JOURNALS
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user