mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[task overview, teams overview] nenaplanovany cas
This commit is contained in:
1 parent
8d49ad7122
commit
536fa40609
7 files changed
+285
-13946
No files matched your search
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<A-team-filter @dayChanged="getDayData" />
|
||||
<A-team-filter :unscheduledTime="unscheduledTime" @dayChanged="getDayData" />
|
||||
|
||||
<W-loadable :content="timelineData" class="w-loadable" empty-message="Nepodarilo sa nacitat data!">
|
||||
<Z-timeline :calData="timelineData" :calConfig="config" :splits="splitDays" @eventMoved="onEventMoved" />
|
||||
<Z-timeline :calData="timelineData" :calConfig="config" :splits="splitDays" @eventMoved="onEventMoved" @completeTask="completeTask" @reopenTask="reopenTask" @deleteTask="deleteTask" />
|
||||
</W-loadable>
|
||||
|
||||
<v-snackbar
|
||||
@@ -37,6 +37,7 @@ export default {
|
||||
errorToastMessage: "Nepodarilo sa nacitat data!",
|
||||
dataLoaded: false,
|
||||
splitDays: [],
|
||||
unscheduledTime: 0,
|
||||
config: {
|
||||
date: new Date(),
|
||||
scrollHour: 7,
|
||||
@@ -75,7 +76,8 @@ export default {
|
||||
|
||||
formatData() {
|
||||
this.timelineData.tasks = []
|
||||
|
||||
this.unscheduledTime = 0
|
||||
|
||||
// format events
|
||||
this.timelineData.forEach(user => {
|
||||
user.tasks.forEach(event => {
|
||||
@@ -87,7 +89,10 @@ export default {
|
||||
event.split = user.splitId
|
||||
})
|
||||
this.timelineData.tasks.push(...user.tasks)
|
||||
this.unscheduledTime += user.unscheduled_time
|
||||
})
|
||||
|
||||
this.unscheduledTime = Math.floor(this.unscheduledTime / 60) + "," + String(this.unscheduledTime % 60)[0] + " h"
|
||||
},
|
||||
|
||||
generateNonWorkingHours(date) {
|
||||
@@ -144,6 +149,26 @@ export default {
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
|
||||
completeTask(id) {
|
||||
this.timelineData.tasks.filter(task => {
|
||||
if (task.id == id) {
|
||||
task.completed = true
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
reopenTask(id) {
|
||||
this.timelineData.tasks.filter(task => {
|
||||
if (task.id == id) {
|
||||
task.completed = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
deleteTask(id) {
|
||||
this.timelineData.tasks.splice(this.timelineData.tasks.findIndex(item => item.id === id), 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user