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:
Jakob Wennberg
2026-06-30 20:42:56 +02:00
committed by GitHub
co-authored by Claude Opus 4.8
parent db843a7a5b
commit d63d2aecf0
19 changed files with 569 additions and 559 deletions
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'
import { useRouter } from 'next/navigation'
import * as DialogPrimitive from '@radix-ui/react-dialog'
import {
Receipt,
ReceiptText,
ArrowLeftRight,
Users,
Wallet,
@@ -35,7 +35,7 @@ type Entry = {
}
const ACTION_ENTRIES: Entry[] = [
{ id: 'new-invoice', label: 'Ny faktura', hint: 'Skapa & skicka faktura', icon: Receipt, href: '/invoices/new', keywords: 'fakturera ny invoice send create' },
{ id: 'new-invoice', label: 'Ny faktura', hint: 'Skapa & skicka faktura', icon: ReceiptText, href: '/invoices/new', keywords: 'fakturera ny invoice send create' },
{ id: 'book-transaction', label: 'Boka transaktion', hint: 'Gå till transaktionsinkorgen', icon: ArrowLeftRight, href: '/transactions', keywords: 'transaktion bokför kategorisera categorize' },
{ id: 'new-customer', label: 'Lägg till kund', icon: Users, href: '/customers', keywords: 'kund customer ny lägg till' },
{ id: 'new-supplier-invoice', label: 'Skapa leverantörsfaktura', icon: Wallet, href: '/supplier-invoices/new', keywords: 'leverantörsfaktura supplier invoice ny' },
+2 -2
View File
@@ -21,7 +21,7 @@ import {
Inbox,
Landmark,
Loader2,
Receipt,
ReceiptText,
ShieldCheck,
Stamp,
} from 'lucide-react'
@@ -341,7 +341,7 @@ export default function AttGoraSection({
{counts.overdue_invoice > 0 && (
<WorklistRow
href="/invoices?status=unpaid"
icon={Receipt}
icon={ReceiptText}
label={t('row_overdue_invoices')}
count={counts.overdue_invoice}
/>
+2 -2
View File
@@ -9,7 +9,7 @@ import { Button } from '@/components/ui/button'
import {
LayoutDashboard,
Home,
Receipt,
ReceiptText,
Users,
ArrowLeftRight,
BookOpen,
@@ -135,7 +135,7 @@ const navItems: NavItem[] = [
{ href: '/transactions', labelKey: 'transactions', icon: ArrowLeftRight, group: 'top' },
{ href: '/pending', labelKey: 'review', icon: ClipboardCheck, group: 'top' },
// Försäljning dropdown
{ href: '/invoices', labelKey: 'invoices', icon: Receipt, group: 'försäljning' },
{ href: '/invoices', labelKey: 'invoices', icon: ReceiptText, group: 'försäljning' },
{ href: '/customers', labelKey: 'customers', icon: Users, group: 'försäljning' },
{ href: '/articles', labelKey: 'articles', icon: Tag, group: 'försäljning' },
// Inköp dropdown
+3 -1
View File
@@ -26,9 +26,11 @@ export interface ReportExportItem {
export function ReportExportMenu({
items,
children,
size = 'sm',
}: {
items?: ReportExportItem[]
children?: React.ReactNode
size?: 'default' | 'sm'
}) {
const t = useTranslations('reports')
const hasItems = !!items && items.length > 0
@@ -39,7 +41,7 @@ export function ReportExportMenu({
{hasItems && (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline" size="sm">
<Button variant="outline" size={size}>
<Download className="h-4 w-4 mr-2" />
{t('export')}
</Button>
@@ -2,7 +2,7 @@
import { useEffect, useState } from 'react'
import { useTranslations } from 'next-intl'
import { Sparkles, X } from 'lucide-react'
import { X } from 'lucide-react'
import { createClient } from '@/lib/supabase/client'
import { useCompany } from '@/contexts/CompanyContext'
@@ -73,7 +73,6 @@ export default function BankSyncSinceLastVisit() {
return (
<div className="inline-flex items-center gap-2 rounded-md border border-success/30 bg-success/5 px-2.5 py-1 text-xs text-success">
<Sparkles className="h-3.5 w-3.5" />
<span>
{count === 1
? t('bank_sync_new_since_last_visit_one')
+2 -2
View File
@@ -6,7 +6,7 @@ import { useTranslations } from 'next-intl'
import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
import {
Receipt,
ReceiptText,
Users,
ArrowLeftRight,
Camera,
@@ -103,7 +103,7 @@ export function EmptyInvoices() {
const t = useTranslations('empty')
return (
<EmptyState
icon={Receipt}
icon={ReceiptText}
title={t('preset_invoices_title')}
description={t('preset_invoices_description')}
actionLabel={t('preset_invoices_action')}