Skip to content
Snippets Groups Projects
Commit c3d4e378 authored by permcu's avatar permcu
Browse files

Integrate StatisticsForPersonPage

parent 4c79b195
No related branches found
No related tags found
1 merge request!361Resolve "Add statistics page for absences"
......@@ -10,6 +10,7 @@
:icon="true"
icon-text="mdi-open-in-new"
i18n-key=""
@click="switchToOwnPage"
/>
</v-card-title>
<v-card-title v-else>
......@@ -84,5 +85,18 @@ export default {
},
},
},
methods: {
switchToOwnPage() {
this.$router.push({
name: "alsijil.coursebook_statistics",
params: {
personId: this.person.id,
schoolTermId: this.statistics.schoolTerm,
},
// TODO: Add where we came from as get parameter if
// meeting decided that own page.
});
},
},
};
</script>
......@@ -4,8 +4,8 @@
<!-- documentations statistics list -->
<statistics-for-person-card
:compact="false"
:personId="TODO"
:schoolTermId="TODO"
:person="{ id: personId }"
:school-term="{ id: schoolTermId }"
/>
</template>
......@@ -18,6 +18,15 @@ export default {
StatisticsForPersonCard,
},
props: {
// personId & schoolTermId are supplied via the url
personId: {
type: [Number, String],
required: true,
},
schoolTermId: {
type: [Number, String],
required: true,
},
},
};
</script>
......@@ -104,5 +104,18 @@ export default {
permission: "alsijil.view_documentations_menu_rule",
},
},
{
path: "statistics/:personId/:schoolTermId/",
component: () => import("./components/coursebook/statistics/StatisticsForPersonPage.vue"),
name: "alsijil.coursebook_statistics",
props: true,
meta: {
inMenu: false,
titleKey: "alsijil.coursebook.statistics.person_compact.title",
toolbarTitle: "alsijil.coursebook.statistics.person_compact.title",
// TODO: Add permission & change it here.
permission: "alsijil.view_documentations_menu_rule",
},
},
],
};
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