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

Show tardiness in lesson notes

parent 5a51ebd6
No related branches found
No related tags found
1 merge request!362Resolve "Add personal note management dialog in course book"
<script setup> <script setup>
import AbsenceReasonChip from "aleksis.apps.kolego/components/AbsenceReasonChip.vue"; import AbsenceReasonChip from "aleksis.apps.kolego/components/AbsenceReasonChip.vue";
import ExtraMarkChip from "../../extra_marks/ExtraMarkChip.vue"; import ExtraMarkChip from "../../extra_marks/ExtraMarkChip.vue";
import TardinessChip from "../personal_notes/TardinessChip.vue";
</script> </script>
<template> <template>
...@@ -64,6 +65,27 @@ import ExtraMarkChip from "../../extra_marks/ExtraMarkChip.vue"; ...@@ -64,6 +65,27 @@ import ExtraMarkChip from "../../extra_marks/ExtraMarkChip.vue";
</template> </template>
</extra-mark-chip> </extra-mark-chip>
<tardiness-chip>
{{ $t("alsijil.personal_notes.late") }}
<template #append>
<span>:
{{
tardyParticipations
.slice(0, 5)
.map((participation) => participation.person.firstName)
.join(", ")
}}
<span v-if="tardyParticipations.length > 5">
<!-- eslint-disable @intlify/vue-i18n/no-raw-text -->
+{{ tardyParticipations.length - 5 }}
<!-- eslint-enable @intlify/vue-i18n/no-raw-text -->
</span>
</span>
</template>
</tardiness-chip>
<manage-students-trigger v-bind="documentationPartProps" /> <manage-students-trigger v-bind="documentationPartProps" />
</div> </div>
</template> </template>
...@@ -111,6 +133,10 @@ export default { ...@@ -111,6 +133,10 @@ export default {
return value; return value;
}, {}); }, {});
}, },
tardyParticipations() {
return this.documentation.participations.filter(p =>
p.noteWithTardiness != null && p.noteWithTardiness.tardiness > 0);
},
}, },
}; };
</script> </script>
......
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