neuronetio / gantt-elastic

Gantt Chart [ javascript gantt chart, gantt component, vue gantt, vue gantt chart, responsive gantt, project manager , vue projects ]
https://neuronet.io/gantt-elastic/
MIT License
1.3k stars 315 forks source link

Working days / hours not working #64

Closed GuillaumeMauginOSF closed 5 years ago

GuillaumeMauginOSF commented 5 years ago

Hello,

I have to reopen an issue because it's still not working for working days... I made the title changed by adding the 'options' again on gantt-elastic-header.

Obtained result Default value displayed : all days of the week cf. Screenshot

Expected result Only working days in the planning

For reference, I use a Vue.js component 'HolidayPlanning.vue' with the following elements if you can help it will help me a lot thanks 👍

Maybe I'm doing something wrong so please let me know :)


<template>
     <gantt-elastic :tasks="tasks" :options="options">
         <gantt-elastic-header slot="header" :options="options"></gantt-elastic-header>
    </gantt-elastic>
</template>

<script>
import GanttElastic from 'gantt-elastic'
import Header from 'gantt-elastic-header'

const options = {
  calendar: {
    workingDays: [1, 2, 3, 4, 5]
  },
  title: {
    label: 'My Planning',
    html: false
  }, /* following code...*/

export default {
  components: {
    'gantt-elastic-header': Header,
    'gantt-elastic': GanttElastic
  },
  data () {
    return {
      tasks: [],
      options: options
    }
  },
  mounted () {
    this.loadHolidays()
  },
  methods: {
    async loadHolidays () {
      const response = await HolidayAPI.getHolidays()
      this.tasks = response.data
    }
  }
}
</script>
neuronetio commented 5 years ago

All days of the week always will be displayed, but when you choose working days then non working days will be grayed out (but visible).