mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[task overview] task overlap
This commit is contained in:
1 parent
0c394fb513
commit
c1296abbdc
5 files changed
+35
-28
No files matched your search
@@ -10,8 +10,8 @@
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"task_id": 1,
|
"task_id": 1,
|
||||||
"starts_at": "2022-12-06T09:00:00+00:00",
|
"starts_at": "2022-12-06T08:30:00+00:00",
|
||||||
"ends_at": "2022-12-06T12:00:00+00:00",
|
"ends_at": "2022-12-06T09:30:00+00:00",
|
||||||
"title": "title",
|
"title": "title",
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"master_task_color": "#121212",
|
"master_task_color": "#121212",
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"task_id": 2,
|
"task_id": 2,
|
||||||
"starts_at": "2022-12-06T12:00:00+00:00",
|
"starts_at": "2022-12-06T08:00:00+00:00",
|
||||||
"ends_at": "2022-12-06T16:00:00+00:00",
|
"ends_at": "2022-12-06T10:00:00+00:00",
|
||||||
"title": "title",
|
"title": "title",
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"master_task_color": "#121212",
|
"master_task_color": "#121212",
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"task_id": null,
|
"task_id": null,
|
||||||
"starts_at": "2022-12-05T16:00:00+00:00",
|
"starts_at": "2022-12-06T07:00:00+00:00",
|
||||||
"ends_at": "2022-12-06T18:00:00+00:00",
|
"ends_at": "2022-12-06T11:00:00+00:00",
|
||||||
"title": "title",
|
"title": "title",
|
||||||
"is_blocker": true,
|
"is_blocker": true,
|
||||||
"master_task_color": null,
|
"master_task_color": null,
|
||||||
@@ -43,21 +43,23 @@
|
|||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"task_id": 1,
|
"task_id": 1,
|
||||||
"starts_at": "2022-12-10T09:00:00+00:00",
|
"starts_at": "2022-12-07T09:00:00+00:00",
|
||||||
"ends_at": "2022-12-12T12:00:00+00:00",
|
"ends_at": "2022-12-07T12:00:00+00:00",
|
||||||
"title": "title",
|
"title": "title",
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"master_task_color": "#121212"
|
"master_task_color": "#121212",
|
||||||
|
"class": "yellow"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"task_id": 2,
|
"task_id": 2,
|
||||||
"starts_at": "2022-12-10T12:00:00+00:00",
|
"starts_at": "2022-12-07T12:00:00+00:00",
|
||||||
"ends_at": "2022-12-12T16:00:00+00:00",
|
"ends_at": "2022-12-07T16:00:00+00:00",
|
||||||
"title": "title",
|
"title": "title",
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"master_task_color": "#121212"
|
"master_task_color": "#121212",
|
||||||
|
"class": "green"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -219,8 +219,11 @@ export default {
|
|||||||
|
|
||||||
eventStyles () {
|
eventStyles () {
|
||||||
if (this.event.allDay || !this.vuecal.time || !this.event.endTimeMinutes || this.view.id === 'month' || this.allDay) return {}
|
if (this.event.allDay || !this.vuecal.time || !this.event.endTimeMinutes || this.view.id === 'month' || this.allDay) return {}
|
||||||
let width = 100 / Math.min(this.overlaps.length + 1, this.overlapsStreak)
|
// let width = 100 / Math.min(this.overlaps.length + 1, this.overlapsStreak)
|
||||||
let left = (100 / (this.overlaps.length + 1)) * this.eventPosition
|
// let left = (100 - ((this.overlaps.length + 1) * 10 )) * this.eventPosition
|
||||||
|
let width = 100 - (this.eventPosition * 10)
|
||||||
|
let left = 10 * this.eventPosition / 2
|
||||||
|
let zIdnex = (this.eventPosition + 1) * 10
|
||||||
|
|
||||||
if (this.vuecal.minEventWidth && width < this.vuecal.minEventWidth) {
|
if (this.vuecal.minEventWidth && width < this.vuecal.minEventWidth) {
|
||||||
width = this.vuecal.minEventWidth
|
width = this.vuecal.minEventWidth
|
||||||
@@ -230,6 +233,7 @@ export default {
|
|||||||
const { top, height } = this.eventDimensions
|
const { top, height } = this.eventDimensions
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
"z-index": `${zIdnex}`,
|
||||||
top: `${top}px`,
|
top: `${top}px`,
|
||||||
height: `${height}px`,
|
height: `${height}px`,
|
||||||
width: `${width}%`,
|
width: `${width}%`,
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ export default {
|
|||||||
getWeek() {
|
getWeek() {
|
||||||
this.firstDay = addDays(startOfWeek(this.date), 1)
|
this.firstDay = addDays(startOfWeek(this.date), 1)
|
||||||
this.lastDay = addDays(endOfWeek(this.date), 1)
|
this.lastDay = addDays(endOfWeek(this.date), 1)
|
||||||
console.log()
|
|
||||||
|
|
||||||
this.$emit('weekChange', {firstDay: this.firstDay, lastDay: this.lastDay})
|
this.$emit('weekChange', {firstDay: this.firstDay, lastDay: this.lastDay})
|
||||||
this.selectedDate = String(this.firstDay.toLocaleDateString('sk-SK') + ' - ' + this.lastDay.toLocaleDateString('sk-SK'))
|
this.selectedDate = String(this.firstDay.toLocaleDateString('sk-SK') + ' - ' + this.lastDay.toLocaleDateString('sk-SK'))
|
||||||
|
|||||||
@@ -252,8 +252,9 @@ export default {
|
|||||||
img
|
img
|
||||||
width: 18px
|
width: 18px
|
||||||
|
|
||||||
&:hover
|
// &:hover,
|
||||||
z-index: 10
|
&:focus
|
||||||
|
z-index: 100 !important
|
||||||
|
|
||||||
&.red
|
&.red
|
||||||
background: #FFC9C9 !important
|
background: #FFC9C9 !important
|
||||||
|
|||||||
@@ -75,17 +75,18 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async onEventMoved(event) {
|
async onEventMoved(event) {
|
||||||
try {
|
console.log(event)
|
||||||
await this.$axios.post_auth_data(`v1/overview/tasks/${event.event.id}`, {start: event.event.start, end: event.event.end})
|
// try {
|
||||||
} catch(error) {
|
// await this.$axios.post_auth_data(`v1/overview/tasks/${event.event.id}`, {start: event.event.start, end: event.event.end})
|
||||||
this.triggerToast("Nepodarilo sa presunut ulohu!")
|
// } catch(error) {
|
||||||
this.timelineData.dates.filter(e => {
|
// this.triggerToast("Nepodarilo sa presunut ulohu!")
|
||||||
if (e.id == event.event.id) {
|
// this.timelineData.dates.filter(e => {
|
||||||
e.start = new Date(event.originalEvent.start)
|
// if (e.id == event.event.id) {
|
||||||
e.end = new Date(event.originalEvent.end)
|
// e.start = new Date(event.originalEvent.start)
|
||||||
}
|
// e.end = new Date(event.originalEvent.end)
|
||||||
})
|
// }
|
||||||
}
|
// })
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user