Add new routes - attendance + marks
This commit is contained in:
@@ -89,6 +89,11 @@
|
|||||||
to: getNavItemRoute($course.id, 'submissions'),
|
to: getNavItemRoute($course.id, 'submissions'),
|
||||||
hideSortIcon: true,
|
hideSortIcon: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Marks',
|
||||||
|
to: getNavItemRoute($course.id, 'marks'),
|
||||||
|
hideSortIcon: true,
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// label: 'Scoreboard',
|
// label: 'Scoreboard',
|
||||||
// to: getNavItemRoute($course.id, 'scoreboard'),
|
// to: getNavItemRoute($course.id, 'scoreboard'),
|
||||||
@@ -99,11 +104,11 @@
|
|||||||
to: getNavItemRoute($course.id, 'people'),
|
to: getNavItemRoute($course.id, 'people'),
|
||||||
hideSortIcon: true,
|
hideSortIcon: true,
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// label: 'Timetable',
|
label: 'Attendance',
|
||||||
// to: getNavItemRoute($course.id, 'timetable'),
|
to: getNavItemRoute($course.id, 'attendance'),
|
||||||
// hideSortIcon: true,
|
hideSortIcon: true,
|
||||||
// },
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
</script>
|
</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