mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix(Currencies): Currency code in services.
This commit is contained in:
@@ -15,16 +15,16 @@ const ExpenseFormPageContext = createContext();
|
||||
* Accounts chart data provider.
|
||||
*/
|
||||
function ExpenseFormPageProvider({ expenseId, ...props }) {
|
||||
const { data: currencies, isFetching: isCurrenciesLoading } = useCurrencies();
|
||||
const { data: currencies, isLoading: isCurrenciesLoading } = useCurrencies();
|
||||
|
||||
// Fetches customers list.
|
||||
const {
|
||||
data: { customers },
|
||||
isFetching: isFieldsLoading,
|
||||
isLoading: isCustomersLoading,
|
||||
} = useCustomers();
|
||||
|
||||
// Fetch the expense details.
|
||||
const { data: expense, isFetching: isExpenseLoading } = useExpense(
|
||||
const { data: expense, isLoading: isExpenseLoading } = useExpense(
|
||||
expenseId,
|
||||
{
|
||||
enabled: !!expenseId,
|
||||
@@ -32,7 +32,7 @@ function ExpenseFormPageProvider({ expenseId, ...props }) {
|
||||
);
|
||||
|
||||
// Fetch accounts list.
|
||||
const { data: accounts, isFetching: isAccountsLoading } = useAccounts();
|
||||
const { data: accounts, isLoading: isAccountsLoading } = useAccounts();
|
||||
|
||||
// Create and edit expense mutate.
|
||||
const { mutateAsync: createExpenseMutate } = useCreateExpense();
|
||||
@@ -57,7 +57,7 @@ function ExpenseFormPageProvider({ expenseId, ...props }) {
|
||||
|
||||
isCurrenciesLoading,
|
||||
isExpenseLoading,
|
||||
isFieldsLoading,
|
||||
isCustomersLoading,
|
||||
isAccountsLoading,
|
||||
|
||||
createExpenseMutate,
|
||||
@@ -70,7 +70,7 @@ function ExpenseFormPageProvider({ expenseId, ...props }) {
|
||||
loading={
|
||||
isCurrenciesLoading ||
|
||||
isExpenseLoading ||
|
||||
isFieldsLoading ||
|
||||
isCustomersLoading ||
|
||||
isAccountsLoading
|
||||
}
|
||||
name={'expense-form'}
|
||||
|
||||
Reference in New Issue
Block a user