fix(project-management) : reflect saved task immediately in board, list and reopened modal

TaskModal now emits the fresh task returned by the API (same task:read
shape as the collection). The board, my-tasks and archives pages reinject
it into their local state and selectedTask before the background re-fetch,
so the list and a reopened modal no longer show the previous snapshot while
loadData() is still running.
This commit is contained in:
Matthieu
2026-06-23 12:14:22 +02:00
parent f6d37e4667
commit bf55a55fa6
4 changed files with 26 additions and 5 deletions
@@ -569,7 +569,7 @@ const props = defineProps<{
const emit = defineEmits<{
(e: 'update:modelValue', value: boolean): void
(e: 'saved'): void
(e: 'saved', task?: Task): void
}>()
const isOpen = computed({
@@ -1042,7 +1042,7 @@ async function handleSubmit() {
await removeRecurrence(props.task.recurrence.id)
}
emit('saved')
emit('saved', savedTask)
isOpen.value = false
} finally {
isSubmitting.value = false