UI Enhancements
This commit is contained in:
@@ -4,8 +4,24 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import BoatReservationComponent from 'src/components/BoatReservationComponent.vue';
|
||||
import { Reservation } from 'src/stores/schedule.types';
|
||||
import { useIntervalStore } from 'src/stores/interval';
|
||||
import { Interval, Reservation } from 'src/stores/schedule.types';
|
||||
import { ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const $route = useRoute();
|
||||
const newReservation = ref<Reservation>();
|
||||
|
||||
if (typeof $route.query.interval === 'string') {
|
||||
useIntervalStore()
|
||||
.fetchInterval($route.query.interval)
|
||||
.then(
|
||||
(interval: Interval) =>
|
||||
(newReservation.value = <Reservation>{
|
||||
resource: interval.resource,
|
||||
start: interval.start,
|
||||
end: interval.end,
|
||||
})
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user