feat(config): phase 7 — drop /ims basePath, update all hardcoded paths, refresh env spec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 22:27:46 +08:00
co-authored by Claude Sonnet 4.6
parent d785d86636
commit 9d047e168f
18 changed files with 45 additions and 37 deletions
+3 -3
View File
@@ -164,13 +164,13 @@ export default async function HseDashboardPage({
<h1 className="text-2xl font-bold text-gray-900">Dashboard</h1>
<div className="flex gap-3">
<a
href="/ims/api/dashboard/export?role=hse"
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"
>
Export CSV
</a>
<a
href={`/ims/api/reports/jkkp8?year=${now.getFullYear()}`}
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"
>
JKKP 8
@@ -191,7 +191,7 @@ export default async function HseDashboardPage({
<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()}.{' '}
<a href={`/ims/api/reports/jkkp8?year=${now.getFullYear() - 1}`} className="underline font-medium">
<a href={`/api/reports/jkkp8?year=${now.getFullYear() - 1}`} className="underline font-medium">
Download {now.getFullYear() - 1} register
</a>
</p>
+2 -2
View File
@@ -173,14 +173,14 @@ export default async function HseIncidentDetailPage({ params }: Props) {
{needsJkkp && (
<div className="mt-4 flex gap-3 flex-wrap">
<a
href={`/ims/api/incidents/${id}/jkkp-pdf?form=jkkp6`}
href={`/api/incidents/${id}/jkkp-pdf?form=jkkp6`}
target="_blank"
className="inline-block bg-gray-800 text-white rounded-lg px-4 py-2 text-sm font-semibold hover:bg-gray-900"
>
Download JKKP 6 (PDF)
</a>
<a
href={`/ims/api/incidents/${id}/jkkp-pdf?form=jkkp7`}
href={`/api/incidents/${id}/jkkp-pdf?form=jkkp7`}
target="_blank"
className="inline-block bg-gray-600 text-white rounded-lg px-4 py-2 text-sm font-semibold hover:bg-gray-700"
>
+1 -1
View File
@@ -92,7 +92,7 @@ export default async function ManagementPage() {
<div className="flex items-center justify-between mb-6">
<h1 className="text-2xl font-bold text-gray-900">Management Dashboard</h1>
<a
href="/ims/api/dashboard/export?role=management"
href="/api/dashboard/export?role=management"
className="text-sm text-gray-500 hover:text-gray-700 border border-gray-200 rounded-lg px-3 py-1.5"
>
Export CSV
+2 -2
View File
@@ -33,7 +33,7 @@ export default async function RootLayout({
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<head>
<link rel="manifest" href="/ims/manifest.json" />
<link rel="manifest" href="/manifest.json" />
</head>
<body className="min-h-full flex flex-col">
<I18nProvider messages={messages}>
@@ -41,7 +41,7 @@ export default async function RootLayout({
</I18nProvider>
<script
dangerouslySetInnerHTML={{
__html: `if('serviceWorker'in navigator){navigator.serviceWorker.register('/ims/sw.js',{scope:'/ims/'}).catch(console.error)}`,
__html: `if('serviceWorker'in navigator){navigator.serviceWorker.register('/sw.js',{scope:'/'}).catch(console.error)}`,
}}
/>
</body>