9a4c6863d1
- Add stages module with full CRUD API and admin overview island - Add mobility overview island (Liste, Kanban, Detail CRUD views) - Add contract PDF upload/download endpoints for mobilites - Add light/dark theme toggle in header - Add employeeOnly flag to hide entire modules from students (admin, students, stages) - Add read-only GET endpoints for modules/ues/ue-modules in notes module - Add [slug].tsx catch-all routes for direct URL navigation - Replace old mobility table with mobilites + stages schema (migration 0004) - Allow students to create mobilites and upload contracts - Redirect authenticated users from / to /apps catalog
29 lines
629 B
TypeScript
29 lines
629 B
TypeScript
import { FreshContext, Handlers } from "$fresh/server.ts";
|
|
import { State } from "$root/defaults/interfaces.ts";
|
|
|
|
export const handler: Handlers<unknown, State> = {
|
|
GET(_request: Request, context: FreshContext<State>) {
|
|
if (context.state.isAuthenticated) {
|
|
return new Response(null, {
|
|
status: 302,
|
|
headers: { Location: "/apps" },
|
|
});
|
|
}
|
|
return context.render();
|
|
},
|
|
};
|
|
|
|
export default function Home() {
|
|
return (
|
|
<>
|
|
<h2>PolyMPR</h2>
|
|
<h3>
|
|
The <em>ultimate</em> HR platform
|
|
</h3>
|
|
<p>
|
|
<a href="/login">Se connecter</a>
|
|
</p>
|
|
</>
|
|
);
|
|
}
|