Add click-to-edit pattern across all admin tables
Replace Actions columns with clickable rows that open edit modals directly. Delete is now an inline two-step confirm button in the edit modal footer. Games modal links to routes/bosses detail, route modal links to encounters, and boss modal has an Edit Team button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ interface EvolutionFormModalProps {
|
||||
onSubmit: (data: CreateEvolutionInput | UpdateEvolutionInput) => void
|
||||
onClose: () => void
|
||||
isSubmitting?: boolean
|
||||
onDelete?: () => void
|
||||
isDeleting?: boolean
|
||||
}
|
||||
|
||||
const TRIGGER_OPTIONS = ['level-up', 'trade', 'use-item', 'shed', 'other']
|
||||
@@ -17,6 +19,8 @@ export function EvolutionFormModal({
|
||||
onSubmit,
|
||||
onClose,
|
||||
isSubmitting,
|
||||
onDelete,
|
||||
isDeleting,
|
||||
}: EvolutionFormModalProps) {
|
||||
const [fromPokemonId, setFromPokemonId] = useState<number | null>(
|
||||
evolution?.fromPokemonId ?? null,
|
||||
@@ -52,6 +56,8 @@ export function EvolutionFormModal({
|
||||
onClose={onClose}
|
||||
onSubmit={handleSubmit}
|
||||
isSubmitting={isSubmitting}
|
||||
onDelete={onDelete}
|
||||
isDeleting={isDeleting}
|
||||
>
|
||||
<PokemonSelector
|
||||
label="From Pokemon"
|
||||
|
||||
Reference in New Issue
Block a user