@extends('layouts.admin') @section('title','Pengurus') @section('page_title','Data Pengurus') @section('page_subtitle','Nama lengkap, nama panggilan, jabatan dan WhatsApp') @section('content')
<div class="grid form-grid"><section class="card"><h3>Tambah Pengurus</h3><form method="post" action="{{ route('members.store') }}" class="form">@csrf<label>Unit<select name="organization_id">@foreach($orgs as $o)<option value="{{ $o->id }}">{{ $o->acronym }} — {{ $o->name }}</option>@endforeach</select></label><div class="two"><label>Nama Lengkap<input name="full_name" required></label><label>Nama Panggilan<input name="nickname" placeholder="Pak Ahmad / Bu Aisyah"></label></div><div class="two"><label>Jabatan<input name="position" required></label><label>No. WhatsApp<input name="whatsapp" placeholder="0812..."></label></div><div class="two"><label>Email<input type="email" name="email"></label><label>Nomor SK<input name="sk_number"></label></div><button class="btn primary">Simpan Pengurus</button></form></section><section class="card tip"><h3>WhatsApp Tracking</h3><p>Tombol WA otomatis menyiapkan pesan <b>“Assalamu'alaikum [nama panggilan]”</b> dan mencatat 1 klik komunikasi.</p><p>Catatan: klik tidak sama dengan status pesan terkirim/dibaca kecuali nanti diintegrasikan dengan WhatsApp Business API.</p></section></div>
<section class="card table-card"><div class="section-head"><h3>Daftar Pengurus</h3><span>{{ $members->total() }} data</span></div><div class="table-wrap"><table><thead><tr><th>Pengurus</th><th>Unit</th><th>Jabatan</th><th>WhatsApp</th><th>SK</th><th>Aksi</th></tr></thead><tbody>@foreach($members as $m)<tr><td><b>{{ $m->full_name }}</b><small>{{ $m->nickname ?: '—' }}</small></td><td><span class="pill">{{ $m->organization?->acronym }}</span></td><td>{{ $m->position }}</td><td>{{ $m->whatsapp ?: '—' }}</td><td>{{ $m->sk_number ?: '—' }}</td><td>@if($m->whatsapp)<a class="btn whatsapp" href="{{ route('members.whatsapp',$m) }}" target="_blank">💬 WhatsApp</a>@endif</td></tr>@endforeach</tbody></table></div>{{ $members->links() }}</section>@endsection