Skip to content

Add Endangered filter to heritage search form #306

@zigzagdev

Description

@zigzagdev

Summary

Surface a filter for is_endangered so users can scope search results to endangered heritage sites.

Scope

  • Domain
    • Add is_endangered: boolean | null to HeritageSearchParams in client/src/domain/types.ts (or boolean defaulting to false; nullability decided alongside parent)
    • Update parseHeritageSearchParams / serializeHeritageSearchParams in client/src/app/features/search/mapper/search-heritages.params.ts
  • API
    • Wire the new param into client/src/app/features/search/apis/search-api.ts once backend support is confirmed
  • UI
    • Add a single checkbox "Endangered only / 危機遺産のみ表示" to HeritageSearchForm. Off = no filter, on = endangered only.
    • Add endangeredOnly ui-text key to en / ja ui.json
  • Tests
    • Param parse / serialize round-trip
    • Form interaction smoke test

Acceptance criteria

  • Toggling the checkbox narrows the result list
  • URL reflects the flag (e.g. ?is_endangered=true); empty / off state omits the param
  • Tests cover the new field

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions