Skip to content

Fix/seller orders table - #187

Merged
Arsh-S merged 15 commits into
mainfrom
fix/seller-orders-table
Nov 18, 2026
Merged

Arsh-S merged 15 commits into
mainfrom
fix/seller-orders-table

Conversation

@jiminkim214

@jiminkim214 jiminkim214 commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The seller fundraiser orders table shows every order that matches the current filters, exports that set, and displays Created At in 12-hour time.

Changes

  • The orders table lists every matching order. Next/Previous are removed, so the footer no longer jumps and marking an order picked up no longer returns the list to page 1.
  • The toolbar shows how many orders match the active search and filters, for example 8 of 42 orders.
  • Export downloads the filtered rows. Row checkboxes limit the file to the selection, and the button label becomes Export N selected.
  • Order Details and Quantity use one line per item, so multi-item orders no longer overlap.
  • Created At displays MMM d, yyyy h:mm a (for example, Oct 7, 2026 2:05 PM) and still sorts on the raw timestamp. The CSV includes a Created At column in that same format.
  • Checkbox forwards a ref so the header checkbox can show a partial selection. vitest.config.ts resolves the @/ alias for the new CSV test.

Test

Screen.Recording.2026-11-07.at.11.25.39.PM.mov

jiminkim214 and others added 2 commits November 7, 2026 22:24
The pickup checkbox only updated its own SWR cache, so the Pickup Status filter and CSV export kept the old status until the Supabase realtime update arrived. Undo from the table also left the checkbox checked and disabled until then. Both now update the orders list and the row cache immediately.

Co-authored-by: Cursor <cursoragent@cursor.com>
Created At uses 12-hour time in the table and CSV, and multi-item order details no longer overlap.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
curaise Ready Ready Preview Nov 17, 2026 11:44pm UTC

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: a4cb7bc8-0f4e-4ffc-a43c-4436abaecb26

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

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.

Share

@eicyer eicyer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  1. Each row currently sends its own request to the server to get order information, even though the page already has that information. Previously, pagination limited this to 10 requests at a time. Now that all rows appear on the page, 300 orders would trigger 300 unnecessary requests. You can add revalidateOnMount: false to the useSWR calls in those cells so they don't request the same data again when they load.

-autoResetPageIndex: false is no longer needed because the table doesn't use pagination, so remove it. Also, the table recreates its columns and sorts all orders every time the component re-renders, even when nothing relevant has changed. Fix: Use useMemo for getColumns and useCallback for setOrderPickedUp so React can reuse them instead of recreating them unnecessarily.

  • If you select rows and a filter hides them, Export quietly exports everything visible instead. Fix: clear the selection with setRowSelection({}) whenever a filter or the search changes.

…payment status tooltip.

- Drop the 1200px minimum width, let headers and buyer names wrap, and tighten cell padding.
- Stack Created At as date over time.
- Show quantity next to each item name in Order Details and remove the separate Quantity column, so item names can wrap.
- Rewrite the Payment Status tooltip to match how statuses are set today (Venmo match or seller confirmation, Zelle/other unverified).
- Payment Status and Pickup Status badges open a menu to change the status. Payment can be marked received; pickup can be marked, and undone within the backend's one minute window.
- Order ID column shows the first 8 characters, the full ID on hover, and copies on click. The search box matches order IDs and the CSV export includes an Order ID column (from #200).
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jiminkim214
❌ Arsh-S
You have signed the CLA already but the status is still pending? Let us recheck it.

@Arsh-S

Arsh-S commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Pushed changes on top of this branch:

  • The table fits without horizontal scroll down to about a 1250px window. Headers and names wrap, Created At is stacked as date over time, and quantity now sits next to each item in Order Details instead of its own column.
  • Pagination is back, done in the browser since the orders endpoint returns everything. Rows per page is 10, 25, 50, 100, or All (default 25), with first, previous, next, and last buttons. Updating an order keeps the current page. Export and select-all still cover every matching order.
  • Fixed the Payment Status filter: selecting Received also matched Not Received. The filters now match exactly and sit in the same order as the columns.
  • Payment Status tooltip rewritten to match how statuses are set today.
  • Payment Status and Pickup Status badges open a menu to change the status. Payment can only be marked received, and pickup can be undone for 1 minute, same as the existing backend rules.
  • Payment Method shows the same Venmo, Zelle, and cash icons as checkout.
  • Order ID is in the row's three-dot menu (full ID, click to copy). Search matches order IDs and the CSV has an Order ID column. This replaces Show order ID in the orders table and CSV export #200.
  • Addressed the review: no per-row order fetch on load, memoized the columns and callbacks, and changing a filter or the search now clears the selection. autoResetPageIndex: false stays because pagination is back and it keeps the page from resetting when an order updates.

Orders table

Pagination footer

Payment Status dropdown

Pickup Status dropdown

Row menu with Order ID

…lection on filter change.

- Row cells no longer refetch their order on mount; the page already has it.
- Remove the unused autoResetPageIndex option.
- Memoize the column definitions and the pickup and payment callbacks.
- Changing a filter or the search clears the row selection so Export never silently falls back to every visible row.
- Move the checkout PaymentMethodIcon into a shared component and reuse it in the Payment Method column with a readable label (Venmo, Zelle, Cash).
- Put the View Order link icon next to its label.
The faceted filters used arrIncludesSome, which does a substring check on string values. Use an exact match for payment status, payment method, and pickup status.
…order the filters.

- Show 25 rows per page by default with 10/25/50/100 options, a page indicator, and Previous/Next below the table. Export and select-all still cover every matching order.
- Updating an order keeps the current page; sorting, filtering, searching, and Reset go back to page 1.
- Filter buttons now follow the column order: Item(s), Payment Type, Payment Status, Pickup Status.
@Arsh-S
Arsh-S merged commit 9e985c5 into main Nov 18, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 01608f60 Deployed Nov 17, 2026 by vercel[bot]
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.

4 participants