feat(opportunities): Konfetti beim Wechsel auf Zusage
Kleines Canvas-Konfetti ohne Abhaengigkeit (src/lib/confetti.ts), ausgeloest beim Phasenwechsel in der Pipeline und beim Speichern im Dialog. Entfaellt bei prefers-reduced-motion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e35c7518db
commit
59b962d66b
@@ -14,6 +14,7 @@ import { STAGE_LABELS } from './opportunityUi';
|
||||
import { ConfirmDialog } from '../ui/Modal';
|
||||
import { useToast } from '../Toast';
|
||||
import { opportunitiesApi } from '../../lib/api';
|
||||
import { fireConfetti } from '../../lib/confetti';
|
||||
import {
|
||||
OPEN_STAGES,
|
||||
OPPORTUNITY_STAGES,
|
||||
@@ -217,6 +218,7 @@ export const Opportunities: React.FC<OpportunitiesProps> = ({
|
||||
try {
|
||||
await opportunitiesApi.update(opportunity.id, { stage });
|
||||
addToast(`„${opportunity.title}" ist jetzt in Phase ${STAGE_LABELS[stage]}.`, 'success');
|
||||
if (stage === 'Zusage') fireConfetti();
|
||||
reload();
|
||||
} catch (err) {
|
||||
addToast(err instanceof Error ? err.message : 'Phase konnte nicht geändert werden.', 'error');
|
||||
|
||||
Reference in New Issue
Block a user