fix(kanban): do not use the bucket id saved on the task
This commit is contained in:
parent
8f85af07ca
commit
2dcf6c6861
@ -348,7 +348,6 @@ const router = createRouter({
|
|||||||
name: 'project.index',
|
name: 'project.index',
|
||||||
redirect(to) {
|
redirect(to) {
|
||||||
const viewId = getProjectViewId(Number(to.params.projectId as string))
|
const viewId = getProjectViewId(Number(to.params.projectId as string))
|
||||||
console.log(viewId)
|
|
||||||
|
|
||||||
if (viewId) {
|
if (viewId) {
|
||||||
console.debug('Replaced list view with', viewId)
|
console.debug('Replaced list view with', viewId)
|
||||||
|
@ -131,11 +131,6 @@ export const useKanbanStore = defineStore('kanban', () => {
|
|||||||
const bucket = buckets.value[b]
|
const bucket = buckets.value[b]
|
||||||
bucket.tasks[t] = task
|
bucket.tasks[t] = task
|
||||||
|
|
||||||
if (bucket.id !== task.bucketId) {
|
|
||||||
bucket.tasks.splice(t, 1)
|
|
||||||
addTaskToBucketAndSort(buckets.value, task)
|
|
||||||
}
|
|
||||||
|
|
||||||
buckets.value[b] = bucket
|
buckets.value[b] = bucket
|
||||||
|
|
||||||
found = true
|
found = true
|
||||||
@ -144,15 +139,6 @@ export const useKanbanStore = defineStore('kanban', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const b in buckets.value) {
|
|
||||||
if (buckets.value[b].id === task.bucketId) {
|
|
||||||
findAndUpdate(b)
|
|
||||||
if (found) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const b in buckets.value) {
|
for (const b in buckets.value) {
|
||||||
findAndUpdate(b)
|
findAndUpdate(b)
|
||||||
if (found) {
|
if (found) {
|
||||||
@ -198,7 +184,6 @@ export const useKanbanStore = defineStore('kanban', () => {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
bucketIndex === null ||
|
bucketIndex === null ||
|
||||||
buckets.value[bucketIndex]?.id !== task.bucketId ||
|
|
||||||
taskIndex === null ||
|
taskIndex === null ||
|
||||||
(buckets.value[bucketIndex]?.tasks[taskIndex]?.id !== task.id)
|
(buckets.value[bucketIndex]?.tasks[taskIndex]?.id !== task.id)
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user