Improve workforce scanning, site transfers and timesheet exports. Audit plant imports, duplicate identities, rates and dashboard totals. Repair delivery PO selection, periodic rechecks and receiving guards. Align financial ledgers, supplier periods and mobile layouts. Add the site map preview, shared theme controls and audit evidence. Verify 3,455 application tests, six fuel export tests, TypeScript and an optimized production build. Clean up a leaked test timer and keep local worktrees and generated reports out of ESLint traversal. Changed-file lint passes; repository-wide lint retains 33 existing errors in unchanged files.
110 lines
3.6 KiB
TypeScript
110 lines
3.6 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import Script from "next/script";
|
|
import "./globals.css";
|
|
import "leaflet/dist/leaflet.css";
|
|
import "leaflet.markercluster/dist/MarkerCluster.css";
|
|
import "leaflet.markercluster/dist/MarkerCluster.Default.css";
|
|
import { AuthProvider } from "@/hooks/use-auth";
|
|
import { ThemeProvider } from "@/hooks/use-theme";
|
|
import { PwaRegister } from "@/components/pwa-register";
|
|
|
|
// Every deployment uses named PocketBase sessions.
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "MEGA INFRASTRUCTURE · Operations",
|
|
description:
|
|
"Construction site operations dashboard — fuel tracking, order management, and workforce hours for MEGA INFRASTRUCTURE.",
|
|
applicationName: "MEGA INFRASTRUCTURE",
|
|
// Declared here rather than as a <link> in the head so that a child
|
|
// route can override it — /dashboard/chat does exactly that.
|
|
manifest: "/manifest.json",
|
|
authors: [{ name: "MEGA INFRASTRUCTURE" }],
|
|
generator: "Next.js",
|
|
keywords: [
|
|
"construction",
|
|
"operations",
|
|
"fuel tracking",
|
|
"workforce",
|
|
"orders",
|
|
"site management",
|
|
],
|
|
// Open Graph — used by WhatsApp, Facebook, LinkedIn, Discord, etc.
|
|
openGraph: {
|
|
type: "website",
|
|
siteName: "MEGA INFRASTRUCTURE",
|
|
title: "MEGA INFRASTRUCTURE · Operations",
|
|
description:
|
|
"Site operations dashboard — fuel tracking, order management, and workforce hours.",
|
|
images: [
|
|
{
|
|
url: "/og-image.png",
|
|
width: 1200,
|
|
height: 630,
|
|
alt: "MEGA INFRASTRUCTURE — Site operations dashboard",
|
|
},
|
|
],
|
|
locale: "en_ZA",
|
|
},
|
|
// Twitter / X card
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "MEGA INFRASTRUCTURE · Operations",
|
|
description:
|
|
"Site operations dashboard — fuel tracking, order management, and workforce hours.",
|
|
images: ["/og-image.png"],
|
|
},
|
|
appleWebApp: {
|
|
capable: true,
|
|
title: "MEGA OPS",
|
|
statusBarStyle: "default",
|
|
},
|
|
formatDetection: {
|
|
telephone: false,
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#e8ebed" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#1c2433" },
|
|
],
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{ children: React.ReactNode }>) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head>
|
|
{/* The manifest is declared via the metadata API, not here — a
|
|
hardcoded <link> cannot be overridden by a child route, and
|
|
/dashboard/chat ships its own manifest so it installs as a
|
|
separate app. */}
|
|
<meta name="theme-color" content="#fdb13c" />
|
|
{/* Next 16's appleWebApp metadata only emits
|
|
`mobile-web-app-capable`, but iOS Safari ignores that for
|
|
Add-to-Home-Screen standalone mode. The `apple-mobile-web-app-capable`
|
|
tag is what makes the home-screen icon launch the app without
|
|
Safari's URL bar / chrome. Harmless on non-iOS browsers. */}
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<Script
|
|
src="https://umami-vmyngbmelll45wokwr270wbx.169.239.180.130.sslip.io/script.js"
|
|
data-website-id="7655a10d-78f7-4391-a0b5-1f8449d4598a"
|
|
strategy="afterInteractive"
|
|
/>
|
|
</head>
|
|
<body>
|
|
<ThemeProvider>
|
|
<AuthProvider mode="users">
|
|
<PwaRegister />
|
|
{children}
|
|
</AuthProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|