mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[task overview] nacitanie dat z json
This commit is contained in:
1 parent
7d36723711
commit
48eae476f0
9 files changed
+392
-13976
No files matched your search
@@ -1,7 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<A-task-filter />
|
||||
<Z-timeline />
|
||||
<A-task-filter @weekChange="getWeekData" />
|
||||
<W-loadable :content="timelineData" class="w-loadable" empty-message="Nepodarilo sa nacitat data!">
|
||||
<Z-timeline :events="timelineData" />
|
||||
</W-loadable>
|
||||
|
||||
<v-snackbar
|
||||
v-model="errorToast"
|
||||
:timeout="2000"
|
||||
color="white"
|
||||
:rounded="true"
|
||||
>
|
||||
Nepodarilo sa nacitat data!
|
||||
</v-snackbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -14,5 +25,33 @@ export default {
|
||||
ATaskFilter,
|
||||
ZTimeline,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
timelineData: null,
|
||||
errorToast: false,
|
||||
dataLoaded: false,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getWeekData(week) {
|
||||
try {
|
||||
this.timelineData = await this.$axios.get_auth_data('v1/overview/tasks')
|
||||
console.log(this.timelineData)
|
||||
} catch(error) {
|
||||
this.timelineData = {}
|
||||
console.error(error)
|
||||
this.errorToast = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.w-loadable
|
||||
text-align: center
|
||||
padding-top: 20px
|
||||
height: 100%
|
||||
</style>
|
||||
Reference in new issue
Block a user