Summary
With `user_gyms` in place (#136), instruktører at the same gym can now be scoped together. This issue builds the read side: when viewing history for a recurring class (e.g. "Styrke Mandag 18:00"), an instruktør should see all sessions linked to that `gym_calendar_id` — including sessions logged by co-instruktører — so the group avoids repetition across weeks.
Priority
High
Data model
No schema change needed. `sessions` already has `gym_calendar_id`. A query joining `sessions → gym_calendar` filtered by class name/time and scoped to the same `sporty_business_unit_id` (via `user_gyms`) is sufficient.
RLS will need a new SELECT policy on `sessions` that allows users to read rows where the session owner belongs to the same gym (same `sporty_business_unit_id` in `user_gyms`).
Acceptance criteria
Out of scope
- Writing or editing another instruktør's session
- Participant-side users
- Cross-gym visibility
Summary
With `user_gyms` in place (#136), instruktører at the same gym can now be scoped together. This issue builds the read side: when viewing history for a recurring class (e.g. "Styrke Mandag 18:00"), an instruktør should see all sessions linked to that `gym_calendar_id` — including sessions logged by co-instruktører — so the group avoids repetition across weeks.
Priority
High
Data model
No schema change needed. `sessions` already has `gym_calendar_id`. A query joining `sessions → gym_calendar` filtered by class name/time and scoped to the same `sporty_business_unit_id` (via `user_gyms`) is sufficient.
RLS will need a new SELECT policy on `sessions` that allows users to read rows where the session owner belongs to the same gym (same `sporty_business_unit_id` in `user_gyms`).
Acceptance criteria
Out of scope