Add pokemon status management with death tracking
Implement status change workflow (alive → dead) with confirmation modal, death cause recording, and visual status indicators on pokemon cards. Includes backend migration for death_cause field and graveyard view on the run dashboard. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -121,7 +121,12 @@ export function RunEncounters() {
|
||||
|
||||
const handleUpdate = (data: {
|
||||
id: number
|
||||
data: { nickname?: string; status?: EncounterStatus; faintLevel?: number }
|
||||
data: {
|
||||
nickname?: string
|
||||
status?: EncounterStatus
|
||||
faintLevel?: number
|
||||
deathCause?: string
|
||||
}
|
||||
}) => {
|
||||
updateEncounter.mutate(data, {
|
||||
onSuccess: () => {
|
||||
@@ -225,7 +230,9 @@ export function RunEncounters() {
|
||||
{encounter.nickname ?? encounter.pokemon.name}
|
||||
{encounter.status === 'caught' &&
|
||||
encounter.faintLevel !== null &&
|
||||
' (dead)'}
|
||||
(encounter.deathCause
|
||||
? ` — ${encounter.deathCause}`
|
||||
: ' (dead)')}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user