chore: merge main into feat/M13-claude-job-queue
Resolves conflict in docs/scrum4me-architecture.md — main brought in ST-1110 demo-user policy section, branch added ST-1111 Claude job queue section. Both are independent topics; kept both in chronological order (ST-1110 first, then ST-1111). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
93f0c4c7f7
19 changed files with 415 additions and 144 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import { useRouter } from 'next/navigation'
|
||||
import { useTransition } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { DemoTooltip } from '@/components/shared/demo-tooltip'
|
||||
import { setActiveProductAction } from '@/actions/active-product'
|
||||
|
||||
interface Props {
|
||||
|
|
@ -18,7 +19,6 @@ export function ActivateProductButton({ productId, isDemo, redirectTo, label = '
|
|||
const [isPending, startTransition] = useTransition()
|
||||
|
||||
function handleActivate() {
|
||||
if (isDemo) { toast.error('Niet beschikbaar in demo-modus'); return }
|
||||
startTransition(async () => {
|
||||
const result = await setActiveProductAction(productId)
|
||||
if (result?.error) toast.error(typeof result.error === 'string' ? result.error : 'Activeren mislukt')
|
||||
|
|
@ -28,12 +28,14 @@ export function ActivateProductButton({ productId, isDemo, redirectTo, label = '
|
|||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={handleActivate}
|
||||
disabled={isPending}
|
||||
className="text-xs text-primary hover:underline font-medium disabled:opacity-50"
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
<DemoTooltip show={isDemo}>
|
||||
<button
|
||||
onClick={() => !isDemo && handleActivate()}
|
||||
disabled={isDemo || isPending}
|
||||
className="text-xs text-primary hover:underline font-medium disabled:opacity-50 disabled:no-underline"
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
</DemoTooltip>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue