Files
PolyMPR/routes/(apps)/students/partials/index.tsx
T
djalim 5ba8b8cb68 feat(ui): implement full UI layer for all modules
Add interactive island components and server partials for notes,
students, and admin modules, following the Figma prototype design.

- static/styles/ui.css: shared component library (buttons, tables,
  chips, cards, filters, tabs, form inputs)
- notes: NotesView (student grade view with UE cards, promo tabs,
  weighted averages), AdminConsultNotes, AdminUEs islands + partials
- students: ConsultStudents (list/filter/delete), AdminPromotions
  (CRUD) islands + partials
- admin: AdminModules, AdminUsers, AdminRoles islands + partials
- All partials use State type with unknown cast for session access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 22:54:10 +02:00

50 lines
1.2 KiB
TypeScript

import {
getPartialsConfig,
makePartials,
} from "$root/defaults/makePartials.tsx";
import { FreshContext } from "$fresh/server.ts";
import { State } from "$root/defaults/interfaces.ts";
// deno-lint-ignore require-await
export async function Index(
_request: Request,
context: FreshContext<State>,
) {
const isEmployee =
(context.state as unknown as { session: Record<string, string> }).session
.eduPersonPrimaryAffiliation === "employee";
return (
<div class="page-content">
<h2 class="page-title">Étudiants</h2>
<p>
Bienvenue{" "}
<strong>
{(context.state as unknown as { session: Record<string, string> })
.session.displayName}
</strong>
.
</p>
{isEmployee && (
<p>
Consultez la{" "}
<a href="/students/consult" f-partial="/students/partials/consult">
liste des élèves
</a>{" "}
ou gérez les{" "}
<a
href="/students/promotions"
f-partial="/students/partials/promotions"
>
promotions
</a>
.
</p>
)}
</div>
);
}
export const config = getPartialsConfig();
export default makePartials(Index);