From 841d52c61ab0d45453490526b2d99bf2e75d34cb Mon Sep 17 00:00:00 2001 From: Casey Date: Wed, 14 Jan 2026 14:42:52 -0600 Subject: [PATCH] fix live updating of table data for status --- frontend/src/components/pages/Tasks.vue | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/pages/Tasks.vue b/frontend/src/components/pages/Tasks.vue index bbc1b78..f7a6d24 100644 --- a/frontend/src/components/pages/Tasks.vue +++ b/frontend/src/components/pages/Tasks.vue @@ -89,16 +89,21 @@ const tableActions = [ menuItems: statusOptions.value.map(option => ({ label: option, command: async (rowData) => { - console.log("Clicked on row:", rowData); - await Api.setTaskStatus(rowData.id, option); - let rowIndex = -1; - for (let i = 0; i row.id === rowData.id); + if (rowIndex >= 0) { + // Update reactively + tableData.value[rowIndex].status = option; + notifications.addSuccess(`Status updated to ${option}`); } - } - if (rowIndex >= 0) { - tableData.value[rowIndex].status = option; + } catch (error) { + console.error("Error updating status:", error); + notifications.addError("Failed to update status"); } }, })),