@extends('layouts.admin') @section('styles') @endsection @section('content')
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @php $user = auth()->user(); $initials = collect(explode(' ', $user->name)) ->map(fn($w) => strtoupper($w[0] ?? '')) ->take(2) ->implode(''); @endphp
{{-- ── KOLOM KIRI: Profile Card ── --}}
@if ($user->foto_profil_url) {{ $user->name }} @else {{ $initials }} @endif
{{ $user->name }}
{{ $user->email }}
{{ $user->role === 'admin' ? 'Admin' : 'Pengguna' }}
Bergabung
{{ $user->created_at->format('d M Y') }}
No. Telepon
{{ $user->no_telepon ?? '—' }}
Status Email
{{ $user->sudah_verifikasi ? 'Terverifikasi' : 'Belum Verifikasi' }}
{{-- ── KOLOM KANAN: Form Sections ── --}}
{{-- ── 1. Informasi Pribadi ── --}}
Informasi Pribadi
Nama, email, dan nomor telepon
@csrf @method('PUT')
{{-- ── 2. Foto Profil ── --}}
Foto Profil
Upload atau ganti foto profil Anda
@csrf @method('PUT')
@if ($user->foto_profil_url) @else {{ $initials }} @endif
Pilih atau seret foto ke sini
JPG, PNG, WebP · Maks. 4 MB
@if ($user->foto_profil)
@endif
{{-- ── 3. Ganti Password ── --}}
Ganti Password
Perbarui kata sandi akun Anda
@csrf @method('PUT')
Masukkan password baru
{{-- ── 4. Sesi & Keamanan ── --}}
Sesi & Keamanan
Kelola sesi login aktif
Sesi Saat Ini
{{ request()->ip() }} · {{ request()->userAgent() ? Str::limit(request()->userAgent(), 50) : 'Browser tidak diketahui' }}
● Aktif
@csrf @method('DELETE')
{{-- end profile-sections --}}
{{-- end profile-grid --}}
{{-- ── MODAL KONFIRMASI LOGOUT ── --}} @endsection @section('scripts') @endsection