mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
feat: fix setting cash.
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
useAccounts,
|
||||
useCreateCashflowTransaction,
|
||||
useCashflowAccounts,
|
||||
useSettingCashFlow,
|
||||
} from 'hooks/query';
|
||||
|
||||
const MoneyInDialogContent = React.createContext();
|
||||
@@ -22,6 +23,9 @@ function MoneyOutProvider({ accountId, accountType, dialogName, ...props }) {
|
||||
const { mutateAsync: createCashflowTransactionMutate } =
|
||||
useCreateCashflowTransaction();
|
||||
|
||||
// Handle fetching settings.
|
||||
const { isLoading: isSettingsLoading } = useSettingCashFlow();
|
||||
|
||||
// Submit payload.
|
||||
const [submitPayload, setSubmitPayload] = React.useState({});
|
||||
|
||||
@@ -42,7 +46,11 @@ function MoneyOutProvider({ accountId, accountType, dialogName, ...props }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<DialogContent isLoading={isAccountsLoading || isCashFlowAccountsLoading}>
|
||||
<DialogContent
|
||||
isLoading={
|
||||
isAccountsLoading || isCashFlowAccountsLoading || isSettingsLoading
|
||||
}
|
||||
>
|
||||
<MoneyInDialogContent.Provider value={provider} {...props} />
|
||||
</DialogContent>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user