feat: stages module, mobility frontend, theme toggle, employeeOnly access control
- 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
This commit is contained in:
+18
-3
@@ -1,13 +1,28 @@
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
import { FreshContext, Handlers } from "$fresh/server.ts";
|
||||
import { State } from "$root/defaults/interfaces.ts";
|
||||
|
||||
// deno-lint-ignore require-await
|
||||
export default async function Home(_request: Request, _context: FreshContext) {
|
||||
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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user