diff --git a/src/components/home/navigation.vue b/src/components/home/navigation.vue index ef93ddbd..e24eaf3c 100644 --- a/src/components/home/navigation.vue +++ b/src/components/home/navigation.vue @@ -187,7 +187,7 @@ export default { .then(namespaces => { namespaces.forEach(n => { if (typeof this.listsVisible[n.id] === 'undefined') { - this.$set(this.listsVisible, n.id, true) + this.listsVisible[n.id] = true } }) }) @@ -217,7 +217,7 @@ export default { } }, toggleLists(namespaceId) { - this.$set(this.listsVisible, namespaceId, !this.listsVisible[namespaceId] ?? false) + this.listsVisible[namespaceId] = !this.listsVisible[namespaceId] ?? false }, updateActiveLists(namespace, activeLists) { // this is a bit hacky: since we do have to filter out the archived items from the list @@ -242,7 +242,7 @@ export default { const list = listsActive[e.newIndex] const listBefore = listsActive[e.newIndex - 1] ?? null const listAfter = listsActive[e.newIndex + 1] ?? null - this.$set(this.listUpdating, list.id, true) + this.listUpdating[list.id] = true const position = calculateItemPosition(listBefore !== null ? listBefore.position : null, listAfter !== null ? listAfter.position : null) @@ -255,7 +255,7 @@ export default { this.$message.error(e) }) .finally(() => { - this.$set(this.listUpdating, list.id, false) + this.listUpdating[list.id] = false }) }, }, diff --git a/src/components/input/multiselect.vue b/src/components/input/multiselect.vue index f5965ee4..03a839d4 100644 --- a/src/components/input/multiselect.vue +++ b/src/components/input/multiselect.vue @@ -284,7 +284,7 @@ export default { this.closeSearchResults() }, setSelectedObject(object, resetOnly = false) { - this.$set(this, 'internalValue', object) + this.internalValue = object // We assume we're getting an array when multiple is enabled and can therefore leave the query // value etc as it is diff --git a/src/components/list/partials/filters.vue b/src/components/list/partials/filters.vue index 67e53562..0c59da19 100644 --- a/src/components/list/partials/filters.vue +++ b/src/components/list/partials/filters.vue @@ -344,11 +344,11 @@ export default { this.params.filter_by.forEach((f, i) => { if (f === filterName && this.params.filter_comparator[i] === 'greater_equals') { foundStart = true - this.$set(this.params.filter_value, i, formatISO(new Date(parts[0]))) + this.params.filter_value[i] = formatISO(new Date(parts[0])) } if (f === filterName && this.params.filter_comparator[i] === 'less_equals') { foundEnd = true - this.$set(this.params.filter_value, i, formatISO(new Date(parts[1]))) + this.params.filter_value[i] = formatISO(new Date(parts[1])) } }) @@ -406,7 +406,7 @@ export default { this.params.filter_by.forEach((f, i) => { if (f === filterName) { found = true - this.$set(this.params.filter_value, i, this.filters[variableName]) + this.params.filter_value[i] = this.filters[variableName] } }) @@ -466,7 +466,7 @@ export default { } }) if (foundDone === false) { - this.$set(this.filters, 'done', true) + this.filters.done = true } }, prepareRelatedObjectFilter(kind, filterName = null, servicePrefix = null) { @@ -482,7 +482,7 @@ export default { if (typeof this.filters[filterName] !== 'undefined' && this.filters[filterName] !== '') { this[`${servicePrefix}Service`].getAll({}, {s: this.filters[filterName]}) .then(r => { - this.$set(this, kind, r) + this[kind] = r }) .catch(e => this.$message.error(e)) } @@ -523,7 +523,7 @@ export default { this.setDateFilter('reminders') }, clear(kind) { - this.$set(this, `found${kind}`, []) + this[`found${kind}`] = [] }, find(kind, query) { @@ -534,9 +534,9 @@ export default { this[`${kind}Service`].getAll({}, {s: query}) .then(response => { // Filter the results to not include users who are already assigneid - this.$set(this, `found${kind}`, differenceWith(response, this[kind], (first, second) => { + this[`found${kind}`] = differenceWith(response, this[kind], (first, second) => { return first.id === second.id - })) + }) }) .catch(e => { this.$message.error(e) @@ -564,7 +564,7 @@ export default { ids.push(u.id) }) - this.$set(this.filters, filterName, ids.join(',')) + this.filters[filterName] = ids.join(',') this.setSingleValueFilter(filterName, filterName, '', 'in') }, findLabels(query) { @@ -599,7 +599,7 @@ export default { labelIDs.push(u.id) }) - this.$set(this.filters, 'labels', labelIDs.join(',')) + this.filters.labels = labelIDs.join(',') this.setSingleValueFilter('labels', 'labels', '', 'in') }, }, diff --git a/src/components/list/partials/list-card.vue b/src/components/list/partials/list-card.vue index ec9109f7..09be012a 100644 --- a/src/components/list/partials/list-card.vue +++ b/src/components/list/partials/list-card.vue @@ -66,7 +66,7 @@ export default { const listService = new ListService() listService.background(this.list) .then(b => { - this.$set(this, 'background', b) + this.background = b }) .catch(e => { this.$message.error(e) diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index df55df04..c66c0793 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -96,7 +96,7 @@ export default { loadNotifications() { this.notificationService.getAll() .then(r => { - this.$set(this, 'allNotifications', r) + this.allNotifications = r }) .catch(e => { this.$message.error(e) @@ -135,7 +135,7 @@ export default { n.read = true this.notificationService.update(n) .then(r => { - this.$set(this.allNotifications, index, r) + this.allNotifications[index] = r }) .catch(e => this.$message.error(e)) } diff --git a/src/components/quick-actions/quick-actions.vue b/src/components/quick-actions/quick-actions.vue index 0aa3a1a9..bc33472d 100644 --- a/src/components/quick-actions/quick-actions.vue +++ b/src/components/quick-actions/quick-actions.vue @@ -298,7 +298,7 @@ export default { return t }) - this.$set(this, 'foundTasks', r) + this.foundTasks = r }) }, 150) }, @@ -329,7 +329,7 @@ export default { t.title = t.name return t }) - this.$set(this, 'foundTeams', r) + this.foundTeams = r }) }, 150) }, diff --git a/src/components/sharing/userTeam.vue b/src/components/sharing/userTeam.vue index d429032d..66bd524f 100644 --- a/src/components/sharing/userTeam.vue +++ b/src/components/sharing/userTeam.vue @@ -276,9 +276,9 @@ export default { this.stuffService .getAll(this.stuffModel) .then((r) => { - this.$set(this, 'sharables', r) + this.sharables = r r.forEach((s) => - this.$set(this.selectedRight, s.id, s.right), + this.selectedRight[s.id] = s.right, ) }) .catch((e) => { @@ -362,7 +362,7 @@ export default { (this.sharables[i].id === this.stuffModel.teamId && this.shareType === 'team') ) { - this.$set(this.sharables[i], 'right', r.right) + this.sharables[i].right = r.right } } this.$message.success({message: this.$t('list.share.userTeam.updatedSuccess', {type: this.shareTypeName})}) @@ -373,21 +373,21 @@ export default { }, find(query) { if (query === '') { - this.$set(this, 'found', []) + this.clearAll() return } this.searchService .getAll({}, {s: query}) .then((response) => { - this.$set(this, 'found', response) + this.found = response }) .catch((e) => { this.$message.error(e) }) }, clearAll() { - this.$set(this, 'found', []) + this.found = [] }, }, } diff --git a/src/components/tasks/edit-task.vue b/src/components/tasks/edit-task.vue index 0b2a2ca4..574b4274 100644 --- a/src/components/tasks/edit-task.vue +++ b/src/components/tasks/edit-task.vue @@ -143,7 +143,7 @@ export default { this.taskService .update(this.taskEditTask) .then((r) => { - this.$set(this, 'taskEditTask', r) + this.taskEditTask = r this.initTaskFields() this.$message.success({message: this.$t('task.detail.updateSuccess')}) }) diff --git a/src/components/tasks/gantt-component.vue b/src/components/tasks/gantt-component.vue index fe359454..cf866c8f 100644 --- a/src/components/tasks/gantt-component.vue +++ b/src/components/tasks/gantt-component.vue @@ -299,15 +299,15 @@ export default { this.fullWidth += this.dayWidth } console.debug('prepareGanttDays; years:', years) - this.$set(this, 'days', years) + this.days = years }, parseTasks() { this.setDates() this.loadTasks() }, loadTasks() { - this.$set(this, 'theTasks', []) - this.$set(this, 'tasksWithoutDates', []) + this.theTasks = [] + this.tasksWithoutDates = [] const getAllTasks = (page = 1) => { return this.taskCollectionService @@ -392,7 +392,7 @@ export default { // prevent it from containing outdated Data in the first place. for (const tt in this.theTasks) { if (this.theTasks[tt].id === this.taskDragged.id) { - this.$set(this, 'taskDragged', this.theTasks[tt]) + this.taskDragged = this.theTasks[tt] break } } @@ -422,11 +422,7 @@ export default { } else { for (const tt in this.theTasks) { if (this.theTasks[tt].id === r.id) { - this.$set( - this.theTasks, - tt, - this.addGantAttributes(r), - ) + this.theTasks[tt] = this.addGantAttributes(r) break } } diff --git a/src/components/tasks/partials/comments.vue b/src/components/tasks/partials/comments.vue index e66f9962..9aead999 100644 --- a/src/components/tasks/partials/comments.vue +++ b/src/components/tasks/partials/comments.vue @@ -229,7 +229,7 @@ export default { this.taskCommentService .getAll({taskId: this.taskId}) .then(r => { - this.$set(this, 'comments', r) + this.comments = r this.makeActions() }) .catch((e) => { @@ -286,7 +286,7 @@ export default { .then((r) => { for (const c in this.comments) { if (this.comments[c].id === this.commentEdit.id) { - this.$set(this.comments, c, r) + this.comments[c] = r } } this.saved = this.commentEdit.id @@ -322,12 +322,12 @@ export default { makeActions() { if (this.canWrite) { this.comments.forEach((c) => { - this.$set(this.actions, c.id, [ + this.actions[c.id] = [ { action: () => this.toggleDelete(c.id), title: this.$t('misc.delete'), }, - ]) + ] }) } }, diff --git a/src/components/tasks/partials/editAssignees.vue b/src/components/tasks/partials/editAssignees.vue index 9a666ee8..3df12441 100644 --- a/src/components/tasks/partials/editAssignees.vue +++ b/src/components/tasks/partials/editAssignees.vue @@ -111,16 +111,16 @@ export default { 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) => { + this.foundUsers = differenceWith(response, this.assignees, (first, second) => { return first.id === second.id - })) + }) }) .catch(e => { this.$message.error(e) }) }, clearAllFoundUsers() { - this.$set(this, 'foundUsers', []) + this.foundUsers = [] }, focus() { this.$refs.multiselect.focus() diff --git a/src/components/tasks/partials/listSearch.vue b/src/components/tasks/partials/listSearch.vue index 9e0e7da1..a6b49b62 100644 --- a/src/components/tasks/partials/listSearch.vue +++ b/src/components/tasks/partials/listSearch.vue @@ -56,14 +56,14 @@ export default { this.listSerivce.getAll({}, {s: query}) .then(response => { - this.$set(this, 'foundLists', response) + this.foundLists = response }) .catch(e => { this.$message.error(e) }) }, clearAll() { - this.$set(this, 'foundLists', []) + this.foundLists = [] }, select(list) { this.list = list diff --git a/src/components/tasks/partials/relatedTasks.vue b/src/components/tasks/partials/relatedTasks.vue index 94b580f4..c836c090 100644 --- a/src/components/tasks/partials/relatedTasks.vue +++ b/src/components/tasks/partials/relatedTasks.vue @@ -188,7 +188,7 @@ export default { findTasks(query) { this.taskService.getAll({}, {s: query}) .then(response => { - this.$set(this, 'foundTasks', response) + this.foundTasks = response }) .catch(e => { this.$message.error(e) @@ -203,7 +203,7 @@ export default { this.taskRelationService.create(rel) .then(() => { if (!this.relatedTasks[this.newTaskRelationKind]) { - this.$set(this.relatedTasks, this.newTaskRelationKind, []) + this.relatedTasks[this.newTaskRelationKind] = [] } this.relatedTasks[this.newTaskRelationKind].push(this.newTaskRelationTask) this.newTaskRelationTask = null diff --git a/src/store/modules/attachments.js b/src/store/modules/attachments.js index 02f5b824..5fe14a0a 100644 --- a/src/store/modules/attachments.js +++ b/src/store/modules/attachments.js @@ -1,5 +1,3 @@ -import Vue from 'vue' - import {findIndexById} from '@/helpers/find' export default { @@ -10,7 +8,7 @@ export default { mutations: { set(state, attachments) { console.debug('Set attachments', attachments) - Vue.set(state, 'attachments', attachments) + state.attachments = attachments }, add(state, attachment) { console.debug('Add attachement', attachment) diff --git a/src/store/modules/config.js b/src/store/modules/config.js index 663c802c..5019d901 100644 --- a/src/store/modules/config.js +++ b/src/store/modules/config.js @@ -1,5 +1,3 @@ -import Vue from 'vue' - import {CONFIG} from '../mutation-types' import {HTTPFactory} from '@/http-common' import {objectToCamelCase} from '@/helpers/case' @@ -58,7 +56,7 @@ export default { state.auth.local.enabled = auth.local.enabled state.auth.openidConnect.enabled = auth.openidConnect.enabled state.auth.openidConnect.redirectUrl = auth.openidConnect.redirectUrl - Vue.set(state.auth.openidConnect, 'providers', auth.openidConnect.providers) + state.auth.openidConnect.providers = auth.openidConnect.providers }, }, actions: { diff --git a/src/store/modules/kanban.js b/src/store/modules/kanban.js index b15b6d0e..fc3b6502 100644 --- a/src/store/modules/kanban.js +++ b/src/store/modules/kanban.js @@ -1,4 +1,3 @@ -import Vue from 'vue' import cloneDeep from 'lodash/cloneDeep' import BucketService from '../../services/bucket' @@ -34,8 +33,8 @@ export default { setBuckets(state, buckets) { state.buckets = buckets buckets.forEach(b => { - Vue.set(state.taskPagesPerBucket, b.id, 1) - Vue.set(state.allTasksLoadedForBucket, b.id, false) + state.taskPagesPerBucket[b.id] = 1 + state.allTasksLoadedForBucket[b.id] = false }) }, addBucket(state, bucket) { @@ -51,18 +50,18 @@ export default { setBucketById(state, bucket) { for (const b in state.buckets) { if (state.buckets[b].id === bucket.id) { - Vue.set(state.buckets, b, bucket) + state.buckets[b] = bucket return } } }, setBucketByIndex(state, {bucketIndex, bucket}) { - Vue.set(state.buckets, bucketIndex, bucket) + state.buckets[bucketIndex] = bucket }, setTaskInBucketByIndex(state, {bucketIndex, taskIndex, task}) { const bucket = state.buckets[bucketIndex] bucket.tasks[taskIndex] = task - Vue.set(state.buckets, bucketIndex, bucket) + state.buckets[bucketIndex] = bucket }, setTaskInBucket(state, task) { // If this gets invoked without any tasks actually loaded, we can save the hassle of finding the task @@ -83,7 +82,8 @@ export default { addTaskToBucketAndSort(state, task) } - Vue.set(state.buckets, b, bucket) + state.buckets[b] = bucket + found = true return } @@ -129,7 +129,7 @@ export default { if (state.buckets[b].tasks[t].id === task.id) { const bucket = state.buckets[b] bucket.tasks.splice(t, 1) - Vue.set(state.buckets, b, bucket) + state.buckets[b] = bucket return } } @@ -138,13 +138,14 @@ export default { } }, setBucketLoading(state, {bucketId, loading}) { - Vue.set(state.bucketLoading, bucketId, loading) + state.bucketLoading[bucketId] = loading }, setTasksLoadedForBucketPage(state, {bucketId, page}) { - Vue.set(state.taskPagesPerBucket, bucketId, page) + state.taskPagesPerBucket[bucketId] = page + }, setAllTasksLoadedForBucket(state, bucketId) { - Vue.set(state.allTasksLoadedForBucket, bucketId, true) + state.allTasksLoadedForBucket[bucketId] = true }, }, getters: { diff --git a/src/store/modules/labels.js b/src/store/modules/labels.js index f8dde656..c061b8b3 100644 --- a/src/store/modules/labels.js +++ b/src/store/modules/labels.js @@ -1,5 +1,4 @@ import LabelService from '@/services/label' -import Vue from 'vue' import {setLoading} from '@/store/helper' export default { @@ -12,14 +11,14 @@ export default { mutations: { setLabels(state, labels) { labels.forEach(l => { - Vue.set(state.labels, l.id, l) + state.labels[l.id] = l }) }, setLabel(state, label) { - Vue.set(state.labels, label.id, label) + state.labels[label.id] = label }, removeLabelById(state, label) { - Vue.delete(state.labels, label.id) + delete state.labels[label.id] }, setLoaded(state, loaded) { state.loaded = loaded diff --git a/src/store/modules/lists.js b/src/store/modules/lists.js index 21400801..d67610de 100644 --- a/src/store/modules/lists.js +++ b/src/store/modules/lists.js @@ -1,4 +1,3 @@ -import Vue from 'vue' import ListService from '@/services/list' import {setLoading} from '@/store/helper' import {removeListFromHistory} from '@/modules/listHistory.ts' @@ -11,11 +10,11 @@ export default { state: () => ({}), mutations: { setList(state, list) { - Vue.set(state, list.id, list) + state[list.id] = list }, setLists(state, lists) { lists.forEach(l => { - Vue.set(state, l.id, l) + state[l.id] = l }) }, removeListById(state, list) { diff --git a/src/store/modules/namespaces.js b/src/store/modules/namespaces.js index 96a75777..c8d3fb52 100644 --- a/src/store/modules/namespaces.js +++ b/src/store/modules/namespaces.js @@ -1,5 +1,3 @@ -import Vue from 'vue' - import NamespaceService from '../../services/namespace' import {setLoading} from '@/store/helper' @@ -19,11 +17,13 @@ export default { return } + // FIXME: direct manipulation of the prop + // might not be a problem since this is happening in the mutation if (!namespace.lists || namespace.lists.length === 0) { namespace.lists = state.namespaces[namespaceIndex].lists } - - Vue.set(state.namespaces, namespaceIndex, namespace) + + state.namespaces[namespaceIndex] = namespace }, setListInNamespaceById(state, list) { for (const n in state.namespaces) { @@ -34,7 +34,7 @@ export default { if (state.namespaces[n].lists[l].id === list.id) { const namespace = state.namespaces[n] namespace.lists[l] = list - Vue.set(state.namespaces, n, namespace) + state.namespaces[n] = namespace return } } diff --git a/src/views/list/ShowList.vue b/src/views/list/ShowList.vue index 9851cf22..abe7a56a 100644 --- a/src/views/list/ShowList.vue +++ b/src/views/list/ShowList.vue @@ -142,7 +142,7 @@ export default { const list = new ListModel(listData) this.listService.get(list) .then(r => { - this.$set(this, 'list', r) + this.list = r this.$store.commit(CURRENT_LIST, r) this.setTitle(this.getListTitle(r)) }) diff --git a/src/views/list/settings/background.vue b/src/views/list/settings/background.vue index c63a2a92..f2c8f913 100644 --- a/src/views/list/settings/background.vue +++ b/src/views/list/settings/background.vue @@ -104,8 +104,8 @@ export default { return } // This is an extra method to reset a few things when searching to not break loading more photos. - this.$set(this, 'backgroundSearchResult', []) - this.$set(this, 'backgroundThumbs', {}) + this.backgroundSearchResult = [] + this.backgroundThumbs = {} this.searchBackgrounds() }, searchBackgrounds(page = 1) { @@ -124,7 +124,7 @@ export default { r.forEach(b => { this.backgroundService.thumb(b) .then(t => { - this.$set(this.backgroundThumbs, b.id, t) + this.backgroundThumbs[b.id] = t }) }) }) diff --git a/src/views/list/settings/edit.vue b/src/views/list/settings/edit.vue index ab90017c..8f566b94 100644 --- a/src/views/list/settings/edit.vue +++ b/src/views/list/settings/edit.vue @@ -106,7 +106,7 @@ export default { this.listService.get(list) .then(r => { - this.$set(this, 'list', r) + this.list = r this.$store.commit(CURRENT_LIST, r) this.setTitle(this.$t('list.edit.title', {list: this.list.title})) }) diff --git a/src/views/list/settings/share.vue b/src/views/list/settings/share.vue index 225abcb2..e60f3139 100644 --- a/src/views/list/settings/share.vue +++ b/src/views/list/settings/share.vue @@ -61,7 +61,7 @@ export default { this.listService.get(list) .then(r => { - this.$set(this, 'list', r) + this.list = r this.$store.commit(CURRENT_LIST, r) // This will trigger the dynamic loading of components once we actually have all the data to pass to them this.manageTeamsComponent = 'userTeam' diff --git a/src/views/list/views/Kanban.vue b/src/views/list/views/Kanban.vue index 3f4c7dd4..6885e33b 100644 --- a/src/views/list/views/Kanban.vue +++ b/src/views/list/views/Kanban.vue @@ -398,20 +398,20 @@ export default { this.$message.error(e) }) .finally(() => { - this.$set(this.taskUpdating, task.id, false) + this.taskUpdating[task.id] = false this.oneTaskUpdating = false }) }, toggleShowNewTaskInput(bucket) { - this.$set(this.showNewTaskInput, bucket, !this.showNewTaskInput[bucket]) + this.showNewTaskInput[bucket] = !this.showNewTaskInput[bucket] }, addTaskToBucket(bucketId) { if (this.newTaskText === '') { - this.$set(this.newTaskError, bucketId, true) + this.newTaskError[bucketId] = true return } - this.$set(this.newTaskError, bucketId, false) + this.newTaskError[bucketId] = false this.createNewTask(this.newTaskText, bucketId) .then(r => { @@ -557,7 +557,7 @@ export default { }) }, collapseBucket(bucket) { - this.$set(this.collapsedBuckets, bucket.id, true) + this.collapsedBuckets[bucket.id] = true saveCollapsedBucketState(this.$route.params.listId, this.collapsedBuckets) }, unCollapseBucket(bucket) { @@ -565,7 +565,7 @@ export default { return } - this.$set(this.collapsedBuckets, bucket.id, false) + this.collapsedBuckets[bucket.id] = false saveCollapsedBucketState(this.$route.params.listId, this.collapsedBuckets) }, }, diff --git a/src/views/list/views/List.vue b/src/views/list/views/List.vue index 1092eea9..e3dd3775 100644 --- a/src/views/list/views/List.vue +++ b/src/views/list/views/List.vue @@ -279,7 +279,7 @@ export default { updateTasks(updatedTask) { for (const t in this.tasks) { if (this.tasks[t].id === updatedTask.id) { - this.$set(this.tasks, t, updatedTask) + this.tasks[t] = updatedTask break } } @@ -299,7 +299,7 @@ export default { this.$store.dispatch('tasks/update', newTask) .then(r => { - this.$set(this.tasks, e.newIndex, r) + this.tasks[e.newIndex] = r }) .catch(e => { this.$message.error(e) diff --git a/src/views/list/views/Table.vue b/src/views/list/views/Table.vue index 18149416..0ab5c68b 100644 --- a/src/views/list/views/Table.vue +++ b/src/views/list/views/Table.vue @@ -239,16 +239,16 @@ export default { created() { const savedShowColumns = localStorage.getItem('tableViewColumns') if (savedShowColumns !== null) { - this.$set(this, 'activeColumns', JSON.parse(savedShowColumns)) + this.activeColumns = JSON.parse(savedShowColumns) } const savedSortBy = localStorage.getItem('tableViewSortBy') if (savedSortBy !== null) { - this.$set(this, 'sortBy', JSON.parse(savedSortBy)) + this.sortBy = JSON.parse(savedSortBy) } - this.$set(this.params, 'filter_by', []) - this.$set(this.params, 'filter_value', []) - this.$set(this.params, 'filter_comparator', []) + this.params.filter_by = [] + this.params.filter_value = [] + this.params.filter_comparator = [] this.initTasks(1) @@ -286,11 +286,11 @@ export default { sort(property) { const order = this.sortBy[property] if (typeof order === 'undefined' || order === 'none') { - this.$set(this.sortBy, property, 'desc') + this.sortBy[property] = 'desc' } else if (order === 'desc') { - this.$set(this.sortBy, property, 'asc') + this.sortBy[property] = 'asc' } else { - this.$delete(this.sortBy, property) + delete this.sortBy[property] } this.initTasks(this.currentPage, this.searchTerm) // Save the order to be able to retrieve them later diff --git a/src/views/namespaces/settings/edit.vue b/src/views/namespaces/settings/edit.vue index 7afc3cf6..c1b19a99 100644 --- a/src/views/namespaces/settings/edit.vue +++ b/src/views/namespaces/settings/edit.vue @@ -110,7 +110,7 @@ export default { const namespace = new NamespaceModel({id: this.$route.params.id}) this.namespaceService.get(namespace) .then(r => { - this.$set(this, 'namespace', r) + this.namespace = r // This will trigger the dynamic loading of components once we actually have all the data to pass to them this.manageTeamsComponent = 'manageSharing' this.manageUsersComponent = 'manageSharing' diff --git a/src/views/namespaces/settings/share.vue b/src/views/namespaces/settings/share.vue index 5096bb7f..55f89781 100644 --- a/src/views/namespaces/settings/share.vue +++ b/src/views/namespaces/settings/share.vue @@ -61,7 +61,7 @@ export default { const namespace = new NamespaceModel({id: this.$route.params.id}) this.namespaceService.get(namespace) .then(r => { - this.$set(this, 'namespace', r) + this.namespace = r // This will trigger the dynamic loading of components once we actually have all the data to pass to them this.manageTeamsComponent = 'manageSharing' this.manageUsersComponent = 'manageSharing' diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index 3cb3d33b..2f4fb56d 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -206,7 +206,7 @@ export default { }) const tasks = r.filter(t => t.dueDate !== null).concat(r.filter(t => t.dueDate === null)) - this.$set(this, 'tasks', tasks) + this.tasks = tasks }) .catch(e => { this.$message.error(e) @@ -215,7 +215,7 @@ export default { updateTasks(updatedTask) { for (const t in this.tasks) { if (this.tasks[t].id === updatedTask.id) { - this.$set(this.tasks, t, updatedTask) + this.tasks[t] = updatedTask // Move the task to the end of the done tasks if it is now done if (updatedTask.done) { this.tasks.splice(t, 1) diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index 4e838b98..fafe36a4 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -561,7 +561,7 @@ export default { this.taskId = Number(this.$route.params.id) this.taskService.get({id: this.taskId}) .then(r => { - this.$set(this, 'task', r) + this.task = r this.$store.commit('attachments/set', r.attachments) this.taskColor = this.task.hexColor this.setActiveFields() diff --git a/src/views/teams/EditTeam.vue b/src/views/teams/EditTeam.vue index b2b8e869..b5198259 100644 --- a/src/views/teams/EditTeam.vue +++ b/src/views/teams/EditTeam.vue @@ -232,7 +232,7 @@ export default { this.teamService .get(this.team) .then((response) => { - this.$set(this, 'team', response) + this.team = response this.title = this.$t('team.edit.title', {team: this.team.name}) this.setTitle(this.title) }) @@ -305,7 +305,7 @@ export default { .then((r) => { for (const tm in this.team.members) { if (this.team.members[tm].id === member.id) { - this.$set(this.team.members[tm], 'admin', r.admin) + this.team.members[tm].admin = r.admin break } } @@ -321,21 +321,21 @@ export default { }, findUser(query) { if (query === '') { - this.$set(this, 'foundUsers', []) + this.clearAll() return } this.userService .getAll({}, {s: query}) .then((response) => { - this.$set(this, 'foundUsers', response) + this.foundUsers = response }) .catch((e) => { this.$message.error(e) }) }, clearAll() { - this.$set(this, 'foundUsers', []) + this.foundUsers = [] }, }, } diff --git a/src/views/teams/ListTeams.vue b/src/views/teams/ListTeams.vue index 7712a277..66ab034a 100644 --- a/src/views/teams/ListTeams.vue +++ b/src/views/teams/ListTeams.vue @@ -46,7 +46,7 @@ export default { loadTeams() { this.teamService.getAll() .then(response => { - this.$set(this, 'teams', response) + this.teams = response }) .catch(e => { this.$message.error(e) diff --git a/src/views/user/Settings.vue b/src/views/user/Settings.vue index 8709fbcd..7dc43402 100644 --- a/src/views/user/Settings.vue +++ b/src/views/user/Settings.vue @@ -409,7 +409,7 @@ export default { } this.totpService.get() .then(r => { - this.$set(this, 'totp', r) + this.totp = r this.totpSetQrCode() }) .catch(e => { @@ -433,7 +433,7 @@ export default { this.totpService.enroll() .then(r => { this.totpEnrolled = true - this.$set(this, 'totp', r) + this.totp = r this.totpSetQrCode() }) .catch(e => this.$message.error(e)) @@ -441,7 +441,7 @@ export default { totpConfirm() { this.totpService.enable({passcode: this.totpConfirmPasscode}) .then(() => { - this.$set(this.totp, 'enabled', true) + this.totp.enabled = true this.$message.success({message: this.$t('user.settings.totp.confirmSuccess')}) }) .catch(e => this.$message.error(e)) @@ -450,7 +450,7 @@ export default { this.totpService.disable({password: this.totpDisablePassword}) .then(() => { this.totpEnrolled = false - this.$set(this, 'totp', new TotpModel()) + this.totp = new TotpModel() this.$message.success({message: this.$t('user.settings.totp.disableSuccess')}) }) .catch(e => this.$message.error(e))