feat: remove createTask mixin

This commit is contained in:
Dominik Pschenitschni 2021-09-07 14:10:52 +02:00
parent aeabc42844
commit 672d63fbed
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
6 changed files with 178 additions and 169 deletions

View file

@ -38,7 +38,6 @@
<script>
import TaskService from '../../services/task'
import createTask from '@/components/tasks/mixins/createTask'
import QuickAddMagic from '@/components/tasks/partials/quick-add-magic.vue'
const INITIAL_SCROLL_HEIGHT = 40
@ -58,9 +57,6 @@ export default {
textAreaHeight: INITIAL_SCROLL_HEIGHT,
}
},
mixins: [
createTask,
],
components: {
QuickAddMagic,
},
@ -100,7 +96,11 @@ export default {
}
newTasks.push(
this.createNewTask(title, 0, this.$store.state.auth.settings.defaultListId, this.defaultPosition)
this.$store.dispatch('tasks/createNewTask', {
title: this.newTaskTitle,
listId: this.$store.state.auth.settings.defaultListId,
position: this.defaultPosition,
})
.then(task => {
this.$emit('taskAdded', task)
return task