Skip to content

Commit

Permalink
Prefil email on reservation form
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Jul 2, 2024
1 parent f775e1c commit 3781911
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion front-vite/src/views/ReservationFormView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
@submit="saveReservation"
:saving="saving"
:save-error="saveError"
:original-values="resaToEdit || {}"
/>

</section>
Expand Down Expand Up @@ -134,7 +135,15 @@ import EventSummary from '@/components/EventSummary.vue'
import EventReservationForm from '@/components/EventReservationForm.vue'
import type { ResaEvent } from '@/declaration';
import { isReservationOpened, isReservationGloballyOpened } from '@/utils/isReservationOpened'
import type { Resa } from '@/declaration';
import { useAuthStore } from '@/stores/auth';
import { storeToRefs } from 'pinia'
const authStore = useAuthStore()
const { user } = storeToRefs(authStore)
const resaToEdit = ref<Resa | null>(null)
const currentRoute = useRoute()
const geotrekId = currentRoute.params.geotrekid
Expand Down Expand Up @@ -180,7 +189,9 @@ onBeforeMount(async () => {
default:
eventError.value = "Une erreur est survenue. Il est impossible d'effecuter une réservation. Merci de prendre contact avec le parc."
}
}
}
// Prefil email
resaToEdit.value = { email: user.value?.email } as Resa
loadingEvent.value = false
})
Expand Down

0 comments on commit 3781911

Please sign in to comment.