refactor(design): drop rounded classes, swap bg-white and gray borders for tokens
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,7 @@ export default async function ReporterIncidentDetail({
|
||||
<Link href="/reporter" className="text-sm text-blue-600 hover:underline">← My Reports</Link>
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-xl shadow-sm p-5">
|
||||
<div className="bg-surface shadow-sm p-5">
|
||||
<div className="flex items-start justify-between gap-3 mb-4">
|
||||
<div>
|
||||
<h1 className="text-lg font-bold text-gray-900">{inc.referenceNo ?? inc.id.slice(0, 8)}</h1>
|
||||
@@ -98,7 +98,7 @@ export default async function ReporterIncidentDetail({
|
||||
</div>
|
||||
|
||||
{inc.description && (
|
||||
<div className="border-t border-gray-100 pt-4">
|
||||
<div className="border-t border-divider pt-4">
|
||||
<p className="text-xs text-gray-500 mb-1">Description</p>
|
||||
<p className="text-sm text-gray-800 whitespace-pre-line">{inc.description}</p>
|
||||
</div>
|
||||
@@ -106,17 +106,17 @@ export default async function ReporterIncidentDetail({
|
||||
</div>
|
||||
|
||||
{capas.length > 0 && (
|
||||
<div className="bg-white rounded-xl shadow-sm p-5">
|
||||
<div className="bg-surface shadow-sm p-5">
|
||||
<h2 className="text-sm font-semibold text-gray-900 mb-3">Corrective Actions ({capas.length})</h2>
|
||||
<div className="space-y-2">
|
||||
{capas.map(c => (
|
||||
<div key={c.id} className="flex items-start justify-between gap-3 text-sm">
|
||||
<p className="text-gray-700 flex-1">{c.description}</p>
|
||||
<span className={`text-xs rounded-full px-2 py-0.5 shrink-0 ${
|
||||
c.status === 'verified' ? 'bg-green-100 text-green-700' :
|
||||
c.status === 'pending_verification' ? 'bg-purple-100 text-purple-700' :
|
||||
'bg-gray-100 text-gray-600'
|
||||
}`}>{c.status.replace(/_/g, ' ')}</span>
|
||||
c.status === 'verified' ? 'bg-green-100 text-green-700' :
|
||||
c.status === 'pending_verification' ? 'bg-purple-100 text-purple-700' :
|
||||
'bg-gray-100 text-gray-600'
|
||||
}`}>{c.status.replace(/_/g, ' ')}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -62,34 +62,34 @@ export default async function ReporterPage() {
|
||||
</div>
|
||||
<Link
|
||||
href="/report"
|
||||
className="bg-blue-600 text-white rounded-lg px-4 py-2 text-sm font-semibold hover:bg-blue-700"
|
||||
className="bg-blue-600 text-white px-4 py-2 text-sm font-semibold hover:bg-blue-700"
|
||||
>
|
||||
+ New Report
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-4 mb-6 text-sm">
|
||||
<div className="bg-white rounded-xl shadow-sm p-4 flex-1 text-center">
|
||||
<div className="bg-surface shadow-sm p-4 flex-1 text-center">
|
||||
<p className="text-2xl font-bold text-gray-900">{rows.length}</p>
|
||||
<p className="text-xs text-gray-500 mt-1">Total Submitted</p>
|
||||
</div>
|
||||
<div className="bg-white rounded-xl shadow-sm p-4 flex-1 text-center">
|
||||
<div className="bg-surface shadow-sm p-4 flex-1 text-center">
|
||||
<p className="text-2xl font-bold text-yellow-600">{openCount}</p>
|
||||
<p className="text-xs text-gray-500 mt-1">In Progress</p>
|
||||
</div>
|
||||
<div className="bg-white rounded-xl shadow-sm p-4 flex-1 text-center">
|
||||
<div className="bg-surface shadow-sm p-4 flex-1 text-center">
|
||||
<p className="text-2xl font-bold text-green-600">{closedCount}</p>
|
||||
<p className="text-xs text-gray-500 mt-1">Closed</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{rows.length === 0 ? (
|
||||
<div className="bg-white rounded-xl shadow-sm p-8 text-center">
|
||||
<div className="bg-surface shadow-sm p-8 text-center">
|
||||
<p className="text-gray-400 text-sm mb-4">No incidents reported yet.</p>
|
||||
<Link href="/report" className="text-blue-600 text-sm hover:underline">Submit your first report →</Link>
|
||||
</div>
|
||||
) : (
|
||||
<div className="bg-white rounded-xl shadow-sm divide-y divide-gray-50">
|
||||
<div className="bg-surface shadow-sm divide-y divide-gray-50">
|
||||
{rows.map(inc => (
|
||||
<Link key={inc.id} href={`/reporter/incidents/${inc.id}`} className="block p-4 cursor-pointer hover:bg-gray-50 transition-colors">
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
|
||||
Reference in New Issue
Block a user