feat(org-inbox): implement join request inbox for platform and club admins
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 30s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 24s

- Added new API endpoint to retrieve join requests accessible by platform admins and club admins.
- Implemented frontend components to display join requests in the inbox, including navigation updates and badge notifications.
- Enhanced sidebar and navigation to conditionally show inbox based on user permissions.
- Updated styles for inbox components and added responsive design for dashboard integration.
- Introduced context management for inbox state and notifications on join request actions.
This commit is contained in:
Lars committed 2026-05-09 09:13:38 +02:00
1 parent 59fb8a5527
commit 58a38702b9
11 files changed
+631 -20

No files matched your search

+13 -15
View File
@@ -5,7 +5,8 @@ import {
Building2,
Settings,
Shield,
Target
Target,
Inbox
} from 'lucide-react'
/**
@@ -15,30 +16,27 @@ import {
* @typedef {{ to: string, label: string, shortLabel?: string, end?: boolean, Icon: import('react').ForwardRefExoticComponent }} AppNavItem
*/
/** @returns {Omit<AppNavItem, 'Icon'>[]} */
function baseItems() {
return [
/** @param {{ showInbox?: boolean }} opts */
function baseItems(opts = {}) {
const showInbox = !!opts.showInbox
const items = [
{ to: '/', label: 'Übersicht', end: true },
...(showInbox ? [{ to: '/inbox', label: 'Posteingang', shortLabel: 'Post' }] : []),
{ to: '/exercises', label: 'Übungen', shortLabel: 'Übungen' },
{ to: '/planning', label: 'Planung' },
{ to: '/clubs', label: 'Vereine' },
{ to: '/trainer-contexts', label: 'Meine Bereiche', shortLabel: 'Bereiche' },
{ to: '/settings', label: 'Einstellungen', shortLabel: 'Einst.' }
]
return items
}
/** @param {boolean} isAdmin */
export function getMainNavItems(isAdmin) {
const icons = [
LayoutDashboard,
BookOpen,
Calendar,
Building2,
Target,
Settings
]
/** @param {boolean} isAdmin @param {{ showInbox?: boolean }} opts */
export function getMainNavItems(isAdmin, opts = {}) {
const showInbox = !!opts.showInbox
const icons = [LayoutDashboard, ...(showInbox ? [Inbox] : []), BookOpen, Calendar, Building2, Target, Settings]
const raw = baseItems().map((item, i) => ({
const raw = baseItems(opts).map((item, i) => ({
...item,
Icon: icons[i]
}))