feat: UI slop cleanup, invoice icon/header polish + year-end in Rapporter, journal-list DataList refactor (#847)
UI cleanup: removed AI-slop (redundant suppliers subtitle, decorative Sparkles glyph), decluttered the article-detail header (single status badge + muted type · #number), standardized the invoice icon Receipt→ReceiptText (no $ in a SEK app), and matched ReportExportMenu trigger size to the primary CTA on list pages. Bookkeeping: surfaced year-end closing in Rapporter (catalog descriptor) and dropped the redundant header button; refactored JournalEntryList to DataList primitives + chunked /api/documents/counts in 50-ID batches (large pages previously 400'd); added optional fraction-digit overrides to formatCurrency. The fiscal-year lock indicator is preserved as a labeled Låst/Stängt badge in FiscalYearSelector. All PR-bot findings triaged as false positives (unused import, formatCurrency öre, lock indicator) or intentional design (year-end placement, empty-state messaging). CI green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
db843a7a5b
commit
d63d2aecf0
@@ -129,6 +129,17 @@ export const REPORT_CATALOG: ReportDescriptor[] = [
|
||||
},
|
||||
|
||||
// --- Bokslut (year-end) ---
|
||||
{
|
||||
// The year-end closing wizard (dispositions, accruals, execute). Owns its
|
||||
// route under /bookkeeping; surfaced here so the closing flow is reachable
|
||||
// from Rapporter rather than only via the Bokföring header.
|
||||
slug: 'year-end-closing',
|
||||
labelKey: 'name_year_end_closing',
|
||||
descKey: 'desc_year_end_closing',
|
||||
category: 'year_end',
|
||||
params: 'fiscal',
|
||||
route: '/bookkeeping/year-end',
|
||||
},
|
||||
{
|
||||
slug: 'income-statement',
|
||||
labelKey: 'name_income_statement',
|
||||
|
||||
+7
-3
@@ -15,12 +15,16 @@ export function cn(...inputs: ClassValue[]) {
|
||||
*/
|
||||
const INVALID_DATE_PLACEHOLDER = '—'
|
||||
|
||||
export function formatCurrency(amount: number, currency: string = 'SEK'): string {
|
||||
export function formatCurrency(
|
||||
amount: number,
|
||||
currency: string = 'SEK',
|
||||
options?: { minimumFractionDigits?: number; maximumFractionDigits?: number },
|
||||
): string {
|
||||
return new Intl.NumberFormat('sv-SE', {
|
||||
style: 'currency',
|
||||
currency,
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 2,
|
||||
minimumFractionDigits: options?.minimumFractionDigits ?? 0,
|
||||
maximumFractionDigits: options?.maximumFractionDigits ?? 2,
|
||||
}).format(amount)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user