UI Enhancements

This commit is contained in:
2024-06-03 12:01:38 -04:00
parent b2420b270c
commit c3098b073f
8 changed files with 98 additions and 65 deletions

View File

@@ -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>