Added statistics page + navigation
This commit is contained in:
parent
cee0139e06
commit
0433ef1c28
3 changed files with 52 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
variant="outline-primary"
|
variant="outline-primary"
|
||||||
right
|
right
|
||||||
>
|
>
|
||||||
|
<b-dropdown-item to="/statistics">Statistics</b-dropdown-item>
|
||||||
<b-dropdown-item to="/logout">Log out</b-dropdown-item>
|
<b-dropdown-item to="/logout">Log out</b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import NotFound from "../views/NotFound.vue";
|
||||||
import Home from "../views/Home.vue";
|
import Home from "../views/Home.vue";
|
||||||
import History from "../views/History.vue";
|
import History from "../views/History.vue";
|
||||||
import Manage from "../views/Manage.vue";
|
import Manage from "../views/Manage.vue";
|
||||||
|
import Statistics from "../views/Statistics.vue";
|
||||||
import Changelog from "../views/Changelog.vue";
|
import Changelog from "../views/Changelog.vue";
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
@ -38,6 +39,12 @@ const routes = [
|
||||||
component: Home,
|
component: Home,
|
||||||
beforeEnter: requireAuth
|
beforeEnter: requireAuth
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/statistics",
|
||||||
|
name: "Statistics",
|
||||||
|
component: Statistics,
|
||||||
|
beforeEnter: requireAuth
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/changelog",
|
path: "/changelog",
|
||||||
name: "Changelog",
|
name: "Changelog",
|
||||||
|
|
44
src/views/Statistics.vue
Normal file
44
src/views/Statistics.vue
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<template>
|
||||||
|
<LayoutNavbarPrivate title="Statistics">
|
||||||
|
<BaseSection id="projects" title="Today">
|
||||||
|
<JugglProjectStatisticsList :statistics="visibleStatistics" />
|
||||||
|
</BaseSection>
|
||||||
|
</LayoutNavbarPrivate>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LayoutNavbarPrivate from "@/components/layout/LayoutNavbarPrivate";
|
||||||
|
import JugglProjectStatisticsList from "@/components/juggl/JugglProjectStatisticsList";
|
||||||
|
import { helperService } from "@/services/helper.service.js";
|
||||||
|
import BaseSection from "@/components/base/BaseSection";
|
||||||
|
import store from "@/store";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Statistics",
|
||||||
|
components: {
|
||||||
|
LayoutNavbarPrivate,
|
||||||
|
JugglProjectStatisticsList,
|
||||||
|
BaseSection
|
||||||
|
},
|
||||||
|
data: () => {
|
||||||
|
return {
|
||||||
|
working: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created: function() {
|
||||||
|
store.dispatch("loadTodaysStatistics");
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
visibleStatistics: () => {
|
||||||
|
return store.getters.getFilteredStatistics({
|
||||||
|
projectVisible: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDurationTimestamp: helperService.getDurationTimestamp
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass"></style>
|
Loading…
Reference in a new issue