Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutV committed Apr 9, 2024
1 parent d2f7e82 commit 584d2bf
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
14 changes: 11 additions & 3 deletions frontend/src/components/projects/ProjectCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ const { t } = useI18n();
<template #content>
<div class="mb-2">
<i :class="['pi', PrimeIcons.CALENDAR_PLUS, 'icon-color']" class="mr-2"></i>
<b>{{ t('views.projects.deadline') }}</b>: {{ formattedDeadline }}<br />
<b>{{ t('views.projects.deadline') }}</b
>: {{ formattedDeadline }}<br />
</div>
<div>
<i :class="['pi', PrimeIcons.INFO_CIRCLE, 'icon-color']" class="mr-2"></i>
<b>{{ t('views.projects.submissionStatus') }}</b>: ok
<b>{{ t('views.projects.submissionStatus') }}</b
>: ok
</div>
</template>
<template #footer>
Expand All @@ -57,7 +59,13 @@ const { t } = useI18n();
},
}"
>
<Button class="align-self-end" :icon="PrimeIcons.ARROW_RIGHT" :label="t('components.card.open')" icon-pos="right" outlined />
<Button
class="align-self-end"
:icon="PrimeIcons.ARROW_RIGHT"
:label="t('components.card.open')"
icon-pos="right"
outlined
/>
</RouterLink>
</template>
</Card>
Expand Down
12 changes: 4 additions & 8 deletions frontend/src/components/projects/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const props = withDefaults(
}>(),
{
courses: () => [],
showPast: false
showPast: false,
},
);
Expand All @@ -25,21 +25,17 @@ const { projects, getProjectsByCourse } = useProject();
/* State */
// The merged projects from all courses
const allProjects = computed(() =>
props.courses.flatMap((course) => course.projects)
);
const allProjects = computed(() => props.courses.flatMap((course) => course.projects));
/**
* Sorts the projects by deadline
*/
const sortedProjects = computed(() => {
const projects = allProjects.value.filter((project) =>
!props.showPast ? moment(project.deadline).isAfter() : true
!props.showPast ? moment(project.deadline).isAfter() : true,
);
return [...projects].sort((a, b) =>
new Date(a.deadline).getTime() - new Date(b.deadline).getTime()
)
return [...projects].sort((a, b) => new Date(a.deadline).getTime() - new Date(b.deadline).getTime());
});
/* Watchers */
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/courses/UpdateCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ onMounted(async () => {
await getCourseByID(params.courseId as string);
/* Set the form values */
if (course.value !== null){
if (course.value !== null) {
form.name = course.value.name;
form.description = course.value.description ?? '';
form.year = `${course.value.academic_startyear} - ${course.value.academic_startyear + 1}`
form.year = `${course.value.academic_startyear} - ${course.value.academic_startyear + 1}`;
}
});
Expand Down Expand Up @@ -95,7 +95,7 @@ const submitCourse = async (): Promise<void> => {
<!-- Course academic year, not editable -->
<div class="mb-4">
<label for="courseYear">{{ t('views.courses.year') }}</label>
<InputText id="courseYear" v-model="form.year" readonly class="readonly-input" />
<InputText id="courseYear" v-model="form.year" readonly class="readonly-input" />
</div>

<!-- Submit button -->
Expand Down
1 change: 0 additions & 1 deletion frontend/src/views/courses/roles/AssistantCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const props = defineProps<{
/* Composable injections */
const { t } = useI18n();
</script>

<template>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/views/courses/roles/StudentCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const props = defineProps<{
/* Composable injections */
const { t } = useI18n();
</script>

<template>
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/views/courses/roles/TeacherCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { type Course } from '@/types/Course.ts';
import { useI18n } from 'vue-i18n';
import { RouterLink } from 'vue-router';
import { PrimeIcons } from 'primevue/api';
import { onMounted } from 'vue';
/* Props */
const props = defineProps<{
Expand All @@ -15,7 +14,6 @@ const props = defineProps<{
/* Composable injections */
const { t } = useI18n();
</script>

<template>
Expand Down

0 comments on commit 584d2bf

Please sign in to comment.