/rh/staff-operations/shift-notes displays a date-navigable log of shift notes for recovery housing operations and allows staff to create new notes via a dialog.
Overview
The page loads shift notes viauseShiftNotes, which queries the rh_shift_notes table joined to rh_residences, filtered by organization_id and ordered by shift_date and shift_time descending. The default filter sets shiftDate to today’s date using format(new Date(), 'yyyy-MM-dd'). A date navigator (previous/next day buttons and a “Today” shortcut) updates shiftDate in the filter state using addDays / subDays from date-fns. A residence select (from useResidences) and a shift-type select (day, evening, overnight) refine the table. The Create Shift Note button opens ShiftNoteDialog. Individual note rows link to /rh/staff-operations/shift-notes/:id.
Who it’s for
No route-levelRequirePermission beyond the outer RHViewGuard, which requires RH_PERMISSIONS.DASHBOARD_VIEW (rh.dashboard.view). STAFF_OPERATIONS_VIEW (rh.staff-operations.view) and STAFF_OPERATIONS_CREATE (rh.staff-operations.create) exist in RH_PERMISSIONS but are not applied as route-level guards on this path.
Before you start
- Hold
rh.dashboard.viewto access the RH module. - Identify the residence and shift type relevant to the note you want to review or create.
Steps
Open Shift Notes
/rh/staff-operations/shift-notes. The table loads today’s shift notes by default, ordered by most recent shift first.Navigate to a different date
Filter by residence or shift type
Day, Evening, Overnight) to narrow the results. Select “All Residences” or “All Shifts” to clear each filter.Review existing notes
Create a new shift note
ShiftNoteDialog opens. Complete the form fields and save. The table refreshes with the new entry.View note details
/rh/staff-operations/shift-notes/:id for the full shift note detail view.Key concepts
Shift types
Shift types
day, evening, and overnight. These correspond to the shift_type column on rh_shift_notes. The semantic meaning within each program’s schedule should be confirmed with a subject-matter expert.Residence filter
Residence filter
useResidences, which queries rh_residences scoped to the current organization. Selecting a residence sets residenceId in the filter, which maps to residence_id on rh_shift_notes.Data table
Data table
ShiftNotesTable with filters passed as props. The useShiftNotes hook is enabled only when organizationId is present, using useOrganization for tenant isolation.Viewing a shift note
The Shift Note Details screen displays the full record for a single shift note entry at/rh/staff-operations/shift-notes/:id.
The Shift Note Details screen fetches a single record from rh_shift_notes joined with rh_residences for the associated residence name. The page header displays the shift date and a badge for shift type (Day Shift, Evening Shift, Overnight Shift). An “Edit” button opens an inline ShiftNoteDialog. Four content cards are rendered when data is present: Shift Information (residence name, date, shift type, shift time), Resident Status (narrative status text), Daily Operations (free-text operations notes), and Significant Events (free-text event notes). An Additional Notes card appears when the notes field is populated.
Protected by rh.dashboard.view via RHViewGuard. The shift note record must exist; navigating to an invalid :id renders a “Shift note not found” message.
Open a shift note
/rh/staff-operations/shift-notes, click a row to navigate to its detail page, or go directly to /rh/staff-operations/shift-notes/:id.Review shift information
Review resident status
Review daily operations and events
Review additional notes
notes field is populated, an Additional Notes card is rendered below the Significant Events card.Edit the shift note
Shift types
Shift types
day (Day Shift), evening (Evening Shift), and overnight (Overnight Shift). The shift type badge style varies by type: day uses the default badge, evening uses the secondary badge, and overnight uses the outline badge.Conditional sections
Conditional sections
daily_operations, significant_events, notes) contains a value. Absence of a card means no content was recorded.PHI in shift notes
PHI in shift notes
rh.dashboard.view and tenant-scoped via RLS on rh_shift_notes.Creating a shift note
The path/rh/staff-operations/shift-notes/new is not registered as a <Route> in src/routes/rh.tsx and does not resolve to a standalone component.
New shift notes are created via the ShiftNoteDialog modal, which opens from the “Create Shift Note” button on the Shift Notes list page at /rh/staff-operations/shift-notes. The dialog renders ShiftNoteForm, which accepts residence, shift date, shift time, shift type (day, evening, overnight), daily operations, significant events, resident status, and a free-text notes field. The form supports auto-save on existing notes (interval configured via module settings).
Requires rh.dashboard.view through the parent RHViewGuard. Navigate to /rh/staff-operations/shift-notes and click “Create Shift Note” to open the creation dialog.
Open Shift Notes list
/rh/staff-operations/shift-notes.Click Create Shift Note
Fill in the form
Submit
Related
Recovery Housing
Governance & parity
Documentation sources
Documentation sources
- src/routes/rh.tsx
- src/cores/rh/pages/ShiftNotesPage.tsx
- src/cores/rh/pages/ShiftNoteDetailPage.tsx
- src/cores/rh/hooks/useShiftNotes.ts
- src/cores/rh/hooks/useShiftNoteDetail.ts
- src/cores/rh/components/forms/ShiftNoteDialog.tsx
- src/cores/rh/components/forms/ShiftNoteForm.tsx
- src/cores/rh/types/index.ts
- src/platform/permissions/constants.ts