diff --git a/app/Http/Controllers/Admin/WaliMuridController.php b/app/Http/Controllers/Admin/WaliMuridController.php index 59305a0..6926782 100644 --- a/app/Http/Controllers/Admin/WaliMuridController.php +++ b/app/Http/Controllers/Admin/WaliMuridController.php @@ -33,7 +33,11 @@ class WaliMuridController extends Controller $totalAktif = User::where('role', 'parent') ->whereHas('parentStudents', fn ($q) => $q->where('status', 'active')) ->count(); + $pending = \App\Models\ParentStudent::where('status', 'pending')->count(); + $baruMingguIni = User::where('role', 'parent') + ->where('created_at', '>=', now()->subDays(7)) + ->count(); - return view('parents.index', compact('users', 'total', 'totalAktif')); + return view('parents.index', compact('users', 'total', 'totalAktif', 'pending', 'baruMingguIni')); } } diff --git a/resources/views/parents/index.blade.php b/resources/views/parents/index.blade.php index e90333f..c3f4ecc 100644 --- a/resources/views/parents/index.blade.php +++ b/resources/views/parents/index.blade.php @@ -5,27 +5,92 @@ @section('content')
- {{-- Header --}} -
+ {{-- Header premium --}} +
-
-
+
+
+
- -
- - {{ $total }} akun - - - {{ $totalAktif }} aktif - + + Verifikasi Wali + @if($pending > 0) + {{ $pending }} + @endif + +
+
+ + {{-- Kartu statistik --}} +
+
+
+
+
+

Total Akun

+

{{ $total }}

+

Seluruh wali terdaftar

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

Aktif

+

{{ $totalAktif }}

+

Terkait & terverifikasi

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

Menunggu

+

{{ $pending }}

+

Perlu diverifikasi

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

Baru 7 Hari

+

{{ $baruMingguIni }}

+

Registrasi terakhir

+
+
+ +
@@ -42,76 +107,106 @@
@endif - {{-- Daftar wali --}} -
-
-

Daftar Akun Wali Murid

-
+ {{-- Tabel wali --}} +
+
+
+

+ + Daftar Akun Wali Murid +

+

Kelola akun & reset password bila wali lupa

+
+ + - + class="text-sm rounded-2xl border-slate-200 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 pl-10 pr-4 py-2.5 w-full sm:w-72 bg-slate-50/50 focus:bg-white transition-all shadow-sm">
@if($users->isEmpty()) -
- -

Belum ada akun wali murid terdaftar.

+
+
+ +
+

Belum ada akun wali murid

+

Wali yang mendaftar lewat aplikasi akan tampil di sini.

@else
- - - - - - - + + + + + + + @foreach($users as $user) - - + - - + - - + @@ -120,7 +215,7 @@
WaliNomor HPPutra/Putri TertautTerdaftarAksi
WaliNomor HPPutra/Putri TertautTerdaftarAksi
+
-
- {{ strtoupper(substr($user->name, 0, 1)) }} +
+
+ {{ strtoupper(substr($user->name, 0, 1)) }} +

{{ $user->name }}

-

{{ $user->username }}

+

{{ $user->username }}

{{ $user->phone ?? '-' }} + + + + {{ $user->phone ?? '-' }} + + @if($user->parentStudents->isEmpty()) - Belum ada tautan + + Belum ada tautan + @else -
+
@foreach($user->parentStudents as $link) - - - {{ $link->student?->full_name ?? 'Siswa' }} + + + + + {{ $link->student?->full_name ?? 'Siswa' }} @if($link->status === 'active') - Aktif + + Aktif + @elseif($link->status === 'pending') - Menunggu + + Menunggu + @else - Ditolak + + Ditolak + @endif @endforeach
@endif
{{ $user->created_at?->format('d M Y') }} + + + + {{ $user->created_at?->format('d M Y') }} + +
-
+
{{ $users->links() }}
@endif