feat(raw-deals): add grid/list toggle and bulk actions in list view#5
Open
thekavishshah wants to merge 2 commits intoRahulg321:mainfrom
Open
feat(raw-deals): add grid/list toggle and bulk actions in list view#5thekavishshah wants to merge 2 commits intoRahulg321:mainfrom
thekavishshah wants to merge 2 commits intoRahulg321:mainfrom
Conversation
|
@thekavishshah is attempting to deploy a commit to the Destiny and Rahul Projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Overview
This PR enhances the Raw Deals page by giving users a choice between a visual card grid and a compact list, plus powerful bulk actions for list mode. Now you can quickly scan deals in a table‐like view, select one or many, and apply actions in a single click.
Key Changes
Grid / List Toggle
Added a client‐side DealContainer component that wraps the existing card grid and the new list view.
Two icon buttons switch seamlessly between layouts without losing state.
Selectable List Rows
Created a DealListItem component to render each deal as a horizontal row.
Each row includes a checkbox to mark individual deals.
A “Select All” checkbox in the header toggles all visible deals at once.
Bulk Actions Toolbar
Delete Selected (red button):
Calls the existing delete-deal server action for every selected deal.
Automatically refreshes the page and clears selections.
Screen Selected (green button):
Redirects to the screening workflow (/raw-deals/screen?ids=…) for all chosen deals.
Disabled until at least one deal is selected.
TypeScript & Code Cleanup
Strongly typed props in both new components using Prisma’s Deal and UserRole enums.
Refactored app/(protected)/raw-deals/page.tsx to render only the server‐side data fetch and page layout, delegating UI state to DealContainer.