diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 9a0b4f9..dba6077 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -74,7 +74,7 @@ class LoginController extends Controller
return match ($user->role) {
'hse_admin' => redirect()->route('hse.dashboard'),
'qma_admin' => redirect()->route('qma.dashboard'),
- 'pg_admin' => redirect()->route('pg.guards.index'),
+ 'pg_admin' => redirect()->route('pg.dashboard'),
'gate_officer' => redirect()->route('pg.gate.inspection'),
default => redirect()->route('qma.dashboard'),
};
diff --git a/app/Http/Controllers/Pg/DashboardController.php b/app/Http/Controllers/Pg/DashboardController.php
new file mode 100644
index 0000000..c78689c
--- /dev/null
+++ b/app/Http/Controllers/Pg/DashboardController.php
@@ -0,0 +1,56 @@
+count();
+ $totalGates = Gate::where('is_active', true)->count();
+ $todayVerifications = VehicleActivity::whereDate('recorded_at', Carbon::today())->count();
+ $totalRejections = VehicleActivity::where('validation_status', 'rejected')->count();
+
+ // Log Verifikasi Gerbang Terkini (Panel Kiri)
+ $recentActivities = VehicleActivity::with(['vehicle', 'driver', 'gate', 'securityGuard'])
+ ->latest('recorded_at')
+ ->take(5)
+ ->get();
+
+ // Personel Satpam Terkini per Regu (Panel Kanan Atas)
+ $recentGuards = SecurityGuard::with('gate')
+ ->orderBy('team')
+ ->take(5)
+ ->get();
+
+ // Ringkasan Jumlah Personel per Regu Tugas (Panel Kanan Bawah)
+ $team1Count = SecurityGuard::where('team', 1)->where('is_active', true)->count();
+ $team2Count = SecurityGuard::where('team', 2)->where('is_active', true)->count();
+ $team3Count = SecurityGuard::where('team', 3)->where('is_active', true)->count();
+
+ return view('pg.dashboard', compact(
+ 'totalGuards',
+ 'activeGuards',
+ 'totalGates',
+ 'todayVerifications',
+ 'totalRejections',
+ 'recentActivities',
+ 'recentGuards',
+ 'team1Count',
+ 'team2Count',
+ 'team3Count'
+ ));
+ }
+}
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 576f3de..2ed8921 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -94,6 +94,17 @@
Dashboard
+ @elseif(auth()->user()->isPgAdmin())
+
@elseif(auth()->user()->isGateOfficer())
- @else
-
@endif
@@ -314,6 +314,15 @@
@endif
@if(auth()->user()->isPgAdmin() || auth()->user()->isAdmin())
+