mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-16 17:48:49 +02:00
feat:#48 added loading indicator and disabled state
This commit is contained in:
@ -35,8 +35,10 @@ const columns = computed(() => [
|
||||
]);
|
||||
|
||||
const toast = useToast();
|
||||
const requestIsPending = ref(false);
|
||||
|
||||
async function finalStep() {
|
||||
requestIsPending.value = true;
|
||||
const createFeed: Promise<string> = createIndividualFeed(
|
||||
store.getAllModules(),
|
||||
);
|
||||
@ -44,6 +46,7 @@ async function finalStep() {
|
||||
// Check if createFeed Promise is resolved
|
||||
createFeed.then(async (token: string) => {
|
||||
tokenStore().setToken(token);
|
||||
requestIsPending.value = false;
|
||||
await router.push("/calendar-link");
|
||||
});
|
||||
|
||||
@ -157,9 +160,9 @@ async function finalStep() {
|
||||
</div>
|
||||
|
||||
<Button
|
||||
:disabled="store.isEmpty()"
|
||||
:disabled="store.isEmpty() || requestIsPending"
|
||||
class="col-12 md:col-4 mb-3 align-self-end"
|
||||
icon="pi pi-save"
|
||||
:icon="requestIsPending ? 'pi pi-spin pi-spinner' : 'pi pi-save'"
|
||||
:label="$t('renameModules.nextStep')"
|
||||
@click="finalStep()"
|
||||
/>
|
||||
|
Reference in New Issue
Block a user