Skip to content

spatial-monorepo


spatial-monorepo / verticals/src / useEmployeeLocator

Function: useEmployeeLocator()

useEmployeeLocator(employeeId): EmployeeLocatorResult

Defined in: packages/verticals/src/components/OfficeProfile.tsx:247

F19 — resolves an employeeId (== RTLS assetId) to the current IMDF unit, floor, and raw PositionUpdate. Returns null when position is unknown.

locateEmployee(id) flies the camera to the employee's floor and selects the unit in Zustand selectionSlice.

Requires <OfficeProfile rtlsAdapter={…}>; when no rtlsAdapter is configured, useRTLS is still called (with a no-op adapter) so hook order stays stable across renders — see #557.

Parameters

employeeId

string

Returns

EmployeeLocatorResult

Released under commercial licensing.