Skip to content

feat: add teacher dashboard and support management#276

Open
nissrinebechi794-eng wants to merge 2 commits into
Open-TutorAi:mainfrom
nissrinebechi794-eng:feature/teacher-dashboard-support
Open

feat: add teacher dashboard and support management#276
nissrinebechi794-eng wants to merge 2 commits into
Open-TutorAi:mainfrom
nissrinebechi794-eng:feature/teacher-dashboard-support

Conversation

@nissrinebechi794-eng

Copy link
Copy Markdown

Description

This pull request introduces the teacher dashboard and support management module.

Features implemented

  • Teacher dashboard interface.

  • Navigation pages:

    • Mes cours
    • Soutien
    • Devoirs
    • Planification
    • Rapports
    • Paramètres

Support Management

  • Create support requests.
  • Display support requests.
  • Search and filter support requests.
  • Edit support requests.
  • Delete support requests.
  • Display support statistics and creation date.
  • Upload support files (PDF, images, and other supported documents).

Backend

  • Added teacher router.
  • Registered teacher routes in gateway/http/app.py.

UI

  • Added teacher pages and support management interface.
  • Added support request form with file upload capability.

Screenshots

Capture d’écran 2026-06-29 210439 SS QQQQ RRR

@Oumaima-elkhoummassi

Copy link
Copy Markdown

Hi @nissrinebechi794-eng

The PR description has the basic structure (features list, screenshots) - that's a good start.

What's missing: there's no documentation file in docs/ for this feature (teacher dashboard, support management, file uploads). Per the project rule, this needs at least a technical doc (endpoints, data models for supports) and a user guide, since there's a UI for teachers.

Could you add these before this is ready for review?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an initial teacher portal surface to the SvelteKit UI (dashboard + support-management UI) and introduces a new backend FastAPI router for teacher-related endpoints, wiring it into the main app.

Changes:

  • Implemented a teacher dashboard page with an in-page sidebar and a support-requests CRUD UI (including file upload) in ui/src/routes/teacher/+page.svelte.
  • Added placeholder teacher navigation route pages (mes-cours, soutien, devoirs, planification, rapports, parametres).
  • Added a new backend teacher router and registered it under /api/v1.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
ui/src/routes/teacher/+page.svelte Teacher dashboard shell + support management UI (list/search/filter/create/edit/delete + file upload).
ui/src/routes/teacher/soutien/+page.svelte Placeholder “Soutien” navigation page.
ui/src/routes/teacher/mes-cours/+page.svelte Placeholder “Mes cours” navigation page.
ui/src/routes/teacher/devoirs/+page.svelte Placeholder “Devoirs à corriger” navigation page.
ui/src/routes/teacher/planification/+page.svelte Placeholder “Planification” navigation page.
ui/src/routes/teacher/rapports/+page.svelte Placeholder “Rapports” navigation page.
ui/src/routes/teacher/parametres/+page.svelte Placeholder “Paramètres” navigation page.
gateway/http/routers/teacher.py New /teacher router with a /dashboard endpoint guarded by user role.
gateway/http/app.py Registers teacher router under /api/v1.

Comment on lines +1 to +20
from fastapi import APIRouter, Depends
from data.models import User
from gateway.http.dependencies import get_current_user

router = APIRouter(
prefix="/teacher",
tags=["teacher"]
)


@router.get("/dashboard")
async def get_teacher_dashboard(
current_user: User = Depends(get_current_user)
):
# Vérification du rôle
if current_user.role != "teacher":
return {
"success": False,
"message": "Access denied"
}
Comment on lines +11 to +14
@router.get("/dashboard")
async def get_teacher_dashboard(
current_user: User = Depends(get_current_user)
):
Comment thread gateway/http/app.py
# /api/v1/auths/* → TUTOR_API_BASE_URL calls (signin, signout, session, …)
app.include_router(auth.router)
app.include_router(auth.router, prefix="/api/v1")


<input
type="text"
placeholder="Recherché..."
Comment on lines +282 to +284
<button class="text-gray-500 text-xl">
🔔
</button>
Comment on lines +434 to +435
{#each filteredSupports as support}

Comment on lines +385 to +387
on:change={(e) => {
selectedFile = e.target.files[0];
}}
Comment on lines +477 to +481
<div class="mt-4 flex gap-3">



</div>
Comment on lines +63 to +66
const token = localStorage.getItem('token') || '';

supports = await getSupportRequests(token);

Comment on lines +1 to +3
<h1 class="p-10 text-3xl font-bold">
Soutien
</h1> No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants