116 lines
4.1 KiB
TypeScript
116 lines
4.1 KiB
TypeScript
import {
|
|
FileText,
|
|
Database,
|
|
AlertTriangle,
|
|
Activity,
|
|
Sparkles,
|
|
Plus
|
|
} from "lucide-react";
|
|
|
|
import InfoBanner from "@/components/common/infoBanner";
|
|
import Button from "@/components/common/button";
|
|
import StatCard from "@/components/common/dashStatCard";
|
|
import Table from "@/components/common/dataTable";
|
|
import { costInvoiceheaders, costInvoicerows } from "@/constants/tabledata";
|
|
|
|
|
|
|
|
|
|
export default function CostInvoicePortal() {
|
|
return (
|
|
<div className="my-15 text-slate-100 font-sans">
|
|
{/* --- HEADER SECTION WITH BUTTONS --- */}
|
|
<div className="flex flex-col md:flex-row md:items-start md:justify-between gap-4 mb-6">
|
|
<div>
|
|
<div className="flex items-center gap-2 text-[12px] font-bold tracking-widest text-slate-500 uppercase font-mono">
|
|
<span className="text-teal-400">Apple One — HQ Tower</span>
|
|
<span className="text-gray-600">•</span>
|
|
<span className="text-gray-400">FINANCE</span>
|
|
<span className="text-gray-400">•</span>
|
|
<span className="text-gray-400">COSTING & INVOICING</span>
|
|
</div>
|
|
|
|
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
|
|
Client costing & auto-invoicing
|
|
</h1>
|
|
|
|
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
|
|
Client-wise costing setup, automatic project approval and invoice generation — fully native, no external dependency.
|
|
</p>
|
|
</div>
|
|
|
|
{/* --- HEADER BUTTONS --- */}
|
|
<div className="flex items-center gap-2.5 self-start md:mt-6">
|
|
<Button className="bg-[#0b1727] hover:bg-slate-800/60 text-slate-200 border border-slate-800 text-xs px-3.5 py-2 rounded-lg flex items-center gap-2 font-semibold transition-colors">
|
|
<Sparkles className="w-4 h-4 text-slate-300" />
|
|
<span>Costing rules</span>
|
|
</Button>
|
|
|
|
<Button className="bg-teal-400 hover:bg-teal-300 text-slate-950 font-bold text-xs px-4 py-2 rounded-lg flex items-center gap-1.5 transition-colors">
|
|
<Plus className="w-4 h-4 stroke-[3]" />
|
|
<span>Generate invoice</span>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
|
|
{/* --- STAT CARDS --- */}
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
|
|
{/* Billed */}
|
|
<StatCard
|
|
variant="icon"
|
|
title="Billed"
|
|
value="₹99.4 L"
|
|
icon={FileText}
|
|
badgeText="this month"
|
|
badgeClassName="text-slate-400 lowercase font-mono"
|
|
iconContainerClassName="bg-blue-950/40 border-blue-800/30 text-blue-400"
|
|
/>
|
|
|
|
{/* Outstanding */}
|
|
<StatCard
|
|
variant="icon"
|
|
title="Outstanding"
|
|
value="₹45.0 L"
|
|
icon={Database}
|
|
badgeText="receivable"
|
|
badgeClassName="text-amber-400 lowercase font-mono"
|
|
iconContainerClassName="bg-amber-950/40 border-amber-800/30 text-amber-400"
|
|
/>
|
|
|
|
{/* Overdue */}
|
|
<StatCard
|
|
variant="icon"
|
|
title="Overdue"
|
|
value="₹4.3 L"
|
|
icon={AlertTriangle}
|
|
badgeText="follow up"
|
|
badgeClassName="text-rose-400 lowercase font-mono"
|
|
iconContainerClassName="bg-rose-950/40 border-rose-900/30 text-rose-400"
|
|
|
|
/>
|
|
|
|
{/* Collection rate */}
|
|
<StatCard
|
|
variant="icon"
|
|
title="Collection rate"
|
|
value="55%"
|
|
icon={Activity}
|
|
badgeText="MTD"
|
|
badgeClassName="text-slate-400 font-mono uppercase"
|
|
iconContainerClassName="bg-emerald-950/40 border-emerald-800/30 text-emerald-400"
|
|
/>
|
|
</div>
|
|
|
|
<div className="mt-5">
|
|
<Table headers={costInvoiceheaders} rows={costInvoicerows}/>
|
|
</div>
|
|
{/* Info Banner */}
|
|
<div className="my-8">
|
|
<InfoBanner
|
|
boldText="Auto-invoicing:"
|
|
normalText=" completed work orders and AMC visits roll up into client costing by contract rate → invoice drafts are generated, approved, and dispatched without manual re-entry."
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
} |