From 12e05f11e032097275db0b968c053d735519a129 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 21 Oct 2022 16:00:10 +0100 Subject: [PATCH] refetch after backup / delete / update --- .../components/portal/overview/backups/BackupsTab.svelte | 8 ++++++-- .../portal/overview/backups/StatusRenderer.svelte | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte b/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte index d435360362..7ba2bd8370 100644 --- a/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte +++ b/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte @@ -100,6 +100,7 @@ appId: app.instance._id, name, }) + await fetchBackups(trigger, page) notifications.success(response.message) } catch { notifications.error("Unable to create backup") @@ -112,20 +113,21 @@ appId: app.instance._id, backupId: detail.backupId, }) - await fetchBackups(app.instance._id, trigger, page) + await fetchBackups(trigger, page) } else if (detail.type === "backupRestore") { await backups.restoreBackup({ appId: app.instance._id, backupId: detail.backupId, name: detail.restoreBackupName, }) + await fetchBackups(trigger, page) } else if (detail.type === "backupUpdate") { await backups.updateBackup({ appId: app.instance._id, backupId: detail.backupId, name: detail.name, }) - await fetchBackups(app.instance._id, trigger, page) + await fetchBackups(trigger, page) } } @@ -138,6 +140,8 @@ placeholder="All" label="Trigger" options={Object.values(triggers)} + getOptionLabel={trigger => + trigger.charAt(0).toUpperCase() + trigger.slice(1)} bind:value={trigger} /> diff --git a/packages/builder/src/components/portal/overview/backups/StatusRenderer.svelte b/packages/builder/src/components/portal/overview/backups/StatusRenderer.svelte index 610b080d37..95834b024e 100644 --- a/packages/builder/src/components/portal/overview/backups/StatusRenderer.svelte +++ b/packages/builder/src/components/portal/overview/backups/StatusRenderer.svelte @@ -5,6 +5,11 @@ $: status = value?.charAt(0).toUpperCase() + value?.slice(1) - + {status}