import { notFound } from "next/navigation"; import { Search } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; import { OzetHucre, OzetSerit } from "@/components/ozet-kart"; import { SATIR_AD_DUZ, SATIR_CIP, SATIR_META } from "@/components/liste-satiri"; import { yoneticiyiAl } from "@/lib/yonetici"; import { UYE_SAYFA_BOYU, uyeOzeti, uyeleriListele } from "../yonetim-queries"; import { EpostaMetni } from "./eposta-metni"; import { KrediCekmecesi } from "./kredi-cekmecesi"; import { UyeSayfalama } from "./uye-sayfalama"; const sayi = new Intl.NumberFormat("tr-TR"); const tarih = new Intl.DateTimeFormat("tr-TR", { day: "numeric", month: "short", year: "numeric", timeZone: "Europe/Istanbul", }); export async function YonetimIcerik({ ara, sayfa, }: { ara?: string; sayfa: number; }) { // Yönetici değilse sayfanın varlığı da belli olmasın const yonetici = await yoneticiyiAl(); if (!yonetici) notFound(); const [ozet, liste] = await Promise.all([ uyeOzeti(), uyeleriListele({ ara, sayfa }), ]); const toplamSayfa = Math.max(1, Math.ceil(liste.toplam / UYE_SAYFA_BOYU)); return (

Üyeler

Kayıtlı hesaplar ve kredi bakiyeleri. Eklediğin ya da düştüğün her kredi deftere yazılır.

{ara ? `"${ara}" için ${sayi.format(liste.toplam)} üye` : `${sayi.format(liste.toplam)} üye`}

{liste.satirlar.length === 0 ? (

{ara ? "Bu aramayla eşleşen üye yok." : "Henüz kayıtlı üye yok."}

) : ( )} {toplamSayfa > 1 ? ( ) : null}
); } export function YonetimIcerikSkeleton() { return (
{Array.from({ length: 6 }, (_, i) => ( ))}
); }