Skip to content

use formatPrice across codebase - #294

Draft
cm-ayf wants to merge 2 commits into
mainfrom
format-price
Draft

use formatPrice across codebase#294
cm-ayf wants to merge 2 commits into
mainfrom
format-price

Conversation

@cm-ayf

@cm-ayf cm-ayf commented Aug 17, 2025

Copy link
Copy Markdown
Owner

closes: #250

@cm-ayf cm-ayf self-assigned this Aug 17, 2025
Copilot AI review requested due to automatic review settings August 17, 2025 05:41
@vercel

vercel Bot commented Aug 17, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
comiacapay Ready Ready Preview Comment Aug 17, 2025 5:45am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes price formatting across the codebase by implementing a centralized formatPrice utility function that formats Japanese Yen prices consistently.

  • Introduces a new formatPrice function in ~/lib/price.ts that uses Intl.NumberFormat for proper currency formatting
  • Replaces all manual price formatting patterns throughout the codebase with calls to formatPrice
  • Updates test expectations to use the standardized formatting function

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/lib/price.ts Introduces the centralized formatPrice utility function
tests/register.test.ts Updates test expectations to use formatPrice instead of manual string formatting
tests/receipts.test.ts Updates test expectations to use formatPrice for consistency
tests/event.test.ts Updates test expectations to use formatPrice throughout
app/routes/$guildId.$eventId.register._index/route.tsx Replaces manual price formatting with formatPrice function
app/routes/$guildId.$eventId.receipts._index/Table.tsx Updates DataGrid value formatter to use formatPrice
app/routes/$guildId.$eventId.receipts._index/Summary.tsx Replaces complex inline currency formatting with formatPrice
app/routes/$guildId.$eventId._index/route.tsx Updates discount display logic to use formatPrice
app/components/DisplayPanel.tsx Replaces manual price formatting with formatPrice in component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread app/lib/price.ts
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.

日本円の表記を適切に統一する

2 participants