Skip to main content

MobilityFilters

packages/mobility/components/molecules/MobilityFilters.js · Tier: molecule · Module: mobility · Rendering: Client Component ('use client')

Purpose​

A generic filter bar that drives URL search params for the staff mobility tables. It supports a license-plate input, a date range and (optionally) an active status selector. On submit it re-navigates to the same pathname with the new params, which triggers an SSR re-fetch.

Props​

PropTypeRequiredDefaultDescription
labelsobjectyes—Localized copy (field labels, apply/reset).
showActivebooleannofalseShows the active status selector.
initial{ licensePlate?, fromDate?, toDate?, active? }yes—Initial values (re-synced from the URL).

Composition​

  • Uses: atoms/core/FormField/Button/Icon, useRouter/useSearchParams/usePathname.
  • Used by: organisms/mobility/TicketsTable, organisms/mobility/SanctionsManageList.

Internationalisation​

All copy via labels.

Accessibility​

Fields wrapped in FormField; apply/reset are labelled buttons.

molecules/core/AdminUserFilters, molecules/core/SystemTrailFilters, molecules/mobility/PaginationBar.