Skip to content

Add sales capture module and harden menu imports#194

Open
dkast wants to merge 18 commits into
mainfrom
dkast-sales-capture-plan
Open

Add sales capture module and harden menu imports#194
dkast wants to merge 18 commits into
mainfrom
dkast-sales-capture-plan

Conversation

@dkast

@dkast dkast commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Why

Phase 1 sales capture lets restaurant staff record completed sales quickly from the dashboard so owners can track performance without a full POS flow. This branch also fixes the follow-up CSV import failure where local imports reached the server action but returned zero created items because billing checks crashed before persistence.

What changed

  • added Prisma sales models and migration for Sale, SaleItem, and OrderType, with immutable product and price snapshots for historical accuracy
  • added /dashboard/sales, /dashboard/sales/new, and /dashboard/sales/closing, plus dashboard navigation, KPI reporting, recent sales, best sellers, and a touch-first quick sale workflow
  • added transaction-backed sales server actions for catalog lookup, sale creation, dashboard metrics, closing summaries, and CSV export
  • hardened the menu item CSV import path by normalizing headers, delimiters, and price formats, and by guarding Better Auth Stripe billing calls when the billing plugin is not configured locally

Notes

  • SaleItem stores product name, variant name, and unit price snapshots so reporting stays correct even if menu items change later.
  • Billing helpers now fall back to stored organization plan and status when Stripe billing is unavailable, which keeps non-billing local flows like CSV import working.

Validation

  • bun run typecheck
  • bun run build
  • bun run lint (pre-existing warnings only)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
biztro Ready Ready Preview, Comment Jul 9, 2026 5:47am

@deepsource-io

deepsource-io Bot commented Jun 21, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 4a8ada5...9acb631 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jul 9, 2026 5:45a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

… enforce Pro plan requirement for sales registration
…tyling and consistency; enhance SalesProBanner for clarity
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