Fix multiple UI/UX issues and invite token migration

Fixes:
- Round edit: Add cache invalidation for voting dates
- Criteria weights: Replace number input with visual slider
- Member invite: Per-member expertise tags with suggestions
  - Tags now added per member, not globally
  - Comma key support for quick tag entry
  - Suggested tags based on ocean/business expertise
- Accept-invite: Add Suspense boundary for useSearchParams
- Add missing inviteToken columns migration

The invite token columns were accidentally skipped in prototype1
migration. This adds them with IF NOT EXISTS checks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 15:25:28 +01:00
parent 3986da172f
commit 8be740a4fb
5 changed files with 272 additions and 133 deletions

View File

@@ -1,6 +1,6 @@
'use client'
import { useState, useEffect } from 'react'
import { useState, useEffect, Suspense } from 'react'
import { useSearchParams, useRouter } from 'next/navigation'
import { signIn } from 'next-auth/react'
import { Button } from '@/components/ui/button'
@@ -16,7 +16,7 @@ import { trpc } from '@/lib/trpc/client'
type InviteState = 'loading' | 'valid' | 'accepting' | 'error'
export default function AcceptInvitePage() {
function AcceptInviteContent() {
const [state, setState] = useState<InviteState>('loading')
const [errorType, setErrorType] = useState<string | null>(null)
@@ -214,3 +214,24 @@ export default function AcceptInvitePage() {
</Card>
)
}
// Loading fallback for Suspense
function LoadingCard() {
return (
<Card className="w-full max-w-md">
<CardContent className="flex flex-col items-center justify-center py-12">
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
<p className="mt-4 text-sm text-muted-foreground">Loading...</p>
</CardContent>
</Card>
)
}
// Export with Suspense boundary for useSearchParams
export default function AcceptInvitePage() {
return (
<Suspense fallback={<LoadingCard />}>
<AcceptInviteContent />
</Suspense>
)
}