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 @@ ...@@ -10,6 +10,7 @@
:icon="true" :icon="true"
icon-text="mdi-open-in-new" icon-text="mdi-open-in-new"
i18n-key="" i18n-key=""
@click="switchToOwnPage"
/> />
</v-card-title> </v-card-title>
<v-card-title v-else> <v-card-title v-else>
...@@ -84,5 +85,18 @@ export default { ...@@ -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> </script>
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<!-- documentations statistics list --> <!-- documentations statistics list -->
<statistics-for-person-card <statistics-for-person-card
:compact="false" :compact="false"
:personId="TODO" :person="{ id: personId }"
:schoolTermId="TODO" :school-term="{ id: schoolTermId }"
/> />
</template> </template>
...@@ -18,6 +18,15 @@ export default { ...@@ -18,6 +18,15 @@ export default {
StatisticsForPersonCard, StatisticsForPersonCard,
}, },
props: { props: {
// personId & schoolTermId are supplied via the url
personId: {
type: [Number, String],
required: true,
},
schoolTermId: {
type: [Number, String],
required: true,
},
}, },
}; };
</script> </script>
...@@ -104,5 +104,18 @@ export default { ...@@ -104,5 +104,18 @@ export default {
permission: "alsijil.view_documentations_menu_rule", 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