feat: complete dashboard mvp
This commit is contained in:
@@ -15,9 +15,8 @@
|
||||
import PageNav from '$lib/components/PageNav/index.svelte';
|
||||
import PageBody from '$lib/components/PageBody/index.svelte';
|
||||
import Box from '$lib/components/Box/index.svelte';
|
||||
import { course, group, setCourse } from '$lib/components/Course/store';
|
||||
import { course, group } from '$lib/components/Course/store';
|
||||
import { getLectureNo } from '$lib/components/Course/function';
|
||||
import { fetchCourse } from '$lib/utils/services/courses';
|
||||
import { lessons } from '$lib/components/Course/components/Lesson/store/lessons';
|
||||
import { ROLE } from '$lib/utils/constants/roles';
|
||||
import { takeAttendance } from '$lib/utils/services/attendance';
|
||||
@@ -27,6 +26,7 @@
|
||||
import type { GroupPerson, Lesson } from '$lib/utils/types/index';
|
||||
|
||||
export let data;
|
||||
|
||||
interface CourseData {
|
||||
attendance: {
|
||||
student_id: string;
|
||||
@@ -127,12 +127,6 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const { data: _data } = await fetchCourse(data.courseId);
|
||||
if (!_data) return;
|
||||
|
||||
setCourse(_data);
|
||||
setAttendance(_data);
|
||||
});
|
||||
|
||||
$: students = isStudent
|
||||
@@ -140,7 +134,7 @@
|
||||
: $group.people.filter((person) => !!person.profile && person.role_id === ROLE.STUDENT);
|
||||
</script>
|
||||
|
||||
<CourseContainer bind:isStudent>
|
||||
<CourseContainer bind:isStudent bind:courseId={data.courseId}>
|
||||
<PageNav title="Attendance" />
|
||||
<PageBody width="w-full max-w-6xl md:w-11/12">
|
||||
<section class="flex items-center mx-2 lg:mx-9 my-5">
|
||||
|
||||
Reference in New Issue
Block a user