Merge branch '59-navigation-to-header' into 'master'

Resolve "Navigation to Header"

Closes #60 and #59

See merge request marcel.schwarz/2020ss-qbc-geofence-timetracking!36
This commit is contained in:
Simon Kellner 2020-05-10 17:18:51 +00:00
commit d66ecc43b7
11 changed files with 286 additions and 119 deletions

View File

@ -6560,6 +6560,12 @@
} }
} }
}, },
"interpret": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/interpret/download/interpret-1.2.0.tgz",
"integrity": "sha1-1QYaYiS+WOgIOYX1AU2EQ1lXYpY=",
"dev": true
},
"invariant": { "invariant": {
"version": "2.2.4", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
@ -9542,6 +9548,15 @@
"readable-stream": "^2.0.2" "readable-stream": "^2.0.2"
} }
}, },
"rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npm.taobao.org/rechoir/download/rechoir-0.6.2.tgz",
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"dev": true,
"requires": {
"resolve": "^1.1.6"
}
},
"redent": { "redent": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
@ -9943,6 +9958,15 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
}, },
"sass": {
"version": "1.26.5",
"resolved": "https://registry.npm.taobao.org/sass/download/sass-1.26.5.tgz",
"integrity": "sha1-LXrs+7q/ophWfI8GYVtuJNLWgJk=",
"dev": true,
"requires": {
"chokidar": ">=2.0.0 <4.0.0"
}
},
"sass-graph": { "sass-graph": {
"version": "2.2.5", "version": "2.2.5",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz",
@ -10346,6 +10370,17 @@
"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
"dev": true "dev": true
}, },
"shelljs": {
"version": "0.8.4",
"resolved": "https://registry.npm.taobao.org/shelljs/download/shelljs-0.8.4.tgz?cache=0&sync_timestamp=1587787497223&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshelljs%2Fdownload%2Fshelljs-0.8.4.tgz",
"integrity": "sha1-3naE/ut2f4cWsyYHiooAh1iQ48I=",
"dev": true,
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
}
},
"signal-exit": { "signal-exit": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
@ -11738,6 +11773,24 @@
"resolved": "https://registry.npmjs.org/vue-apexcharts/-/vue-apexcharts-1.5.3.tgz", "resolved": "https://registry.npmjs.org/vue-apexcharts/-/vue-apexcharts-1.5.3.tgz",
"integrity": "sha512-ImbvQxgwbLMrEc9/veDIJ7lzncf1fJDSNqqK0x2YDNUCq5tE9uqM4Gb/ZYUB5WlDM3vDpzwDEmsidWcaO6/WXQ==" "integrity": "sha512-ImbvQxgwbLMrEc9/veDIJ7lzncf1fJDSNqqK0x2YDNUCq5tE9uqM4Gb/ZYUB5WlDM3vDpzwDEmsidWcaO6/WXQ=="
}, },
"vue-cli-plugin-vuetify": {
"version": "2.0.5",
"resolved": "https://registry.npm.taobao.org/vue-cli-plugin-vuetify/download/vue-cli-plugin-vuetify-2.0.5.tgz",
"integrity": "sha1-Cbp4koZT/H44Aeo35RIPlXQT3aQ=",
"dev": true,
"requires": {
"semver": "^7.1.2",
"shelljs": "^0.8.3"
},
"dependencies": {
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.2.tgz?cache=0&sync_timestamp=1586886225130&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.2.tgz",
"integrity": "sha1-YElisFK4HtB4aq6EOJ/7pw/9OTg=",
"dev": true
}
}
},
"vue-eslint-parser": { "vue-eslint-parser": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.0.0.tgz", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.0.0.tgz",
@ -11830,6 +11883,20 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"vuetify": {
"version": "2.2.27",
"resolved": "https://registry.npm.taobao.org/vuetify/download/vuetify-2.2.27.tgz",
"integrity": "sha1-ooy2dzt8Vc2OnO3KwGEzuIbI7uQ="
},
"vuetify-loader": {
"version": "1.4.3",
"resolved": "https://registry.npm.taobao.org/vuetify-loader/download/vuetify-loader-1.4.3.tgz",
"integrity": "sha1-3xMjxVi+CYkId+X76BezpxpsU40=",
"dev": true,
"requires": {
"loader-utils": "^1.2.0"
}
},
"watchpack": { "watchpack": {
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz",

View File

@ -14,7 +14,8 @@
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-apexcharts": "^1.5.3", "vue-apexcharts": "^1.5.3",
"vue-router": "^3.1.6" "vue-router": "^3.1.6",
"vuetify": "^2.2.11"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "~4.3.0", "@vue/cli-plugin-babel": "~4.3.0",
@ -23,7 +24,11 @@
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11" "sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-cli-plugin-vuetify": "~2.0.5",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.3.0"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View File

@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet">
</head> </head>
<body style="margin:0px"> <body style="margin:0px">
<noscript> <noscript>

View File

@ -1,46 +1,147 @@
<template> <template>
<div class="app"> <div class="app">
<div> <v-app id="geotimetracking">
<Header /> <!-- Side navigation menu -->
</div> <v-navigation-drawer v-model="drawer" app clipped class="main_accent">
<div class="Site-content"> <v-list dense>
<router-view /> <v-list-item link to="/">
</div> <v-list-item-action>
<div> <v-icon>mdi-view-dashboard</v-icon>
<Footer /> </v-list-item-action>
</div> <v-list-item-content>
<v-list-item-title>Home</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item link to="/timerecords" v-bind:class="{'d-none':!login}">
<v-list-item-action>
<v-icon>mdi-clock</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Time Records</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item link to="/weeksummary" v-bind:class="{'d-none':!login}">
<v-list-item-action>
<v-icon>mdi-chart-bar</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Week Summary</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item link to="/about">
<v-list-item-action>
<v-icon>mdi-information-outline</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>About</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>
<!-- Top menu bar -->
<v-app-bar app clipped-left class="main" elevation="10">
<v-app-bar-nav-icon @click.stop="drawer = !drawer" />
<v-img src="./assets/logo.svg" max-height="100%" max-width="100" contain></v-img>
<v-toolbar-title>Geo Timetracking</v-toolbar-title>
<v-spacer></v-spacer>
<!-- Menu with account icon -->
<v-menu
v-model="menu"
:close-on-content-click="false"
:nudge-width="200"
offset-y
>
<template v-slot:activator="{ on }">
<v-btn
icon
v-on="on"
>
<v-icon>mdi-account</v-icon>
</v-btn>
</template>
<v-card>
<v-list>
<v-list-item>
<v-list-item-avatar>
<img src="https://cdn.vuetifyjs.com/images/john.jpg" alt="John">
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title>John Doe</v-list-item-title>
<v-list-item-subtitle>Admin</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-btn
:class="fav ? 'red--text' : ''"
icon
@click="fav = !fav"
>
<v-icon>mdi-heart</v-icon>
</v-btn>
</v-list-item-action>
</v-list-item>
</v-list>
<v-divider></v-divider>
<v-list>
<v-list-item>
<v-list-item-action>
<v-switch v-model="message" color="primary" :input-value="login" @change="login= !login"></v-switch>
</v-list-item-action>
<v-list-item-title>View as Guest</v-list-item-title>
</v-list-item>
</v-list>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn text @click="menu = false">Cancel</v-btn>
<v-btn color="primary" text @click="menu = false">Save</v-btn>
</v-card-actions>
</v-card>
</v-menu>
</v-app-bar>
<!-- Routed pages are inserted here -->
<v-content>
<router-view />
</v-content>
<!-- Footer on bottom -->
<v-footer app class="main">
<span>&copy; 2020 Team TacocaT</span>
</v-footer>
</v-app>
</div> </div>
</template> </template>
<script> <script>
import Footer from './components/layout/Footer';
import Header from './components/layout/Header';
export default { export default {
name:"app", props: {
components: { source: String
Footer, },
Header data: () => ({
drawer: null,
login: true
}),
created() {
this.$vuetify.theme.dark = true;
} }
} };
</script> </script>
<style scoped> <style scoped>
.link {
.app { color: #f1f1f1f1;
display: flex; text-decoration: none;
min-height: 100vh;
flex-direction: column;
font-family: 'Montserrat', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #131313;
color: #f1f1f1f1;
} }
.Site-content { .v-application {
flex: 1; font-family: 'Montserrat', sans-serif;
background-color: var(--v-background-base) !important;
} }
</style> </style>

View File

@ -1,41 +0,0 @@
footer
<template>
<div class="footer">
<h3>Links</h3>
<u><router-link to="/">Home</router-link></u>
<br>
<u><router-link to="/about">About</router-link></u>
<br>
<u><router-link to="/timerecords">Time Records</router-link></u>
<br>
<u><router-link to="/weeksummary">Week Summary</router-link></u>
</div>
</template>
<script>
export default {
name: "Footer"
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
height: 10vh;
background: #272727;
color: #f1f1f1f1;
text-align: center;
padding: 10px;
}
.footer a {
font-family: 'Montserrat', sans-serif;
color: #f1f1f1f1;
padding-right: 5px;
text-decoration: none;
}
</style>

View File

@ -1,43 +0,0 @@
<template>
<div class="header">
<div>
<u><router-link to="/"><img alt="Vue logo" src="../../assets/logo.svg"></router-link></u>
</div>
<div>
<u><router-link to="/signin">Sign In</router-link></u>
</div>
</div>
</template>
<script>
export default {
name: "Header"
}
</script>
<style scoped>
.header {
display: flex;
height: 10vh;
justify-content: space-between;
background: #272727;
color: #f1f1f1f1;
padding: 10px;
}
.header a {
font-family: 'Montserrat', sans-serif;
color: #f1f1f1f1;
text-decoration: none;
}
.header img {
float: left;
height: 7vh;
width: auto;
/* padding: 5px; */
}
</style>

View File

@ -1,10 +1,12 @@
import Vue from "vue"; import Vue from "vue";
import App from "./App.vue"; import App from "./App.vue";
import router from "./router"; import router from "./router";
import vuetify from './plugins/vuetify';
Vue.config.productionTip = false; Vue.config.productionTip = false;
new Vue({ new Vue({
router, router,
vuetify,
render: h => h(App) render: h => h(App)
}).$mount("#app"); }).$mount("#app");

View File

@ -0,0 +1,27 @@
import Vue from 'vue';
import Vuetify from 'vuetify/lib';
Vue.use(Vuetify);
export default new Vuetify({
theme: {
options: {
customProperties: true
},
themes: {
dark: {
primary: '#0096ff',
secondary: '#b0bec5',
accent: '#8c9eff',
error: '#b71c1c',
main: '#272727',
main_accent: '#202020',
footer: '#404040',
background: '#131313',
},
},
dark:true
},
});

View File

@ -37,6 +37,48 @@ export default {
end: "25.04.2020 / 16:30", end: "25.04.2020 / 16:30",
time: "2:30", time: "2:30",
type: "Paid" type: "Paid"
},
{
id: 4,
start: "25.04.2020 / 8:00",
end: "25.04.2020 / 13:00",
time: "5:00",
type: "Paid"
},
{
id: 5,
start: "25.04.2020 / 13:00",
end: "25.04.2020 / 14:00",
time: "1:00",
type: "Lunch"
},
{
id: 6,
start: "25.04.2020 / 14:00 ",
end: "25.04.2020 / 16:30",
time: "2:30",
type: "Paid"
},
{
id: 7,
start: "25.04.2020 / 8:00",
end: "25.04.2020 / 13:00",
time: "5:00",
type: "Paid"
},
{
id: 8,
start: "25.04.2020 / 13:00",
end: "25.04.2020 / 14:00",
time: "1:00",
type: "Lunch"
},
{
id: 9,
start: "25.04.2020 / 14:00 ",
end: "25.04.2020 / 16:30",
time: "2:30",
type: "Paid"
} }
] ]
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<h3 align='center'>Weeky Summary</h3> <h3 align='center'>Week Summary</h3>
<div id="chart"> <div id="chart">
<apexchart type="bar" height="350" :options="chartOptions" :series="series"></apexchart> <apexchart type="bar" height="350" :options="chartOptions" :series="series"></apexchart>
</div> </div>

5
frontend/vue.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
"transpileDependencies": [
"vuetify"
]
}