@include('partials.pwa-head') @vite(['resources/css/app.css', 'resources/js/app.js']) @php $tz = 'Asia/Jakarta'; $nowWib = \Carbon\Carbon::now($tz); $allSlots = \App\Models\Setting::getOperationalSlots(); $leadHours = (int) \App\Models\Setting::getSameDayLeadHours(); // Minimal jeda jam dari jam sekarang (same day) $minTimeToday = $nowWib->copy()->addHours($leadHours); $validTodaySlots = array_values(array_filter($allSlots, function($slot) use ($minTimeToday) { $slotTime = \Carbon\Carbon::createFromTimeString($slot, 'Asia/Jakarta'); return $slotTime->gte($minTimeToday); })); $hasValidTodaySlots = !empty($validTodaySlots); $serverToday = $nowWib->format('Y-m-d'); $tomorrow = $nowWib->copy()->addDay()->format('Y-m-d'); $minDate = $hasValidTodaySlots ? $serverToday : $tomorrow; $defaultDate = $minDate; $defaultTime = $hasValidTodaySlots ? $validTodaySlots[0] : ($allSlots[0] ?? '09:00'); $platformFee = (int) \App\Models\Setting::getValue('platform_fee', 2500); $gatewayFee = (int) \App\Models\Setting::getValue('payment_gateway_fee', 4000); $totalPlatformFee = $platformFee + $gatewayFee; $detailConfig = [ 'serverToday' => $serverToday, 'serverHour' => (int) $nowWib->format('H'), 'serverMinute' => (int) $nowWib->format('i'), 'leadHours' => $leadHours, 'platformFee' => $platformFee, 'gatewayFee' => $gatewayFee, 'totalPlatformFee' => $totalPlatformFee, 'orderBaseUrl' => route('services.order.step2', $service->secure_id), 'defaultDate' => $defaultDate, 'defaultTime' => $defaultTime, ]; @endphp
arrow_back

TERAPISKU - {{ $service->name }}

@if($service->image_url) {{ $service->name }} @else {{ $service->icon }} @endif

{{ $service->name }}

star 4.8 · 285 ulasan · 1.2k booking
Tersedia di Jabodetabek
@if(!empty($service->description))

info Tentang Layanan

{{ $service->description }}

@endif

task_alt Termasuk dalam Layanan

@if(!empty($service->durations) && is_array($service->durations))

timer Pilih Durasi

@php $sortedDurations = collect($service->durations)->sortBy('minutes')->values()->all(); @endphp @foreach($sortedDurations as $index => $d) @php $isActive = $index === 0; // First item is active by default $priceRaw = (int) preg_replace('/[^0-9]/', '', (string)($d['price'] ?? '0')); $priceLabel = 'Rp ' . number_format($priceRaw, 0, ',', '.'); @endphp @endforeach
@endif

calendar_month Jadwal Terapi

info

Minimal pemesanan H-{{ $leadHours }} jam sebelum jadwal. Pastikan mitra memiliki waktu yang cukup untuk menuju lokasi Anda.

location_on Lokasi Terapi

@forelse($addresses as $index => $addr)
is_default || $index === 0) ? 'checked' : '' }}>
@empty
location_off

Belum ada alamat tersimpan

Tambahkan alamat terapi Anda menggunakan Google Maps agar terapis dapat menuju lokasi Anda.

@endforelse @if($addresses->count() > 0) @endif
@php $platformFee = (int) \App\Models\Setting::getValue('platform_fee', 2500); $gatewayFee = (int) \App\Models\Setting::getValue('payment_gateway_fee', 4000); $totalPlatformFee = $platformFee + $gatewayFee; $userWallet = (int) ($user ? $user->wallet_balance : 0); $firstPriceRaw = 0; if (!empty($sortedDurations[0])) { $firstPriceRaw = (int) preg_replace('/[^0-9]/', '', (string)($sortedDurations[0]['price'] ?? '0')); } $initialTotal = $firstPriceRaw + $totalPlatformFee; @endphp

receipt_long Ringkasan Pesanan

Biaya Layanan Rp {{ number_format($firstPriceRaw, 0, ',', '.') }}
Biaya Platform @if($totalPlatformFee > 0) Rp {{ number_format($totalPlatformFee, 0, ',', '.') }} @else Gratis @endif
Total Pembayaran Rp {{ number_format($initialTotal, 0, ',', '.') }}
account_balance_wallet Saldo Wallet
Rp {{ number_format($userWallet, 0, ',', '.') }}
@if(\App\Models\Setting::getValue('allow_konsumen_order', '1') == '0')
pause_circle {{ \App\Models\Setting::getValue('maintenance_message_konsumen_order', 'Layanan pemesanan sedang dalam pemeliharaan sementara.') }}
@else @php $initialAddressId = $addresses->firstWhere('is_default', true)->id ?? ($addresses->first()->id ?? ''); @endphp Lanjut ke Pembayaran arrow_forward @endif
@if(session('coverage_error')) @endif @if(session('schedule_error')) @endif @if(session('error') && !session('coverage_error') && !session('schedule_error')) @endif @include('partials.pwa-script')