-
Notifications
You must be signed in to change notification settings - Fork 61
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
chore(j-s): Arraignment Date Lock #16153
Conversation
WalkthroughThe changes in this pull request focus on updating the logic within the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
apps/judicial-system/web/src/routes/Court/Indictments/Subpoena/Subpoena.tsx (2)
172-175
: Consider clarifying the different navigation behaviorsThe change to use
isArraignmentScheduled
for determining the navigation behavior is good. However, the different actions taken (direct navigation vs. setting state) depending on the arraignment status might be confusing. Consider adding a comment explaining why these behaviors differ, or refactor to make the logic more consistent.You could add a comment like this:
// If arraignment is scheduled, navigate directly. // Otherwise, set navigateTo to trigger the confirmation modal. if (isArraignmentScheduled) { router.push(`${constants.INDICTMENTS_DEFENDER_ROUTE}/${workingCase.id}`) } else { setNavigateTo(constants.INDICTMENTS_DEFENDER_ROUTE) }
179-181
: Consider explicit button text for both casesWhile the change to vary the button text based on
isArraignmentScheduled
is good, setting it toundefined
when an arraignment is scheduled might not be the best approach. Consider providing explicit text for both cases to improve clarity and user experience.You could modify the code like this:
nextButtonText={ isArraignmentScheduled ? formatMessage(strings.continueButtonText) : formatMessage(strings.nextButtonText) }Don't forget to add the
continueButtonText
to your string resources.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- apps/judicial-system/web/src/routes/Court/Indictments/Subpoena/Subpoena.tsx (4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/judicial-system/web/src/routes/Court/Indictments/Subpoena/Subpoena.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments not posted (2)
apps/judicial-system/web/src/routes/Court/Indictments/Subpoena/Subpoena.tsx (2)
49-49
: LGTM: Clear and purposeful variable introductionThe introduction of
isArraignmentScheduled
is a good approach to determine if an arraignment date has been set. This boolean will be useful for controlling the locking mechanism mentioned in the PR objectives.
137-138
: LGTM: Effective implementation of locking mechanismThe changes to
dateTimeDisabled
andcourtRoomDisabled
props effectively implement the locking mechanism for subpoena fields once an arraignment date is set. This aligns perfectly with the PR objectives and ensures that these critical fields cannot be modified after subpoenas have been issued.
apps/judicial-system/web/src/routes/Court/Indictments/Subpoena/Subpoena.tsx
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16153 +/- ##
==========================================
+ Coverage 36.63% 36.65% +0.01%
==========================================
Files 6771 6769 -2
Lines 139481 139406 -75
Branches 39672 39644 -28
==========================================
- Hits 51100 51098 -2
+ Misses 88381 88308 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 338 Passed, 0 Skipped, 1m 7.47s Total Time |
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Arraignment Date Lock
Reitir á "Fyrirkall" skjá - gera þá disabled fyrr
What
Why
Screenshots / Gifs
Screen.Recording.2024-09-25.at.14.47.21.mov
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes