diff --git a/src/pages/schedule/BoatReservationPage.vue b/src/pages/schedule/BoatReservationPage.vue index 26ef1ed..6bb396a 100644 --- a/src/pages/schedule/BoatReservationPage.vue +++ b/src/pages/schedule/BoatReservationPage.vue @@ -14,11 +14,6 @@ class="q-px-none" clickable @click="boatSelect = true"> - @@ -75,7 +70,11 @@ - {{ bookingDuration }} hours + {{ bookingDuration.hours }} hours + + + {{ bookingDuration.minutes }} mins + @@ -88,11 +87,6 @@ - - { bookingForm.value.endDate = new_interval?.end; }); -const bookingDuration = computed((): number => { +const bookingDuration = computed((): { hours: number; minutes: number } => { if (bookingForm.value.startDate && bookingForm.value.endDate) { const start = new Date(bookingForm.value.startDate).getTime(); const end = new Date(bookingForm.value.endDate).getTime(); const delta = Math.abs(end - start) / 1000; - return Math.floor(delta / 3600) % 24; + const hours = Math.floor(delta / 3600) % 24; + const minutes = Math.floor(delta - hours * 3600) % 60; + return { hours: hours, minutes: minutes }; } - return 0; + return { hours: 0, minutes: 0 }; }); const onReset = () => {