Add new routes - attendance + marks
This commit is contained in:
@@ -89,6 +89,11 @@
|
||||
to: getNavItemRoute($course.id, 'submissions'),
|
||||
hideSortIcon: true,
|
||||
},
|
||||
{
|
||||
label: 'Marks',
|
||||
to: getNavItemRoute($course.id, 'marks'),
|
||||
hideSortIcon: true,
|
||||
},
|
||||
// {
|
||||
// label: 'Scoreboard',
|
||||
// to: getNavItemRoute($course.id, 'scoreboard'),
|
||||
@@ -99,11 +104,11 @@
|
||||
to: getNavItemRoute($course.id, 'people'),
|
||||
hideSortIcon: true,
|
||||
},
|
||||
// {
|
||||
// label: 'Timetable',
|
||||
// to: getNavItemRoute($course.id, 'timetable'),
|
||||
// hideSortIcon: true,
|
||||
// },
|
||||
{
|
||||
label: 'Attendance',
|
||||
to: getNavItemRoute($course.id, 'attendance'),
|
||||
hideSortIcon: true,
|
||||
},
|
||||
];
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<script context="module">
|
||||
import { fetchCourse } from '../../../utils/services/courses';
|
||||
|
||||
export async function preload({ params }, session) {
|
||||
if (process.browser) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const {
|
||||
data,
|
||||
// error
|
||||
} = await fetchCourse(params.id, session);
|
||||
|
||||
return { courseData: data };
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import CourseContainer from '../../../components/CourseContainer/index.svelte';
|
||||
import PageNav from '../../../components/PageNav/index.svelte';
|
||||
import PageBody from '../../../components/PageBody/index.svelte';
|
||||
import { setCourseData } from '../../../components/Course/store';
|
||||
|
||||
export let courseData = {};
|
||||
|
||||
onMount(() => {
|
||||
setCourseData(courseData);
|
||||
});
|
||||
</script>
|
||||
|
||||
<CourseContainer>
|
||||
<PageNav title="Attendance" />
|
||||
<PageBody />
|
||||
</CourseContainer>
|
||||
@@ -0,0 +1,35 @@
|
||||
<script context="module">
|
||||
import { fetchCourse } from '../../../utils/services/courses';
|
||||
|
||||
export async function preload({ params }, session) {
|
||||
if (process.browser) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const {
|
||||
data,
|
||||
// error
|
||||
} = await fetchCourse(params.id, session);
|
||||
|
||||
return { courseData: data };
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import CourseContainer from '../../../components/CourseContainer/index.svelte';
|
||||
import PageNav from '../../../components/PageNav/index.svelte';
|
||||
import PageBody from '../../../components/PageBody/index.svelte';
|
||||
import { setCourseData } from '../../../components/Course/store';
|
||||
|
||||
export let courseData = {};
|
||||
|
||||
onMount(() => {
|
||||
setCourseData(courseData);
|
||||
});
|
||||
</script>
|
||||
|
||||
<CourseContainer>
|
||||
<PageNav title="Marks" />
|
||||
<PageBody />
|
||||
</CourseContainer>
|
||||
Reference in New Issue
Block a user