refactor: everything to nuxt.js
This commit is contained in:
20
app/pages/schedule/edit/[id].vue
Normal file
20
app/pages/schedule/edit/[id].vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import BoatReservationComponent from '~/components/BoatReservationComponent.vue';
|
||||
import { useReservationStore } from '~/stores/reservation';
|
||||
import type { Reservation } from '~/utils/schedule.types';
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
const route = useRoute();
|
||||
const reservation = ref<Reservation>();
|
||||
|
||||
onMounted(async () => {
|
||||
const id = route.params.id as string;
|
||||
reservation.value = await useReservationStore().getReservationById(id);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-page>
|
||||
<BoatReservationComponent v-model="reservation" />
|
||||
</q-page>
|
||||
</template>
|
||||
Reference in New Issue
Block a user