diff --git a/frontend/src/i18n/lang/en.json b/frontend/src/i18n/lang/en.json index ccaa684b6..bb24504af 100644 --- a/frontend/src/i18n/lang/en.json +++ b/frontend/src/i18n/lang/en.json @@ -763,6 +763,7 @@ "allDay": "All day", "saved": "Saved", "saveError": "Something went wrong saving the task", + "loadError": "Something went wrong loading your tasks", "createTitle": "New task", "createAllDay": "All day · {date}", "sortDefault": "Default order", diff --git a/frontend/src/stores/tasks.ts b/frontend/src/stores/tasks.ts index ac27ff0d2..da4eaaad2 100644 --- a/frontend/src/stores/tasks.ts +++ b/frontend/src/stores/tasks.ts @@ -154,6 +154,7 @@ export const useTaskStore = defineStore('task', () => { const isLoading = ref(false) const draggedTask = ref(null) const lastUpdatedTask = ref(null) + const lastDeletedTask = ref(null) const hasTasks = computed(() => Object.keys(tasks.value).length > 0) @@ -214,6 +215,7 @@ export const useTaskStore = defineStore('task', () => { const taskService = new TaskService() const response = await taskService.delete(task) kanbanStore.removeTaskInBucket(task) + lastDeletedTask.value = task return response } @@ -594,6 +596,7 @@ export const useTaskStore = defineStore('task', () => { isLoading, draggedTask, lastUpdatedTask, + lastDeletedTask, hasTasks, diff --git a/frontend/src/views/planner/PlannerSidebar.vue b/frontend/src/views/planner/PlannerSidebar.vue index 035cf2a73..8e03ed607 100644 --- a/frontend/src/views/planner/PlannerSidebar.vue +++ b/frontend/src/views/planner/PlannerSidebar.vue @@ -78,6 +78,7 @@ import type {PlannerSidebarSort} from './helpers/usePlannerTasks' import FilterPopup from '@/components/project/partials/FilterPopup.vue' import PriorityLabel from '@/components/tasks/partials/PriorityLabel.vue' import {useProjectStore} from '@/stores/projects' +import {plannerTaskColor} from './helpers/taskColor' defineProps<{ tasks: ITask[] @@ -121,11 +122,7 @@ function onDrop(event: DragEvent) { const projectStore = useProjectStore() function taskColor(task: ITask): string { - const hex = projectStore.projects[task.projectId]?.hexColor || task.hexColor - if (!hex) { - return 'var(--primary)' - } - return hex.startsWith('#') ? hex : `#${hex}` + return plannerTaskColor(task.hexColor, projectStore.projects[task.projectId]?.hexColor) } function projectName(task: ITask): string { diff --git a/frontend/src/views/planner/PlannerView.vue b/frontend/src/views/planner/PlannerView.vue index a4b845e4d..c37bad5b2 100644 --- a/frontend/src/views/planner/PlannerView.vue +++ b/frontend/src/views/planner/PlannerView.vue @@ -62,9 +62,22 @@ + + + + {{ $t('planner.loadError') }} + +