Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle generic modal close event #721

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions frontend/src/components/GenericModal.vue
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an indentation fix. Nothing changed in this file.

Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,33 @@ onUnmounted(() => {
<div class="new-design overlay" role="dialog" tabindex="-1" aria-labelledby="title" aria-modal="true">
<div class="dismiss-zone" @click="emits('close')"></div>
<div class="modal">
<link-button class="modal-close" v-if="closable" @click="emits('close')" aria-labelledby="modal-close-button">
<img id="modal-close-button" src="@/assets/svg/icons/close.svg" :alt="t('label.close')" :title="t('label.close')"/>
</link-button>
<div class="modal-header">
<slot name="header"></slot>
<notice-bar type="error" v-if="errorMessage">
{{ errorMessage }}
</notice-bar>
<notice-bar type="warning" v-else-if="warningMessage">
{{ warningMessage }}
</notice-bar>
<notice-bar v-else-if="infoMessage">
{{ infoMessage }}
</notice-bar>
<div class="pls-keep-height" v-else/>
</div>
<div class="modal-body">
<slot></slot>
</div>
<div class="modal-actions">
<slot name="actions"></slot>
</div>
<div class="divider"></div>
<div class="footer">
<slot name="footer"></slot>
</div>
<link-button class="modal-close" v-if="closable" @click="emits('close')" aria-labelledby="modal-close-button">
<img id="modal-close-button" src="@/assets/svg/icons/close.svg" :alt="t('label.close')" :title="t('label.close')"/>
</link-button>
<div class="modal-header">
<slot name="header"></slot>
<notice-bar type="error" v-if="errorMessage">
{{ errorMessage }}
</notice-bar>
<notice-bar type="warning" v-else-if="warningMessage">
{{ warningMessage }}
</notice-bar>
<notice-bar v-else-if="infoMessage">
{{ infoMessage }}
</notice-bar>
<div class="pls-keep-height" v-else/>
</div>
<div class="modal-body">
<slot></slot>
</div>
<div class="modal-actions">
<slot name="actions"></slot>
</div>
<div class="divider"></div>
<div class="footer">
<slot name="footer"></slot>
</div>
</div>
</div>
</template>
<style scoped>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/WaitingListActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ onMounted(async () => {
<template>
<div>
<home-view></home-view>
<generic-modal :error-message="errorMsg">
<generic-modal :error-message="errorMsg" @close="() => router.push({name: 'home'})">
<template v-slot:header>
<word-mark/>
<h2 id="title" v-if="isError">
Expand Down