# Employee Maps workspace

Open Employee → Maps at [react.konverra.com/custom/project-staff-map](https://react.konverra.com/custom/project-staff-map). This is the single map entry point. Use the map selector in the page header to choose one of six main maps. Staff Map, Projects Map and FRI Map provide related options in the **Show** bar. Each main map remembers its last selected option when returning. The dropdown closes and displays that map in the same workspace. Only the selected view loads its map data. Each view keeps its own applied filters while switching, and `map_view` in the URL identifies the selected view.

**Main maps:** Staff Map (Overview, Allocations, All staff, Inductee distances); Projects Map (Current projects, Current + history); FRI Map (All stories, Story comparison); Centres Map; District Map; FT Availability Map.

Older React map URLs redirect to this page, preserving their filters. Allocation path parameters become employee/area filters, story IDs select the story view, and array/comma-separated filter formats are translated for the selected view. Menu entries and project/story Map actions use this canonical path directly.

| Map option | Legacy feature | Checks |
| --- | --- | --- |
| Staff + Projects | `/project_report/project_staff_summary` | Staff/project layers, program toggles, allocations, nearby colleagues, travel indicators, search, area filter, CSV, fullscreen and closing selected details. |
| Project Map | `/project_report/project_maps` | Program/year/area filters, FT names and experience, exact/approximate/missing locations, program colours and project links. |
| Project Summary | `/project_report/project_summary_maps` | Try 2026, 2023, and both years together. Current and historical results retain their own project links; missing saved locations are counted. |
| Allocations | `/assigned_staff/allocations/{zone?}/{state?}/{staff?}` | Choose zone, state and employee; check active allocations and ministry filters, project distances, and employee selection from the area map. |
| All Staff | `/assigned_staff/staffs` | Area and joining-date filters, located/missing staff, and View allocations opening the Allocations view. |
| Inductee distances | `/assigned_staff/new_staffs` | Select an inductee and compare staff in their base district, with distances measured from that inductee. |
| FRI Locations | `/specialstory/all_fri_locations` | Program, story type/subtype and area filters; story thumbnails, project, assigned employee and story links. |
| FRI Story Map | `/specialstory/show_location/{id}` | Administrators can choose Story map from FRI Locations or enter a numeric story record ID. This compares persecution stories in the story's state, matching the legacy behaviour. |
| Centers / KML | `/project_new/center_map` | Program, year, ICT A/B and zone filters, center details and project links. Existing role and zone restrictions apply; KML download remains administrator-only. |
| District Maps | `/project_report/district_maps` | Strategy program/year/area filters, district options, flagged project links and Banswara information where available. |
| State–FT Map | `/ft_availability/map` | Field trainer availability by year and area, district totals and mandal drill-down. |

## Regression checks

- Use **Hide header** and **Hide sidebar** independently. **Full map** hides both; the compact bar keeps Back, the map selector and restore buttons available. Confirm filters, map position and selections remain, and the existing list toggles stay synchronized.

- Apply different filters in two views. Switch back and confirm each view restores its own filters.
- Reset a view and confirm its dropdown selection stays active.
- Open Maps, select a view, and confirm the menu closes. Test Escape and clicking outside to dismiss it without changing the view.
- Open allocations from All Staff, then return; confirm the joining-date and area filters remain.
- Open a shared workspace URL and confirm the selected view and applied filters load.
- Verify that an account without center/story permissions cannot open those views.
- Verify that the popup close controls remain visible, including after zooming and fitting the map.

Travel indicators represent approved plans covering today, not GPS positions. Map distances are straight-line distances. Historical summary locations use saved coordinates; opening the summary does not geocode or update projects.

## Validation performed

PHP syntax checks, ESLint, production compilation and 14 focused workspace tests passed. The Project Summary API was also exercised in a read-only local database transaction for current, historical and mixed years. Its route and authentication middleware were matched directly in the application router.

The full `artisan route:list` command is blocked by an existing duplicate `CbcTenDayMapController` declaration in `CdpTenDayMapController.php`. Full visual/browser verification remains pending.
