The location-aware pages
The canonical list lives in ExpiringHeaderComponent.locationPageFinished[]. Any route registered here renders the inline picker in its header and re-evaluates its data when the picker changes.
The current entries are:
- dashboard
- classes
- calendar
- users
- reports
- schedule-calendar
- appointments
- locations
- roles
- receipt-printer
- online-payment
If a new page needs to be location-aware, adding its route name to this array is the single switch that turns the behaviour on.
What changes when you switch
Each store on a location-aware page injects LocationStore and narrows its computed signals using selected()?.locationId. When you change the picker, the signal flips and every downstream list, count, and chart recomputes.
Typical visible changes are:
- The dashboard tile totals re-aggregate to the new branch only.
- The classes, calendar, and schedule-calendar lists show only sessions hosted at the selected branch.
- The users page filters down to customers with activity at the branch.
- The reports page restricts every chart and export to branch-level rows.
- The receipt-printer and online-payment screens show only the hardware and gateways configured for that branch.
Pages NOT filtered by location
Anything not listed in locationPageFinished[] is intentionally global. The picker is hidden on those pages, and changing the picker on another page does not alter their data.
This is the right behaviour for settings that belong to the whole account rather than a single branch, including most billing screens, account information, integrations, and brand-level configuration. If you find a page that you believe should be branch-scoped but is not, treat it as a configuration question: the fix is to register the route in locationPageFinished[] and make sure the page's store reads selected()?.locationId.
When in doubt, look for the inline picker in the header. If it is there, the page is location-aware. If it is missing, the page is account-wide.
