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:
@@ -165,13 +165,13 @@ export default async function HseDashboardPage({
|
||||
<div className="flex gap-3">
|
||||
<a
|
||||
href="/api/dashboard/export?role=hse"
|
||||
className="text-sm text-gray-500 hover:text-gray-700 border border-gray-200 rounded-lg px-3 py-1.5"
|
||||
className="text-sm text-gray-500 hover:text-gray-700 border border-divider px-3 py-1.5"
|
||||
>
|
||||
Export CSV
|
||||
</a>
|
||||
<a
|
||||
href={`/api/reports/jkkp8?year=${now.getFullYear()}`}
|
||||
className="text-sm text-gray-500 hover:text-gray-700 border border-gray-200 rounded-lg px-3 py-1.5"
|
||||
className="text-sm text-gray-500 hover:text-gray-700 border border-divider px-3 py-1.5"
|
||||
>
|
||||
JKKP 8
|
||||
</a>
|
||||
@@ -187,7 +187,7 @@ export default async function HseDashboardPage({
|
||||
{(tab === 'overview') && (
|
||||
<>
|
||||
{now.getMonth() === 0 && (
|
||||
<div className="bg-amber-50 border border-amber-200 rounded-xl p-4 mb-6">
|
||||
<div className="bg-amber-50 border border-amber-200 p-4 mb-6">
|
||||
<p className="text-sm text-amber-800">
|
||||
<strong>JKKP 8 annual register due:</strong> the {now.getFullYear() - 1} register must be
|
||||
submitted to DOSH before 31 January {now.getFullYear()}.{' '}
|
||||
@@ -210,7 +210,7 @@ export default async function HseDashboardPage({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<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-1">
|
||||
Leading vs Lagging — Last 30 Days
|
||||
</h2>
|
||||
@@ -218,16 +218,16 @@ export default async function HseDashboardPage({
|
||||
Leading: hazard + near-miss reports (predict risk) · Lagging: injuries (past harm)
|
||||
</p>
|
||||
<div className="flex gap-4">
|
||||
<div className="flex-1 text-center bg-blue-50 rounded-lg p-4">
|
||||
<div className="flex-1 text-center bg-blue-50 p-4">
|
||||
<p className="text-3xl font-bold text-blue-600">{leadingCount}</p>
|
||||
<p className="text-xs text-blue-700 mt-1">Leading (Hazards + Near Misses)</p>
|
||||
</div>
|
||||
<div className="flex-1 text-center bg-red-50 rounded-lg p-4">
|
||||
<div className="flex-1 text-center bg-red-50 p-4">
|
||||
<p className="text-3xl font-bold text-red-600">{laggingCount}</p>
|
||||
<p className="text-xs text-red-700 mt-1">Lagging (Injuries)</p>
|
||||
</div>
|
||||
{capaOnTimeRate !== null && (
|
||||
<div className="flex-1 text-center bg-green-50 rounded-lg p-4">
|
||||
<div className="flex-1 text-center bg-green-50 p-4">
|
||||
<p className="text-3xl font-bold text-green-600">{capaOnTimeRate}%</p>
|
||||
<p className="text-xs text-green-700 mt-1">CAPA On-Time Rate</p>
|
||||
</div>
|
||||
@@ -240,7 +240,7 @@ export default async function HseDashboardPage({
|
||||
{/* Trends tab */}
|
||||
{tab === 'trends' && (
|
||||
<>
|
||||
<div className="bg-white rounded-xl shadow-sm p-5 mb-4">
|
||||
<div className="bg-surface shadow-sm p-5 mb-4">
|
||||
<h2 className="text-sm font-semibold text-gray-900 mb-1">
|
||||
Incident Trend — Last 12 Months
|
||||
</h2>
|
||||
@@ -266,7 +266,7 @@ export default async function HseDashboardPage({
|
||||
</div>
|
||||
|
||||
{rootCauses.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-4">Top Root Causes</h2>
|
||||
<ol className="space-y-2">
|
||||
{rootCauses.map((rc, i) => (
|
||||
@@ -288,7 +288,7 @@ export default async function HseDashboardPage({
|
||||
{tab === 'zones' && (
|
||||
<>
|
||||
{by_zone.length > 0 && (
|
||||
<div className="bg-white rounded-xl shadow-sm p-5 mb-4">
|
||||
<div className="bg-surface shadow-sm p-5 mb-4">
|
||||
<h2 className="text-sm font-semibold text-gray-900 mb-4">
|
||||
Zone Incident Heatmap — Last 90 Days
|
||||
</h2>
|
||||
@@ -312,7 +312,7 @@ export default async function HseDashboardPage({
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="bg-white rounded-xl shadow-sm p-5 mb-4">
|
||||
<div className="bg-surface shadow-sm p-5 mb-4">
|
||||
<h2 className="text-sm font-semibold text-gray-900 mb-4">By Incident Type</h2>
|
||||
<div className="space-y-2">
|
||||
{Object.entries(by_type).sort((a, b) => b[1] - a[1]).map(([type, count]) => (
|
||||
@@ -333,7 +333,7 @@ export default async function HseDashboardPage({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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-4">By Site</h2>
|
||||
<div className="space-y-2">
|
||||
{by_site.map(({ name, count }) => (
|
||||
|
||||
Reference in New Issue
Block a user