Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

MAke CRM extensible

François Zaninottoaf2d1d0f2153
diff --git a/makefile b/makefile
index e81396dc..2c839a24 100644
--- a/makefile
+++ b/makefile
@@ -50,4 +50,8 @@ test-ci:
lint:
npm run lint:check
- npm run prettier:check
\ No newline at end of file
+ npm run prettier:check
+
+publish:
+ npm run build-lib
+ npm publish
\ No newline at end of file
diff --git a/src/root/CRM.tsx b/src/root/CRM.tsx
index 9937e400..2a7ee1d1 100644
--- a/src/root/CRM.tsx
+++ b/src/root/CRM.tsx
@@ -8,7 +8,7 @@ import {
localStorageStore,
mergeTranslations,
} from 'react-admin';
-import type { AuthProvider, DataProvider } from 'react-admin';
+import type { AdminProps, AuthProvider, DataProvider } from 'react-admin';
import { deepmerge } from '@mui/utils';
import polyglotI18nProvider from 'ra-i18n-polyglot';
import englishMessages from 'ra-language-english';
@@ -54,7 +54,8 @@ type CRMProps = {
authProvider?: AuthProvider;
lightTheme?: RaThemeOptions;
darkTheme?: RaThemeOptions;
-} & Partial<ConfigurationContextValue>;
+} & Partial<ConfigurationContextValue> &
+ Partial<AdminProps>;
const defaultLightTheme = deepmerge(defaultTheme, {
palette: {
@@ -132,6 +133,7 @@ export const CRM = ({
title = defaultTitle,
dataProvider = defaultDataProvider,
authProvider = defaultAuthProvider,
+ ...rest
}: CRMProps) => (
<ConfigurationProvider
contactGender={contactGender}
@@ -155,6 +157,7 @@ export const CRM = ({
darkTheme={darkTheme || null}
i18nProvider={i18nProvider}
requireAuth
+ {...rest}
>
<CustomRoutes noLayout>
<Route path={SignupPage.path} element={<SignupPage />} />