From 7f0be087997cdfbb12541951b34d62e1d9c34983 Mon Sep 17 00:00:00 2001 From: Natty Date: Thu, 29 Feb 2024 23:47:01 +0100 Subject: [PATCH] Update group ID and time when splicing --- .../frontend/client/src/components/MagNotifications.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fe_calckey/frontend/client/src/components/MagNotifications.vue b/fe_calckey/frontend/client/src/components/MagNotifications.vue index ba3ec85..871d502 100644 --- a/fe_calckey/frontend/client/src/components/MagNotifications.vue +++ b/fe_calckey/frontend/client/src/components/MagNotifications.vue @@ -442,8 +442,9 @@ const prepend = (item: packed.PackNotification): void => { const itemsNew = [currNotification, group.value]; items.value = [ { - ...group, + id: currNotification.id, type: "group", + created_at: currNotification.created_at, value: itemsNew, users: itemsNew.map((n) => { switch (n.type) { @@ -460,6 +461,8 @@ const prepend = (item: packed.PackNotification): void => { ...items.value, ]; } else if (group.type === "group") { + group.id = currNotification.id; + group.created_at = currNotification.created_at; group.value = [currNotification, ...group.value]; group.users = group.value.map((n) => { switch (n.type) {