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 RouteEncounterFormModalProps {
|
||||
onSubmit: (data: CreateRouteEncounterInput | UpdateRouteEncounterInput) => void
|
||||
onClose: () => void
|
||||
isSubmitting?: boolean
|
||||
onDelete?: () => void
|
||||
isDeleting?: boolean
|
||||
}
|
||||
|
||||
export function RouteEncounterFormModal({
|
||||
@@ -15,6 +17,8 @@ export function RouteEncounterFormModal({
|
||||
onSubmit,
|
||||
onClose,
|
||||
isSubmitting,
|
||||
onDelete,
|
||||
isDeleting,
|
||||
}: RouteEncounterFormModalProps) {
|
||||
const [search, setSearch] = useState('')
|
||||
const [pokemonId, setPokemonId] = useState(encounter?.pokemonId ?? 0)
|
||||
@@ -52,6 +56,8 @@ export function RouteEncounterFormModal({
|
||||
onClose={onClose}
|
||||
onSubmit={handleSubmit}
|
||||
isSubmitting={isSubmitting}
|
||||
onDelete={onDelete}
|
||||
isDeleting={isDeleting}
|
||||
>
|
||||
{!encounter && (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user