feat: tambah fitur impor excel karyawan hse, perapian sidebar pg, dan bel notifikasi suara asisten verifikasi gerbang

This commit is contained in:
Ray1111-aa
2026-10-17 08:48:32 +07:00
parent 6e5ae727f9
commit 034da013d3
14 changed files with 1567 additions and 159 deletions
@@ -69,8 +69,25 @@ class GateInspectionController extends Controller
$currentGuard = $user ? $user->securityGuard : null;
$guards = SecurityGuard::where('is_active', true)->orderBy('name')->get();
$items = $pendingActivities->map(function ($act) {
$unitText = trim(($act->vehicle->brand_type ?? 'Kendaraan') . ' ' . ($act->vehicle->code ?? ''));
$driverText = $act->driver->name ?? 'Pengemudi';
$directionText = strtolower($act->direction) === 'in' ? 'akan masuk gerbang' : 'akan keluar gerbang';
return [
'id' => $act->id,
'code' => $act->vehicle->code ?? '',
'brand_type' => $act->vehicle->brand_type ?? '',
'license_plate' => $act->vehicle->license_plate ?? '',
'driver_name' => $driverText,
'direction' => strtolower($act->direction),
'announcement' => "Perhatian, Unit {$unitText}, pengemudi {$driverText}, {$directionText}.",
];
});
return response()->json([
'count' => $pendingActivities->count(),
'items' => $items,
'html' => view('pg.partials.queue_cards', compact('pendingActivities', 'currentGuard', 'guards'))->render(),
]);
}