Recent Activations fieldset: shared lib + Team Edit - #436
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, exportinginitRecentActivationsFieldset(vm)andaddTeamMemberById(vm, memberId), parameterised on the Beacon team-form viewmodel — Create exposes it asteamViewModel, Edit asvm.injectscripts/teams/create.js: ~280 lines removed, nowrequires the lib and callsinitRecentActivationsFieldset(teamViewModel); the?lhmembers=prefill path usesrecentActivations.addTeamMemberById(teamViewModel, id).injectscripts/teams/edit.js: wires ininitRecentActivationsFieldset(vm).styles/teams.create.css→styles/teams.recent-activations.css: pure rename (content unchanged), now loaded by both the create and edit content scripts.Behaviour
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.jscompiles andeslintis 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