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:
@@ -46,19 +46,6 @@ export function AdminRuns() {
|
||||
accessor: (r) => new Date(r.startedAt).toLocaleDateString(),
|
||||
sortKey: (r) => r.startedAt,
|
||||
},
|
||||
{
|
||||
header: 'Actions',
|
||||
accessor: (r) => (
|
||||
<div className="flex gap-2" onClick={(e) => e.stopPropagation()}>
|
||||
<button
|
||||
onClick={() => setDeleting(r)}
|
||||
className="text-red-600 hover:text-red-800 dark:text-red-400 text-sm"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
@@ -73,6 +60,7 @@ export function AdminRuns() {
|
||||
isLoading={runsLoading || gamesLoading}
|
||||
emptyMessage="No runs yet."
|
||||
keyFn={(r) => r.id}
|
||||
onRowClick={(r) => setDeleting(r)}
|
||||
/>
|
||||
|
||||
{deleting && (
|
||||
|
||||
Reference in New Issue
Block a user