From 43a569d248d1a54ec64c4a5678627bdc8bc1af91 Mon Sep 17 00:00:00 2001
From: Jakob Wennberg
{t('older_unmatched', { count: items.older_unmatched_count })}
diff --git a/components/reconciliation/ReconciliationRail.tsx b/components/reconciliation/ReconciliationRail.tsx
index 5b566870..846ec1c6 100644
--- a/components/reconciliation/ReconciliationRail.tsx
+++ b/components/reconciliation/ReconciliationRail.tsx
@@ -62,11 +62,13 @@ interface ReconciliationRailProps {
accounts: ReconciliationAccount[]
selectedKey: string | null
onSelect: (accountKey: string) => void
+ /** Rendered under the list: the way to the pärm the accounts feed. */
+ footer?: React.ReactNode
}
const MANUAL_OPEN_STORAGE_KEY = 'Accounted:recon-rail-manual-open'
-export function ReconciliationRail({ accounts, selectedKey, onSelect }: ReconciliationRailProps) {
+export function ReconciliationRail({ accounts, selectedKey, onSelect, footer }: ReconciliationRailProps) {
const t = useTranslations('reconciliation')
const fed = accounts.filter((a) => a.kind !== 'manual')
const manual = accounts.filter((a) => a.kind === 'manual')
@@ -207,6 +209,7 @@ export function ReconciliationRail({ accounts, selectedKey, onSelect }: Reconcil
)}
+ {footer}
)
}
diff --git a/components/reconciliation/ReconciliationUnderlag.tsx b/components/reconciliation/ReconciliationUnderlag.tsx
index 83b681a8..4087d028 100644
--- a/components/reconciliation/ReconciliationUnderlag.tsx
+++ b/components/reconciliation/ReconciliationUnderlag.tsx
@@ -3,7 +3,6 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { useTranslations } from 'next-intl'
import { Paperclip } from 'lucide-react'
-import { Button } from '@/components/ui/button'
import { QUIET_LINK_CLASS, HOVER_REVEAL_CLASS } from '@/components/ui/dry-table'
import { useToast } from '@/components/ui/use-toast'
import { cn, formatDate } from '@/lib/utils'
@@ -111,11 +110,16 @@ export function ReconciliationUnderlag({ accountKey, throughDate, canWrite = tru
}
return (
- {t('empty')}
{t('heading_dated', { date: formatDate(throughDate) })}
+ {attachments !== null && attachments.length === 0 && (
+
+ {t('empty_short')}
+
+ )}
{canWrite && (
<>
void upload(e.target.files)}
aria-label={t('attach')}
/>
-
+
>
)}
{attachments.map((a) => (