diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue index 130b4c9b1a621fecc2f3c0de1f20fdee395c2dd7..b857a1ba59b7a61263bf2cfc6f2c7ac6e8af102a 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue @@ -21,7 +21,7 @@ /> </v-card-title> <v-card-title v-else> - {{ $t("alsijil.coursebook.statistics.person_page.title") }} + {{ $t("alsijil.coursebook.statistics.title_plural") }} </v-card-title> <v-card-text> diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonPage.vue b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonPage.vue index b372e391767994a10499bfc80b4ba8ba281fa01f..af1858baa67b98a717d7fffb2c4bb3847979a721 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonPage.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonPage.vue @@ -10,7 +10,7 @@ <school-term-field v-model="schoolTerm" :enable-create="false" /> <!-- documentations for person list --> <c-r-u-d-iterator - i18n-key="TODO" + i18n-key="alsijil.coursebook.statistics" :gql-query="gqlQuery" :gql-additional-query-args="gqlQueryArgs" :enable-create="false" @@ -133,6 +133,7 @@ import StatisticsForPersonCard from "./StatisticsForPersonCard.vue"; import { participationsOfPerson, personalNotesForPerson, + personName, } from "./statistics.graphql"; import { DateTime } from "luxon"; import ExtraMarkChip from "../../extra_marks/ExtraMarkChip.vue"; @@ -165,6 +166,26 @@ export default { required: true, }, }, + apollo: { + personName: { + query: personName, + variables() { + return { + person: this.personId, + }; + }, + result({ data }) { + this.$setToolBarTitle( + this.$t( + "alsijil.coursebook.statistics.person_page.title", + { + fullName: data.personName.fullName || "???", + }, + ) + ); + }, + }, + }, data() { return { mode: MODE.PARTICIPATIONS, diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql index 38d8817b83e1a673f38d26352a682a407e5b3aa3..68e0a08ca3804bf841fc25c57c99d4e4dc3f66ee 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql +++ b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql @@ -110,3 +110,10 @@ query statisticsByGroup($group: ID!, $term: ID) { # } } } + +query personName($person: ID!) { + personName: personById(id: $person) { + id + fullName + } +} diff --git a/aleksis/apps/alsijil/frontend/messages/de.json b/aleksis/apps/alsijil/frontend/messages/de.json index b3072a421b487a13507fd73510a9179a4359fa4d..64d53a19e995836ede28cdfc55adbab7504bb98c 100644 --- a/aleksis/apps/alsijil/frontend/messages/de.json +++ b/aleksis/apps/alsijil/frontend/messages/de.json @@ -96,8 +96,9 @@ "title": "Kursbuch · Statistiken" }, "person_page": { - "title": "Statistiken" - } + "title": "Kursbuch · Statistiken · {fullName}" + }, + "title_plural": "Statistiken" } }, "excuse_types": { diff --git a/aleksis/apps/alsijil/frontend/messages/en.json b/aleksis/apps/alsijil/frontend/messages/en.json index 4cb74d6bcc345b06fc3ca6652d3d44cf9497d32c..e1af3ea7c1645d6e369a6d7fb9aee7e9ca21207e 100644 --- a/aleksis/apps/alsijil/frontend/messages/en.json +++ b/aleksis/apps/alsijil/frontend/messages/en.json @@ -154,9 +154,10 @@ "title": "Coursebook · Statistics" }, "person_page": { - "title": "Statistics" + "title": "Coursebook · Statistics · {fullName}" }, - "person_view_details": "Details" + "person_view_details": "Details", + "title_plural": "Statistics" }, "personal_notes": "Personal Notes" }