EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
page.tsx
Go to the documentation of this file.
1"use client";
2import { Icon } from '@/contexts/IconContext';
3
4export default function MissingProductInfo() {
5 const data = [
6 {
7 id: 1,
8 sku: "CART-045",
9 name: "Brother TN-2450 Toner",
10 missingFields: ["Supplier", "Cost Price", "Barcode"],
11 severity: "high",
12 completeness: 60
13 },
14 {
15 id: 2,
16 sku: "CABLE-USB-12",
17 name: "USB-C Cable 2m",
18 missingFields: ["Description", "Category"],
19 severity: "medium",
20 completeness: 80
21 },
22 {
23 id: 3,
24 sku: "PAPER-A3",
25 name: "A3 Copy Paper",
26 missingFields: ["Weight", "Dimensions"],
27 severity: "low",
28 completeness: 90
29 }
30 ];
31
32 return (
33 <div className="p-6 min-h-screen bg-bg">
34 {/* Header with back button */}
35 <div className="mb-6">
36 <div className="flex items-center gap-3 mb-2">
37 <a
38 href="/pages/reports?source=advisor"
39 className="text-muted hover:text-brand transition-colors"
40 >
41 <Icon name="arrow_back" size={24} />
42 </a>
43 <h1 className="text-3xl font-bold text-text">Missing Product Information</h1>
44 </div>
45 <p className="text-muted ml-9">
46 Products with incomplete or missing required information
47 </p>
48 </div>
49
50 {/* Table */}
51 <div className="bg-surface rounded-lg shadow-sm border border-border overflow-hidden">
52 <div className="overflow-x-auto">
53 <table className="w-full">
54 <thead className="bg-[var(--brand)] text-surface">
55 <tr>
56 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
57 SKU
58 </th>
59 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
60 Product Name
61 </th>
62 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
63 Missing Fields
64 </th>
65 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
66 Completeness
67 </th>
68 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
69 Severity
70 </th>
71 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
72 Actions
73 </th>
74 </tr>
75 </thead>
76 <tbody className="divide-y divide-border">
77 {data.length === 0 ? (
78 <tr>
79 <td colSpan={6} className="px-6 py-12 text-center">
80 <Icon name="check_circle" size={48} className="text-success mx-auto mb-3" />
81 <p className="text-muted font-medium">All product information is complete</p>
82 <p className="text-muted-2 text-sm mt-1">No missing fields detected</p>
83 </td>
84 </tr>
85 ) : (
86 data.map((row) => (
87 <tr key={row.id} className="hover:bg-surface-2 transition-colors">
88 <td className="px-6 py-4 text-sm font-medium text-text">
89 {row.sku}
90 </td>
91 <td className="px-6 py-4 text-sm text-text">
92 {row.name}
93 </td>
94 <td className="px-6 py-4 text-sm text-muted">
95 {row.missingFields.join(", ")}
96 </td>
97 <td className="px-6 py-4 text-sm">
98 <div className="flex items-center gap-2">
99 <div className="flex-1 h-2 bg-surface-2 rounded-full overflow-hidden">
100 <div
101 className={`h-full ${
102 row.completeness >= 80 ? 'bg-success' :
103 row.completeness >= 60 ? 'bg-warning' :
104 'bg-error'
105 }`}
106 style={{ width: `${row.completeness}%` }}
107 />
108 </div>
109 <span className="text-muted min-w-[3rem] text-right">
110 {row.completeness}%
111 </span>
112 </div>
113 </td>
114 <td className="px-6 py-4">
115 <span className={`px-2 py-1 text-xs font-medium rounded ${
116 row.severity === 'high' ? 'bg-error/20 text-error' :
117 row.severity === 'medium' ? 'bg-warning/20 text-warning' :
118 'bg-muted/20 text-muted'
119 }`}>
120 {row.severity.toUpperCase()}
121 </span>
122 </td>
123 <td className="px-6 py-4 text-sm space-x-3">
124 <a href="#" className="text-brand hover:text-brand2 transition-colors">
125 Complete Info
126 </a>
127 <a href="#" className="text-muted hover:text-text transition-colors">
128 Review
129 </a>
130 </td>
131 </tr>
132 ))
133 )}
134 </tbody>
135 </table>
136 </div>
137 </div>
138 </div>
139 );
140}