feat: Add default customer message and terms and conditions to the transactions.

This commit is contained in:
Ahmed Bouhuolia
2023-12-14 11:01:25 +02:00
parent e5bcb1c19a
commit 33e5d1a979
18 changed files with 658 additions and 1 deletions

View File

@@ -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 };