Skip to content

feat: allow custom thousands separator per team and apply in currency…#32

Open
nachoaguirre wants to merge 2 commits intomokuappio:mainfrom
nachoaguirre:feat/custom-thousands-separator
Open

feat: allow custom thousands separator per team and apply in currency…#32
nachoaguirre wants to merge 2 commits intomokuappio:mainfrom
nachoaguirre:feat/custom-thousands-separator

Conversation

@nachoaguirre
Copy link

Summary

This PR adds support for configurable thousands separator in currency formatting across the application.

modal

Changes

  • Currency Filter: Added thousandsSeparator parameter to formatCurrency() function with default value ,
  • Team Model: Added thousands_separator field to store user preference (defaults to ,)
  • Team Settings UI: Added input field in the Invoicing tab to configure the thousands separator
  • Components: Updated all invoice-related components to use the configured separator from team settings:
    • InvoiceRow.vue
    • InvoiceHeader.vue
    • InvoiceTotals.vue
    • InvoicesList.vue
  • Store: Updated invoices.js to include thousands_separator in the team properties mapping
  • i18n: Added translation key for the new setting

Usage

Users can now configure their preferred thousands separator (comma, space, period, etc.) in the Team Settings > Invoicing tab. The separator will be applied to all currency values throughout the application.

Examples:

  • , → 1,234,567.89
  • (space) → 1 234 567.89
  • . → 1.234.567.89
  • `` (empty) → 1234567.89

Technical Notes

  • Backward compatible: defaults to comma separator if not configured
  • Uses component methods instead of filters to access Vuex store state
  • Compatible with older Babel versions (no optional chaining operators)
serverless-invoices-thousands.mp4

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