fix: namespace collision of global error method with draggable error method
This commit is contained in:

committed by
kolaente

parent
0da7a46612
commit
ebeca48be4
@ -124,7 +124,7 @@ export default {
|
||||
loadLabels() {
|
||||
this.$store.dispatch('labels/loadAllLabels')
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -206,7 +206,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('lists/toggleListFavorite', list)
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
resize() {
|
||||
// Hide the menu by default on mobile
|
||||
@ -252,7 +252,7 @@ export default {
|
||||
position,
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this.listUpdating, list.id, false)
|
||||
|
@ -488,7 +488,7 @@ export default {
|
||||
.then(r => {
|
||||
this.$set(this, kind, r)
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
}
|
||||
},
|
||||
setDoneFilter() {
|
||||
@ -543,7 +543,7 @@ export default {
|
||||
}))
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
add(kind, filterName) {
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
this.$set(this, 'background', b)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => this.backgroundLoading = false)
|
||||
},
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('lists/toggleListFavorite', list)
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ export default {
|
||||
this.migrate()
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
this.authUrl = r.url
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
migrate() {
|
||||
@ -159,7 +159,7 @@ export default {
|
||||
this.$store.dispatch('namespaces/loadNamespaces')
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isMigrating = false
|
||||
@ -176,7 +176,7 @@ export default {
|
||||
this.$store.dispatch('namespaces/loadNamespaces')
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isMigrating = false
|
||||
|
@ -99,10 +99,10 @@ export default {
|
||||
this.subscriptionService.create(subscription)
|
||||
.then(() => {
|
||||
this.$emit('change', subscription)
|
||||
this.success({message: this.$t('task.subscription.subscribeSuccess', {entity: this.entity})})
|
||||
this.$message.success({message: this.$t('task.subscription.subscribeSuccess', {entity: this.entity})})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
unsubscribe() {
|
||||
@ -113,10 +113,10 @@ export default {
|
||||
this.subscriptionService.delete(subscription)
|
||||
.then(() => {
|
||||
this.$emit('change', null)
|
||||
this.success({message: this.$t('task.subscription.unsubscribeSuccess', {entity: this.entity})})
|
||||
this.$message.success({message: this.$t('task.subscription.unsubscribeSuccess', {entity: this.entity})})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -102,7 +102,7 @@ export default {
|
||||
this.$set(this, 'allNotifications', r)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
to(n, index) {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
.then(r => {
|
||||
this.$set(this.allNotifications, index, r)
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -388,12 +388,12 @@ export default {
|
||||
|
||||
this.createNewTask(this.query, 0, this.currentList.id)
|
||||
.then(r => {
|
||||
this.success({message: this.$t('task.createSuccess')})
|
||||
this.$message.success({message: this.$t('task.createSuccess')})
|
||||
this.$router.push({name: 'task.detail', params: {id: r.id}})
|
||||
this.closeQuickActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
newList() {
|
||||
@ -407,12 +407,12 @@ export default {
|
||||
})
|
||||
this.$store.dispatch('lists/createList', newList)
|
||||
.then(r => {
|
||||
this.success({message: this.$t('list.create.createdSuccess')})
|
||||
this.$message.success({message: this.$t('list.create.createdSuccess')})
|
||||
this.$router.push({name: 'list.index', params: {listId: r.id}})
|
||||
this.closeQuickActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
newNamespace() {
|
||||
@ -420,11 +420,11 @@ export default {
|
||||
|
||||
this.$store.dispatch('namespaces/createNamespace', newNamespace)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('namespace.create.success')})
|
||||
this.$message.success({message: this.$t('namespace.create.success')})
|
||||
this.closeQuickActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
newTeam() {
|
||||
@ -435,11 +435,11 @@ export default {
|
||||
name: 'teams.edit',
|
||||
params: {id: r.id},
|
||||
})
|
||||
this.success({message: this.$t('team.create.success')})
|
||||
this.$message.success({message: this.$t('team.create.success')})
|
||||
this.closeQuickActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
select(parentIndex, index) {
|
||||
|
@ -234,7 +234,7 @@ export default {
|
||||
this.linkShares = r
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
add() {
|
||||
@ -251,11 +251,11 @@ export default {
|
||||
this.name = ''
|
||||
this.password = ''
|
||||
this.showNewForm = false
|
||||
this.success({message: this.$t('list.share.links.createSuccess')})
|
||||
this.$message.success({message: this.$t('list.share.links.createSuccess')})
|
||||
this.load()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
remove() {
|
||||
@ -266,11 +266,11 @@ export default {
|
||||
this.linkShareService
|
||||
.delete(linkshare)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('list.share.links.deleteSuccess')})
|
||||
this.$message.success({message: this.$t('list.share.links.deleteSuccess')})
|
||||
this.load()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showDeleteModal = false
|
||||
|
@ -282,7 +282,7 @@ export default {
|
||||
)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
deleteSharable() {
|
||||
@ -304,10 +304,10 @@ export default {
|
||||
this.sharables.splice(i, 1)
|
||||
}
|
||||
}
|
||||
this.success({message: this.$t('list.share.userTeam.removeSuccess', {type: this.shareTypeName, sharable: this.sharableName})})
|
||||
this.$message.success({message: this.$t('list.share.userTeam.removeSuccess', {type: this.shareTypeName, sharable: this.sharableName})})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
add(admin) {
|
||||
@ -328,11 +328,11 @@ export default {
|
||||
this.stuffService
|
||||
.create(this.stuffModel)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('list.share.userTeam.addedSuccess', {type: this.shareTypeName})})
|
||||
this.$message.success({message: this.$t('list.share.userTeam.addedSuccess', {type: this.shareTypeName})})
|
||||
this.load()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
toggleType(sharable) {
|
||||
@ -365,10 +365,10 @@ export default {
|
||||
this.$set(this.sharables[i], 'right', r.right)
|
||||
}
|
||||
}
|
||||
this.success({message: this.$t('list.share.userTeam.updatedSuccess', {type: this.shareTypeName})})
|
||||
this.$message.success({message: this.$t('list.share.userTeam.updatedSuccess', {type: this.shareTypeName})})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
find(query) {
|
||||
@ -383,7 +383,7 @@ export default {
|
||||
this.$set(this, 'found', response)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAll() {
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
this.errorMessage = this.$t('list.create.addListRequired')
|
||||
return
|
||||
}
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -149,10 +149,10 @@ export default {
|
||||
.then((r) => {
|
||||
this.$set(this, 'taskEditTask', r)
|
||||
this.initTaskFields()
|
||||
this.success({message: this.$t('task.detail.updateSuccess')})
|
||||
this.$message.success({message: this.$t('task.detail.updateSuccess')})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -354,7 +354,7 @@ export default {
|
||||
})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
addGantAttributes(t) {
|
||||
@ -439,7 +439,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
editTask(task) {
|
||||
@ -476,7 +476,7 @@ export default {
|
||||
this.hideCrateNewTask()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
formatYear(date) {
|
||||
|
@ -88,7 +88,7 @@ export default {
|
||||
this.loadedList = cloneDeep(currentList)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
|
||||
@ -161,7 +161,7 @@ export default {
|
||||
this.$set(this.tasks, e.newIndex, r)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -229,10 +229,10 @@ export default {
|
||||
'attachments/removeById',
|
||||
this.attachmentToDelete.id,
|
||||
)
|
||||
this.success(r)
|
||||
this.$message.success(r)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showDeleteModal = false
|
||||
|
@ -234,7 +234,7 @@ export default {
|
||||
this.makeActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
addComment() {
|
||||
@ -256,11 +256,11 @@ export default {
|
||||
.then((r) => {
|
||||
this.comments.push(r)
|
||||
this.newComment.comment = ''
|
||||
this.success({message: this.$t('task.comment.addedSuccess')})
|
||||
this.$message.success({message: this.$t('task.comment.addedSuccess')})
|
||||
this.makeActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.creating = false
|
||||
@ -296,7 +296,7 @@ export default {
|
||||
}, 2000)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isCommentEdit = false
|
||||
@ -314,7 +314,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showDeleteModal = false
|
||||
|
@ -132,7 +132,7 @@ export default {
|
||||
this.$emit('input', r)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -89,7 +89,7 @@ export default {
|
||||
}, 2000)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.saving = false
|
||||
|
@ -84,10 +84,10 @@ export default {
|
||||
this.$store.dispatch('tasks/addAssignee', {user: user, taskId: this.taskId})
|
||||
.then(() => {
|
||||
this.$emit('input', this.assignees)
|
||||
this.success({message: this.$t('task.assignee.assignSuccess')})
|
||||
this.$message.success({message: this.$t('task.assignee.assignSuccess')})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
removeAssignee(user) {
|
||||
@ -99,10 +99,10 @@ export default {
|
||||
this.assignees.splice(a, 1)
|
||||
}
|
||||
}
|
||||
this.success({message: this.$t('task.assignee.assignSuccess')})
|
||||
this.$message.success({message: this.$t('task.assignee.assignSuccess')})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
findUser(query) {
|
||||
@ -119,7 +119,7 @@ export default {
|
||||
}))
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAllFoundUsers() {
|
||||
|
@ -115,11 +115,11 @@ export default {
|
||||
.then(() => {
|
||||
bubble()
|
||||
if (showNotification) {
|
||||
this.success({message: this.$t('task.label.addSuccess')})
|
||||
this.$message.success({message: this.$t('task.label.addSuccess')})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
removeLabel(label) {
|
||||
@ -141,10 +141,10 @@ export default {
|
||||
this.$store.dispatch('tasks/removeLabel', {label: label, taskId: this.taskId})
|
||||
.then(() => {
|
||||
removeFromState()
|
||||
this.success({message: this.$t('task.label.removeSuccess')})
|
||||
this.$message.success({message: this.$t('task.label.removeSuccess')})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
createAndAddLabel(title) {
|
||||
@ -157,10 +157,10 @@ export default {
|
||||
.then(r => {
|
||||
this.addLabel(r, false)
|
||||
this.labels.push(r)
|
||||
this.success({message: this.$t('task.label.removeSuccess')})
|
||||
this.$message.success({message: this.$t('task.label.removeSuccess')})
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -81,7 +81,7 @@ export default {
|
||||
}, 2000)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.saving = false
|
||||
|
@ -102,7 +102,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.loadingInternal = false
|
||||
|
@ -63,7 +63,7 @@ export default {
|
||||
this.$set(this, 'foundLists', response)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAll() {
|
||||
|
@ -196,7 +196,7 @@ export default {
|
||||
this.$set(this, 'foundTasks', response)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
addTaskRelation() {
|
||||
@ -219,7 +219,7 @@ export default {
|
||||
}, 2000)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
removeTaskRelation() {
|
||||
@ -243,7 +243,7 @@ export default {
|
||||
}, 2000)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showDeleteModal = false
|
||||
@ -257,7 +257,7 @@ export default {
|
||||
this.addTaskRelation()
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
relationKindTitle(kind, length) {
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
}
|
||||
this.task = t
|
||||
this.$emit('task-updated', t)
|
||||
this.success({
|
||||
this.$message.success({
|
||||
message: this.task.done ?
|
||||
this.$t('task.doneSuccess') :
|
||||
this.$t('task.undoneSuccess'),
|
||||
@ -188,7 +188,7 @@ export default {
|
||||
}])
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ export default {
|
||||
this.$store.dispatch('namespaces/loadNamespacesIfFavoritesDontExist')
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
hideDeferDueDatePopup(e) {
|
||||
|
@ -93,16 +93,16 @@ export default {
|
||||
.then(r => {
|
||||
this.avatarProvider = r.avatarProvider
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
updateAvatarStatus() {
|
||||
const avatarStatus = new AvatarModel({avatarProvider: this.avatarProvider})
|
||||
this.avatarService.update(avatarStatus)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('user.settings.avatar.statusUpdateSuccess')})
|
||||
this.$message.success({message: this.$t('user.settings.avatar.statusUpdateSuccess')})
|
||||
this.$store.commit('auth/reloadAvatar')
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
uploadAvatar() {
|
||||
this.loading = true
|
||||
@ -112,10 +112,10 @@ export default {
|
||||
canvas.toBlob(blob => {
|
||||
this.avatarService.create(blob)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('user.settings.avatar.setSuccess')})
|
||||
this.$message.success({message: this.$t('user.settings.avatar.setSuccess')})
|
||||
this.$store.commit('auth/reloadAvatar')
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
this.isCropAvatar = false
|
||||
|
@ -61,10 +61,10 @@ export default {
|
||||
|
||||
this.dataExportService.request(this.password)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('user.export.success')})
|
||||
this.$message.success({message: this.$t('user.export.success')})
|
||||
this.password = ''
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -113,10 +113,10 @@ export default {
|
||||
|
||||
this.accountDeleteService.request(this.password)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('user.deletion.requestSuccess')})
|
||||
this.$message.success({message: this.$t('user.deletion.requestSuccess')})
|
||||
this.password = ''
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
cancelDeletion() {
|
||||
if (this.password === '') {
|
||||
@ -127,11 +127,11 @@ export default {
|
||||
|
||||
this.accountDeleteService.cancel(this.password)
|
||||
.then(() => {
|
||||
this.success({message: this.$t('user.deletion.scheduledCancelSuccess')})
|
||||
this.$message.success({message: this.$t('user.deletion.scheduledCancelSuccess')})
|
||||
this.$store.dispatch('auth/refreshUserInfo')
|
||||
this.password = ''
|
||||
})
|
||||
.catch(e => this.error(e))
|
||||
.catch(e => this.$message.error(e))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user