mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: Add default customer message and terms and conditions to the transactions.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from '@/constants/classes';
|
||||
import { useSettings } from '@/hooks/query';
|
||||
import PreferencesPageLoader from '../PreferencesPageLoader';
|
||||
|
||||
const PreferencesCreditNotesFormContext = React.createContext();
|
||||
|
||||
function PreferencesCreditNotesBoot({ ...props }) {
|
||||
// Fetches organization settings.
|
||||
const { isLoading: isSettingsLoading } = useSettings();
|
||||
|
||||
// Provider state.
|
||||
const provider = {
|
||||
organization: {},
|
||||
};
|
||||
|
||||
// Detarmines whether if any query is loading.
|
||||
const isLoading = isSettingsLoading;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT,
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT,
|
||||
)}
|
||||
>
|
||||
{isLoading ? (
|
||||
<PreferencesPageLoader />
|
||||
) : (
|
||||
<PreferencesCreditNotesFormContext.Provider value={provider} {...props} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const usePreferencesCreditNotesFormContext = () =>
|
||||
React.useContext(PreferencesCreditNotesFormContext);
|
||||
|
||||
export { PreferencesCreditNotesBoot, usePreferencesCreditNotesFormContext };
|
||||
Reference in New Issue
Block a user