Skip to content

feat: order CSV import with account grouping - #202

Draft
scottcarlton wants to merge 7 commits into
devfrom
feature/order-import
Draft

feat: order CSV import with account grouping#202
scottcarlton wants to merge 7 commits into
devfrom
feature/order-import

Conversation

@scottcarlton

Copy link
Copy Markdown
Owner

Summary

  • Add bulk order import from CSV (upload or paste), accessible via "Import" button on the orders page header
  • CSV rows are grouped by account name (case-insensitive) — each unique account becomes one order with multiple line items, instead of one order per row
  • Products resolved by style number against the org's catalog; unmatched accounts or styles are skipped with per-row reporting
  • Grouped preview UI shows account cards with expandable line items, with remove row/group controls before committing
  • Toast feedback includes both order count and line count

Test plan

  • Log in as brand org, navigate to /orders, confirm "Import" button appears
  • Click Import → modal opens with Upload / Paste CSV tabs
  • Download CSV template → verify headers: account, style_number, qty, unit_price, color, size, expected_ship_date, notes
  • Upload CSV with multiple rows for same account → preview shows grouped under one account header
  • Upload CSV with unknown account → rows skipped, toast reports skip count
  • Upload CSV with unknown style_number → line skipped, other valid lines for same account still import
  • Remove a line from preview → group updates
  • Remove entire account group → rows removed
  • Click Save Items → toast shows "N orders imported (M lines)"
  • Orders list refreshes with new draft orders
  • bun run check — 0 errors
  • bun run test:run — 575 tests pass (includes 3 new groupOrderRows tests)

🤖 Generated with Claude Code

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
threadline Ready Ready Preview, Comment May 30, 2026 6:08pm

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