@extends('layouts.app') @section('title', 'User: ' . $user->name) @section('content')

{{ $user->name }}

{{ $user->email }}
{{ $user->phone_number }}
@php $roleColors = [ 'super_admin' => 'bg-purple-100 text-purple-800', 'gas_company_admin' => 'bg-blue-100 text-blue-800', 'end_user' => 'bg-green-100 text-green-800', ][$user->role] ?? 'bg-gray-100 text-gray-800'; @endphp {{ ucwords(str_replace('_', ' ', $user->role)) }}

User Information

Personal details and account information

Full Name
{{ $user->name }}
Email Address
{{ $user->email }}
Phone Number
{{ $user->phone_number }}
Role
{{ ucwords(str_replace('_', ' ', $user->role)) }}
Account Status
@if($user->email_verified_at) Verified @else Pending Verification @endif
Member Since
{{ $user->created_at->format('F j, Y') }} ({{ $user->created_at->diffForHumans() }})
@if($user->gasCompany)
Gas Company
{{ $user->gasCompany->name }}
@endif
@if($user->registrations->count() > 0)

Registered Sensors

Sensors registered to this user

@foreach($user->registrations as $registration) @php $sensor = $registration->sensor; $statusColors = [ 'online' => 'text-green-600', 'offline' => 'text-gray-500', 'battery_low' => 'text-yellow-600', ][$sensor->status] ?? 'text-gray-500'; @endphp @endforeach
Sensor ID Location Status Last Seen Actions
{{ $sensor->device_uuid }}
{{ $sensor->qr_code }}
{{ $registration->location_name }}
{{ $registration->address }}
{{ ucfirst($sensor->status) }} @if($sensor->last_gas_level !== null)
@php $gasLevel = (int)$sensor->last_gas_level; $gasColor = $gasLevel < 20 ? 'bg-red-600' : ($gasLevel < 50 ? 'bg-yellow-500' : 'bg-green-600'); @endphp
{{ $gasLevel }}% full
@endif
@if($sensor->last_ping) {{ $sensor->last_ping->diffForHumans() }} @else Never @endif View
@endif

Recent Activity

User's recent actions and events

Activity log will be implemented here

@endsection