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')
- {{-- Header --}} -
+ {{-- Header premium --}} +
-
-
+
+
+
- -
- - - {{ $pending->count() }} menunggu - + + Data Wali Murid + +
+
+ + {{-- Kartu statistik --}} +
+
+
+
+
+

Antrean

+

{{ $pending->count() }}

+

Menunggu keputusan

+
+
+ +
+
+
+ +
+
+
+
+

Disetujui Hari Ini

+

{{ $approvedToday }}

+

Akun langsung aktif

+
+
+ +
+
+
+ +
+
+
+
+

Ditolak

+

{{ $rejectedTotal }}

+

Total penolakan

+
+
+ +
+
+
+ +
+
+
+
+

Total Wali

+

{{ $totalWali }}

+

Akun terdaftar

+
+
+ +
@@ -41,49 +105,93 @@ @endif {{-- Antrean pending --}} -
-
-

Antrean Verifikasi

- Wali daftar via app โ†’ cocokkan data โ†’ verifikasi di sini +
+
+
+

+ + Antrean Verifikasi +

+

Wali daftar via app โ†’ cocokkan data โ†’ setujui di sini

+
+ + + {{ $pending->count() }} menunggu +
@if($pending->isEmpty()) -
-
- +
+
+
-

Tidak ada antrean ๐ŸŽ‰

-

Semua permintaan verifikasi sudah diproses.

+

Tidak ada antrean ๐ŸŽ‰

+

Semua permintaan verifikasi sudah diproses.

@else -
+
@foreach($pending as $link) -
+
-
- {{ strtoupper(substr($link->user->name, 0, 1)) }} +
+
+ {{ strtoupper(substr($link->user->name, 0, 1)) }} +
+ @if($link->relation === 'father') + + + + @elseif($link->relation === 'mother') + + + + @elseif($link->relation === 'guardian') + + + + @endif
-

{{ $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 +

+
+ + + {{ $link->student->full_name }} + + + NISN {{ $link->student->nisn }} + + + + {{ $link->student->class_name }} + +
+

+ Daftar {{ $link->created_at?->diffForHumans() }} + @if($link->user->phone) + ยท {{ $link->user->phone }} + @endif

-

Daftar: {{ $link->created_at?->diffForHumans() }}

-
-
- @csrf - -
-
- @csrf - -
+
+ +
@endforeach @@ -93,33 +201,56 @@ {{-- Riwayat terakhir --}} @if($recent->isNotEmpty()) -
-
-

Terakhir Diproses

+
+
+

+ + Terakhir Diproses +

+

20 verifikasi terakhir

- - - - - - + + + + + + @foreach($recent as $link) - - - - + + + - + @endforeach @@ -129,4 +260,61 @@ @endif + +@push('scripts') + +@endpush @endsection
WaliSiswaStatusDiproses
WaliSiswaStatusDiproses
{{ $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() }}