Files
PolyMPR/routes/(apps)/notes/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

57 lines
1.4 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">PolyNotes</h2>
<p>
Bienvenue{" "}
<strong>
{(context.state as unknown as { session: Record<string, string> })
.session.displayName}
</strong>
.
</p>
{isEmployee
? (
<p>
Consultez les{" "}
<a href="/notes/courses" f-partial="/notes/partials/courses">
notes des élèves
</a>{" "}
ou gérez les{" "}
<a href="/notes/ues" f-partial="/notes/partials/ues">
UEs
</a>
.
</p>
)
: (
<p>
Consultez vos{" "}
<a href="/notes/notes" f-partial="/notes/partials/notes">
notes
</a>
.
</p>
)}
</div>
);
}
export const config = getPartialsConfig();
export default makePartials(Index);