Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutV committed May 23, 2024
1 parent 90c7854 commit f5396eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
10 changes: 7 additions & 3 deletions frontend/src/components/projects/groups/GroupsManageTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import DataTable, { type DataTableRowExpandEvent } from 'primevue/datatable';
import Column from 'primevue/column';
import AllSubmission from '@/components/submissions/AllSubmission.vue';
import InputNumber, { InputNumberBlurEvent } from 'primevue/inputnumber';
import InputNumber, { type InputNumberBlurEvent } from 'primevue/inputnumber';
import { type Project } from '@/types/Project.ts';
import { useStudents } from '@/composables/services/student.service.ts';
import { ref } from 'vue';
Expand Down Expand Up @@ -35,7 +35,7 @@ const editingGroup = ref<Group | null>();
* @param group The group to update.
* @param score The new score.
*/
function updateGroupScore(group: Group, score: number|string): void {
function updateGroupScore(group: Group, score: number | string): void {
emit('update:group-score', group, score);
editingGroup.value = null;
}
Expand Down Expand Up @@ -79,7 +79,11 @@ async function expandGroup(event: DataTableRowExpandEvent): Promise<void> {
<template #body="{ data }">
<i :class="PrimeIcons.CHART_BAR" class="mr-2" />
<template v-if="editingGroup === data">
<InputNumber :model-value="data.score" @blur="(event: InputNumberBlurEvent) => updateGroupScore(data, event.value)" /> /
<InputNumber
:model-value="data.score"
@blur="(event: InputNumberBlurEvent) => updateGroupScore(data, event.value)"
/>
/
{{ project.max_score }}
</template>
<template v-else>
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/views/projects/roles/TeacherProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ const { groups, getGroupsByProject, updateGroup } = useGroup();
*/
async function updateGroupScore(group: Group, score: number): Promise<void> {
try {
await updateGroup({
...group,
score,
}, false);
await updateGroup(
{
...group,
score,
},
false,
);
group.score = score;
Expand Down

0 comments on commit f5396eb

Please sign in to comment.