{{-- brafa Systems — Mews hotels. Livewire backing: App\Http\Livewire\SuperAdmin\MewsManagement. --}}
@if ($successMessage)
{{ $successMessage }}
@endif @if ($errorMessage)
{{ $errorMessage }}
@endif {{-- Hotels --}}

Mews hotels

Hotels connected to Mews (docs/mews-integration-plan.md). Add one from the properties page with its Mews access token, or let the hotel connect brafa in the Mews Marketplace (needs the webhook below). Door codes are written to the reservation in Mews once a lock has the code.

@forelse ($details as $d) @php($pid = (string) $d->PropertyID) @if ($editing === $pid) @endif @empty @endforelse
Hotel Status Last sync Rooms Codes in Mews Actions
{{ $pid }} · {{ $d->environment }} · {{ $d->timezone }}
@if ($d->is_enabled) Connected @else Off @endif @unless (isset($automationOn[$pid]))
Automation is switched off
@endunless
{{ optional($d->last_synced_at)->diffForHumans() ?? 'Never' }} @if ($d->last_error)
{{ \Illuminate\Support\Str::limit($d->last_error, 90) }}
@endif
{{ $rooms[$pid] ?? 0 }} @if ($d->writeback_enabled) {{ $codesInMews[$pid] ?? 0 }} @if (($writeErrors[$pid] ?? 0) > 0)
{{ $writeErrors[$pid] }} failed
@endif @else Not written @endif
@if (($writeErrors[$pid] ?? 0) > 0) @endif
Mews services that get door codes
@foreach ($services as $s) @endforeach
@error('selectedServices')

{{ $message }}

@enderror

PIN length applies to new bookings only.

Check-in on first unlock needs auto check-in switched on for the property; early check-in when the room is ready needs auto early check-in. Both are on the property page.

No Mews hotels yet.
{{-- Webhooks --}}

Webhooks

Send these to Mews support to register them (one per environment, for both general and integration webhooks). Reservation changes then sync within a couple of minutes, and hotels that connect brafa in the Mews Marketplace are added automatically, with their automation switched off.

@forelse ($webhookUrls as $label => $url)
{{ $label }}
{{ $url }}
@empty
Set MEWS_WEBHOOK_SECRET (16+ letters and digits) in .env, then run config:cache.
@endforelse
@forelse ($events as $e) @empty @endforelse
ReceivedEnvHotelWhatResult
{{ $e->created_at->format('Y-m-d H:i:s') }} {{ $e->environment }} {{ $e->enterprise_id ?? '—' }} {{ $e->summary }} @if ($e->error) {{ \Illuminate\Support\Str::limit($e->error, 80) }} @elseif ($e->processed_at) Done @else Pending @endif
No webhooks received yet.
{{-- Write errors --}} @if ($recentErrors->isNotEmpty())

Door codes not written to Mews

Retried automatically on each sync (up to 40 per hotel per run).

@foreach ($recentErrors as $r) @endforeach
HotelBookingErrorWhen
{{ $names[(string) $r->PropertyID] ?? $r->PropertyID }} {{ $r->booking_id }} {{ \Illuminate\Support\Str::limit($r->door_code_error, 160) }} {{ $r->updated_at->diffForHumans() }}
@endif