-
Notifications
You must be signed in to change notification settings - Fork 6
Updates to Customize Benefit Screen #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Justin-MacIntosh
commented
Nov 20, 2025
- feat: Updated Configure Benefit to allow for multiple of the same check to be added.
- feat: Updated Configure Benefit to display the most recent version of each published check.
- chore: Changed benefitResource to block UI interactions while updates are in progress.
…ck to be added. feat: Updated Configure Benefit to display the most recent version of each published check. chore: Changed benefitResource to block UI interactions while updates are in progress.
| checkResultsList.add(result); | ||
| checkResults.put(checkConfig.getCheckId(), Map.of("name", checkConfig.getCheckName(), "result", result)); | ||
|
|
||
| String uniqueCheckKey = checkConfig.getCheckId() + checkNum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing issues when there were multiple checks of the same exact ID.
| newCheck.setOwnerId(userId); | ||
| newCheck.setPublic(true); | ||
| newCheck.setVersion(1); | ||
| newCheck.setVersion(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current logic increments the version and then publishes. It's been a bear to get that function just right, so I decided to set the initial version to 0 here so the first published version isn't "2".
| const before = benefit; | ||
|
|
||
| setBenefit({ ...newBenefit }); | ||
| setActionInProgress(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to be more in line with how we're doing the other API calls. This removes the last of the "Optimistic UI" in the frontend. As snappy as that was I was experiencing some strange behaviors locally that I think had to do with Optimistic API calls. Better to just unify the pattern, especially if it's buggy.
ab2ba84 to
5684067
Compare