Add nullable region field to evolutions for regional form filtering
Regional evolutions (e.g., Pikachu → Alolan Raichu) only occur in specific regions. This adds a nullable region column so the app can filter evolutions by the game's region. When a regional evolution exists for a given trigger/item, the non-regional counterpart is automatically hidden. Full-stack: migration, model, schemas, API with region query param, seeder, Go fetch tool, frontend types/API/hook/components, and admin form. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ interface StatusChangeModalProps {
|
||||
}) => void
|
||||
onClose: () => void
|
||||
isPending: boolean
|
||||
region?: string
|
||||
}
|
||||
|
||||
const typeColors: Record<string, string> = {
|
||||
@@ -60,6 +61,7 @@ export function StatusChangeModal({
|
||||
onUpdate,
|
||||
onClose,
|
||||
isPending,
|
||||
region,
|
||||
}: StatusChangeModalProps) {
|
||||
const { pokemon, currentPokemon, route, nickname, catchLevel, faintLevel, deathCause } =
|
||||
encounter
|
||||
@@ -72,7 +74,8 @@ export function StatusChangeModal({
|
||||
|
||||
const activePokemonId = currentPokemon?.id ?? pokemon.id
|
||||
const { data: evolutions, isLoading: evolutionsLoading } = useEvolutions(
|
||||
showEvolve ? activePokemonId : null
|
||||
showEvolve ? activePokemonId : null,
|
||||
region,
|
||||
)
|
||||
|
||||
const handleConfirmDeath = () => {
|
||||
|
||||
Reference in New Issue
Block a user