fix: add missing newlines at the end of JSON files; clean up formatting in page components
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
UserPlus,
|
||||
IdCard,
|
||||
ClipboardList,
|
||||
KeyRound,
|
||||
// Courses
|
||||
GraduationCap,
|
||||
CalendarDays,
|
||||
@@ -41,24 +40,6 @@ import {
|
||||
PanelTop,
|
||||
Newspaper,
|
||||
Palette,
|
||||
// Fisheries
|
||||
Fish,
|
||||
Waves,
|
||||
Anchor,
|
||||
BookOpen,
|
||||
ShieldCheck,
|
||||
Trophy,
|
||||
// Meetings
|
||||
BookMarked,
|
||||
ListChecks,
|
||||
ScrollText,
|
||||
// Association (Verband)
|
||||
Building2,
|
||||
Network,
|
||||
SearchCheck,
|
||||
Share2,
|
||||
PieChart,
|
||||
LayoutTemplate,
|
||||
// Modules
|
||||
Database,
|
||||
} from 'lucide-react';
|
||||
@@ -396,176 +377,51 @@ const getRoutes = (account: string) => {
|
||||
});
|
||||
}
|
||||
|
||||
// ── Custom Modules ──
|
||||
if (featureFlagsConfig.enableModuleBuilder) {
|
||||
routes.push({
|
||||
label: 'common:routes.customModules',
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
children: [
|
||||
{
|
||||
label: 'common:routes.moduleList',
|
||||
path: createPath(pathsConfig.app.accountModules, account),
|
||||
Icon: <Database className={iconClasses} />,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
// ── Fisheries ──
|
||||
if (featureFlagsConfig.enableFischerei) {
|
||||
routes.push({
|
||||
label: 'common:routes.fisheriesManagement',
|
||||
collapsible: true,
|
||||
children: [
|
||||
{
|
||||
label: 'common:routes.fisheriesOverview',
|
||||
path: createPath(pathsConfig.app.accountFischerei, account),
|
||||
Icon: <Fish className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.fisheriesWaters',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountFischerei + '/waters',
|
||||
account,
|
||||
),
|
||||
Icon: <Waves className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.fisheriesLeases',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountFischerei + '/leases',
|
||||
account,
|
||||
),
|
||||
Icon: <Anchor className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.fisheriesCatchBooks',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountFischerei + '/catch-books',
|
||||
account,
|
||||
),
|
||||
Icon: <BookOpen className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.fisheriesPermits',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountFischerei + '/permits',
|
||||
account,
|
||||
),
|
||||
Icon: <ShieldCheck className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.fisheriesCompetitions',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountFischerei + '/competitions',
|
||||
account,
|
||||
),
|
||||
Icon: <Trophy className={iconClasses} />,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
// ── Meeting Protocols ──
|
||||
if (featureFlagsConfig.enableMeetingProtocols) {
|
||||
routes.push({
|
||||
label: 'common:routes.meetingProtocols',
|
||||
collapsible: true,
|
||||
children: [
|
||||
{
|
||||
label: 'common:routes.meetingsOverview',
|
||||
path: createPath(pathsConfig.app.accountMeetings, account),
|
||||
Icon: <BookMarked className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.meetingsProtocols',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountMeetings + '/protocols',
|
||||
account,
|
||||
),
|
||||
Icon: <ScrollText className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.meetingsTasks',
|
||||
path: createPath(pathsConfig.app.accountMeetings + '/tasks', account),
|
||||
Icon: <ListChecks className={iconClasses} />,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
// ── Association Management (Verband) ──
|
||||
if (featureFlagsConfig.enableVerbandsverwaltung) {
|
||||
routes.push({
|
||||
label: 'common:routes.associationManagement',
|
||||
collapsible: true,
|
||||
children: [
|
||||
{
|
||||
label: 'common:routes.associationOverview',
|
||||
path: createPath(pathsConfig.app.accountVerband, account),
|
||||
Icon: <Building2 className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.associationHierarchy',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountVerband + '/hierarchy',
|
||||
account,
|
||||
),
|
||||
Icon: <Network className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.associationMemberSearch',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountVerband + '/members',
|
||||
account,
|
||||
),
|
||||
Icon: <SearchCheck className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.associationEvents',
|
||||
path: createPath(pathsConfig.app.accountVerband + '/events', account),
|
||||
Icon: <Share2 className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.associationReporting',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountVerband + '/reporting',
|
||||
account,
|
||||
),
|
||||
Icon: <PieChart className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common:routes.associationTemplates',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountVerband + '/templates',
|
||||
account,
|
||||
),
|
||||
Icon: <LayoutTemplate className={iconClasses} />,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
// Note: Fischerei, Meetings, and Verband sections are injected at runtime
|
||||
// via injectAccountFeatureRoutes() in the layout, based on per-account
|
||||
// settings (account_settings.features). They are NOT added here to avoid
|
||||
// duplicate entries when both the global feature flag and per-account
|
||||
// setting are enabled.
|
||||
|
||||
// ── Administration ──
|
||||
routes.push({
|
||||
label: 'common:routes.administration',
|
||||
collapsible: false,
|
||||
children: [
|
||||
{
|
||||
const adminChildren: Array<
|
||||
| {
|
||||
label: string;
|
||||
path: string;
|
||||
Icon: React.ReactNode;
|
||||
}
|
||||
| undefined
|
||||
> = [
|
||||
{
|
||||
label: 'common:routes.accountSettings',
|
||||
path: createPath(pathsConfig.app.accountSettings, account),
|
||||
Icon: <Settings className={iconClasses} />,
|
||||
},
|
||||
featureFlagsConfig.enableTeamAccountBilling
|
||||
? {
|
||||
label: 'common:routes.billing',
|
||||
path: createPath(pathsConfig.app.accountBilling, account),
|
||||
Icon: <CreditCard className={iconClasses} />,
|
||||
}
|
||||
: undefined,
|
||||
],
|
||||
});
|
||||
];
|
||||
|
||||
if (featureFlagsConfig.enableModuleBuilder) {
|
||||
adminChildren.push({
|
||||
label: 'common:routes.moduleList',
|
||||
path: createPath(pathsConfig.app.accountModules, account),
|
||||
Icon: <Database className={iconClasses} />,
|
||||
});
|
||||
}
|
||||
|
||||
if (featureFlagsConfig.enableTeamAccountBilling) {
|
||||
adminChildren.push({
|
||||
label: 'common:routes.billing',
|
||||
path: createPath(pathsConfig.app.accountBilling, account),
|
||||
Icon: <CreditCard className={iconClasses} />,
|
||||
});
|
||||
}
|
||||
|
||||
routes.push({
|
||||
label: 'common:routes.administration',
|
||||
collapsible: false,
|
||||
children: adminChildren,
|
||||
});
|
||||
}
|
||||
|
||||
return routes;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user