chore: formated tests
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m18s
Check Deno code / Check Deno code (push) Successful in 5s
Tests / Unit tests (push) Successful in 11s
Tests / Integration tests (push) Successful in 1m13s
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m18s
Check Deno code / Check Deno code (push) Successful in 5s
Tests / Unit tests (push) Successful in 11s
Tests / Integration tests (push) Successful in 1m13s
This commit was merged in pull request #147.
This commit is contained in:
@@ -1,8 +1,18 @@
|
|||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
type Student = { numEtud: number; nom: string; prenom: string; idPromo: string };
|
type Student = {
|
||||||
|
numEtud: number;
|
||||||
|
nom: string;
|
||||||
|
prenom: string;
|
||||||
|
idPromo: string;
|
||||||
|
};
|
||||||
type UE = { id: number; nom: string };
|
type UE = { id: number; nom: string };
|
||||||
type UEModule = { idModule: string; idUE: number; idPromo: string; coeff: number };
|
type UEModule = {
|
||||||
|
idModule: string;
|
||||||
|
idUE: number;
|
||||||
|
idPromo: string;
|
||||||
|
coeff: number;
|
||||||
|
};
|
||||||
type Module = { id: string; nom: string };
|
type Module = { id: string; nom: string };
|
||||||
type Note = { numEtud: number; idModule: string; note: number };
|
type Note = { numEtud: number; idModule: string; note: number };
|
||||||
type Ajustement = { numEtud: number; idUE: number; valeur: number };
|
type Ajustement = { numEtud: number; idUE: number; valeur: number };
|
||||||
@@ -202,9 +212,7 @@ export default function NoteRecap({ numEtud }: Props) {
|
|||||||
return (
|
return (
|
||||||
<div key={ue.id} class="edit-section">
|
<div key={ue.id} class="edit-section">
|
||||||
{/* UE header */}
|
{/* UE header */}
|
||||||
<div
|
<div style="display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap">
|
||||||
style="display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap"
|
|
||||||
>
|
|
||||||
<p class="edit-section-title" style="margin: 0">{ue.nom}</p>
|
<p class="edit-section-title" style="margin: 0">{ue.nom}</p>
|
||||||
{avg !== null && (
|
{avg !== null && (
|
||||||
<span class={noteClass(avg)} style="font-size: 0.78rem">
|
<span class={noteClass(avg)} style="font-size: 0.78rem">
|
||||||
@@ -254,9 +262,7 @@ export default function NoteRecap({ numEtud }: Props) {
|
|||||||
</span>
|
</span>
|
||||||
{isEditing
|
{isEditing
|
||||||
? (
|
? (
|
||||||
<div
|
<div style="display: flex; align-items: center; gap: 0.25rem">
|
||||||
style="display: flex; align-items: center; gap: 0.25rem"
|
|
||||||
>
|
|
||||||
<input
|
<input
|
||||||
class="form-input"
|
class="form-input"
|
||||||
style="width: 5rem; text-align: center; font-size: 0.85rem"
|
style="width: 5rem; text-align: center; font-size: 0.85rem"
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
import { assertEquals, assertExists } from "@std/assert";
|
import { assertEquals, assertExists } from "@std/assert";
|
||||||
import { makeEmployeeContext, makeGetRequest } from "../helpers/handler.ts";
|
import { makeEmployeeContext, makeGetRequest } from "../helpers/handler.ts";
|
||||||
import {
|
import { seedPermissions, truncateAll } from "../helpers/db_integration.ts";
|
||||||
seedPermissions,
|
|
||||||
truncateAll,
|
|
||||||
} from "../helpers/db_integration.ts";
|
|
||||||
import { handler as permissionsHandler } from "$apps/admin/api/permissions.ts";
|
import { handler as permissionsHandler } from "$apps/admin/api/permissions.ts";
|
||||||
|
|
||||||
const PERMISSIONS = [
|
const PERMISSIONS = [
|
||||||
{ id: "note_read", nom: "Consulter les notes des étudiants" },
|
{ id: "note_read", nom: "Consulter les notes des étudiants" },
|
||||||
{ id: "note_write", nom: "Saisir et modifier les notes" },
|
{ id: "note_write", nom: "Saisir et modifier les notes" },
|
||||||
{ id: "student_read", nom: "Consulter la liste des étudiants" },
|
{ id: "student_read", nom: "Consulter la liste des étudiants" },
|
||||||
{ id: "student_write", nom: "Gérer les étudiants (ajout, modification, suppression)" },
|
{
|
||||||
|
id: "student_write",
|
||||||
|
nom: "Gérer les étudiants (ajout, modification, suppression)",
|
||||||
|
},
|
||||||
{ id: "module_read", nom: "Consulter les modules et enseignements" },
|
{ id: "module_read", nom: "Consulter les modules et enseignements" },
|
||||||
{ id: "module_write", nom: "Gérer les modules et enseignements" },
|
{ id: "module_write", nom: "Gérer les modules et enseignements" },
|
||||||
{ id: "user_read", nom: "Consulter les utilisateurs et leurs rôles" },
|
{ id: "user_read", nom: "Consulter les utilisateurs et leurs rôles" },
|
||||||
|
|||||||
Reference in New Issue
Block a user