Skip to content
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

feat(j-s): Event to handle case sent to public prosecutor #15288

Merged
merged 7 commits into from
Jun 21, 2024

Conversation

unakb
Copy link
Member

@unakb unakb commented Jun 19, 2024

Héraðsdómur á ekki að þurfa að taka afstöðu til birtingar dóms oftar en einu sinni

What

Created an event that signals that an indictment case has been sent to the public prosecutors office

Why

So that district court judges can see which cases they've sent and so we can hide the button and service requirement choices once they've been decided.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Introduced an Event Log module to track events in the judicial system.
    • Added functionality to log events such as INDICTMENT_SENT_TO_PUBLIC_PROSECUTOR.
  • Enhancements

    • Updated endpoint URL in authentication service to match the new event log structure.
    • Improved conditional rendering and event logging in the indictments completion page.
  • Bug Fixes

    • Added error handling for event logging failures.
  • Documentation

    • Added GraphQL mutation for creating event logs.
  • Refactor

    • Renamed routes and removed logger injection in Event Log controller for consistency.

@unakb unakb requested a review from a team as a code owner June 19, 2024 16:10
Copy link
Contributor

coderabbitai bot commented Jun 19, 2024

Walkthrough

The changes introduce an Event Logging feature to the judicial system application. Key additions include the EventLogModule for managing event logs, new GraphQL mutations for logging events, and updates to existing services and components to support event logging. These modifications enhance the system's ability to track and manage events related to cases more effectively.

Changes

Files/Paths Change Summary
app.module.ts Added import and inclusion of EventLogModule.
backend.ts Introduced EventType, UserRole, and CreateEventLogInput imports, added createEventLog method in BackendApi class.
index.ts (under modules/) Exported EventLogModule.
auth.service.ts Modified fetch call endpoint URL.
case.model.ts Changed the import source of EventLog.
createEventLog.input.ts Introduced CreateEventLogInput class with validation and GraphQL integration.
eventLog.config.ts Introduced configuration settings for Event Log module.
eventLog.module.ts Created EventLogModule with EventLogResolver as provider.
eventLog.resolver.ts Added EventLogResolver with createEventLog mutation for logging events.
index.ts (under event-log/) Exported CreateEventLogInput and EventLog.
eventLog.model.ts Removed an empty line.
eventLog.controller.ts Renamed routes, updated controller paths, and removed logger injection.
Completed.tsx Added EventType import, modified useDefendants hook, introduced useEventLog hook, and added logic for event logging and conditional rendering.
createEventLog.graphql Introduced a GraphQL mutation CreateEventLog.
errors.ts Added error message for event logging failure.
eventLog.ts Added INDICTMENT_SENT_TO_PUBLIC_PROSECUTOR event type to EventType enum.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fe1a351 and 436dc00.

