Conversation
Senior staff goals converted from new staff goals (MPDX-9865) are marked readOnly by the API and reject every mutation. Fetch the new readOnly field, expose isReadOnly through GoalCalculatorContext, and disable all calculator inputs (autosave fields, SECA select, geographic location autocomplete, budget grids' cell editing, add/delete line items, and lump sum/line item toggles) while still showing the inputs and calculated totals. Hide the delete button and show a Read-Only badge on read-only goal cards. Co-Authored-By: Claude Fable 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.
Description
GoalCalculation.readOnlyfield and rejects all mutations (including deletion) against read-only goals. Read-only goals are created automatically when a new staff member reports (MPDX-9865).readOnlyfield in the goal calculator and goals list queries, and exposeisReadOnlythroughGoalCalculatorContext.useGoalAutoSavehook), the SECA status select, the geographic location autocomplete, budget grid cell editing, Add Line Item and delete line-item actions, the Lump Sum/Line Item mode toggle, and the lump sum total field.GoalCard.onDeleteis now optional).Note: until the API PR reaches staging,
yarn gqlon this branch needs a staging schema snapshot withreadOnlygrafted on (API_URL=<snapshot file> yarn gql).Testing
UPDATE goal_calculations SET read_only = true WHERE id = '...'on staging, or mockreadOnly: truelocally)Checklist:
/pr-reviewcommand locally and fixed any relevant suggestions🤖 Generated with Claude Code