Alpenwerk HR — HR-Stammdatenverwaltung Mitarbeiter:innen, Organisationsstruktur, Planstellen, Eintritt, Austritt, Versetzung, Beförderung, Karenz, On- und Offboarding, Berichte, Exporte, Massenimport und ein lückenloser Nachweis jeder Änderung. Next.js 16, React 19 und TypeScript; PostgreSQL über Kysely; Anmeldung ausschliesslich über Microsoft Entra ID. Die Fachlogik liegt in der Datenbank, die Zugriffsschranke ist Row Level Security. Betrieb auf Windows Server: siehe deploy/windows/README.md. Sicherheitskonzept: docs/sicherheitskonzept.md.
51 lines
2.0 KiB
TypeScript
51 lines
2.0 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
// Last resort: catches errors thrown by the root layout itself, where
|
|
// (app)/error.tsx is not mounted yet. It replaces <html>, so it cannot use
|
|
// the app's fonts, Tailwind layer or shared components — hence the inline
|
|
// styles. Kept deliberately plain; anything clever here can fail too.
|
|
//
|
|
// Die Farben sind dieselben wie in app/globals.css, nur von Hand: surface,
|
|
// border, ink, ink-body, ink-muted und brand-500. Sie stehen hier doppelt,
|
|
// weil diese Seite gerade dann erscheint, wenn das Stylesheet nicht
|
|
// getragen hat — eine Variable waere hier genau das, worauf man sich nicht
|
|
// verlassen kann.
|
|
export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
|
|
useEffect(() => {
|
|
console.error("Global error:", error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<html lang="de-AT">
|
|
<body style={{ margin: 0, backgroundColor: "#fdf6f4", fontFamily: "system-ui, sans-serif", color: "#231f20" }}>
|
|
<div style={{ maxWidth: 480, margin: "15vh auto", padding: 24, background: "#fff", border: "1px solid #f0dbd4", borderRadius: 8 }}>
|
|
<h1 style={{ fontSize: 18, margin: "0 0 8px" }}>Die Anwendung konnte nicht geladen werden</h1>
|
|
<p style={{ fontSize: 14, lineHeight: 1.5, color: "#4b4446", margin: "0 0 16px" }}>
|
|
Es ist ein unerwarteter Fehler aufgetreten. Ihre Daten sind davon nicht betroffen.
|
|
</p>
|
|
{error.digest && (
|
|
<p style={{ fontSize: 12, fontFamily: "monospace", color: "#756c6e", margin: "0 0 16px" }}>Fehlerkennung: {error.digest}</p>
|
|
)}
|
|
<button
|
|
onClick={reset}
|
|
style={{
|
|
background: "#164194",
|
|
color: "#fff",
|
|
border: "none",
|
|
borderRadius: 4,
|
|
padding: "8px 16px",
|
|
fontSize: 14,
|
|
fontWeight: 600,
|
|
cursor: "pointer",
|
|
}}
|
|
>
|
|
Erneut versuchen
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|