- HomeController.ts: addes api method for showing number of publications per month for given year
All checks were successful
CI Pipeline / japa-tests (push) Successful in 50s

- adapted command ValidateChecksum.ts: on published files are checked. better information logging
- better LineChart.vue component: showing real statistics
- start/routes/apu.ts: added Route.get('/statistic/:year', 'HomeController.findPublicationsPerMonth');
This commit is contained in:
Kaimbacher 2024-02-02 14:00:54 +01:00
parent 8cef7390d7
commit 68928b5e07
10 changed files with 260 additions and 74 deletions

View file

@ -67,6 +67,8 @@ export const MainService = defineStore('main', {
menu: menu,
totpState: 0,
graphData: {},
}),
actions: {
// payload = authenticated user
@ -165,6 +167,20 @@ export const MainService = defineStore('main', {
this.totpState = state;
},
async fetchChartData(year) {
// sampleDataKey= authors or datasets
axios
.get(`/api/statistic/${year}`)
.then((r) => {
if (r.data) {
this.graphData = r.data;
}
})
.catch((error) => {
alert(error.message);
});
},
// fetchfiles(id) {
// // sampleDataKey= authors or datasets
// axios