Skip to content

Improve ticket tier selection and pricing - #168

Merged
malkoG merged 3 commits into
devfrom
fix/ticket-selection
Apr 2, 2026
Merged

malkoG merged 3 commits into
devfrom
fix/ticket-selection

Conversation

@malkoG

@malkoG malkoG commented Apr 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Always show the ticket tier selection step during registration, even with a single tier, so users can see capacity and price before confirming
  • Add structured numeric pricing (priceAmount integer column) to event tiers for KRW formatting (15000 → ₩15,000) and future payment integration
  • Update dashboard tier form with numeric price input, and all price displays to use formatPrice() with fallback to the existing price label

Test plan

  • Create/edit event tiers in dashboard — set numeric price, verify it saves
  • View registration page — verify price displays as ₩15,000 format
  • Single-tier event — verify ticket selection step still shows
  • Tier with no price set — verify "Free" fallback displays

Summary by CodeRabbit

  • New Features

    • Event organizers can now input tier prices as numeric values in the dashboard.
    • Tier prices automatically display in proper KRW currency format across the platform.
  • Improvements

    • Tier selection step now appears whenever tiers exist, streamlining the registration flow.

malkoG added 3 commits April 2, 2026 18:32
Users should see capacity and price info before confirming,
even when there is only one ticket tier available.
Add integer price_amount column to eventTiers for structured
numeric pricing (KRW). Prepares for payment integration.
Add formatPrice utility for KRW formatting (15000 → ₩15,000).
Update tier APIs, dashboard form, and registration page to use
numeric priceAmount with fallback to the existing price label.
@coderabbitai

coderabbitai Bot commented Apr 2, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 05f4035d-874d-45ce-8028-8798fa31d4ee

📥 Commits

Reviewing files that changed from the base of the PR and between b988f08 and 6a3357a.

📒 Files selected for processing (12)
  • drizzle/0046_small_blindfold.sql
  • drizzle/meta/0046_snapshot.json
  • drizzle/meta/_journal.json
  • src/lib/format-price.ts
  • src/routes/events/$eventId/dashboard/route.tsx
  • src/routes/events/$eventId/dashboard/tiers.tsx
  • src/routes/events/$eventId/register.tsx
  • src/routes/events/-create.ts
  • src/routes/events/-detail.ts
  • src/routes/events/-rsvp-status.ts
  • src/routes/events/-update.ts
  • src/server/db/schema.ts

📝 Walkthrough

Walkthrough

The changes introduce numeric price storage to event tiers via a new price_amount database column, add a KRW currency formatting utility, and propagate the priceAmount field through tier management, event creation/update endpoints, and event registration UI.

Changes

Cohort / File(s) Summary
Database Migration & Schema
drizzle/0046_small_blindfold.sql, drizzle/meta/_journal.json, src/server/db/schema.ts
New migration adds price_amount integer column to event_tiers table; schema extended with nullable priceAmount field; migration journal entry added.
Price Formatting Utility
src/lib/format-price.ts
New exported formatPrice() function converts numeric priceAmount to KRW-formatted string, with fallback handling for null/zero values.
Tier Dashboard & Management
src/routes/events/$eventId/dashboard/route.tsx, src/routes/events/$eventId/dashboard/tiers.tsx
TierItem type extended with priceAmount field; tier price input refactored to use numeric input (type="number") bound to priceAmount instead of string price; tier creation/updates now handle and persist priceAmount.
Event Endpoints
src/routes/events/-create.ts, src/routes/events/-detail.ts, src/routes/events/-rsvp-status.ts, src/routes/events/-update.ts
Event creation, detail, RSVP status, and update endpoints extended to accept and return priceAmount in tier payloads; tier upsert/insert logic updated to persist numeric price amounts.
Event Registration UI
src/routes/events/$eventId/register.tsx
TierInfo type extended with priceAmount field; tier price displays updated to use formatPrice(tier.priceAmount, tier.price); tier selection step condition changed from multi-tier check to always display when tiers exist.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A numeric price hops in,
KRW formatting with a grin,
Through tiers and tills the data flows,
From form to database it goes,
Pretty prices now in sight! 💰

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ticket-selection

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@malkoG
malkoG merged commit 345ade0 into dev Apr 2, 2026
0 of 2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 27, 2026
2 of 4 tasks
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