-
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
fix(j-s): Enable send to prison admin if service not required #17045
Conversation
WalkthroughThe changes in this pull request modify the logic for enabling the "Send to Prison Admin" button 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: 0
🧹 Outside diff range and nitpick comments (1)
apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx (1)
351-351
: LGTM! Consider adding a comment to explain the condition.The logic correctly implements the PR objective by allowing indictments to be sent to prison admin when service is not required, while maintaining the requirement for
verdictViewDate
when service is required.Consider adding a comment to explain the condition:
disabled={ !workingCase.indictmentReviewDecision || + // Require verdictViewDate only when service is required (!isFine && !defendant.verdictViewDate && serviceRequired) }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.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."
📓 Learnings (1)
apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx (3)
Learnt from: oddsson
PR: island-is/island.is#16495
File: apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx:102-103
Timestamp: 2024-11-12T15:15:11.835Z
Learning: In the TypeScript file `apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx`, within the `handleSetDate` function, the else block is intentionally kept to handle an unlikely scenario and should not be removed, even if it appears unnecessary due to prior validation checks.
Learnt from: oddsson
PR: island-is/island.is#16495
File: apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx:84-105
Timestamp: 2024-11-12T15:15:11.835Z
Learning: In `apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx`, the `setAndSendDefendantToServer` function handles errors internally, so additional error handling when calling it is not necessary.
Learnt from: oddsson
PR: island-is/island.is#16831
File: apps/judicial-system/web/src/components/BlueBoxWithIcon/BlueBoxWithDate.tsx:204-337
Timestamp: 2024-11-19T09:28:36.448Z
Learning: Buttons in this project are considered accessible as is, and adding additional ARIA attributes like `aria-label` and `aria-disabled` is not required unless specifically needed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17045 +/- ##
==========================================
- Coverage 35.69% 35.68% -0.01%
==========================================
Files 6939 6937 -2
Lines 147081 147063 -18
Branches 41832 41839 +7
==========================================
- Hits 52495 52481 -14
+ Misses 94586 94582 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 15 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 335 Passed, 0 Skipped, 1m 15.2s Total Time |
Ríksak - ekki er hægt að senda til fullnustu ef ekki þurfti að birta dóminn
What
Allow indictment to be sent to prison admin if it doesn't require servicing
Why
Because it should be allowed
Checklist:
Summary by CodeRabbit