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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user