import { Package, AlertTriangle, Activity, FileText, LayoutGrid, Plus } from "lucide-react"; import Button from "@/utils/button"; import StatCard from "@/utils/dashStatCard"; import InfoBanner from "@/utils/infoBanner"; export default function InventoryPortal() { const stockItems = [ { item: "Cooling tower fan belt", group: "HVAC", store: "Block Store", min: 5, presentValue: 8, unit: "Gallon", status: "COMPLETED", isHighlighted: false, }, { item: "Air filter 24×24", group: "HVAC", store: "Block Store", min: 5, presentValue: 2, unit: "Nos", status: "OVERDUE", isHighlighted: true, }, { item: "MCB 32A", group: "Electrical", store: "Block Store", min: 5, presentValue: 8, unit: "Nos", status: "COMPLETED", isHighlighted: false, }, { item: "Contactor 40A", group: "Electrical", store: "Block Store", min: 2, presentValue: 2, unit: "Nos", status: "OVERDUE", isHighlighted: false, }, { item: "PVC pipe 1\"", group: "Plumbing", store: "Main Store", min: 3, presentValue: 0, unit: "Mtr", status: "OVERDUE", isHighlighted: false, }, { item: "Submersible pump seal", group: "Plumbing", store: "Main Store", min: 3, presentValue: 2, unit: "Nos", status: "OVERDUE", isHighlighted: false, }, { item: "Refrigerant R410a", group: "HVAC", store: "Block Store", min: 5, presentValue: 0, unit: "Kg", status: "OVERDUE", isHighlighted: false, }, ]; const consumptionLedger = [ { txn: "TXN-5200", item: "Cooling tower fan belt", type: "Consume", qty: "2 Gallon", jobCard: "026/1009", date: "Jun 20, 2026", }, { txn: "TXN-5201", item: "MCB 32A", type: "Consume", qty: "1 Nos", jobCard: "026/1016", date: "Jun 21, 2026", }, { txn: "TXN-5202", item: "Air filter 24×24", type: "Receipt", qty: "10 Nos", jobCard: "—", date: "Jun 22, 2026", }, { txn: "TXN-5203", item: "Submersible pump seal", type: "Consume", qty: "1 Nos", jobCard: "026/1023", date: "Jun 23, 2026", }, { txn: "TXN-5204", item: "Air filter 24×24", type: "Consume", qty: "3 Nos", jobCard: "026/1030", date: "Jun 24, 2026", }, { txn: "TXN-5205", item: "PVC pipe 1\"", type: "Receipt", qty: "20 Mtr", jobCard: "—", date: "Jun 25, 2026", }, { txn: "TXN-5406", item: "Cooling tower fan belt", type: "Consume", qty: "2 Gallon", jobCard: "026/1009", date: "Jun 7, 2026", }, { txn: "TXN-5407", item: "MCB 32A", type: "Consume", qty: "1 Nos", jobCard: "026/1016", date: "Jun 7, 2026", }, { txn: "TXN-5200", item: "Cooling tower fan belt", type: "Consume", qty: "2 Gallon", jobCard: "026/1009", date: "Jun 20, 2026", }, { txn: "TXN-5201", item: "MCB 32A", type: "Consume", qty: "1 Nos", jobCard: "026/1016", date: "Jun 21, 2026", }, { txn: "TXN-5202", item: "Air filter 24×24", type: "Receipt", qty: "10 Nos", jobCard: "—", date: "Jun 22, 2026", }, { txn: "TXN-5203", item: "Submersible pump seal", type: "Consume", qty: "1 Nos", jobCard: "026/1023", date: "Jun 23, 2026", }, { txn: "TXN-5204", item: "Air filter 24×24", type: "Consume", qty: "3 Nos", jobCard: "026/1030", date: "Jun 24, 2026", }, { txn: "TXN-5205", item: "PVC pipe 1\"", type: "Receipt", qty: "20 Mtr", jobCard: "—", date: "Jun 25, 2026", }, { txn: "TXN-5406", item: "Cooling tower fan belt", type: "Consume", qty: "2 Gallon", jobCard: "026/1009", date: "Jun 7, 2026", }, { txn: "TXN-5407", item: "MCB 32A", type: "Consume", qty: "1 Nos", jobCard: "026/1016", date: "Jun 7, 2026", }, ]; return (
{/* --- HEADER SECTION --- */}
Apple One — HQ Tower Operations Inventory

Inventory & stock

Stock master with receipt / consume transactions. Consumption posts back to the originating request job card; items at or below minimum are flagged for reorder.

{/* --- HEADER BUTTONS --- */}
{/* --- STAT CARDS --- */}
{/* Stock items */} {/* Below minimum */} {/* Units consumed */} {/* Posted to requests */}
{/* --- TABLES GRID (SIDE-BY-SIDE) --- */}
{/* LEFT TABLE: STOCK MASTER */}

Stock master

7 items
{/* Corrected column layout and removed horizontal scrollbar to align with the right UI. */}
{stockItems.map((row, index) => { const isOverdue = row.status === "OVERDUE"; return ( ); })}
Item Group Store Min Present Status
{row.isHighlighted && (
)} {row.item}
{row.group} {row.store} {row.min} {row.presentValue}{" "} {row.unit} {row.status === "COMPLETED" ? ( COMPLETED ) : ( OVERDUE )}
{/* RIGHT TABLE: CONSUMPTION LEDGER */}

Consumption ledger

posts back to job card
{consumptionLedger.map((row, index) => ( ))}
Txn Item Type Qty Job Card Date
{row.txn} {row.item} {row.type === "Consume" ? ( Consume ) : ( Receipt )} {row.qty} {row.jobCard} {row.date}
); }