mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: account drawer.
This commit is contained in:
@@ -144,3 +144,19 @@ export function useInactivateAccount(props) {
|
||||
...props,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve account transactions.
|
||||
*/
|
||||
export function useAccountTransactions(id, props) {
|
||||
console.log(id, 'FF');
|
||||
return useRequestQuery(
|
||||
[t.ACCOUNT_TRANSACTION, id],
|
||||
{ method: 'get', url: `accounts/transactions?account_id=${id}` },
|
||||
{
|
||||
select: (res) => res.data.transactions,
|
||||
defaultData: [],
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const ACCOUNTS = {
|
||||
ACCOUNT: 'ACCOUNT',
|
||||
ACCOUNT_TRANSACTION: 'ACCOUNT_TRANSACTION',
|
||||
ACCOUNTS: 'ACCOUNTS',
|
||||
ACCOUNTS_TYPES: 'ACCOUNTS_TYPES',
|
||||
};
|
||||
@@ -126,5 +127,5 @@ export default {
|
||||
...ORGANIZATIONS,
|
||||
...SUBSCRIPTIONS,
|
||||
...EXPENSES,
|
||||
...MANUAL_JOURNALS
|
||||
...MANUAL_JOURNALS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user