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"); } }, })),