feat(ui): kart özeti, KMH paneli, taksit seçimi ve kalan taksit iptali

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 11:19:17 +03:00
parent cc624af69f
commit 0ad52757ad
7 changed files with 512 additions and 9 deletions
+11
View File
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { hasHouseholdRole } from "@/features/households/roles";
import { StatementView } from "@/features/transactions/components/statement-view";
import { getCardSummary, getOverdraftSummary } from "@/features/transactions/card";
import { currentMonth, getAccountStatement } from "@/features/transactions/statement";
import { tr } from "@/i18n/tr";
import { requireActiveHousehold } from "@/lib/dal";
@@ -21,10 +22,20 @@ export default async function AccountStatementPage({
const month = requested > now ? now : requested;
const statement = await getAccountStatement(user.id, household.id, id, month);
if (!statement) notFound();
const [card, overdraft] = await Promise.all([
statement.account.type === "credit_card"
? getCardSummary(user.id, household.id, id)
: Promise.resolve(null),
statement.account.type === "bank"
? getOverdraftSummary(user.id, household.id, id)
: Promise.resolve(null),
]);
return (
<StatementView
key={`${id}-${month}`}
statement={statement}
card={card}
overdraft={overdraft}
canWrite={hasHouseholdRole(household.role, "member")}
/>
);