feat: HSE dashboard with incident stats by type and site

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
This commit is contained in:
2026-07-11 07:40:22 +08:00
co-authored by Claude Sonnet 4.6
parent 713556631b
commit b281420810
4 changed files with 167 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
interface Props {
label: string
value: number
sub?: string
accent?: 'default' | 'green' | 'yellow' | 'red'
}
const ACCENT = {
default: 'border-gray-200',
green: 'border-green-400',
yellow: 'border-yellow-400',
red: 'border-red-400',
}
export function StatCard({ label, value, sub, accent = 'default' }: Props) {
return (
<div className={`bg-white rounded-xl shadow-sm p-5 border-t-4 ${ACCENT[accent]}`}>
<p className="text-xs text-gray-500 uppercase tracking-wide font-medium">{label}</p>
<p className="text-3xl font-bold text-gray-900 mt-1">{value}</p>
{sub && <p className="text-xs text-gray-400 mt-1">{sub}</p>}
</div>
)
}