Files selected for processing (15)
  • apps/judicial-system/api/src/app/app.module.ts (2 hunks)
  • apps/judicial-system/api/src/app/data-sources/backend.ts (3 hunks)
  • apps/judicial-system/api/src/app/modules/auth/auth.service.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/case/models/case.model.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/dto/createEventLog.input.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.config.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.module.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/index.ts (1 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/models/eventLog.model.ts (1 hunks)
  • apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts (1 hunks)
  • apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx (3 hunks)
  • apps/judicial-system/web/src/utils/hooks/useEventLog/createEventLog.graphql (1 hunks)
  • apps/judicial-system/web/src/utils/hooks/useEventLog/index.ts (1 hunks)
  • libs/judicial-system/types/src/lib/eventLog.ts (1 hunks)
Files not reviewed due to errors (1)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (no review received)
Files skipped from review due to trivial changes (4)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.config.ts
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.module.ts
  • apps/judicial-system/api/src/app/modules/event-log/index.ts
  • apps/judicial-system/api/src/app/modules/event-log/models/eventLog.model.ts
Additional context used
Path-based instructions (11)
apps/judicial-system/web/src/utils/hooks/useEventLog/createEventLog.graphql (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."
libs/judicial-system/types/src/lib/eventLog.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
apps/judicial-system/api/src/app/modules/event-log/dto/createEventLog.input.ts (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."
apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts (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."
apps/judicial-system/web/src/utils/hooks/useEventLog/index.ts (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."
apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (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."
apps/judicial-system/api/src/app/app.module.ts (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."
apps/judicial-system/api/src/app/modules/auth/auth.service.ts (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."
apps/judicial-system/api/src/app/data-sources/backend.ts (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."
apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.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."
apps/judicial-system/api/src/app/modules/case/models/case.model.ts (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."
Biome
apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts

[error] 16-16: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts

[error] 20-20: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 26-26: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 28-28: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 29-29: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

apps/judicial-system/api/src/app/modules/auth/auth.service.ts

[error] 30-30: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 32-32: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 121-125: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.

Additional comments not posted (12)
apps/judicial-system/web/src/utils/hooks/useEventLog/createEventLog.graphql (1)

1-3: The GraphQL mutation definition for CreateEventLog looks concise and correctly formatted.

libs/judicial-system/types/src/lib/eventLog.ts (1)

9-9: Adding INDICTMENT_SENT_TO_PUBLIC_PROSECUTOR to the EventType enum aligns with the PR's objectives and ensures that new events can be handled appropriately.

apps/judicial-system/api/src/app/modules/event-log/dto/createEventLog.input.ts (1)

1-22: The CreateEventLogInput class is well-defined with appropriate use of decorators to ensure that the fields meet the validation and GraphQL schema requirements. The use of @IsOptional() on caseId and nationalId fields allows flexibility in logging events that might not always be tied to a specific case or user.
[APROVED]

apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts (2)

1-14: The controller setup with TokenGuard ensures secure access to the event logging endpoint. The route and method decorators are correctly used to define the API's behavior.


16-16: There seems to be a misunderstanding in the static analysis tool's error message about decorators. Since there are no decorators used incorrectly in this snippet, this issue can be ignored.

Tools
Biome

[error] 16-16: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

apps/judicial-system/api/src/app/app.module.ts (1)

17-17: The inclusion of EventLogModule in the application module is correctly implemented.

Also applies to: 71-71

apps/judicial-system/api/src/app/modules/auth/auth.service.ts (1)

173-173: The update to the fetch URL for event logging is correctly implemented and aligns with the new API endpoint structure.

apps/judicial-system/api/src/app/data-sources/backend.ts (1)

11-13: The import additions for EventType, UserRole, and CreateEventLogInput are correctly implemented and necessary for the new functionality.

Also applies to: 25-25

apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx (3)

29-29: The import of EventType and useEventLog are correctly implemented for the new event logging functionality.

Also applies to: 37-37


49-49: The useEventLog hook is correctly utilized to access the createEventLog function, which is used appropriately to log events under specific conditions.

Also applies to: 67-71


140-272: The conditional rendering based on the sentToPublicProsecutor state is correctly implemented to dynamically adjust UI components based on the case's event log status.

apps/judicial-system/api/src/app/modules/case/models/case.model.ts (1)

29-29: The addition of the EventLog import is correctly implemented to support the new event logging functionality in the Case model.

@datadog-island-is
Copy link

datadog-island-is bot commented Jun 19, 2024

Datadog Report

All test runs 279c2bb 🔗

8 Total Test Services: 0 Failed, 8 Passed
🔻 Test Sessions change in coverage: 3 decreased, 3 increased, 5 no change

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
judicial-system-api 0 0 0 54 0 10.62s 1 decreased (-0.2%) Link
judicial-system-backend 0 0 0 20346 0 16m 7.03s 1 no change Link
judicial-system-formatters 0 0 0 36 0 10.01s 1 increased (+0.02%) Link
judicial-system-message 0 0 0 29 0 15.29s 1 no change Link
judicial-system-message-handler 0 0 0 3 0 8.49s 1 increased (+0.03%) Link
judicial-system-types 0 0 0 19 0 13.66s 1 decreased (-0.1%) Link
judicial-system-web 0 0 0 312 0 1m 14.75s 1 decreased (-0.08%) Link
judicial-system-xrd-api 0 0 0 6 0 15.43s 1 increased (+0.03%) Link

🔻 Code Coverage Decreases vs Default Branch (3)

  • judicial-system-api - jest 19.41% (-0.2%) - Details
  • judicial-system-types - jest 53.13% (-0.1%) - Details
  • judicial-system-web - jest 32.5% (-0.08%) - Details

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 1.26582% with 78 lines in your changes missing coverage. Please review.

Project coverage is 37.16%. Comparing base (cdcb448) to head (ebbf079).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #15288      +/-   ##
==========================================
+ Coverage   37.14%   37.16%   +0.01%     
==========================================
  Files        6499     6481      -18     
  Lines      132176   131815     -361     
  Branches    37797    37678     -119     
==========================================
- Hits        49100    48991     -109     
+ Misses      83076    82824     -252     
Flag Coverage Δ
api 3.47% <ø> (ø)
api-domains-mortgage-certificate 35.00% <ø> (ø)
application-ui-shell 21.62% <ø> (ø)
clients-syslumenn 49.53% <ø> (ø)
judicial-system-api 17.95% <2.70%> (-0.19%) ⬇️
judicial-system-formatters 81.40% <100.00%> (+0.02%) ⬆️
judicial-system-message 66.06% <ø> (+0.06%) ⬆️
judicial-system-types 48.88% <0.00%> (-0.10%) ⬇️
judicial-system-web 28.24% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
apps/judicial-system/api/src/app/app.module.ts 0.00% <ø> (ø)
...src/app/modules/event-log/models/eventLog.model.ts 0.00% <ø> (ø)
apps/judicial-system/web/messages/Core/errors.ts 100.00% <ø> (ø)
libs/judicial-system/types/src/lib/eventLog.ts 100.00% <100.00%> (ø)
...al-system/api/src/app/modules/auth/auth.service.ts 0.00% <0.00%> (ø)
...stem/api/src/app/modules/case/models/case.model.ts 0.00% <0.00%> (ø)
apps/judicial-system/api/src/app/modules/index.ts 0.00% <0.00%> (ø)
...udicial-system/api/src/app/data-sources/backend.ts 0.00% <0.00%> (ø)
...cial-system/api/src/app/modules/event-log/index.ts 0.00% <0.00%> (ø)
...d/src/app/modules/event-log/eventLog.controller.ts 0.00% <0.00%> (ø)
... and 5 more

... and 111 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdcb448...ebbf079. Read the comment docs.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 436dc00 and 39431e1.

Files selected for processing (1)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 39431e1 and 8d92edb.

Files selected for processing (5)
  • apps/judicial-system/api/src/app/data-sources/backend.ts (3 hunks)
  • apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (1 hunks)
  • apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts (1 hunks)
  • apps/judicial-system/web/messages/Core/errors.ts (1 hunks)
  • apps/judicial-system/web/src/utils/hooks/useEventLog/index.ts (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • apps/judicial-system/api/src/app/data-sources/backend.ts
  • apps/judicial-system/web/src/utils/hooks/useEventLog/index.ts
Additional context used
Path-based instructions (3)
apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts (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."
apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (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."
apps/judicial-system/web/messages/Core/errors.ts (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."
Biome
apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts

[error] 16-16: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts

[error] 20-20: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 26-26: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 28-28: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 29-29: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

Additional comments not posted (7)
apps/judicial-system/backend/src/app/modules/event-log/eventLog.controller.ts (3)

1-1: LGTM! The updated controller path adheres to typical RESTful conventions.

Also applies to: 9-9


11-11: Constructor correctly implements dependency injection for EventLogService.


14-14: The use of @Post and @ApiCreatedResponse decorators is appropriate and correctly applied.

apps/judicial-system/api/src/app/modules/event-log/eventLog.resolver.ts (3)

1-2: Imports and decorators are correctly used to secure and define GraphQL resolver functionality.

Also applies to: 16-16


19-22: Constructor correctly implements dependency injection for logging. The error flagged by static analysis is a false positive.

Tools
Biome

[error] 20-20: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


24-35: The GraphQL mutation is correctly implemented with appropriate use of decorators for parameters and context. The errors flagged by static analysis are false positives.

Tools
Biome

[error] 26-26: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 28-28: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 29-29: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

apps/judicial-system/web/messages/Core/errors.ts (1)

120-124: The addition of the new error message for event log creation failure is clear and consistent with existing error handling patterns.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8d92edb and 6c7d8c5.

Files selected for processing (1)
  • apps/judicial-system/api/src/app/data-sources/backend.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/judicial-system/api/src/app/data-sources/backend.ts

Copy link
Member

@gudjong gudjong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6c7d8c5 and ac9ad60.

Files selected for processing (4)
  • apps/judicial-system/api/src/app/app.module.ts (2 hunks)
  • apps/judicial-system/api/src/app/modules/index.ts (1 hunks)
  • apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx (2 hunks)
  • apps/judicial-system/web/src/utils/hooks/useEventLog/index.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • apps/judicial-system/api/src/app/modules/index.ts
Files skipped from review as they are similar to previous changes (3)
  • apps/judicial-system/api/src/app/app.module.ts
  • apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx
  • apps/judicial-system/web/src/utils/hooks/useEventLog/index.ts

@unakb unakb added the automerge Merge this PR as soon as all checks pass label Jun 20, 2024
@kodiakhq kodiakhq bot merged commit 110e634 into main Jun 21, 2024
48 checks passed
@kodiakhq kodiakhq bot deleted the j-s/send-and-save-service-requirement branch June 21, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants