fix: dashboard
Deploy banu-front / deploy (push) Successful in 1m34s

This commit is contained in:
sajjadtalkhabi
2026-07-12 12:03:26 +03:30
parent dbc166f015
commit b592f520ab
33 changed files with 1714 additions and 102 deletions
+4
View File
@@ -0,0 +1,4 @@
import { http } from '@/services/api/http'
import { endpoints } from '@/services/api/endpoints'
export const apiGetAdminDashboard = () => http.get(endpoints.getAdminDashboard)
+4
View File
@@ -0,0 +1,4 @@
import { http } from '@/services/api/http'
import { endpoints } from '@/services/api/endpoints'
export const apiGetCounselorDashboard = () => http.get(endpoints.getCounselorDashboard)
+7
View File
@@ -28,6 +28,7 @@ export const endpoints = {
// (/courses, /sessions/:id, /exams/:id, /exams/:id/submit) — the backend
// infers role from the auth token and scopes the response. Terms have a
// dedicated student route (returns the membership row with the nested term).
getStudentDashboard: '/student/dashboard',
getStudentTerms: '/student/my-terms',
showStudentTerm: '/student/my-terms/:id',
getStudentExamResults: '/student/exam-results',
@@ -46,6 +47,12 @@ export const endpoints = {
getStudentCertificates: '/student/certificates',
downloadStudentCertificate: '/student/certificates/:id/download',
// ─── Per-role aggregated dashboards ────────────────────────────────────────
// Each requires the matching role's token; backend scopes the payload.
getAdminDashboard: '/admin/dashboard',
getCounselorDashboard: '/counselor/dashboard',
getMissionaryDashboard: '/missionary/dashboard',
// ─── Admin: users (out of scope of the Terms/Courses backend doc) ──────────
getPendingStudents: '/admin/pending-students',
showPendingStudent: '/admin/pending-students/:id',
+4
View File
@@ -0,0 +1,4 @@
import { http } from '@/services/api/http'
import { endpoints } from '@/services/api/endpoints'
export const apiGetMissionaryDashboard = () => http.get(endpoints.getMissionaryDashboard)
+4
View File
@@ -0,0 +1,4 @@
import { http } from '@/services/api/http'
import { endpoints } from '@/services/api/endpoints'
export const apiGetStudentDashboard = () => http.get(endpoints.getStudentDashboard)