Skip to content

Fix transaction card payment source label - #97

Merged
rcastaneda-dev merged 1 commit into
mainfrom
fix/transaction-payment-source-label
May 22, 2026
Merged

Fix transaction card payment source label#97
rcastaneda-dev merged 1 commit into
mainfrom
fix/transaction-payment-source-label

Conversation

@rcastaneda-dev

Copy link
Copy Markdown
Owner

Summary

  • Fixes expense/fee transaction cards showing Source: transactions.businessRevenue (raw i18n key) instead of a translated label.
  • Adds getPaymentSourceTranslationKey() in transactionUtils.ts so card display uses the same locale keys as TransactionForm (businessCash, externalFunds, mixedSources).
  • Updates mixed-payment breakdown copy to use businessCash instead of the non-existent businessRevenue key.

Test plan

  • Open Business Transactions and confirm an expense or fee card with payment source Business Cash shows Source: Business Cash (not a raw key).
  • Confirm External Funds and Mixed Sources labels render correctly on other cards.
  • For a mixed-source transaction, verify the breakdown line uses lowercase “business cash” and “external funds”.
  • Switch app language to Spanish and confirm source labels still translate correctly.

Made with Cursor

Cards referenced transactions.businessRevenue, which does not exist in locale files. Align display with TransactionForm using businessCash and a shared payment-source translation helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings May 22, 2026 03:30
@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
nanisessentials-inventory Ready Ready Preview, Comment May 22, 2026 3:31am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes transaction cards (expenses/fees) rendering a raw i18n key for the payment source by aligning the card display with the same translation keys used in TransactionForm.

Changes:

  • Added getPaymentSourceTranslationKey() helper in src/lib/transactionUtils.ts to map PaymentSource values to existing transactions.* locale keys.
  • Updated TransactionsPage to use the shared helper for rendering the payment source label and corrected mixed-source breakdown copy to use businessCash (instead of the non-existent businessRevenue key).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/lib/transactionUtils.ts Introduces a typed mapping helper from PaymentSource to valid transaction locale keys.
src/components/pages/transactions/TransactionsPage.tsx Uses the shared helper to translate the payment source on transaction cards and fixes mixed breakdown wording.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rcastaneda-dev
rcastaneda-dev merged commit ca3c907 into main May 22, 2026
6 checks passed
@rcastaneda-dev
rcastaneda-dev deleted the fix/transaction-payment-source-label branch May 22, 2026 03:33
@rcastaneda-dev
rcastaneda-dev restored the fix/transaction-payment-source-label branch May 22, 2026 03:33
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