@extends('layouts.main') @section('content')

Daftar Anggota

@forelse($keanggotaan as $i => $anggota) @empty @endforelse
No Nama No. Anggota Provinsi
{{ $i+1 }} {{ $anggota->user->name ?? '-' }} {{ $anggota->nomor_anggota ?? '-' }} {{ $anggota->user->profile->province->name ?? ($anggota->user->profile->other_province ?? '-') }}
Belum ada anggota
@php $uCard = auth()->user(); $pCard = optional($uCard->profile); $provinceCard = optional($pCard->province)->name ?? ($pCard->other_province ?? null); $regencyCard = optional($pCard->regency)->name ?? ($pCard->other_regency ?? null); $districtCard = optional($pCard->district)->name ?? ($pCard->other_district ?? null); @endphp
{{ data_get($cardSetting, 'title.text', 'KARTU ANGGOTA') }}
@if($pCard && $pCard->foto) @else @endif
@php $anggotaCard = $uCard->keanggotaan ?? null; // Prioritaskan nomor anggota, jika tidak ada baru gunakan ID $qrData = !empty($anggotaCard->nomor_anggota) ? $anggotaCard->nomor_anggota : ($uCard->id ?? ''); $qrSvg = \SimpleSoftwareIO\QrCode\Facades\QrCode::size(80)->generate($qrData); $qrBase64 = base64_encode($qrSvg); @endphp QR Code
@php $user = auth()->user(); $isSuperAdmin = (method_exists($user, 'isSuperAdmin') ? $user->isSuperAdmin() : false) || (property_exists($user, 'role') && $user->role === 'superadmin') || (method_exists($user, 'hasRole') && $user->hasRole('superadmin')); $isAdmin = (method_exists($user, 'isAdmin') ? $user->isAdmin() : false) || (property_exists($user, 'role') && $user->role === 'admin') || (method_exists($user, 'hasRole') && $user->hasRole('admin')); // Tampilkan tombol jika: // - Superadmin // - Admin $shouldShowButtons = $isSuperAdmin || $isAdmin; @endphp {{-- Tiga tombol utama --}} @if($shouldShowButtons)
@endif

Pengaturan Teks Kartu

Mengedit: Pilih teks pada kartu
x
@php $bgDir = public_path('assets/images/card'); $bgFiles = glob($bgDir . '/*.{png,jpg,jpeg,gif,webp}', GLOB_BRACE); @endphp @if(count($bgFiles) > 0) @foreach($bgFiles as $file) @php $filename = basename($file); @endphp @php $isUploaded = DB::table('idcardbegrounds')->where('filename', $filename)->exists(); @endphp
{{ $filename }} @if($isUploaded) @endif
@endforeach @endif
@if(isset($shouldShowButtons) && $shouldShowButtons)
@endif
@endsection @push('styles') @endpush