refactor(register): customer, supplier and article detail as documents, not card piles (#1624)
The three register detail pages rendered a handful of facts as a grid of sparse bordered cards floating in an empty page. They now read as one flowing document: serif entity name over a quiet type/status kicker, quiet ghost actions top right (delete turns terracotta only on hover), and hairline-kickered definition sections (KONTAKT, KUNDUPPGIFTER, PRIS, BOKFORING, BETALNINGSUPPGIFTER, FAKTUROR) with aligned label/value rows in a constrained column (max-w-2xl, supplier max-w-3xl for its invoice table). Sections land with the standard stagger-enter. New shared primitive components/ui/detail-section.tsx (DetailSection, DefRow, DefEmpty) carries the grammar. Empty values render a muted en dash for facts that matter (email, phone, expense account) and are omitted row-wise otherwise; a section with nothing to say is omitted. Behavior preserved: edit/deactivate/delete flows, confirm dialogs, personal-number reveal + AttnLine, account-activation retry, viewer lock states, routing and all existing i18n keys. New def_* label keys added line-wise to both sv.json and en.json; customer invoice_count gained ICU plural (1 faktura, not 1 fakturor). Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Jakob Wennberg
Claude Fable 5
parent
51539b93ed
commit
a977a67063
+23
-1
@@ -1274,9 +1274,17 @@
|
||||
"label_personal_number": "Personal no.:",
|
||||
"label_vat": "VAT:",
|
||||
"label_payment_terms": "Payment terms:",
|
||||
"def_email": "Email",
|
||||
"def_phone": "Phone",
|
||||
"def_address": "Address",
|
||||
"def_customer_number": "Customer number",
|
||||
"def_org_number": "Org. no.",
|
||||
"def_personal_number": "Personal number",
|
||||
"def_vat": "VAT number",
|
||||
"def_payment_terms": "Payment terms",
|
||||
"payment_terms_value": "{days} days",
|
||||
"verified": "Verified",
|
||||
"invoice_count": "{count} invoices",
|
||||
"invoice_count": "{count, plural, one {# invoice} other {# invoices}}",
|
||||
"load_failed_title": "Could not load customer",
|
||||
"load_failed_description": "Customer not found.",
|
||||
"updated_title": "Customer updated",
|
||||
@@ -4456,6 +4464,20 @@
|
||||
"payment_terms_inline": "Payment terms: {days} days",
|
||||
"currency_inline": "Currency: {currency}",
|
||||
"expense_account_inline": "Expense account: {account}",
|
||||
"delete": "Delete",
|
||||
"kicker_org": "Org. no. {number}",
|
||||
"def_email": "Email",
|
||||
"def_phone": "Phone",
|
||||
"def_address": "Address",
|
||||
"def_vat": "VAT number",
|
||||
"def_bankgiro": "Bankgiro",
|
||||
"def_plusgiro": "Plusgiro",
|
||||
"def_iban": "IBAN",
|
||||
"def_bic": "BIC",
|
||||
"def_payment_terms": "Payment terms",
|
||||
"payment_terms_value": "{days} days",
|
||||
"def_currency": "Currency",
|
||||
"def_expense_account": "Expense account",
|
||||
"invoices_section_title": "Invoices",
|
||||
"new_invoice": "New invoice",
|
||||
"no_invoices": "No invoices registered for this supplier",
|
||||
|
||||
+23
-1
@@ -1274,9 +1274,17 @@
|
||||
"label_personal_number": "Persnr:",
|
||||
"label_vat": "VAT:",
|
||||
"label_payment_terms": "Betalningsvillkor:",
|
||||
"def_email": "E-post",
|
||||
"def_phone": "Telefon",
|
||||
"def_address": "Adress",
|
||||
"def_customer_number": "Kundnummer",
|
||||
"def_org_number": "Org.nr",
|
||||
"def_personal_number": "Personnummer",
|
||||
"def_vat": "VAT-nummer",
|
||||
"def_payment_terms": "Betalningsvillkor",
|
||||
"payment_terms_value": "{days} dagar",
|
||||
"verified": "Verifierad",
|
||||
"invoice_count": "{count} fakturor",
|
||||
"invoice_count": "{count, plural, one {# faktura} other {# fakturor}}",
|
||||
"load_failed_title": "Kunde inte ladda kund",
|
||||
"load_failed_description": "Kunden hittades inte.",
|
||||
"updated_title": "Kund uppdaterad",
|
||||
@@ -4456,6 +4464,20 @@
|
||||
"payment_terms_inline": "Betalningsvillkor: {days} dagar",
|
||||
"currency_inline": "Valuta: {currency}",
|
||||
"expense_account_inline": "Kostnadskonto: {account}",
|
||||
"delete": "Ta bort",
|
||||
"kicker_org": "Org.nr {number}",
|
||||
"def_email": "E-post",
|
||||
"def_phone": "Telefon",
|
||||
"def_address": "Adress",
|
||||
"def_vat": "VAT-nummer",
|
||||
"def_bankgiro": "Bankgiro",
|
||||
"def_plusgiro": "Plusgiro",
|
||||
"def_iban": "IBAN",
|
||||
"def_bic": "BIC",
|
||||
"def_payment_terms": "Betalningsvillkor",
|
||||
"payment_terms_value": "{days} dagar",
|
||||
"def_currency": "Valuta",
|
||||
"def_expense_account": "Kostnadskonto",
|
||||
"invoices_section_title": "Fakturor",
|
||||
"new_invoice": "Ny faktura",
|
||||
"no_invoices": "Inga fakturor registrerade för denna leverantör",
|
||||
|
||||
Reference in New Issue
Block a user