feat: replace our home-grown gantt implementation with ganttastic #2180

Merged
konrad merged 78 commits from feature/ganttastic into main 2022-10-27 16:03:27 +00:00
1 changed files with 20 additions and 20 deletions
Showing only changes of commit 7a7a1c985e - Show all commits

View File

@ -1,24 +1,24 @@
<template>
<div class="gantt-container">
konrad marked this conversation as resolved Outdated

Use loading component. This way it's easier for us to refactor the is-loading styles from bulma later.

Use loading component. This way it's easier for us to refactor the `is-loading` styles from bulma later.

Done.

Done.
<div :style="{'width': ganttChartWidth + 'px'}">
<g-gantt-chart
:chart-start="`${dateFrom} 00:00`"
:chart-end="`${dateTo} 23:59`"
:precision="precision"
bar-start="startDate"
bar-end="endDate"
:grid="true"
@dragend-bar="updateTask"
@dblclick-bar="openTask"
>
<g-gantt-row
v-for="(bar, k) in ganttBars"
:key="k"
label=""
:bars="bar"
/>
</g-gantt-chart>
</div>
<g-gantt-chart
:chart-start="`${dateFrom} 00:00`"
:chart-end="`${dateTo} 23:59`"
:precision="precision"
bar-start="startDate"
bar-end="endDate"
:grid="true"
@dragend-bar="updateTask"
@dblclick-bar="openTask"
font="'Open Sans', sans-serif"
konrad marked this conversation as resolved Outdated

Is it possible to use here simply inherit as value?

Is it possible to use here simply `inherit` as value?

Seems to work, yes.

Seems to work, yes.

Not necessary with lates release. Removed.

Not necessary with lates release. Removed.
:width="ganttChartWidth + 'px'"
>
<g-gantt-row
v-for="(bar, k) in ganttBars"
:key="k"
label=""
:bars="bar"
/>
</g-gantt-chart>
</div>
<form
@submit.prevent="createTask()"
@ -82,7 +82,7 @@ const ganttChartWidth = computed(() => {
const from = parse(props.dateFrom, 'yyyy-LL-dd', new Date())
const to = parse(props.dateTo, 'yyyy-LL-dd', new Date())
const dateDiff = Math.floor((to - from) / (1000 * 60 * 60 * 24))
return dateDiff * DAY_WIDTH_PIXELS
})