Files
dickendock/frontend/src/toolRegistry.js

37 lines
1.3 KiB
JavaScript

import Kalkulator3D, { SavedList } from './tools/kalkulator3d.jsx';
import { CalculatorIcon, ArchiveIcon, AppsIcon } from './icons.jsx';
import Bestellungen from './tools/bestellungen.jsx';
// ══════════════════════════════════════════════════════════════════════════════
// Tool-Registry
// Neues Tool: id, icon (SVG-Komponente), label, navLabel, group, component
// ══════════════════════════════════════════════════════════════════════════════
export const TOOLS = [
{
id: 'kalkulator3d',
Icon: CalculatorIcon,
label: 'Kostenrechner',
navLabel: 'Kosten',
group: '3D-Druck',
component: Kalkulator3D,
},
{
id: 'kalkulator3d-saved',
Icon: ArchiveIcon,
label: 'Archiv',
navLabel: 'Archiv',
group: '3D-Druck',
component: SavedList,
},
];
export function getGroupedTools() {
const groups = {};
for (const t of TOOLS) {
const g = t.group || 'Allgemein';
if (!groups[g]) groups[g] = [];
groups[g].push(t);
}
return Object.entries(groups);
}