diff --git a/resources/ts/components/TaskItem.vue b/resources/ts/components/TaskItem.vue index ab87a24..f637167 100644 --- a/resources/ts/components/TaskItem.vue +++ b/resources/ts/components/TaskItem.vue @@ -11,7 +11,7 @@ import { relativeTime } from "@/lib/dates"; import { useAlertStore } from "@/stores/alerts"; import { useI18n } from "vue-i18n"; -const emit = defineEmits<(e: "clone" | "delete", task: Task) => void>(); +const emit = defineEmits<(e: "clone" | "delete" | "updated", task: Task) => void>(); const task = defineModel({ required: true }); defineProps<{ showLastChecked: boolean; showNextReset: boolean }>(); @@ -39,6 +39,7 @@ function onSave() { }) .then((newTask) => { task.value = newTask; + emit("updated", newTask); alertSuccess(i18n.t("alerts.task_updated")); }) .catch(() => { @@ -57,6 +58,7 @@ function onCheck() { }) .then((newTask) => { task.value = newTask; + emit("updated", newTask); }) .catch(() => { alertError(i18n.t("alerts.task_update_error")); @@ -68,6 +70,7 @@ function onCheck() { }) .then((newTask) => { task.value = newTask; + emit("updated", newTask); }) .catch(() => { alertError(i18n.t("alerts.task_update_error")); diff --git a/resources/ts/views/HomeView.vue b/resources/ts/views/HomeView.vue index d9055f0..ab70009 100644 --- a/resources/ts/views/HomeView.vue +++ b/resources/ts/views/HomeView.vue @@ -1,7 +1,8 @@