b6c6be5c97
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
944 B
TypeScript
30 lines
944 B
TypeScript
import { HandCoins } from "lucide-react";
|
||
import Link from "next/link";
|
||
import { Button } from "@/components/ui/button";
|
||
import { tr } from "@/i18n/tr";
|
||
import { countDueContacts } from "../service";
|
||
|
||
/** Dashboard: vadesi geçmiş veya yaklaşan cari borç/alacak uyarısı (Faz 8 kararı: uygulama içi). */
|
||
export async function ContactsDueBanner({
|
||
userId,
|
||
householdId,
|
||
}: {
|
||
userId: string;
|
||
householdId: string;
|
||
}) {
|
||
const n = await countDueContacts(userId, householdId);
|
||
if (!n) return null;
|
||
return (
|
||
<div
|
||
role="status"
|
||
className="flex flex-wrap items-center gap-3 rounded-xl border border-budget/30 bg-budget/10 p-3 text-sm"
|
||
>
|
||
<HandCoins className="size-4 shrink-0 text-budget" aria-hidden />
|
||
<span className="flex-1">{tr.contacts.dueBanner(n)}</span>
|
||
<Button asChild size="sm" variant="outline">
|
||
<Link href="/cari">{tr.contacts.dueLink}</Link>
|
||
</Button>
|
||
</div>
|
||
);
|
||
}
|