Skip to content

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

Merge remote-tracking branch 'origin/main' into mobile-2

Jean-Baptiste Kaiser2cfe5eeaeb26
diff --cc registry.json
index c75e0ad7,4af62e5a..fdc3fc7d
--- a/registry.json
+++ b/registry.json
@@@ -399,12 -352,8 +399,12 @@@
"path": "src/components/atomic-crm/misc/Markdown.tsx",
"type": "registry:component"
},
+ {
+ "path": "src/components/atomic-crm/misc/InfinitePagination.tsx",
+ "type": "registry:component"
+ },
{
- "path": "src/components/atomic-crm/misc/ImportFromJsonDialog.tsx",
+ "path": "src/components/atomic-crm/misc/ImportPage.tsx",
"type": "registry:component"
},
{
diff --cc src/components/atomic-crm/root/CRM.tsx
index 5b011035,a025b028..52d9ce2a
--- a/src/components/atomic-crm/root/CRM.tsx
+++ b/src/components/atomic-crm/root/CRM.tsx
@@@ -16,11 -15,10 +16,12 @@@ import { OAuthConsentPage } from "@/com
import companies from "../companies";
import contacts from "../contacts";
import { Dashboard } from "../dashboard/Dashboard";
+import { MobileDashboard } from "../dashboard/MobileDashboard";
import deals from "../deals";
import { Layout } from "../layout/Layout";
+import { MobileLayout } from "../layout/MobileLayout";
import { SignupPage } from "../login/SignupPage";
+ import { ImportPage } from "../misc/ImportPage";
import {
authProvider as defaultAuthProvider,
dataProvider as defaultDataProvider,
@@@ -156,73 -169,3 +157,74 @@@ export const CRM = (
</ConfigurationProvider>
);
};
+
+const DesktopAdmin = (props: CoreAdminProps) => {
+ return (
+ <Admin
+ store={localStorageStore(undefined, "CRM")}
+ layout={Layout}
+ loginPage={StartPage}
+ i18nProvider={i18nProvider}
+ dashboard={Dashboard}
+ requireAuth
+ disableTelemetry
+ {...props}
+ >
+ <CustomRoutes noLayout>
+ <Route path={SignupPage.path} element={<SignupPage />} />
+ <Route path={SetPasswordPage.path} element={<SetPasswordPage />} />
+ <Route
+ path={ForgotPasswordPage.path}
+ element={<ForgotPasswordPage />}
+ />
+ <Route path={OAuthConsentPage.path} element={<OAuthConsentPage />} />
+ </CustomRoutes>
+
+ <CustomRoutes>
+ <Route path={SettingsPage.path} element={<SettingsPage />} />
++ <Route path={ImportPage.path} element={<ImportPage />} />
+ </CustomRoutes>
+ <Resource name="deals" {...deals} />
+ <Resource name="contacts" {...contacts} />
+ <Resource name="companies" {...companies} />
+ <Resource name="contact_notes" />
+ <Resource name="deal_notes" />
+ <Resource name="tasks" />
+ <Resource name="sales" {...sales} />
+ <Resource name="tags" />
+ </Admin>
+ );
+};
+
+const MobileAdmin = (props: CoreAdminProps) => {
+ return (
+ <Admin
+ store={localStorageStore(undefined, "CRM")}
+ layout={MobileLayout}
+ loginPage={StartPage}
+ i18nProvider={i18nProvider}
+ dashboard={MobileDashboard}
+ requireAuth
+ disableTelemetry
+ {...props}
+ >
+ <CustomRoutes noLayout>
+ <Route path={SignupPage.path} element={<SignupPage />} />
+ <Route path={SetPasswordPage.path} element={<SetPasswordPage />} />
+ <Route
+ path={ForgotPasswordPage.path}
+ element={<ForgotPasswordPage />}
+ />
+ <Route path={OAuthConsentPage.path} element={<OAuthConsentPage />} />
+ </CustomRoutes>
+ <Resource
+ name="contacts"
+ list={ContactList}
+ show={ContactShow}
+ recordRepresentation={contacts.recordRepresentation}
+ />
+ <Resource name="companies" show={CompanyShow} />
+ <Resource name="tasks" list={MobileTasksList} />
+ </Admin>
+ );
+};