diff --git a/app/(dashboard)/hem-sections.tsx b/app/(dashboard)/hem-sections.tsx
index 3286d3e6..cdca1ac7 100644
--- a/app/(dashboard)/hem-sections.tsx
+++ b/app/(dashboard)/hem-sections.tsx
@@ -190,7 +190,7 @@ export async function HemPanesSection({
// the worklist count is the list's length (it used to scan the same rows
// twice). Everything else runs in the same wave.
const suggestedMatchesPromise = listSuggestedMatches(supabase, companyId, SUGGESTED_MATCH_SCAN_CAP)
- const [worklist, suggestedMatches, resumeItems, { data: bankConnections }, postedEntries] =
+ const [worklist, suggestedMatches, resumeItems, bankConnectionsRes, postedEntries] =
await Promise.all([
// Pending-work counts come from lib/worklist: the same source as the
// sidebar badges, so the numbers can never diverge.
@@ -210,6 +210,11 @@ export async function HemPanesSection({
// bookkeeping that its ledger is blank, so errors degrade to the normal copy.
const emptyLedger = setupOpen && !postedEntries.error && (postedEntries.count || 0) === 0
+ const bankConnections = bankConnectionsRes.data
+ // Same degrade-on-error rule as emptyLedger: a failed fetch must NOT tell a
+ // connected company that no bank is connected, so errors read as connected.
+ const hasActiveBankConnection = !!bankConnectionsRes.error || (bankConnections ?? []).length > 0
+
// Same day-math as the bank_connection_expiring notice predicate
// (lib/notices/categories.ts): the Bevaka row and the notice can never
// disagree on the threshold.
@@ -225,6 +230,7 @@ export async function HemPanesSection({
suggestedMatches={suggestedMatches.slice(0, 5)}
expiringBankConnections={expiringBankConnections}
emptyLedger={emptyLedger}
+ hasActiveBankConnection={hasActiveBankConnection}
/>
diff --git a/components/dashboard/AttGoraSection.tsx b/components/dashboard/AttGoraSection.tsx
index 0bb42d58..f43cf70b 100644
--- a/components/dashboard/AttGoraSection.tsx
+++ b/components/dashboard/AttGoraSection.tsx
@@ -60,6 +60,14 @@ interface AttGoraSectionProps {
* state then says "nothing here yet" instead of a false "all caught up".
*/
emptyLedger?: boolean
+ /**
+ * False when the company has no active bank connection. The all-clear state
+ * then explains that nothing flows in automatically and offers "Anslut bank"
+ * instead of a bare "all caught up": for a disconnected company the silence
+ * is a setup gap, not an achievement. Defaults to true so a fetch error
+ * degrades to the ordinary all-clear copy, never to a wrong nag.
+ */
+ hasActiveBankConnection?: boolean
}
interface WorklistRowProps {
@@ -108,6 +116,7 @@ export default function AttGoraSection({
suggestedMatches,
expiringBankConnections = [],
emptyLedger = false,
+ hasActiveBankConnection = true,
}: AttGoraSectionProps) {
const t = useTranslations('dashboard')
const { toast } = useToast()
@@ -237,13 +246,22 @@ export default function AttGoraSection({
description={t('att_gora_new_body')}
className="py-10"
/>
- ) : (
+ ) : hasActiveBankConnection ? (
+ ) : (
+
)
) : (
diff --git a/messages/en.json b/messages/en.json
index 2ae25ac3..c32d3cb0 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -6927,6 +6927,9 @@
"att_gora_empty_title": "All caught up!",
"att_gora_empty_body": "No transactions to record and no documents to handle.",
"att_gora_new_status": "Nothing here yet",
+ "att_gora_no_bank_title": "All clear for now",
+ "att_gora_no_bank_body": "No bank is connected. Connect your bank to fetch bank transactions automatically.",
+ "att_gora_no_bank_action": "Connect bank",
"att_gora_new_title": "Your books are empty so far",
"att_gora_new_body": "The get-started steps above will fill them: your history, the bank and the receipts.",
"band_bokfor": "Record",
diff --git a/messages/sv.json b/messages/sv.json
index 938be1d8..7e7a7c8f 100644
--- a/messages/sv.json
+++ b/messages/sv.json
@@ -6927,6 +6927,9 @@
"att_gora_empty_title": "Allt klart!",
"att_gora_empty_body": "Inga transaktioner att bokföra och inga underlag att hantera.",
"att_gora_new_status": "Inget här än",
+ "att_gora_no_bank_title": "Allt klart just nu",
+ "att_gora_no_bank_body": "Ingen bank är ansluten. Anslut din bank så hämtas banktransaktioner automatiskt.",
+ "att_gora_no_bank_action": "Anslut bank",
"att_gora_new_title": "Bokföringen är tom än så länge",
"att_gora_new_body": "Kom igång-stegen ovan fyller den: historiken, banken och kvittona.",
"band_bokfor": "Bokför",