Fix id params not being named correctly
This commit is contained in:
@ -96,7 +96,7 @@
|
||||
}
|
||||
},
|
||||
props: {
|
||||
taskID: {
|
||||
taskId: {
|
||||
required: true,
|
||||
type: Number,
|
||||
},
|
||||
@ -153,7 +153,7 @@
|
||||
this.uploadFiles(this.$refs.files.files)
|
||||
},
|
||||
uploadFiles(files) {
|
||||
const attachmentModel = new AttachmentModel({taskId: this.taskID})
|
||||
const attachmentModel = new AttachmentModel({taskId: this.taskId})
|
||||
this.attachmentService.create(attachmentModel, files)
|
||||
.then(r => {
|
||||
if(r.success !== null) {
|
||||
|
@ -72,7 +72,7 @@
|
||||
export default {
|
||||
name: 'comments',
|
||||
props: {
|
||||
taskID: {
|
||||
taskId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
@ -94,22 +94,22 @@
|
||||
},
|
||||
created() {
|
||||
this.taskCommentService = new TaskCommentService()
|
||||
this.newComment = new TaskCommentModel({taskId: this.taskID})
|
||||
this.commentEdit = new TaskCommentModel({taskId: this.taskID})
|
||||
this.commentToDelete = new TaskCommentModel({taskId: this.taskID})
|
||||
this.newComment = new TaskCommentModel({taskId: this.taskId})
|
||||
this.commentEdit = new TaskCommentModel({taskId: this.taskId})
|
||||
this.commentToDelete = new TaskCommentModel({taskId: this.taskId})
|
||||
this.comments = []
|
||||
},
|
||||
mounted() {
|
||||
this.loadComments()
|
||||
},
|
||||
watch: {
|
||||
taskID() {
|
||||
taskId() {
|
||||
this.loadComments()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadComments() {
|
||||
this.taskCommentService.getAll({taskId: this.taskID})
|
||||
this.taskCommentService.getAll({taskId: this.taskId})
|
||||
.then(r => {
|
||||
this.$set(this, 'comments', r)
|
||||
})
|
||||
@ -143,7 +143,7 @@
|
||||
if (this.commentEdit.comment === '') {
|
||||
return
|
||||
}
|
||||
this.commentEdit.taskId = this.taskID
|
||||
this.commentEdit.taskId = this.taskId
|
||||
this.taskCommentService.update(this.commentEdit)
|
||||
.then(r => {
|
||||
for (const c in this.comments) {
|
||||
|
@ -49,11 +49,11 @@
|
||||
multiselect,
|
||||
},
|
||||
props: {
|
||||
taskID: {
|
||||
taskId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
listID: {
|
||||
listId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
@ -84,7 +84,7 @@
|
||||
},
|
||||
methods: {
|
||||
addAssignee(user) {
|
||||
const taskAssignee = new TaskAssigneeModel({userId: user.id, taskId: this.taskID})
|
||||
const taskAssignee = new TaskAssigneeModel({userId: user.id, taskId: this.taskId})
|
||||
this.taskAssigneeService.create(taskAssignee)
|
||||
.then(() => {
|
||||
this.success({message: 'The user was successfully assigned.'}, this)
|
||||
@ -94,7 +94,7 @@
|
||||
})
|
||||
},
|
||||
removeAssignee(user) {
|
||||
const taskAssignee = new TaskAssigneeModel({userId: user.id, taskId: this.taskID})
|
||||
const taskAssignee = new TaskAssigneeModel({userId: user.id, taskId: this.taskId})
|
||||
this.taskAssigneeService.delete(taskAssignee)
|
||||
.then(() => {
|
||||
// Remove the assignee from the list
|
||||
@ -115,7 +115,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
this.listUserService.getAll({listId: this.listID}, {s: query})
|
||||
this.listUserService.getAll({listId: this.listId}, {s: query})
|
||||
.then(response => {
|
||||
// Filter the results to not include users who are already assigned
|
||||
this.$set(this, 'foundUsers', differenceWith(response, this.assignees, (first, second) => {
|
||||
|
@ -50,7 +50,7 @@
|
||||
default: () => [],
|
||||
type: Array,
|
||||
},
|
||||
taskID: {
|
||||
taskId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
@ -108,7 +108,7 @@
|
||||
this.$set(this, 'foundLabels', [])
|
||||
},
|
||||
addLabel(label) {
|
||||
let labelTask = new LabelTaskModel({taskID: this.taskID, labelId: label.id})
|
||||
let labelTask = new LabelTaskModel({taskId: this.taskId, labelId: label.id})
|
||||
this.labelTaskService.create(labelTask)
|
||||
.then(() => {
|
||||
this.success({message: 'The label was successfully added.'}, this)
|
||||
@ -119,7 +119,7 @@
|
||||
})
|
||||
},
|
||||
removeLabel(label) {
|
||||
let labelTask = new LabelTaskModel({taskID: this.taskID, labelId: label.id})
|
||||
let labelTask = new LabelTaskModel({taskId: this.taskId, labelId: label.id})
|
||||
this.labelTaskService.delete(labelTask)
|
||||
.then(() => {
|
||||
// Remove the label from the list
|
||||
|
@ -105,7 +105,7 @@
|
||||
multiselect,
|
||||
},
|
||||
props: {
|
||||
taskID: {
|
||||
taskId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
@ -156,7 +156,7 @@
|
||||
},
|
||||
addTaskRelation() {
|
||||
let rel = new TaskRelationModel({
|
||||
taskId: this.taskID,
|
||||
taskId: this.taskId,
|
||||
otherTaskId: this.newTaskRelationTask.id,
|
||||
relationKind: this.newTaskRelationKind,
|
||||
})
|
||||
@ -177,7 +177,7 @@
|
||||
removeTaskRelation() {
|
||||
let rel = new TaskRelationModel({
|
||||
relationKind: this.relationToDelete.relationKind,
|
||||
taskId: this.taskID,
|
||||
taskId: this.taskId,
|
||||
otherTaskId: this.relationToDelete.otherTaskId,
|
||||
})
|
||||
this.taskRelationService.delete(rel)
|
||||
|
Reference in New Issue
Block a user