UI: alle 8 Dialoge auf barrierearme Modal-Basis umgestellt
Bisher waren alle Overlay-Dialoge plain divs ohne role/Fokus-Trap/Escape. Jetzt setzen sie auf <Modal> auf (role=dialog, aria-modal, Fokus-Trap + -Rueckgabe, Escape, Body-Scroll-Lock, konsistenter X-Button, Scroll bei langem Inhalt). - Modal: X-Schliessen-Button + max-h-[90vh]/overflow-y-auto ergaenzt - BlockerDialog, ManualDialog (Timeline) - leads: CSV-Import + Neuer Lead - bereich: Neues Projekt - projekt: Gate-Review + Projekt abschliessen - lead: Zu Deal machen Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
30006e3b32
commit
f600c9f187
7 files changed
+489
-566
No files matched your search
+95
-116
@@ -8,6 +8,7 @@ import { Card } from '../components/ui/Card';
|
||||
import { Button } from '../components/ui/Button';
|
||||
import { SkeletonCard } from '../components/ui/SkeletonCard';
|
||||
import { ErrorState } from '../components/ui/ErrorState';
|
||||
import { Modal } from '../components/ui/Modal';
|
||||
import { useConfirm } from '../components/ui/ConfirmProvider';
|
||||
import { useCurrentUser } from '../hooks/useCurrentUser';
|
||||
import { voice } from '../lib/voice';
|
||||
@@ -704,65 +705,52 @@ function GateDialog({
|
||||
},
|
||||
});
|
||||
return (
|
||||
<div
|
||||
className="fixed inset-0 z-50 flex items-center justify-center bg-black/30"
|
||||
onClick={onClose}
|
||||
>
|
||||
<div
|
||||
className="w-full max-w-md rounded-[var(--radius-xl)] bg-[var(--color-bg)] p-6 shadow-[var(--shadow-lg)]"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
<Modal open onClose={onClose} title={`Gate-Review: ${PHASE_META[phase].label}`}>
|
||||
<p className="mt-1 text-sm text-[var(--color-ink-muted)]">
|
||||
Ziel: {PHASE_META[phase].gateZiel}
|
||||
</p>
|
||||
<form
|
||||
className="mt-4 space-y-3"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
add.mutate({
|
||||
projectId,
|
||||
phase,
|
||||
ergebnisErreicht: erreicht,
|
||||
notiz: notiz.trim() || undefined,
|
||||
advance,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<h2 className="text-xl font-semibold">Gate-Review: {PHASE_META[phase].label}</h2>
|
||||
<p className="mt-1 text-sm text-[var(--color-ink-muted)]">
|
||||
Ziel: {PHASE_META[phase].gateZiel}
|
||||
</p>
|
||||
<form
|
||||
className="mt-4 space-y-3"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
add.mutate({
|
||||
projectId,
|
||||
phase,
|
||||
ergebnisErreicht: erreicht,
|
||||
notiz: notiz.trim() || undefined,
|
||||
advance,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={erreicht}
|
||||
onChange={(e) => setErreicht(e.target.checked)}
|
||||
/>
|
||||
Ergebnis erreicht
|
||||
</label>
|
||||
<textarea
|
||||
value={notiz}
|
||||
onChange={(e) => setNotiz(e.target.value)}
|
||||
rows={3}
|
||||
placeholder="Rückblick / Maßnahmen (bei Gelb/Rot)"
|
||||
className={inputCls}
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={erreicht}
|
||||
onChange={(e) => setErreicht(e.target.checked)}
|
||||
/>
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={advance}
|
||||
onChange={(e) => setAdvance(e.target.checked)}
|
||||
/>
|
||||
Folgephase jetzt freigeben
|
||||
</label>
|
||||
<div className="flex justify-end gap-2">
|
||||
<Button type="button" variant="ghost" onClick={onClose}>
|
||||
Abbrechen
|
||||
</Button>
|
||||
<Button type="submit" disabled={add.isPending}>
|
||||
Speichern
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Ergebnis erreicht
|
||||
</label>
|
||||
<textarea
|
||||
value={notiz}
|
||||
onChange={(e) => setNotiz(e.target.value)}
|
||||
rows={3}
|
||||
placeholder="Rückblick / Maßnahmen (bei Gelb/Rot)"
|
||||
className={inputCls}
|
||||
/>
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input type="checkbox" checked={advance} onChange={(e) => setAdvance(e.target.checked)} />
|
||||
Folgephase jetzt freigeben
|
||||
</label>
|
||||
<div className="flex justify-end gap-2">
|
||||
<Button type="button" variant="ghost" onClick={onClose}>
|
||||
Abbrechen
|
||||
</Button>
|
||||
<Button type="submit" disabled={add.isPending}>
|
||||
Speichern
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2320,65 +2308,56 @@ function AbschlussDialog({
|
||||
{ key: 'retro', label: 'Retrospektive / Lessons Learned durchgeführt' },
|
||||
];
|
||||
return (
|
||||
<div
|
||||
className="fixed inset-0 z-50 flex items-center justify-center bg-black/30"
|
||||
onClick={onClose}
|
||||
>
|
||||
<div
|
||||
className="max-h-[90vh] w-full max-w-md overflow-y-auto rounded-[var(--radius-xl)] bg-[var(--color-bg)] p-6 shadow-[var(--shadow-lg)]"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<h2 className="text-xl font-semibold">Projekt abschließen</h2>
|
||||
<p className="mt-1 text-sm text-[var(--color-ink-muted)]">
|
||||
Ein Projekt endet bewusst (Leitfaden Phase 4).
|
||||
</p>
|
||||
<form onSubmit={submit} className="mt-4 space-y-3">
|
||||
<div className="space-y-1.5 rounded-[var(--radius-md)] border border-[var(--color-border)] p-3">
|
||||
{checkItems.map((it) => (
|
||||
<label key={it.key} className="flex items-start gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={checks[it.key]}
|
||||
onChange={(e) => setChecks((c) => ({ ...c, [it.key]: e.target.checked }))}
|
||||
className="mt-0.5"
|
||||
/>
|
||||
{it.label}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
<label className="block">
|
||||
<span className="text-sm font-medium">Abschlussvermerk</span>
|
||||
<textarea
|
||||
value={vermerk}
|
||||
onChange={(e) => setVermerk(e.target.value)}
|
||||
rows={3}
|
||||
maxLength={2000}
|
||||
placeholder="Ziel erreicht? Aufwand gegen Plan? Wichtigste Erkenntnisse — eine halbe Seite, kein Roman."
|
||||
className={clsx(inputCls, 'mt-1')}
|
||||
/>
|
||||
</label>
|
||||
<label className="block">
|
||||
<span className="text-sm font-medium">Lessons-Learned-URL (Outline)</span>
|
||||
<input
|
||||
required
|
||||
type="url"
|
||||
value={url}
|
||||
onChange={(e) => setUrl(e.target.value)}
|
||||
placeholder="https://outline.tool-ctrl.de/lessons-learned/..."
|
||||
className={clsx(inputCls, 'mt-1')}
|
||||
/>
|
||||
</label>
|
||||
<div className="flex justify-end gap-2">
|
||||
<Button type="button" variant="ghost" onClick={onClose}>
|
||||
Abbrechen
|
||||
</Button>
|
||||
<Button type="submit" disabled={mutation.isPending}>
|
||||
Abschließen
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<Modal open onClose={onClose} title="Projekt abschließen">
|
||||
<p className="mt-1 text-sm text-[var(--color-ink-muted)]">
|
||||
Ein Projekt endet bewusst (Leitfaden Phase 4).
|
||||
</p>
|
||||
<form onSubmit={submit} className="mt-4 space-y-3">
|
||||
<div className="space-y-1.5 rounded-[var(--radius-md)] border border-[var(--color-border)] p-3">
|
||||
{checkItems.map((it) => (
|
||||
<label key={it.key} className="flex items-start gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={checks[it.key]}
|
||||
onChange={(e) => setChecks((c) => ({ ...c, [it.key]: e.target.checked }))}
|
||||
className="mt-0.5"
|
||||
/>
|
||||
{it.label}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
<label className="block">
|
||||
<span className="text-sm font-medium">Abschlussvermerk</span>
|
||||
<textarea
|
||||
value={vermerk}
|
||||
onChange={(e) => setVermerk(e.target.value)}
|
||||
rows={3}
|
||||
maxLength={2000}
|
||||
placeholder="Ziel erreicht? Aufwand gegen Plan? Wichtigste Erkenntnisse — eine halbe Seite, kein Roman."
|
||||
className={clsx(inputCls, 'mt-1')}
|
||||
/>
|
||||
</label>
|
||||
<label className="block">
|
||||
<span className="text-sm font-medium">Lessons-Learned-URL (Outline)</span>
|
||||
<input
|
||||
required
|
||||
type="url"
|
||||
value={url}
|
||||
onChange={(e) => setUrl(e.target.value)}
|
||||
placeholder="https://outline.tool-ctrl.de/lessons-learned/..."
|
||||
className={clsx(inputCls, 'mt-1')}
|
||||
/>
|
||||
</label>
|
||||
<div className="flex justify-end gap-2">
|
||||
<Button type="button" variant="ghost" onClick={onClose}>
|
||||
Abbrechen
|
||||
</Button>
|
||||
<Button type="submit" disabled={mutation.isPending}>
|
||||
Abschließen
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user