fix: format amount fields with currency and thousand separators; show – for empty values #25

Closed
opened 2026-05-05 08:06:30 +00:00 by casper-stevens · 1 comment
Member

Context

Ref: lhumina_code/home#210

Two related display bugs make financial data unreadable:

  1. Raw integers are shown without formatting (e.g. 10000000 instead of €10,000,000)
  2. Empty dates and optional values show 0 instead of

Amount formatting rules

Raw value Detail view Grid/card (compact)
10000000 €10,000,000 €10M
250000 €250,000 €250K
1500 €1,500 €1,500
  • Currency symbol must always be shown
  • Currency codes must be uppercase (EUR, USD, GBP — never eur)
  • Full formatting in detail views; compact in list/grid/card views

Empty value rules

Show (en-dash) instead of 0 or empty string for:

  • Follow-up dates
  • Close dates
  • Contract dates
  • HR dates
  • Any optional numeric or date field with no value set

Scope

All entity templates that display amounts or optional dates:

  • Deals (amount, close date, follow-up date)
  • Contracts (contract value, dates)
  • Finance records (amount, dates)
  • HR records (dates)
  • Investment roadmap / dashboard summaries

Nice to have (can be a follow-up)

A currency display selector so the user can pick their preferred display currency (EUR / USD / GBP). The selected currency is applied to all amount displays.

Acceptance criteria

  • No raw integer amounts visible anywhere in the UI
  • No 0 shown for empty date or optional value fields
  • Amounts in list/grid views use compact notation (K/M suffix)
  • Amounts in detail views use full notation with thousand separators
  • Currency symbol always present
## Context Ref: [lhumina_code/home#210](https://forge.ourworld.tf/lhumina_code/home/issues/210) Two related display bugs make financial data unreadable: 1. Raw integers are shown without formatting (e.g. `10000000` instead of `€10,000,000`) 2. Empty dates and optional values show `0` instead of `–` ## Amount formatting rules | Raw value | Detail view | Grid/card (compact) | |-----------|-------------|---------------------| | `10000000` | `€10,000,000` | `€10M` | | `250000` | `€250,000` | `€250K` | | `1500` | `€1,500` | `€1,500` | - Currency symbol must always be shown - Currency codes must be uppercase (EUR, USD, GBP — never `eur`) - Full formatting in detail views; compact in list/grid/card views ## Empty value rules Show `–` (en-dash) instead of `0` or empty string for: - Follow-up dates - Close dates - Contract dates - HR dates - Any optional numeric or date field with no value set ## Scope All entity templates that display amounts or optional dates: - Deals (amount, close date, follow-up date) - Contracts (contract value, dates) - Finance records (amount, dates) - HR records (dates) - Investment roadmap / dashboard summaries ## Nice to have (can be a follow-up) A currency display selector so the user can pick their preferred display currency (EUR / USD / GBP). The selected currency is applied to all amount displays. ## Acceptance criteria - No raw integer amounts visible anywhere in the UI - No `0` shown for empty date or optional value fields - Amounts in list/grid views use compact notation (K/M suffix) - Amounts in detail views use full notation with thousand separators - Currency symbol always present
Author
Member

Implemented in commit 76f7cf0: added 6 formatting helpers (format_amount, format_amount_compact, format_optional_date, etc.) applied to all financial fields; dashboard metrics, roadmap, CRM cards.

Implemented in commit 76f7cf0: added 6 formatting helpers (format_amount, format_amount_compact, format_optional_date, etc.) applied to all financial fields; dashboard metrics, roadmap, CRM cards.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_biz#25
No description provided.