From 4d475c3cd493f30d930578ca18e540dc5eaa7ccf Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 4 Aug 2022 11:31:06 +0100 Subject: [PATCH] Navigate to group upon creation --- .../src/pages/builder/portal/manage/groups/index.svelte | 3 ++- packages/builder/src/stores/portal/groups.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/manage/groups/index.svelte b/packages/builder/src/pages/builder/portal/manage/groups/index.svelte index b8e0bb3df2..ad16c45047 100644 --- a/packages/builder/src/pages/builder/portal/manage/groups/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/groups/index.svelte @@ -59,7 +59,8 @@ async function saveGroup(group) { try { - await groups.actions.save(group) + group = await groups.actions.save(group) + $goto(`./${group._id}`) notifications.success(`User group created successfully`) } catch (error) { notifications.error(`Failed to save user group`) diff --git a/packages/builder/src/stores/portal/groups.js b/packages/builder/src/stores/portal/groups.js index 8d9f6fa132..74bfcccacf 100644 --- a/packages/builder/src/stores/portal/groups.js +++ b/packages/builder/src/stores/portal/groups.js @@ -28,6 +28,7 @@ export function createGroupsStore() { } return state }) + return group }, delete: async group => {