@extends('layouts.dashboard') @section('title', 'User WhatsApp Connection') @section('page-title', 'WhatsApp Gateway for ' . $user->name) @section('content')
@if(session('success')) @endif @if(session('error')) @endif
Connection Status
@if($status === 'connected')

Connected

Logged in as: +{{ $phoneNumber }}

@csrf
@elseif($status === 'qr' && $qrCode)
Scan QR Code

Open WhatsApp on your mobile, go to Linked Devices, and scan this QR code to authenticate the gateway.

WhatsApp QR Code

Or Link with Phone Number

Request an 8-character pairing code to type into WhatsApp on your phone.

@csrf
+
@if(session('success_code'))
Pairing Code:
{{ session('success_code') }}
Type this on your phone's linked devices screen.
@endif
Waiting for connection...
@else

Disconnected

The gateway is not connected or initialized for this user.

Initialize Session
Checking status or service starting up...
@endif
Agent Profile & Preferences
{{ $user->name }}
{{ $user->email }}
{{ $user->phone ?? '-' }}
{{ str_replace('_', ' ', $user->settings->whatsapp_mode ?? 'manual') }}
Recent Activity Logs
Last 50 Logs
@forelse($logs as $log) @empty @endforelse
ID Recipient Type Status Response Detail Time
#{{ $log->id }} +{{ $log->mobile }} {{ $log->message_type }} @if($log->status === 'sent') Sent @elseif($log->status === 'queued') Queued @else Failed @endif {{ $log->response }} {{ $log->inserted_on }}
No Logs Recorded

Gateway actions and send attempts will be displayed here.

@if($status !== 'connected') @endif @endsection