+
+ {summary.map((s) => (
+
+
+ {s.label}
+
+ {formatMoney(s.value)}
+
+
+
+ ))}
+
+ {totals.includesHidden || totals.excludesHidden ? (
+
+ {totals.excludesHidden ? t.summary.excludesHidden : t.summary.includesHidden}
+
+ ) : null}
+
+
+ {!canEdit ?
{t.ownerOnly}
: null}
+ {canEdit ? (
+
+ ) : null}
+
+
+ {active.length === 0 ? (
+
+
{t.empty}
+ {canEdit ?
{t.emptyOwnerHint}
: null}
+
+ ) : (
+ ACCOUNT_TYPES.map((type) => {
+ const group = active.filter((a) => a.type === type);
+ if (!group.length) return null;
+ return (
+
+
+ {t.typeGroups[type]}
+
+
+ {group.map((a) => (
+
+ ))}
+
+
+ );
+ })
+ )}
+
+ {archived.length ? (
+
+
+
+
+
+
+ {archived.map((a) => (
+
+ ))}
+
+
+
+ ) : null}
+
+
!o && setDialog(null)}
+ />
+
+ !o && setArchiving(null)}>
+
+
+ {t.archiveTitle}
+
+ {archiving ? t.archiveDescription(archiving.name) : null}
+
+
+
+ {tr.common.cancel}
+
+
+
+
+
+ );
+}
diff --git a/src/features/accounts/service.int.test.ts b/src/features/accounts/service.int.test.ts
new file mode 100644
index 0000000..1db1033
--- /dev/null
+++ b/src/features/accounts/service.int.test.ts
@@ -0,0 +1,156 @@
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { AccountModel } from "@/models/account";
+import { HouseholdModel } from "@/models/household";
+import { setupSeededDb, teardownDb } from "@/test/seeded-db";
+import { createAccount, listAccounts, setAccountArchived, updateAccount } from "./service";
+
+let ids: Awaited