Mariano/risk improvements - #267
Conversation
…mas, actions, and components for improved clarity and consistency
…rity - Removed redundant risk level translation logic from InherentRiskVendorChart and ResidualRiskVendorChart components. - Updated layout for better responsiveness in risk chart headers. - Enhanced visual representation of risk levels by adjusting styles in risk chart cells. - Cleaned up form submission logic in InherentRiskForm and ResidualRiskForm by removing console logs and ensuring router refresh after successful submissions.
…dates - Integrated useSearchParams in InherentRiskForm and ResidualRiskForm for better state management. - Updated form submission logic to force page refresh instead of router manipulation. - Added descriptive labels to select fields for clarity on risk levels. - Cleaned up unnecessary comments and improved toast notifications for user feedback.
- Changed assigneeId in createRiskSchema, updateRiskSchema, createTaskSchema, updateTaskSchema, and updatePolicyFormSchema to be optional and nullable for improved flexibility in form submissions.
… and UI - Added visual order for likelihood rendering in InherentRiskVendorChart and ResidualRiskVendorChart for better clarity. - Streamlined grid cell rendering logic to improve performance and maintainability. - Updated form submission logic in InherentRiskForm and ResidualRiskForm to ensure proper page refresh and state management after successful updates. - Removed unnecessary console logs and improved user feedback through toast notifications.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request refactors a large portion of the codebase to transition from using “owner” terminology to “assignee” terminology. Changes span multiple layers including action files, form components, UI elements, API endpoints, Prisma schema definitions, and SQL migration scripts. Most modifications involve renaming variables (e.g. ownerId to assigneeId), updating props and types, and adjusting query logic and UI components with minor formatting improvements. The overall functionality remains intact while adopting a consistent assignee-centered structure across tasks, vendors, risks, and related API responses. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant RF as RiskForm Component
participant QS as QueryState Hook
participant API as Risk API
U->>RF: Fill out risk form & submit
RF->>API: POST risk data with assigneeId
API-->>RF: Return success/error response
RF->>QS: Update query state (set open to null) & update URL
QS-->>RF: URL updated, form closed
sequenceDiagram
participant U as User
participant VS as VendorSheet Component
participant VF as VendorForm Component
participant API as Vendor API
U->>VS: Open vendor creation sheet
VS->>VF: Render form with available assignees
U->>VF: Fill out form, select an assignee
VF->>API: Submit vendor creation with assigneeId
API-->>VF: Return vendor creation confirmation
VF->>VS: Close sheet and update vendor list
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (56)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Refactor & Style