{{-- resources/views/public/booking-resource.blade.php --}} @php // Get theme fonts from active preset $headingFont = 'Inter'; $bodyFont = 'Inter'; if ($website && $website->activeTheme && $website->activeTheme->theme) { $defaultPreset = $website->activeTheme->theme->presets()->where('is_default', true)->first(); if ($defaultPreset && isset($defaultPreset->font_scheme)) { $headingFont = $defaultPreset->font_scheme['heading'] ?? 'Inter'; $bodyFont = $defaultPreset->font_scheme['body'] ?? 'Inter'; } } // Build Google Fonts URL dynamically $fontsToLoad = []; if ($headingFont !== 'Default') { $fontsToLoad[] = str_replace(' ', '+', $headingFont) . ':wght@300;400;500;600;700;800;900'; } if ($bodyFont !== 'Default' && $bodyFont !== $headingFont) { $fontsToLoad[] = str_replace(' ', '+', $bodyFont) . ':wght@300;400;500;600;700;800;900'; } $googleFontsUrl = 'https://fonts.googleapis.com/css2?family=' . implode('&family=', $fontsToLoad) . '&display=swap'; @endphp Book {{ $resource->name }} - {{ $website->name }} @if(count($fontsToLoad) > 0) @endif @php $headerSection = $website->globalSections()->where('type', 'header')->where('is_default', true)->first(); @endphp @if($headerSection && $headerSection->builder_data)
{!! $headerSection->renderBuilderContent() !!}
@endif
@if($resource->main_image) {{ $resource->name }} @else
@endif

{{ $resource->name }}

@if($resource->resource_category)

{{ $resource->resource_category }}

@endif
@php $hasSubscriptionPackages = $resource->activeSubscriptionPackages && $resource->activeSubscriptionPackages->count() > 0; $showPriceRange = $hasSubscriptionPackages && $resource->base_price <= 0; @endphp @if($showPriceRange) @php $minPrice = $resource->activeSubscriptionPackages->min('price'); $maxPrice = $resource->activeSubscriptionPackages->max('price'); @endphp @if($minPrice == $maxPrice) RM {{ number_format($minPrice, 2) }} subscription @else RM {{ number_format($minPrice, 2) }} - {{ number_format($maxPrice, 2) }} subscription packages @endif @else RM {{ number_format($resource->base_price, 2) }} {{ str_replace('per_', 'per ', $resource->price_type) }} @endif
@if($resource->short_description)

{{ $resource->short_description }}

@endif
@if($resource->capacity)
Capacity: Up to {{ $resource->capacity }} people
@endif @if($resource->min_booking_duration)
Duration: Minimum {{ $resource->min_booking_duration }} minutes
@endif
@if($resource->amenities && is_array($resource->amenities) && count($resource->amenities) > 0)
Amenities: @foreach($resource->amenities as $amenity) {{ $amenity }} @endforeach
@endif @if($resource->description)
Description:

{{ $resource->description }}

@endif

Make a Booking

@if($customer) My Account @endif
@if(session('error')) @endif @if(session('success')) @endif @if($errors->any()) @endif @if($activeSubscription)
Active Subscription

You have an active {{ $activeSubscription->package->name }} subscription!

Credits Remaining
@if($activeSubscription->package->booking_credits) {{ $activeSubscription->credits_remaining }} @else @endif
@if($activeSubscription->package->booking_credits)
of {{ $activeSubscription->package->booking_credits }}
@else
Unlimited
@endif
Status
@if($activeSubscription->on_trial) On Trial @else {{ ucfirst($activeSubscription->status) }} @endif
Renews On
{{ $activeSubscription->current_period_end->format('M d, Y') }}
{{ $activeSubscription->current_period_end->diffForHumans() }}
@if($activeSubscription->canBook())
Great news! You can book for FREE using your subscription credits. Just select your date and time below - no payment required!
@else
No credits remaining. Your credits will reset on {{ $activeSubscription->current_period_end->format('M d, Y') }}.
@endif
@endif @if($resource->payment_mode === 'both')
Choose Your Payment Option
@if($resource->base_price > 0)
Pay Per Booking
RM {{ number_format($resource->base_price, 2) }} per {{ str_replace('per_', '', $resource->price_type) }}

No commitment, pay as you go

@endif @if(!$activeSubscription)
Subscribe & Save
@if($resource->activeSubscriptionPackages->count() > 0)
From RM {{ number_format($resource->activeSubscriptionPackages->min('price'), 2) }} per month

Save with subscription packages

@else
Packages Available

Regular pricing benefits

@endif
@else
Already Subscribed
Active Subscription

You already have an active subscription.
Manage Subscription →

@endif
@endif @if(($resource->payment_mode === 'subscription' || $resource->payment_mode === 'both') && !$activeSubscription)
Choose Your Subscription Package
@if($resource->activeSubscriptionPackages->count() > 0)
@foreach($resource->activeSubscriptionPackages as $package)
@if($package->is_popular)
Most Popular
@endif
{{ $package->name }}

RM {{ number_format($package->price, 2) }}

{{ $package->billing_period_display }}
@if($package->savings_percentage > 0)
Save {{ $package->savings_percentage }}%
@endif
  • {{ $package->booking_limit_display }}
  • @if($package->duration_months)
  • {{ $package->duration_display }}
  • @else
  • Auto-renews monthly
  • @endif @if($resource->allow_trial && $resource->trial_days)
  • {{ $resource->trial_days }} days free trial
  • @endif
@if($package->description)

{{ $package->description }}

@endif
@endforeach
@if($resource->allow_trial && $resource->trial_days)
Free Trial: Try any package free for {{ $resource->trial_days }} days. Cancel anytime during trial period.
@endif @else
No subscription packages are currently available. Please contact us or choose one-time payment.
@endif @if($resource->payment_mode === 'both')
@endif
@endif
Booking Tip: You can book for the same day! Just select your start date/time, and the end time will automatically be set to 1 hour later. You can adjust it as needed.
@csrf
@error('start_datetime')
{{ $message }}
@enderror Unavailable dates are disabled. Same-day bookings are allowed.
@error('end_datetime')
{{ $message }}
@enderror Must be at least 1 hour after start time. Auto-set when you select start date.
@error('participants')
{{ $message }}
@enderror
@error('payment_method')
{{ $message }}
@enderror @php $hasAnyPayment = ($enabledPayments['stripe'] ?? false) || ($enabledPayments['paypal'] ?? false) || ($enabledPayments['chipin'] ?? false) || ($enabledPayments['bank_transfer'] ?? false) || ($enabledPayments['cod'] ?? false); @endphp @if(!$hasAnyPayment) No payment methods are currently enabled. Please contact the administrator. @endif
@if($enabledPayments['bank_transfer'] ?? false) @endif

@if(!$customer)
Have an account? Login to auto-fill your information and track your bookings.
Login
@endif
Your Information @if($customer) Logged in as {{ $customer->name }} @endif
@error('customer_name')
{{ $message }}
@enderror
@error('customer_email')
{{ $message }}
@enderror
@error('customer_phone')
{{ $message }}
@enderror
@error('special_requests')
{{ $message }}
@enderror
Cancel
@php $footerSection = $website->globalSections()->where('type', 'footer')->where('is_default', true)->first(); @endphp @if($footerSection && $footerSection->builder_data) @endif @if($website->settings['google_analytics'] ?? false) @endif