2import { Icon } from '@/contexts/IconContext';
4export default function StockLevelIssues() {
13 issueType: "understock",
14 location: "Main Store"
19 name: "A4 Paper 500 Sheet",
23 issueType: "overstock",
29 name: "7 Port USB Hub",
34 location: "Branch Store"
39 <div className="p-6 min-h-screen bg-bg">
40 {/* Header with back button */}
41 <div className="mb-6">
42 <div className="flex items-center gap-3 mb-2">
44 href="/pages/reports?source=advisor"
45 className="text-muted hover:text-brand transition-colors"
47 <Icon name="arrow_back" size={24} />
49 <h1 className="text-3xl font-bold text-text">Stock Level Issues</h1>
51 <p className="text-muted ml-9">
52 Products with stock levels outside recommended ranges
57 <div className="bg-surface rounded-lg shadow-sm border border-border overflow-hidden">
58 <div className="overflow-x-auto">
59 <table className="w-full">
60 <thead className="bg-[var(--brand)] text-surface">
62 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
65 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
68 <th className="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider">
71 <th className="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider">
74 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
77 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
80 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
85 <tbody className="divide-y divide-border">
86 {data.length === 0 ? (
88 <td colSpan={7} className="px-6 py-12 text-center">
89 <Icon name="check_circle" size={48} className="text-success mx-auto mb-3" />
90 <p className="text-muted font-medium">All stock levels are optimal</p>
91 <p className="text-muted-2 text-sm mt-1">No stock issues detected</p>
96 <tr key={row.id} className="hover:bg-surface-2 transition-colors">
97 <td className="px-6 py-4 text-sm font-medium text-text">
100 <td className="px-6 py-4 text-sm text-text">
103 <td className="px-6 py-4 text-sm text-right">
104 <span className={`font-medium ${
105 row.issueType === 'zero' ? 'text-error' :
106 row.issueType === 'understock' ? 'text-warning' :
112 <td className="px-6 py-4 text-sm text-muted text-right">
113 {row.minStock} / {row.maxStock}
115 <td className="px-6 py-4">
116 <span className={`px-2 py-1 text-xs font-medium rounded ${
117 row.issueType === 'zero' ? 'bg-error/20 text-error' :
118 row.issueType === 'understock' ? 'bg-warning/20 text-warning' :
119 'bg-info/20 text-info'
121 {row.issueType === 'zero' ? 'OUT OF STOCK' :
122 row.issueType === 'understock' ? 'LOW STOCK' :
126 <td className="px-6 py-4 text-sm text-muted">
129 <td className="px-6 py-4 text-sm space-x-3">
130 {row.issueType === 'overstock' ? (
132 <a href="#" className="text-brand hover:text-brand2 transition-colors">
135 <a href="#" className="text-muted hover:text-text transition-colors">
141 <a href="#" className="text-brand hover:text-brand2 transition-colors">
144 <a href="#" className="text-muted hover:text-text transition-colors">