feat(ui): birikim sayfası, varlık detayı ve hareket diyalogları

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 23:17:44 +03:00
parent 890ba9f521
commit a818c110cf
8 changed files with 877 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { AssetDetailView } from "@/features/assets/components/asset-detail-view";
import { getAsset } from "@/features/assets/service";
import { tr } from "@/i18n/tr";
import { requireActiveHousehold } from "@/lib/dal";
export const metadata: Metadata = { title: tr.assets.history };
/** /birikim/:id — varlık hareketleri (gizli varlık yalnızca sahibine; aksi 404). */
export default async function AssetPage({ params }: PageProps<"/birikim/[id]">) {
const { user, household } = await requireActiveHousehold("viewer");
const { id } = await params;
const data = await getAsset(user.id, household.id, id);
if (!data) notFound();
return <AssetDetailView key={id} data={data} />;
}
+22
View File
@@ -0,0 +1,22 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { PageHeader } from "@/components/page-header";
import { AssetsView } from "@/features/assets/components/assets-view";
import { listAssets } from "@/features/assets/service";
import { tr } from "@/i18n/tr";
import { requireActiveHousehold } from "@/lib/dal";
export const metadata: Metadata = { title: tr.assets.title };
/** /birikim — altın, döviz ve ziynet varlıkları; ortalama maliyet ve kâr/zarar. */
export default async function AssetsPage() {
const { user, household } = await requireActiveHousehold("viewer");
const data = await listAssets(user.id, household.id);
if (!data) notFound();
return (
<>
<PageHeader title={tr.assets.title} description={tr.assets.description} />
<AssetsView items={data.items} totals={data.totals} canWrite={data.canWrite} />
</>
);
}