Integrate Employer Fatigue Dashboard with Backend Fatigue Logic - #494
Open
allistyre wants to merge 4 commits into
Open
Integrate Employer Fatigue Dashboard with Backend Fatigue Logic#494allistyre wants to merge 4 commits into
allistyre wants to merge 4 commits into
Conversation
Collaborator
Author
|
The latest main conflicts have been resolved and all CI checks have passed |
LoopyB
requested changes
Aug 12, 2026
LoopyB
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Alli, this is great work and the overall approach looks solid. Thanks for your amazing effort in getting this done. The Backend is now the source of truth for fatigue calculations and the duplicated Frontend fatigue logic has been removed.
I’ve found one blocking issue before merge:
/shifts/fatigueis currently declared after/:id, so Express may match"fatigue"as the shift ID and never reach the fatigue controller. Please could you move the static/fatigueroute above/:id.
I’d also like a few focused automated tests around the new endpoint, particularly:
- route resolution;
- employer authorization/scoping;
- normal/fatigued/empty scenarios.
There are a couple of smaller non-blocking comments around the modal/date handling and formatting churn, but the core architecture is sound.
Once the route and focused tests are done, I’m happy to review again. Great work!
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.
Summary
This push builds from the Shift Fatigue Monitoring section from PR #397 and instead integrates the Employer Fatigue Dashboard with the existing backend fatigue logic, replacing the duplicated frontend fatigue calculations identified in PR #397
Changes
Testing