Files
property-management-network/components/dashboard/rent-status-badge.tsx
T
Leon SerfatyandClaude Opus 4.8 857b9a7811 Initial import: property management SaaS + security hardening + admin dashboard
Property Management Network — Next.js 16 (App Router), Better Auth,
Drizzle ORM over PostgreSQL, Stripe, OpenAI, Resend.

Includes:
- Security hardening: access-control/IDOR fixes, TLS-by-default DB layer,
  constant-time cron auth, strict security headers, atomic AI quota gating,
  HTML/email output encoding, demo-backdoor disabled in production.
- Superadmin dashboard at /admin (overview/MRR, server-paginated users with
  ban/impersonate/plan/delete, billing, platform activity + admin audit log,
  AI usage, system health) via the Better Auth admin plugin.
- Seed/migration utility scripts under scripts/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 20:36:07 -04:00

21 lines
954 B
TypeScript

import { cn } from "@/lib/utils"
type RentStatus = "pending" | "paid" | "overdue" | "partial" | "waived"
const config: Record<RentStatus, { label: string; className: string }> = {
paid: { label: "Paid", className: "text-emerald-400 bg-emerald-500/10 border-emerald-500/20" },
pending: { label: "Pending", className: "text-amber-400 bg-amber-500/10 border-amber-500/20" },
overdue: { label: "Overdue", className: "text-red-400 bg-red-500/10 border-red-500/20" },
partial: { label: "Partial", className: "text-blue-400 bg-blue-500/10 border-blue-500/20" },
waived: { label: "Waived", className: "text-white/40 bg-white/5 border-white/10" },
}
export function RentStatusBadge({ status }: { status: RentStatus }) {
const { label, className } = config[status] ?? config.pending
return (
<span className={cn("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium", className)}>
{label}
</span>
)
}