diff --git a/components/reconciliation/AccountOverview.tsx b/components/reconciliation/AccountOverview.tsx index 036af05e..1d3658b0 100644 --- a/components/reconciliation/AccountOverview.tsx +++ b/components/reconciliation/AccountOverview.tsx @@ -558,12 +558,6 @@ export function AccountOverview({ account, rail, otherBankAccounts = [], window,

)} - {/* Underlag for the balansdag in play: the signed date, else the date the next sign-off would cover. */} - = signoffDefaultDate ? status.signoff.through_date : signoffDefaultDate} - /> - {/* Bridge: how the difference is explained. */} {status.bridge.length > 0 && (
@@ -626,6 +620,12 @@ export function AccountOverview({ account, rail, otherBankAccounts = [], window, )} + {/* Underlag for the balansdag in play: the signed date, else the date the next sign-off would cover. */} + = signoffDefaultDate ? status.signoff.through_date : signoffDefaultDate} + /> + {items.older_unmatched_count > 0 && (

{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('heading_dated', { date: formatDate(throughDate) })}

+ {attachments !== null && attachments.length === 0 && ( + + {t('empty_short')} + + )} {canWrite && ( <> void upload(e.target.files)} aria-label={t('attach')} /> - + )}
- {attachments === null ? null : attachments.length === 0 ? ( -

{t('empty')}

- ) : ( + {attachments === null || attachments.length === 0 ? null : (
    {attachments.map((a) => (
  • diff --git a/components/reconciliation/ReconciliationWorkspace.tsx b/components/reconciliation/ReconciliationWorkspace.tsx index 229e3e66..95dcd75e 100644 --- a/components/reconciliation/ReconciliationWorkspace.tsx +++ b/components/reconciliation/ReconciliationWorkspace.tsx @@ -124,18 +124,6 @@ export function ReconciliationWorkspace({ initialPeriods, initialCompanyId }: Re } action={
    - - {tParm('open_parm')} - - { @@ -205,12 +193,28 @@ export function ReconciliationWorkspace({ initialPeriods, initialCompanyId }: Re ) } + const railFooter = ( + + {tParm('open_parm')} + + ) + return (
    {header} + {/* How the selected account is worked: a view of the body, so it sits with the body, not with the page scope. */} + {selected && mode === 'match' && (
    - +
    void load()} />
    @@ -220,7 +224,7 @@ export function ReconciliationWorkspace({ initialPeriods, initialCompanyId }: Re } + rail={} otherBankAccounts={accounts.filter((a) => a.kind === 'bank' && a.account_key !== selected.account_key && !a.superseded_by)} window={window} onChanged={() => void load()} diff --git a/messages/en.json b/messages/en.json index dc67cc04..831426d1 100644 --- a/messages/en.json +++ b/messages/en.json @@ -8066,6 +8066,7 @@ "heading_dated": "Supporting documents as of {date}", "attach": "Attach document", "empty": "No supporting documents for this date. Attach the bank statement, engagement letter or other specification the account was reconciled against.", + "empty_short": "nothing attached", "remove": "Remove", "attached": "{name} attached", "removed": "{name} removed. The file stays in the archive with a note about the removal.", diff --git a/messages/sv.json b/messages/sv.json index de89003a..fb0fd225 100644 --- a/messages/sv.json +++ b/messages/sv.json @@ -8066,6 +8066,7 @@ "heading_dated": "Underlag per {date}", "attach": "Bifoga underlag", "empty": "Inget underlag bifogat för det här datumet. Bifoga kontoutdrag, engagemangsbesked eller annan specifikation som kontot stämts av mot.", + "empty_short": "inget bifogat", "remove": "Ta bort", "attached": "{name} bifogad", "removed": "{name} borttagen. Filen finns kvar i arkivet med en notering om borttagningen.",