Skip to content

[team] Add per-project role management to the team page#2161

Open
frankrousseau wants to merge 7 commits into
cgwire:mainfrom
frankrousseau:feat/per-project-roles
Open

[team] Add per-project role management to the team page#2161
frankrousseau wants to merge 7 commits into
cgwire:mainfrom
frankrousseau:feat/per-project-roles

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problem

Solution

  • Role select per team member showing the effective role; picking the person's global role back restores inheritance, admin members stay text-only
  • Team roles stored in the productions store and the page gated by a new isCurrentUserProductionManager getter (project role first, global fallback)
  • Team.vue and ProductionTeamList.vue converted to composition API on the way

frankrousseau and others added 7 commits July 23, 2026 23:39
Role select per team member showing the effective role: picking the
person's global role back restores inheritance, admins stay text-only.
Team roles live in the productions store (currentTeamRoles) and the page
is gated by the new isCurrentUserProductionManager getter, so per-project
managers get the team controls and demoted managers lose them.
Team.vue and ProductionTeamList.vue converted to composition API on the
way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Blue accent on the role select and text plus a tooltip showing the
person's global role whenever an explicit project role is set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The blue border read poorly: a small Project role tag next to the
select marks members whose project role overrides their global role,
with the global role in the tooltip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ingest the project_roles map exposed by GET /data/user/context
(cgwire/zou#1178) into the user store and derive
currentUserEffectiveRole, isCurrentUserProductionManager and
isCurrentUserProductionSupervisor from it. The Team page getter moves
from the production team fetch to the context map, and changing your
own role updates the map so the gating follows immediately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First migration wave from global role getters to per-production
effective roles: entity lists, task lists and the metadata modal swap to
isCurrentUserProductionManager / isCurrentUserProductionSupervisor.
TaskInfo and ActionPanel also serve cross-production views (Todos, All
Tasks, checks, notifications) where the current production can differ
from the displayed task's one: they resolve the role through the new
currentUserRoleForProduction(productionId) getter keyed on the task's
production. AllTaskList keeps global getters (cross-production view).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Second wave: production-routed pages (task, playlist, task type,
schedule, breakdown, entity pages and lists, production settings and
brief, estimation helper, breakdown shot line) and the entity mixins
swap to the per-production effective role getters. Task.vue is safe on
currentProduction: the topbar route watcher syncs it on every
navigation, including arrivals from Todos or notifications. Deferred
with reasons (wave 3): PlaylistPlayer and PlaylistedEntity (temp
playlists can mix productions, shared player runs unauthenticated),
MetadataField, MetadataInput, TableMetadataSelectorMenu and the
descriptors mixin (consumed by cross-production views), AssetLibrary
(cross-production route, currentProduction never synced).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Third and last wave: comment and annotation affordances in the
playlist player and the comment widgets resolve through the displayed
entity or task production (temp playlists can mix productions); the
metadata widgets and the search query list take the production from
the entity or a productionId prop wired by production-scoped pages,
with a global-role fallback preserving cross-production consumers.
Playlist editing actions, the department combobox and the descriptors
mixin stay on global gating, with reasons recorded in the wave
report. The shared players remain untouched (unauthenticated).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant