Format the phone numbers on the customer's quote

Fixkamo-signer-monorepo
Ya
29 Agosti 2026, 07:53 UTC
Mwandishi
Kamo
Ahadi ya
7248a5c

The page a customer opens printed every number exactly as stored — "9495550134" on the letterhead, and the same again under Your Contact. This app had no phone library at all, so it gains libphonenumber-js and `src/lib/phone.ts`. That helper mirrors kamo-internal's `formatPhoneDisplay` rule for rule, for the same reason QuoteDocument mirrors QuotePreviewDialog class for class: a quote that groups its numbers one way in the staff preview and another way on the page the customer opens is a document that disagrees with itself. Hand-rolling a `(###) ###-####` template was the tempting alternative and is the bug the platform already fixed once — applied to "+442079460958" it renders "(207) 946-0958", which is a different, dialable, wrong number. Length, not validity, is the gate: isValid() rejects reserved exchanges, so gating on it refuses to format every 555 number, which is most of a demo organization's book. The addressee's own number and the letterhead on QuoteUnavailable go through it too — a customer reaching the expired page still gets a number they can read.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei