feat: enhance member management features; add quick stats and search capabilities
This commit is contained in:
@@ -5,9 +5,6 @@ import {
|
||||
CreditCard,
|
||||
// People (Members + Access)
|
||||
UserCheck,
|
||||
UserPlus,
|
||||
IdCard,
|
||||
ClipboardList,
|
||||
// Courses
|
||||
GraduationCap,
|
||||
CalendarDays,
|
||||
@@ -69,7 +66,10 @@ import pathsConfig from '~/config/paths.config';
|
||||
|
||||
const iconClasses = 'w-4';
|
||||
|
||||
const getRoutes = (account: string, accountFeatures?: Record<string, boolean>) => {
|
||||
const getRoutes = (
|
||||
account: string,
|
||||
accountFeatures?: Record<string, boolean>,
|
||||
) => {
|
||||
const routes: Array<
|
||||
| {
|
||||
label: string;
|
||||
@@ -110,46 +110,11 @@ const getRoutes = (account: string, accountFeatures?: Record<string, boolean>) =
|
||||
}> = [];
|
||||
|
||||
if (featureFlagsConfig.enableMemberManagement) {
|
||||
peopleChildren.push(
|
||||
{
|
||||
label: 'common.routes.clubMembers',
|
||||
path: createPath(pathsConfig.app.accountCmsMembers, account),
|
||||
Icon: <UserCheck className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common.routes.memberApplications',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountCmsMembers + '/applications',
|
||||
account,
|
||||
),
|
||||
Icon: <UserPlus className={iconClasses} />,
|
||||
},
|
||||
// NOTE: memberPortal page does not exist yet — nav entry commented out until built
|
||||
// {
|
||||
// label: 'common.routes.memberPortal',
|
||||
// path: createPath(
|
||||
// pathsConfig.app.accountCmsMembers + '/portal',
|
||||
// account,
|
||||
// ),
|
||||
// Icon: <KeyRound className={iconClasses} />,
|
||||
// },
|
||||
{
|
||||
label: 'common.routes.memberCards',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountCmsMembers + '/cards',
|
||||
account,
|
||||
),
|
||||
Icon: <IdCard className={iconClasses} />,
|
||||
},
|
||||
{
|
||||
label: 'common.routes.memberDues',
|
||||
path: createPath(
|
||||
pathsConfig.app.accountCmsMembers + '/dues',
|
||||
account,
|
||||
),
|
||||
Icon: <ClipboardList className={iconClasses} />,
|
||||
},
|
||||
);
|
||||
peopleChildren.push({
|
||||
label: 'common.routes.clubMembers',
|
||||
path: createPath(pathsConfig.app.accountCmsMembers, account),
|
||||
Icon: <UserCheck className={iconClasses} />,
|
||||
});
|
||||
}
|
||||
|
||||
// Admin users who can log in — always visible
|
||||
@@ -417,7 +382,10 @@ const getRoutes = (account: string, accountFeatures?: Record<string, boolean>) =
|
||||
}
|
||||
|
||||
// ── Fisheries ──
|
||||
if (featureFlagsConfig.enableFischerei && (accountFeatures?.fischerei !== false)) {
|
||||
if (
|
||||
featureFlagsConfig.enableFischerei &&
|
||||
accountFeatures?.fischerei !== false
|
||||
) {
|
||||
routes.push({
|
||||
label: 'common.routes.fisheriesManagement',
|
||||
collapsible: true,
|
||||
@@ -473,7 +441,10 @@ const getRoutes = (account: string, accountFeatures?: Record<string, boolean>) =
|
||||
}
|
||||
|
||||
// ── Meeting Protocols ──
|
||||
if (featureFlagsConfig.enableMeetingProtocols && (accountFeatures?.meetings !== false)) {
|
||||
if (
|
||||
featureFlagsConfig.enableMeetingProtocols &&
|
||||
accountFeatures?.meetings !== false
|
||||
) {
|
||||
routes.push({
|
||||
label: 'common.routes.meetingProtocols',
|
||||
collapsible: true,
|
||||
@@ -502,7 +473,10 @@ const getRoutes = (account: string, accountFeatures?: Record<string, boolean>) =
|
||||
}
|
||||
|
||||
// ── Association Management (Verband) ──
|
||||
if (featureFlagsConfig.enableVerbandsverwaltung && (accountFeatures?.verband !== false)) {
|
||||
if (
|
||||
featureFlagsConfig.enableVerbandsverwaltung &&
|
||||
accountFeatures?.verband !== false
|
||||
) {
|
||||
routes.push({
|
||||
label: 'common.routes.associationManagement',
|
||||
collapsible: true,
|
||||
|
||||
Reference in New Issue
Block a user