Add In-Process Deal Flow and Status-Based Filtering#4
Open
thekavishshah wants to merge 1 commit intoRahulg321:mainfrom
Open
Add In-Process Deal Flow and Status-Based Filtering#4thekavishshah wants to merge 1 commit intoRahulg321:mainfrom
thekavishshah wants to merge 1 commit 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.
Prisma schema: Introduced a new DealStatus enum and added a status field to the Deal model (defaulting to RAW).
GetAllDeals action: Extended the deal-fetching helper to accept an optional status parameter so it only returns deals matching RAW, IN_PROCESS, etc.
Async params: Updated the component to await searchParams (Next.js 15 requirement).
Status filter: Always passes status = RAW into the deal-fetch call so that once a deal is moved out, it no longer appears here.
Async params: Likewise, awaits searchParams before reading page or limit.
Hardwired filter: Fetches only deals where status = IN_PROCESS, ensuring this list stays in sync.
New imports: Brought in two server-actions—one to flip RAW → IN_PROCESS, another to export an IN_PROCESS deal to Bitrix.
Form-action handlers: Wrapped each action in the proper (formData) => … signature that Next.js expects.
Conditional buttons:
RAW deals show a “Move to In Process” button.
IN_PROCESS deals show a “Publish to Bitrix” button.
Styling tweak: Ensured every action button spans the full width, matching the existing View and Screen buttons.
Renamed the nav item from “Infer” to “Screened” to reflect the new workflow terminology.
Ran a Prisma migration (“add-deal-status”) to apply the new enum and field to the database.