diff --git a/frontend/src/lib/components/SubscriptionEditForm.svelte b/frontend/src/lib/components/SubscriptionEditForm.svelte index 17ff19f..89e6d12 100644 --- a/frontend/src/lib/components/SubscriptionEditForm.svelte +++ b/frontend/src/lib/components/SubscriptionEditForm.svelte @@ -127,7 +127,7 @@
{#if isUpdating} - + {:else} - {#if localUser.role_id === 8} + {#if role_id === 8} - {#if localUser.role_id > 0} + {#if role_id > 0}
{#if isUpdating} - + {:else} import { applyAction, enhance } from '$app/forms'; + import SmallLoader from '$lib/components/SmallLoader.svelte'; import { receive, send } from '$lib/utils/helpers'; import { t } from 'svelte-i18n'; /** @type {import('./$types').ActionData} */ export let form; + let loading = false; /** @type {import('./$types').SubmitFunction} */ const handleRequestChange = async () => { + loading = true; return async ({ result }) => { await applyAction(result); + loading = false; }; }; @@ -40,6 +44,10 @@ required />
- + {#if loading} + + {:else} + + {/if}