diff --git a/app/Http/Controllers/Admin/ParentVerificationController.php b/app/Http/Controllers/Admin/ParentVerificationController.php index 05f7bb8..8c7e08d 100644 --- a/app/Http/Controllers/Admin/ParentVerificationController.php +++ b/app/Http/Controllers/Admin/ParentVerificationController.php @@ -20,12 +20,18 @@ class ParentVerificationController extends Controller $recent = ParentStudent::query() ->where('status', '!=', 'pending') - ->with(['user:id,name,username', 'student:id,nisn,full_name,class_name']) + ->with(['user:id,name,username,phone', 'student:id,nisn,full_name,class_name']) ->orderByDesc('updated_at') ->limit(20) ->get(); - return view('parents.verification', compact('pending', 'recent')); + $totalWali = \App\Models\User::where('role', 'parent')->count(); + $approvedToday = ParentStudent::where('status', 'active') + ->whereDate('verified_at', today()) + ->count(); + $rejectedTotal = ParentStudent::where('status', 'rejected')->count(); + + return view('parents.verification', compact('pending', 'recent', 'totalWali', 'approvedToday', 'rejectedTotal')); } public function approve(Request $request, int $linkId): RedirectResponse diff --git a/resources/views/parents/verification.blade.php b/resources/views/parents/verification.blade.php index 64776f0..d13cb7f 100644 --- a/resources/views/parents/verification.blade.php +++ b/resources/views/parents/verification.blade.php @@ -5,25 +5,89 @@ @section('content')
Akun wali yang mendaftar lewat aplikasi mobile & belum terverifikasi otomatis
+Akun wali yang mendaftar lewat aplikasi & belum terverifikasi otomatis
Antrean
+{{ $pending->count() }}
+Menunggu keputusan
+Disetujui Hari Ini
+{{ $approvedToday }}
+Akun langsung aktif
+Ditolak
+{{ $rejectedTotal }}
+Total penolakan
+Total Wali
+{{ $totalWali }}
+Akun terdaftar
+Wali daftar via app โ cocokkan data โ setujui di sini
+Tidak ada antrean ๐
-Semua permintaan verifikasi sudah diproses.
+Tidak ada antrean ๐
+Semua permintaan verifikasi sudah diproses.
{{ $link->user->name }}
-- NISN {{ $link->student->nisn }} ยท {{ $link->student->full_name }} ยท {{ $link->student->class_name }} +
+ {{ $link->user->name }} + @if($link->relation === 'father') + AYAH + @elseif($link->relation === 'mother') + IBU + @elseif($link->relation === 'guardian') + WALI + @endif +
++ Daftar {{ $link->created_at?->diffForHumans() }} + @if($link->user->phone) + ยท {{ $link->user->phone }} + @endif
-Daftar: {{ $link->created_at?->diffForHumans() }}
20 verifikasi terakhir
| Wali | -Siswa | -Status | -Diproses | + +||||
|---|---|---|---|---|---|---|---|
| Wali | +Siswa | +Status | +Diproses | ||||
| {{ $link->user->name }} | -{{ $link->student->full_name }} ({{ $link->student->class_name }}) | -+ | |||||
|
+
+
+
+ {{ strtoupper(substr($link->user->name, 0, 1)) }}
+
+
+
+ {{ $link->user->name }} + @if($link->user->phone) +{{ $link->user->phone }} + @endif + |
+ + {{ $link->student->full_name }} + ({{ $link->student->class_name }}) + | +@if($link->status === 'active') - Aktif + + Aktif + @else - Ditolak + + Ditolak + @endif | -{{ $link->verified_at?->diffForHumans() }} | +{{ $link->verified_at?->diffForHumans() }} |