diff --git a/src/modules/chatelet/types/room.ts b/src/modules/chatelet/types/room.ts index b49ebef..7115fa8 100644 --- a/src/modules/chatelet/types/room.ts +++ b/src/modules/chatelet/types/room.ts @@ -2,6 +2,13 @@ // Note: operator-private fields (wallet, checkin_instructions) are stripped // server-side by public_room_dict and never reach the client. +/** The room owner's rules, from their operator settings (chatelet ≥ v0.5.0). */ +export interface HouseRules { + checkin_time: string + checkout_time: string + cancellation_policy: string +} + export interface Room { id: string title: string @@ -19,6 +26,10 @@ export interface Room { listing_event_id: string | null created_at: string updated_at: string + /** Absent on chatelet < v0.5.0. */ + house_rules?: HouseRules + /** Rails the owner accepts for this room: 'lightning' and maybe 'fiat'. Absent on < v0.5.0. */ + payment_methods?: string[] } export interface AvailabilityResult { diff --git a/src/modules/chatelet/views/ChateletDetailPage.vue b/src/modules/chatelet/views/ChateletDetailPage.vue index aa71891..612d425 100644 --- a/src/modules/chatelet/views/ChateletDetailPage.vue +++ b/src/modules/chatelet/views/ChateletDetailPage.vue @@ -3,10 +3,11 @@ import { computed, onMounted, ref, watch } from 'vue' import { useRoute, useRouter } from 'vue-router' import { toast } from 'vue-sonner' import { watchDebounced } from '@vueuse/core' -import { MapPin, Users } from 'lucide-vue-next' +import { Clock, MapPin, Moon, Users } from 'lucide-vue-next' import { Card, CardContent } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' +import { ImageViewer } from '@/components/ui/image' import { formatSats } from '@/lib/utils/formatting' import { useAuth } from '@/composables/useAuthService' import { useChatelet } from '../composables/useChatelet' @@ -129,11 +130,18 @@ watch(showBooking, (open) => {
Room not found.
- +
@@ -161,6 +169,35 @@ watch(showBooking, (open) => { {{ room.description }}

+ + + +

Things to know

+
    +
  • + + Check-in from {{ room.house_rules.checkin_time }} · check-out by + {{ room.house_rules.checkout_time }} +
  • +
  • + + Up to {{ room.max_guests }} guest{{ room.max_guests === 1 ? '' : 's' }} +
  • +
  • + + Minimum stay {{ room.min_nights }} night{{ room.min_nights === 1 ? '' : 's' }} +
  • +
+
+

Cancellation policy

+

+ {{ room.house_rules.cancellation_policy }} +

+
+
+
+