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 CustomerDataQuality() {
5 const data = [
6 {
7 id: 1,
8 customerName: "JOHN SMITH",
9 issueType: "Missing Email",
10 severity: "high",
11 lastUpdated: "2024-03-15",
12 recordAge: 245
13 },
14 {
15 id: 2,
16 customerName: "Sarah Johnson",
17 issueType: "Invalid Phone Number",
18 severity: "medium",
19 lastUpdated: "2024-11-20",
20 recordAge: 53
21 },
22 {
23 id: 3,
24 customerName: "Bob Williams",
25 issueType: "Incomplete Address",
26 severity: "medium",
27 lastUpdated: "2024-08-10",
28 recordAge: 155
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">Customer Data Quality</h1>
44 </div>
45 <p className="text-muted ml-9">
46 Customer records with data quality issues requiring attention
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 Customer Name
58 </th>
59 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
60 Issue Type
61 </th>
62 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
63 Severity
64 </th>
65 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
66 Last Updated
67 </th>
68 <th className="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider">
69 Record Age (Days)
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 customer data is high quality</p>
82 <p className="text-muted-2 text-sm mt-1">No data quality issues 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.customerName}
90 </td>
91 <td className="px-6 py-4 text-sm text-text">
92 {row.issueType}
93 </td>
94 <td className="px-6 py-4">
95 <span className={`px-2 py-1 text-xs font-medium rounded ${
96 row.severity === 'high' ? 'bg-error/20 text-error' :
97 row.severity === 'medium' ? 'bg-warning/20 text-warning' :
98 'bg-muted/20 text-muted'
99 }`}>
100 {row.severity.toUpperCase()}
101 </span>
102 </td>
103 <td className="px-6 py-4 text-sm text-muted">
104 {row.lastUpdated}
105 </td>
106 <td className="px-6 py-4 text-sm text-right">
107 <span className={`${
108 row.recordAge > 180 ? 'text-error font-medium' :
109 row.recordAge > 90 ? 'text-warning font-medium' :
110 'text-muted'
111 }`}>
112 {row.recordAge}
113 </span>
114 </td>
115 <td className="px-6 py-4 text-sm space-x-3">
116 <a href="#" className="text-brand hover:text-brand2 transition-colors">
117 Update
118 </a>
119 <a href="#" className="text-muted hover:text-text transition-colors">
120 Contact
121 </a>
122 <a href="#" className="text-muted hover:text-text transition-colors">
123 Review
124 </a>
125 </td>
126 </tr>
127 ))
128 )}
129 </tbody>
130 </table>
131 </div>
132 </div>
133 </div>
134 );
135}