123 lines
2.9 KiB
JavaScript
123 lines
2.9 KiB
JavaScript
// Missionary passed (completed) education. Shapes mirror /student/my-terms,
|
|
// /courses and /sessions. Session ids reuse existing adminSessions ids so the
|
|
// shared GET /sessions/:id mock resolves the detail drill-down.
|
|
|
|
const makeTerm = (id, title, over) => ({
|
|
id,
|
|
title,
|
|
description: 'ترم تکمیلشده',
|
|
isActive: false,
|
|
startsAt: '2025-09-22T00:00:00+00:00',
|
|
endsAt: '2026-01-20T00:00:00+00:00',
|
|
score: 20,
|
|
minimumScore: 12,
|
|
coverUrl: null,
|
|
coursesCount: 3,
|
|
sessionsCount: 18,
|
|
examsCount: 12,
|
|
homeworksCount: 15,
|
|
studentsCount: 40,
|
|
createdAt: '2025-08-01T10:00:00+00:00',
|
|
...over,
|
|
})
|
|
|
|
export const passedTerms = [
|
|
{
|
|
id: 9,
|
|
userId: 14,
|
|
termId: 3,
|
|
status: 'completed',
|
|
completedAt: '2026-02-01T10:00:00+00:00',
|
|
term: makeTerm(3, 'پاییز ۱۴۰۴'),
|
|
},
|
|
{
|
|
id: 10,
|
|
userId: 14,
|
|
termId: 4,
|
|
status: 'completed',
|
|
completedAt: '2025-07-05T10:00:00+00:00',
|
|
term: makeTerm(4, 'تابستان ۱۴۰۴', { coursesCount: 1, sessionsCount: 6 }),
|
|
},
|
|
]
|
|
|
|
const teacher = { id: 2, name: 'علیرضا حسینی' }
|
|
|
|
export const passedCourses = [
|
|
{
|
|
id: 21,
|
|
termId: 3,
|
|
teacherId: 2,
|
|
teacher,
|
|
title: 'مبانی اعتقادات',
|
|
description: 'درس پایه',
|
|
capacity: 50,
|
|
isActive: false,
|
|
coverUrl: null,
|
|
sessionsCount: 2,
|
|
examsCount: 6,
|
|
homeworksCount: 7,
|
|
prerequisiteCourseIds: [],
|
|
prerequisiteCourses: [],
|
|
},
|
|
{
|
|
id: 22,
|
|
termId: 3,
|
|
teacherId: 2,
|
|
teacher,
|
|
title: 'اخلاق کاربردی',
|
|
description: 'درس تکمیلی',
|
|
capacity: 40,
|
|
isActive: false,
|
|
coverUrl: null,
|
|
sessionsCount: 1,
|
|
examsCount: 2,
|
|
homeworksCount: 3,
|
|
prerequisiteCourseIds: [],
|
|
prerequisiteCourses: [],
|
|
},
|
|
{
|
|
id: 30,
|
|
termId: 4,
|
|
teacherId: 2,
|
|
teacher,
|
|
title: 'تاریخ اسلام',
|
|
description: 'درس پایه',
|
|
capacity: 45,
|
|
isActive: false,
|
|
coverUrl: null,
|
|
sessionsCount: 0,
|
|
examsCount: 1,
|
|
homeworksCount: 2,
|
|
prerequisiteCourseIds: [],
|
|
prerequisiteCourses: [],
|
|
},
|
|
]
|
|
|
|
const makeSession = (id, courseId, title, over) => ({
|
|
id,
|
|
courseId,
|
|
title,
|
|
description: 'جلسه گذراندهشده',
|
|
type: 'online',
|
|
startsAt: '2025-09-25T18:00:00+03:30',
|
|
durationMinutes: 90,
|
|
location: null,
|
|
link: 'https://meet.example.com/abc',
|
|
prerequisiteSessionIds: [],
|
|
examsCount: 1,
|
|
homeworksCount: 2,
|
|
prerequisiteSessions: [],
|
|
isComplete: true,
|
|
isSeen: true,
|
|
course: { id: courseId, termId: 3, teacherId: 2, title: 'مبانی اعتقادات' },
|
|
...over,
|
|
})
|
|
|
|
export const passedSessions = [
|
|
makeSession(101, 21, 'جلسه اول — مقدمه'),
|
|
makeSession(102, 21, 'جلسه دوم — مفاهیم پایه'),
|
|
makeSession(103, 22, 'جلسه اول — کلیات', {
|
|
course: { id: 22, termId: 3, teacherId: 2, title: 'اخلاق کاربردی' },
|
|
}),
|
|
]
|