From a84192f8f7d6f3af851cb44d372f84cad5efe33a Mon Sep 17 00:00:00 2001 From: Jake/Rads Date: Thu, 23 Jun 2022 22:31:50 +0200 Subject: [PATCH] fix(dashboard): fix cards not updating after editing --- dashboard/src/lib/group/Edit.svelte | 7 +------ dashboard/src/lib/group/MemberEdit.svelte | 15 +++++---------- dashboard/src/lib/member/Edit.svelte | 9 ++------- dashboard/src/lib/member/GroupEdit.svelte | 15 +++++---------- 4 files changed, 13 insertions(+), 33 deletions(-) diff --git a/dashboard/src/lib/group/Edit.svelte b/dashboard/src/lib/group/Edit.svelte index c975b5d9..89aae0e6 100644 --- a/dashboard/src/lib/group/Edit.svelte +++ b/dashboard/src/lib/group/Edit.svelte @@ -13,14 +13,10 @@ let err: string[] = []; - let input: Group = {...group}; + let input: Group = group; const dispatch = createEventDispatcher(); - function update() { - dispatch('update', group); - } - function deletion() { dispatch('deletion', group.id); } @@ -45,7 +41,6 @@ let res = await api().groups(group.id).patch({data}); group = {...group, ...res}; err = []; - update(); editMode = false; loading = false; } catch (error) { diff --git a/dashboard/src/lib/group/MemberEdit.svelte b/dashboard/src/lib/group/MemberEdit.svelte index a9ff2e7b..72f5d8ea 100644 --- a/dashboard/src/lib/group/MemberEdit.svelte +++ b/dashboard/src/lib/group/MemberEdit.svelte @@ -1,6 +1,5 @@