spatial-monorepo / verticals/src / RoomStatusFeatureStateLayer
Function: RoomStatusFeatureStateLayer()
RoomStatusFeatureStateLayer(
__namedParameters):Element
Defined in: packages/verticals/src/components/HospitalProfile.tsx:384
Subscribes to roomStatusSource DataBus on the 'sensor' channel. Each batch item must be { unitId: string, status: RoomStatus }. For each item, calls map.setFeatureState — never reloads the source. Unknown statuses fall back to 'available'.
Also renders a small legend (LegendPanel) with the five status colours.
Issue #602 — sourceId no longer defaults to the literal 'imdf-units'. No such source is ever created (IMDF unit sources are per-level — imdf-units-<levelId>, see getIMDFSourceIds in @diginestai/core) and this component has no wired concept of "the active floor" to derive one from, so guessing a default here would just trade one wrong literal for another. Callers must pass the real, level-scoped source id (e.g. via getIMDFSourceIds(activeLevelId).units) explicitly.
Parameters
__namedParameters
sourceId?
string
Returns
Element
