fix(parties): one "från SCB" note per contact section (#2316)

* fix(parties): one "från SCB" note per contact section, not one under every field

The founder read four tags in a row. Kontaktuppgifter now ends with one
sentence naming the fields the register gave: "E-post, Telefon, adress
och Momsnr från SCB." Nothing else changes; the fill rule and the
equality test behind it are the same.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(parties): the customer page's registry note tolerates the loading state

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(parties): the supplier page's registry note tolerates the loading state

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-09-05 14:53:13 +02:00
committed by GitHub
co-authored by Claude Fable 5.1 Jakob Wennberg
parent 971952fe19
commit bff44e5757
5 changed files with 38 additions and 19 deletions
+6
View File
@@ -149,3 +149,9 @@ export function contactFill(row: ContactRow, now: RegistrySummary['contact'], be
export function fromRegistry(rowValue: string | null | undefined, registryValue: string | null | undefined): boolean {
return !!norm(rowValue) && norm(rowValue) === norm(registryValue)
}
/** "E-post, telefon och adress": a list the way Swedish (or English) joins it. */
export function listSv(items: string[], and: string): string {
if (items.length <= 1) return items.join('')
return `${items.slice(0, -1).join(', ')} ${and} ${items[items.length - 1]}`
}