mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 01:36:39 +02:00
feat(crm): move Import-Wizard into CRM-Settings tab
Import ist kein eigener Nav-Eintrag mehr, sondern ein Tab in den CRM-Einstellungen. /crm/import redirectet auf /crm/settings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dda672d41e
commit
27507f1372
3 changed files with 29 additions and 25 deletions
|
|
@ -39,6 +39,7 @@ import {
|
||||||
CUSTOM_FIELD_TYPE_LABELS,
|
CUSTOM_FIELD_TYPE_LABELS,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import { LexwareSyncContent } from '../lexware/LexwareSyncPage';
|
import { LexwareSyncContent } from '../lexware/LexwareSyncPage';
|
||||||
|
import { ImportPage } from '../import/ImportPage';
|
||||||
import styles from './CrmSettingsPage.module.css';
|
import styles from './CrmSettingsPage.module.css';
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
@ -1326,7 +1327,7 @@ function NorthDataConfig() {
|
||||||
// Page Component
|
// Page Component
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
type SettingsTab = 'module' | 'customfields' | 'lexware' | 'integrations' | 'settings';
|
type SettingsTab = 'module' | 'customfields' | 'lexware' | 'integrations' | 'import' | 'settings';
|
||||||
|
|
||||||
export function CrmSettingsPage() {
|
export function CrmSettingsPage() {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
|
|
@ -1447,6 +1448,25 @@ export function CrmSettingsPage() {
|
||||||
</svg>
|
</svg>
|
||||||
Integrationen
|
Integrationen
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className={`${styles.settingsTab} ${activeTab === 'import' ? styles.settingsTabActive : ''}`}
|
||||||
|
onClick={() => setActiveTab('import')}
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="1.5"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
>
|
||||||
|
<path d="M8 2v8M5 7l3 3 3-3" />
|
||||||
|
<path d="M2 12h12" />
|
||||||
|
</svg>
|
||||||
|
Import
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`${styles.settingsTab} ${activeTab === 'settings' ? styles.settingsTabActive : ''}`}
|
className={`${styles.settingsTab} ${activeTab === 'settings' ? styles.settingsTabActive : ''}`}
|
||||||
onClick={() => setActiveTab('settings')}
|
onClick={() => setActiveTab('settings')}
|
||||||
|
|
@ -1610,6 +1630,13 @@ export function CrmSettingsPage() {
|
||||||
<NorthDataConfig />
|
<NorthDataConfig />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Tab: Import */}
|
||||||
|
{activeTab === 'import' && (
|
||||||
|
<div className={styles.card}>
|
||||||
|
<ImportPage />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Tab: Weitere Einstellungen */}
|
{/* Tab: Weitere Einstellungen */}
|
||||||
{activeTab === 'settings' && (
|
{activeTab === 'settings' && (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import { CrmSettingsProvider, CrmModuleGuard } from '../crm/settings/CrmSettings
|
||||||
import { CrmSettingsPage } from '../crm/settings/CrmSettingsPage';
|
import { CrmSettingsPage } from '../crm/settings/CrmSettingsPage';
|
||||||
import { LexwareSyncPage } from '../crm/lexware/LexwareSyncPage';
|
import { LexwareSyncPage } from '../crm/lexware/LexwareSyncPage';
|
||||||
import { ForecastPage } from '../crm/forecast/ForecastPage';
|
import { ForecastPage } from '../crm/forecast/ForecastPage';
|
||||||
import { ImportPage } from '../crm/import/ImportPage';
|
|
||||||
|
|
||||||
function PrivateRoute({ children }: { children: React.ReactNode }) {
|
function PrivateRoute({ children }: { children: React.ReactNode }) {
|
||||||
const { isAuthenticated, isLoading } = useAuth();
|
const { isAuthenticated, isLoading } = useAuth();
|
||||||
|
|
@ -73,7 +72,7 @@ export function App() {
|
||||||
<Route path="crm/deals/:id" element={<CrmModuleGuard module="deals"><DealDetailPage /></CrmModuleGuard>} />
|
<Route path="crm/deals/:id" element={<CrmModuleGuard module="deals"><DealDetailPage /></CrmModuleGuard>} />
|
||||||
<Route path="crm/pipelines" element={<CrmModuleGuard module="pipelines"><PipelinesPage /></CrmModuleGuard>} />
|
<Route path="crm/pipelines" element={<CrmModuleGuard module="pipelines"><PipelinesPage /></CrmModuleGuard>} />
|
||||||
<Route path="crm/forecast" element={<CrmModuleGuard module="deals"><ForecastPage /></CrmModuleGuard>} />
|
<Route path="crm/forecast" element={<CrmModuleGuard module="deals"><ForecastPage /></CrmModuleGuard>} />
|
||||||
<Route path="crm/import" element={<ImportPage />} />
|
<Route path="crm/import" element={<Navigate to="/crm/settings" replace />} />
|
||||||
<Route path="crm/settings" element={<CrmSettingsPage />} />
|
<Route path="crm/settings" element={<CrmSettingsPage />} />
|
||||||
<Route path="crm/lexware-sync" element={<LexwareSyncPage />} />
|
<Route path="crm/lexware-sync" element={<LexwareSyncPage />} />
|
||||||
{/* Admin-Bereich mit eigenem Layout (Top-Tabs) */}
|
{/* Admin-Bereich mit eigenem Layout (Top-Tabs) */}
|
||||||
|
|
|
||||||
|
|
@ -391,28 +391,6 @@ export function AppLayout() {
|
||||||
{!collapsed && 'Prognose'}
|
{!collapsed && 'Prognose'}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
)}
|
)}
|
||||||
<NavLink
|
|
||||||
to="/crm/import"
|
|
||||||
className={({ isActive }) =>
|
|
||||||
`${styles.navLink} ${isActive ? styles.active : ''}`
|
|
||||||
}
|
|
||||||
title="Import"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
width="16"
|
|
||||||
height="16"
|
|
||||||
viewBox="0 0 16 16"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth="1.5"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M8 2v8M5 7l3 3 3-3" />
|
|
||||||
<path d="M2 12h12" />
|
|
||||||
</svg>
|
|
||||||
{!collapsed && 'Import'}
|
|
||||||
</NavLink>
|
|
||||||
{/* CRM Einstellungen (nur Admins) */}
|
{/* CRM Einstellungen (nur Admins) */}
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<NavLink
|
<NavLink
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue