Pass the list id to the gantt chart
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ff5ec58934
commit
128a7f8f2a
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<gantt :tasks="list.tasks" v-if="$route.params.type === 'gantt'"/>
|
||||
<gantt :list="list" v-if="$route.params.type === 'gantt'"/>
|
||||
<show-list-task :the-list="list" v-else/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</label>
|
||||
</div>
|
||||
<gantt-chart
|
||||
:tasks="tasks"
|
||||
:list="list"
|
||||
:show-taskswithout-dates="showTaskswithoutDates"
|
||||
/>
|
||||
</div>
|
||||
|
@ -21,6 +21,7 @@
|
|||
|
||||
<script>
|
||||
import GanttChart from './gantt-component'
|
||||
import ListModel from '../../models/list'
|
||||
|
||||
export default {
|
||||
name: 'Gantt',
|
||||
|
@ -31,8 +32,8 @@
|
|||
}
|
||||
},
|
||||
props: {
|
||||
tasks: {
|
||||
type: Array,
|
||||
list: {
|
||||
type: ListModel,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
|
|
|
@ -119,10 +119,12 @@
|
|||
|
||||
<script>
|
||||
import VueDragResize from 'vue-drag-resize'
|
||||
import TaskService from '../../services/task'
|
||||
import message from '../../message'
|
||||
import EditTask from "./edit-task";
|
||||
import TaskModel from "../../models/task";
|
||||
import EditTask from './edit-task'
|
||||
|
||||
import TaskService from '../../services/task'
|
||||
import TaskModel from '../../models/task'
|
||||
import ListModel from '../../models/list'
|
||||
|
||||
export default {
|
||||
name: 'GanttChart',
|
||||
|
@ -131,8 +133,8 @@
|
|||
VueDragResize,
|
||||
},
|
||||
props: {
|
||||
tasks: {
|
||||
type: Array,
|
||||
list: {
|
||||
type: ListModel,
|
||||
required: true,
|
||||
},
|
||||
showTaskswithoutDates: {
|
||||
|
@ -161,7 +163,7 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
tasks() {
|
||||
list() {
|
||||
this.parseTasks()
|
||||
}
|
||||
},
|
||||
|
@ -202,7 +204,7 @@
|
|||
this.prepareTasks()
|
||||
},
|
||||
prepareTasks() {
|
||||
this.theTasks = this.tasks
|
||||
this.theTasks = this.list.tasks
|
||||
.filter(t => {
|
||||
if(t.startDate === null && !t.done) {
|
||||
this.tasksWithoutDates.push(t)
|
||||
|
@ -290,7 +292,7 @@
|
|||
if (!this.newTaskFieldActive) {
|
||||
return
|
||||
}
|
||||
let task = new TaskModel({text: this.newTaskTitle})
|
||||
let task = new TaskModel({text: this.newTaskTitle, listID: this.list.id})
|
||||
this.taskService.create(task)
|
||||
.then(r => {
|
||||
this.theTasks.push(this.addGantAttributes(r))
|
||||
|
|
Reference in New Issue
Block a user