| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <!-- Boite de dialogue "soumettre une candidature" -->
- <template>
- <v-dialog
- :model-value="modelValue"
- max-width="600px"
- :persistent="!jobApplicationSent"
- no-click-animation
- :retain-focus="false"
- >
- <div v-if="!jobApplicationSent">
- <JoinUsForm :job-posting-id="jobPostingId" @submit="onFormSubmit" />
- <v-btn @click="close()"> Annuler </v-btn>
- </div>
- <div v-else>
- <v-card class="pa-6 text-center">
- Votre candidature a bien été envoyée, merci de votre intérêt.<br />
- Nous vous recontacterons dès que possible.
- </v-card>
- <v-btn @click="close()"> Fermer </v-btn>
- </div>
- </v-dialog>
- </template>
- <script setup lang="ts">
- import type { PropType } from 'vue'
- defineProps({
- modelValue: Boolean,
- jobPostingId: {
- type: Number as PropType<number | null>,
- required: false,
- default: null,
- },
- })
- const jobApplicationSent: Ref<boolean> = ref(false)
- const emit = defineEmits(['update:modelValue'])
- const onFormSubmit = () => {
- jobApplicationSent.value = true
- }
- const close = () => {
- emit('update:modelValue', false)
- }
- </script>
- <style scoped lang="scss">
- .v-dialog {
- :deep(.v-overlay__content) {
- overflow: auto !important;
- }
- :deep(.v-card) {
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
- }
- .v-btn {
- width: 100%;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- }
- }
- </style>
|