feat: emlak CRM iskelet kurulumu

- schema.ts tamamen yeniden yazıldı (properties, customers, customer_searches, property_matches, presentations, investors, activities, tenant_settings)
- Sidebar emlak modüllerine güncellendi (İlanlar, Müşteriler, Yatırımcılar, Sunumlar, Aktiviteler)
- Eski CRM lib dosyaları temizlendi (finance, invoice, lead, task, software, vs.)
- Yeni modül dizinleri oluşturuldu (stub pages)
- command-search emlak navigasyonuna güncellendi
- site-header temizlendi
- Typecheck: 0 hata (chart.tsx template hariç)
This commit is contained in:
egecankomur
2026-05-05 11:43:29 +03:00
parent 37679e83e6
commit 2f17c342ca
172 changed files with 422 additions and 23862 deletions
-68
View File
@@ -1,68 +0,0 @@
import Link from "next/link";
import { AlertTriangle, Crown } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import {
RESOURCE_LABELS,
type PlanResource,
type PlanUsage,
} from "@/lib/appwrite/plan-limits";
const SOFT_THRESHOLD = 0.8;
export function UsageBanner({
usage,
resource,
}: {
usage: PlanUsage;
resource: PlanResource;
}) {
if (usage.plan === "pro") return null;
const u = usage.usage[resource];
if (u.limit === Number.POSITIVE_INFINITY) return null;
const ratio = u.used / u.limit;
if (ratio < SOFT_THRESHOLD) return null;
const label = RESOURCE_LABELS[resource];
const reached = u.reached;
return (
<Card
className={
reached
? "border-destructive/40 bg-destructive/5"
: "border-amber-500/40 bg-amber-500/5"
}
>
<CardContent className="flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between">
<div className="flex items-start gap-2 text-sm">
<AlertTriangle
className={`size-4 mt-0.5 shrink-0 ${
reached ? "text-destructive" : "text-amber-600"
}`}
/>
<div>
<span className="font-medium">
{reached ? "Sınıra ulaşıldı" : "Sınıra yaklaşıyorsun"}:
</span>{" "}
<span className="text-muted-foreground">
{u.used} / {u.limit} {label}.
</span>
{reached && (
<span className="text-muted-foreground"> Yeni {label} eklemek için Pro'ya geç.</span>
)}
</div>
</div>
<Button asChild size="sm" variant={reached ? "default" : "outline"}>
<Link href="/settings/billing">
<Crown className="size-3.5" />
Pro'ya geç
</Link>
</Button>
</CardContent>
</Card>
);
}