Skip to content
Snippets Groups Projects
Commit c727ca51 authored by Julian's avatar Julian
Browse files

Use UpdateOrCreateGrade

parent 983312fd
No related branches found
No related tags found
2 merge requests!3Draft: Resolve "Implement shared secret mechanism",!2Frontend
......@@ -6,10 +6,11 @@ import {
effortsWithGrades
} from "./effortTab.graphql";
import GradeChip from "../grades/GradeChip.vue";
import UpdateOrCreateGrade from "../grades/UpdateOrCreateGrade.vue";
export default {
name: "GroupPage_EffortTab",
components: { GradeChip, PersonChip, SecondaryActionButton },
components: { GradeChip, PersonChip, SecondaryActionButton, UpdateOrCreateGrade },
mixins: [groupOverviewTabMixin],
computed: {
headers() {
......@@ -61,19 +62,13 @@ export default {
v-for="effort in efforts"
#[`item.effort-${effort.id}`]="{ item }"
>
<template v-if="!effort.canEdit">
<template v-if="effort.grades.find(grade => grade.person.id === item.id)">
<!-- There exists a grade → show edit dialog -->
Hier edit für:
{{ effort.grades.find(grade => grade.person.id === item.id)?.id }}
</template>
<template v-else>
<secondary-action-button i18n-key="maka.grades.add" icon-text="mdi-star-plus-outline" rounded small text />
</template>
</template>
<template v-else>
<grade-chip :grade="effort.grades.find(grade => grade.person.id === item.id)" />
</template>
<update-or-create-grade
v-if="effort.canEdit"
:effort="effort"
:person-id="item.id"
:value="effort.grades.find(grade => grade.person.id === item.id)"
/>
<grade-chip v-else :grade="effort.grades.find(grade => grade.person.id === item.id)" />
</template>
</v-data-table>
</template>
......
......@@ -14,6 +14,12 @@ query effortsWithGrades($orderBy: [String], $filters: JSONString) {
gradeSet {
id
name
gradeChoices {
id
name
value
order
}
}
grades {
id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment