Skip to content

Recent Activations fieldset: shared lib + Team Edit - #436

Merged
OSPFNeighbour merged 1 commit into
master-devfrom
feat/recent-activations-team-edit
Sep 8, 2026
Merged

Recent Activations fieldset: shared lib + Team Edit#436
OSPFNeighbour merged 1 commit into
master-devfrom
feat/recent-activations-team-edit

Conversation

@OSPFNeighbour

Copy link
Copy Markdown
Collaborator

What

Follow-up to #421 / #422. The "Recent myAvailability Activation Requests" fieldset — expand a recent activation for the assigned-to unit, click an Accepted / Available / Conditional responder straight into the team — was inline in the Team Create inject script. This extracts it and adds it to Team Edit.

  • src/lib/teamRecentActivations.js (new): the whole fieldset, exporting initRecentActivationsFieldset(vm) and addTeamMemberById(vm, memberId), parameterised on the Beacon team-form viewmodel — Create exposes it as teamViewModel, Edit as vm.
  • injectscripts/teams/create.js: ~280 lines removed, now requires the lib and calls initRecentActivationsFieldset(teamViewModel); the ?lhmembers= prefill path uses recentActivations.addTeamMemberById(teamViewModel, id).
  • injectscripts/teams/edit.js: wires in initRecentActivationsFieldset(vm).
  • styles/teams.create.cssstyles/teams.recent-activations.css: pure rename (content unchanged), now loaded by both the create and edit content scripts.

Behaviour

  • Team Create: no change — same fieldset, same code path.
  • Team Edit: gains the fieldset (before the member-search fieldset).
  • The prod-only gating + train/dev placeholder from Add Recent Activations widget to Team Create #422 carry over unchanged (isProductionBeaconApi() moved into the lib).

Provenance / testing

This packages work that was sitting in the working tree; I extracted and branched it, I didn't author the fieldset. webpack --config webpack.dev.js compiles and eslint is clean, but I have not run it against Beacon — the injected-DOM / mams-Lambda behaviour needs a check on a real Team Edit page (prod) and a train/dev page (placeholder).

🤖 Generated with Claude Code

The "Recent myAvailability Activation Requests" fieldset (expand a recent
unit activation, click an Accepted/Available/Conditional responder
straight into the team) lived inline in the Team Create inject script.

- move it to src/lib/teamRecentActivations.js, exporting
  initRecentActivationsFieldset(vm) + addTeamMemberById(vm, memberId),
  parameterised on the team-form viewmodel (Create exposes it as
  `teamViewModel`, Edit as `vm`)
- wire it into the Team Edit inject script
- rename styles/teams.create.css -> teams.recent-activations.css (content
  unchanged) and load it from both the create and edit content scripts

No behaviour change on Team Create; Team Edit gains the fieldset. The
train/dev placeholder and prod-only gating (#422) carry over unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@OSPFNeighbour
OSPFNeighbour merged commit e6c8507 into master-dev Sep 8, 2026
@OSPFNeighbour
OSPFNeighbour deleted the feat/recent-activations-team-edit branch September 8, 2026 03:36
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