Skip to content

Conversation

@thekavishshah
Copy link

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.

@vercel
Copy link

vercel bot commented May 5, 2025

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant