feat: modernize and polish Verifikasi Pos Gerbang UI/UX for security guards
This commit is contained in:
@@ -28,18 +28,37 @@ class GateInspectionController extends Controller
|
|||||||
$gate = $gateId ? Gate::find($gateId) : Gate::first();
|
$gate = $gateId ? Gate::find($gateId) : Gate::first();
|
||||||
|
|
||||||
$pendingActivities = collect();
|
$pendingActivities = collect();
|
||||||
|
$todayApprovedCount = 0;
|
||||||
|
$todayRejectedCount = 0;
|
||||||
if ($gate) {
|
if ($gate) {
|
||||||
$pendingActivities = VehicleActivity::where('gate_id', $gate->id)
|
$pendingActivities = VehicleActivity::where('gate_id', $gate->id)
|
||||||
->where('validation_status', 'pending')
|
->where('validation_status', 'pending')
|
||||||
->with(['vehicle', 'driver'])
|
->with(['vehicle', 'driver'])
|
||||||
->orderBy('recorded_at', 'asc')
|
->orderBy('recorded_at', 'asc')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
$todayApprovedCount = VehicleActivity::where('gate_id', $gate->id)
|
||||||
|
->where('validation_status', 'approved')
|
||||||
|
->whereDate('validated_at', Carbon::today())
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$todayRejectedCount = VehicleActivity::where('gate_id', $gate->id)
|
||||||
|
->where('validation_status', 'rejected')
|
||||||
|
->whereDate('validated_at', Carbon::today())
|
||||||
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Daftar satpam aktif untuk fallback pilihan
|
// Daftar satpam aktif untuk fallback pilihan
|
||||||
$guards = SecurityGuard::where('is_active', true)->orderBy('name')->get();
|
$guards = SecurityGuard::where('is_active', true)->orderBy('name')->get();
|
||||||
|
|
||||||
return view('pg.gate_inspection', compact('gate', 'pendingActivities', 'guards', 'currentGuard'));
|
return view('pg.gate_inspection', compact(
|
||||||
|
'gate',
|
||||||
|
'pendingActivities',
|
||||||
|
'guards',
|
||||||
|
'currentGuard',
|
||||||
|
'todayApprovedCount',
|
||||||
|
'todayRejectedCount'
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -108,19 +108,15 @@
|
|||||||
@elseif(auth()->user()->isGateOfficer())
|
@elseif(auth()->user()->isGateOfficer())
|
||||||
<a href="{{ route('pg.gate.inspection') }}"
|
<a href="{{ route('pg.gate.inspection') }}"
|
||||||
class="flex items-center space-x-3 px-3.5 py-2.5 text-sm {{ request()->routeIs('pg.gate.*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
class="flex items-center space-x-3 px-3.5 py-2.5 text-sm {{ request()->routeIs('pg.gate.*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
||||||
<svg class="w-5 h-5 flex-shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
<i class="fa-solid fa-shield-halved text-base w-5 text-center"></i>
|
||||||
<rect x="3" y="3" width="7" height="7" rx="2"></rect>
|
<span>Verifikasi Pos Gerbang</span>
|
||||||
<rect x="14" y="3" width="7" height="7" rx="2"></rect>
|
|
||||||
<rect x="14" y="14" width="7" height="7" rx="2"></rect>
|
|
||||||
<rect x="3" y="14" width="7" height="7" rx="2"></rect>
|
|
||||||
</svg>
|
|
||||||
<span>Pos Gerbang</span>
|
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Grup: Modul Operasional RKM -->
|
<!-- Grup: Modul Operasional RKM -->
|
||||||
|
@if(!auth()->user()->isGateOfficer())
|
||||||
<div>
|
<div>
|
||||||
<p class="px-3 text-[11px] font-bold text-slate-400 uppercase tracking-wider mb-2">
|
<p class="px-3 text-[11px] font-bold text-slate-400 uppercase tracking-wider mb-2">
|
||||||
MANAJEMEN SISTEM
|
MANAJEMEN SISTEM
|
||||||
@@ -332,13 +328,8 @@
|
|||||||
<span>Log Verifikasi Gerbang</span>
|
<span>Log Verifikasi Gerbang</span>
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@if(auth()->user()->isGateOfficer())
|
|
||||||
<a href="{{ route('pg.gate.inspection') }}" class="flex items-center space-x-3 px-3 py-2.5 rounded-xl text-sm {{ request()->routeIs('pg.gate.*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
|
||||||
<i class="fa-solid fa-shield-halved w-5 text-center"></i>
|
|
||||||
<span>Pos Gerbang</span>
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<p class="text-[11px] font-bold text-slate-400 uppercase tracking-wider px-2 mt-4">PENGATURAN</p>
|
<p class="text-[11px] font-bold text-slate-400 uppercase tracking-wider px-2 mt-4">PENGATURAN</p>
|
||||||
<div class="space-y-1">
|
<div class="space-y-1">
|
||||||
|
|||||||
@@ -1,61 +1,161 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('title', 'Verifikasi Pos Gerbang - Private Guard (PG)')
|
@section('title', 'Verifikasi Pos Gerbang - Private Guard (PG) | PT Kerinci Merangin Hidro')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
<!-- Header Pos Gerbang -->
|
|
||||||
<div class="bg-gradient-to-r from-slate-900 to-slate-800 text-white p-5 rounded-2xl shadow-md border border-slate-700 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
<!-- Header Judul & Tindakan Cepat -->
|
||||||
|
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
||||||
<div>
|
<div>
|
||||||
<div class="flex flex-wrap items-center gap-2">
|
<span class="text-xs font-bold uppercase tracking-wider text-[#1b5e20] block mb-1">
|
||||||
<span class="inline-flex items-center px-2.5 py-0.5 rounded-lg text-xs font-bold bg-blue-500/20 text-blue-300 border border-blue-500/30">
|
OPERASIONAL POS KEAMANAN
|
||||||
<i class="fa-solid fa-shield-halved mr-1.5 text-blue-400"></i> Pos Gerbang Aktif
|
</span>
|
||||||
|
<div class="flex items-center space-x-3">
|
||||||
|
<h2 class="text-2xl sm:text-3xl font-extrabold text-slate-900 tracking-tight">
|
||||||
|
Verifikasi Pos Gerbang
|
||||||
|
</h2>
|
||||||
|
<span class="w-6 h-6 rounded-full bg-slate-200/90 text-slate-500 text-xs inline-flex items-center justify-center font-bold shadow-sm" title="Pemeriksaan fisik armada dan validasi angka odometer sebelum portal dibuka">
|
||||||
|
<i class="fa-solid fa-info text-[10px]"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@if($currentGuard)
|
|
||||||
<span class="inline-flex items-center px-2.5 py-0.5 rounded-lg text-xs font-bold bg-emerald-500/20 text-emerald-300 border border-emerald-500/30">
|
|
||||||
<i class="fa-solid fa-user-check mr-1.5 text-emerald-400"></i>
|
|
||||||
Petugas: {{ $currentGuard->name }} (ID: {{ $currentGuard->badge_id }}) • Regu {{ $currentGuard->team }}
|
|
||||||
</span>
|
|
||||||
@else
|
|
||||||
<span class="text-xs text-slate-400">Akun Pengawas / Bersama</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="text-xs sm:text-sm text-slate-500 mt-1">
|
||||||
<h2 class="text-2xl font-black text-white tracking-tight mt-1.5">
|
Petugas Satpam yang sedang piket wajib memverifikasi kondisi fisik kendaraan dan angka odometer riil sebelum membuka portal gerbang.
|
||||||
{{ $gate ? $gate->name : 'Pos Gerbang Belum Dipilih' }}
|
|
||||||
</h2>
|
|
||||||
<p class="text-xs text-slate-300 mt-1">
|
|
||||||
Petugas Satpam yang sedang piket wajib memverifikasi kondisi fisik kendaraan dan angka odometer riil sebelum membuka portal.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Tombol Aksi Cepat: Segarkan Antrean & Status Auto-Refresh -->
|
||||||
|
<div class="flex flex-wrap items-center gap-2.5">
|
||||||
|
<button onclick="window.location.reload()"
|
||||||
|
class="inline-flex items-center space-x-2 px-3.5 py-2.5 bg-white border border-slate-200 hover:border-slate-300 text-slate-700 hover:text-slate-900 rounded-xl text-xs font-bold shadow-xs hover:bg-slate-50 transition cursor-pointer"
|
||||||
|
title="Segarkan data antrean kendaraan">
|
||||||
|
<i class="fa-solid fa-arrows-rotate text-[#1b5e20] transition-transform duration-300 active:rotate-180"></i>
|
||||||
|
<span>Segarkan Antrean</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Indikator Auto Refresh -->
|
||||||
|
<div class="inline-flex items-center space-x-2 px-3.5 py-2 bg-emerald-50 border border-emerald-200/80 rounded-xl text-xs font-semibold text-emerald-800 shadow-xs">
|
||||||
|
<span class="relative flex h-2 w-2">
|
||||||
|
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
|
||||||
|
<span class="relative inline-flex rounded-full h-2 w-2 bg-emerald-500"></span>
|
||||||
|
</span>
|
||||||
|
<span>Auto-refresh: <strong id="refreshCountdown" class="font-mono">30s</strong></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 4 Kartu Ringkasan Operasional (Gaya Pastel Sederhana & Bersih) -->
|
||||||
|
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
||||||
|
<!-- 1. Antrean Menunggu -->
|
||||||
<div>
|
<div>
|
||||||
<span class="bg-amber-500/20 text-amber-300 border border-amber-500/30 font-bold px-3.5 py-2 rounded-xl text-xs flex items-center shadow-sm">
|
<div class="bg-[#fef9e8] border border-[#feefc7] rounded-3xl h-24 sm:h-28 flex items-center justify-center shadow-xs">
|
||||||
<i class="fa-solid fa-clock-rotate-left mr-2 animate-spin text-amber-400"></i>
|
<span class="text-3xl sm:text-4xl font-black text-[#d97706]">{{ $pendingActivities->count() }}</span>
|
||||||
Antrean: {{ $pendingActivities->count() }} Kendaraan
|
</div>
|
||||||
|
<p class="mt-2 text-center text-[11px] font-bold text-slate-500 uppercase tracking-wider">ANTREAN MENUNGGU</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 2. Disetujui Hari Ini -->
|
||||||
|
<div>
|
||||||
|
<div class="bg-[#eef7ee] border border-[#d6ebd7] rounded-3xl h-24 sm:h-28 flex items-center justify-center shadow-xs">
|
||||||
|
<span class="text-3xl sm:text-4xl font-black text-[#2e7d32]">{{ $todayApprovedCount }}</span>
|
||||||
|
</div>
|
||||||
|
<p class="mt-2 text-center text-[11px] font-bold text-slate-500 uppercase tracking-wider">DISETUJUI HARI INI</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 3. Ditolak Hari Ini -->
|
||||||
|
<div>
|
||||||
|
<div class="bg-[#fef2f2] border border-[#fecdd3] rounded-3xl h-24 sm:h-28 flex items-center justify-center shadow-xs">
|
||||||
|
<span class="text-3xl sm:text-4xl font-black text-[#e11d48]">{{ $todayRejectedCount }}</span>
|
||||||
|
</div>
|
||||||
|
<p class="mt-2 text-center text-[11px] font-bold text-slate-500 uppercase tracking-wider">DITOLAK HARI INI</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 4. Pos Jaga & Regu Piket -->
|
||||||
|
<div>
|
||||||
|
<div class="bg-[#edf5fd] border border-[#d2e4fb] rounded-3xl h-24 sm:h-28 flex flex-col items-center justify-center px-3 text-center shadow-xs">
|
||||||
|
<span class="text-sm sm:text-base font-black text-[#1976d2] truncate max-w-full">
|
||||||
|
{{ $gate ? $gate->name : 'Pos Gerbang' }}
|
||||||
|
</span>
|
||||||
|
<span class="text-[11px] font-bold text-slate-600 mt-0.5">
|
||||||
|
Regu {{ $currentGuard->team ?? '1' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<p class="mt-2 text-center text-[11px] font-bold text-slate-500 uppercase tracking-wider">POS JAGA AKTIF</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Informasi Pos Jaga & Petugas Piket (Clean White Card) -->
|
||||||
|
<div class="bg-white rounded-2xl border border-slate-200 p-4 sm:p-5 shadow-sm flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<!-- Avatar Bulat Hijau Khas KMH -->
|
||||||
|
<div class="w-12 h-12 rounded-2xl bg-[#1b5e20] text-white font-black text-lg flex items-center justify-center shadow-sm flex-shrink-0">
|
||||||
|
{{ strtoupper(substr($currentGuard->name ?? auth()->user()->name, 0, 1)) }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-emerald-50 text-emerald-700 border border-emerald-200">
|
||||||
|
<span class="w-1.5 h-1.5 rounded-full bg-emerald-500 mr-1.5 animate-pulse"></span>
|
||||||
|
Pos Aktif: {{ $gate ? $gate->name : 'Gerbang' }}
|
||||||
|
</span>
|
||||||
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-blue-50 text-blue-700 border border-blue-200">
|
||||||
|
Regu {{ $currentGuard->team ?? '1' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h3 class="text-base font-extrabold text-slate-800 tracking-tight mt-1">
|
||||||
|
{{ $currentGuard ? $currentGuard->name : auth()->user()->name }}
|
||||||
|
<span class="text-xs font-mono font-medium text-slate-500 ml-1">
|
||||||
|
(ID: {{ $currentGuard->badge_id ?? auth()->user()->username }})
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Jam Digital Real-time Pos Jaga -->
|
||||||
|
<div class="bg-slate-50 border border-slate-200/80 rounded-xl px-4 py-2 text-left sm:text-right w-full sm:w-auto">
|
||||||
|
<span class="text-[10px] font-bold uppercase tracking-wider text-slate-400 block">Waktu Pos Jaga</span>
|
||||||
|
<span id="posDigitalClock" class="text-xs font-mono font-black text-slate-800">
|
||||||
|
--:--:-- WIB
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Antrean Validasi Kendaraan -->
|
<!-- Antrean Validasi Kendaraan -->
|
||||||
<div class="bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden">
|
<div class="bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden">
|
||||||
<div class="p-4 bg-slate-50 border-b border-slate-100 flex justify-between items-center">
|
<!-- Header Card Antrean & Pencarian Cepat -->
|
||||||
<h3 class="text-xs font-bold text-slate-800 uppercase tracking-wider flex items-center">
|
<div class="p-4 sm:p-5 border-b border-slate-100 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 bg-white">
|
||||||
<i class="fa-solid fa-car-side text-emerald-600 mr-2"></i> Kendaraan Menunggu Verifikasi Fisik
|
<div class="flex items-center space-x-2.5">
|
||||||
</h3>
|
<h3 class="text-xs sm:text-sm font-extrabold text-slate-900 tracking-tight uppercase">
|
||||||
<span class="text-xs text-slate-500">Auto-refresh saat halaman dimuat ulang</span>
|
Kendaraan Menunggu Verifikasi Fisik
|
||||||
|
</h3>
|
||||||
|
<span class="bg-amber-100 text-amber-800 text-xs font-extrabold px-2.5 py-0.5 rounded-full font-mono">
|
||||||
|
{{ $pendingActivities->count() }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Input Filter Cepat Client-Side -->
|
||||||
|
@if($pendingActivities->count() > 0)
|
||||||
|
<div class="w-full sm:w-72">
|
||||||
|
<input type="text"
|
||||||
|
id="searchQueueInput"
|
||||||
|
placeholder="Cari kode unit, plat, driver..."
|
||||||
|
class="w-full text-xs rounded-xl border border-slate-200 bg-slate-50/60 hover:bg-white focus:bg-white px-3.5 py-2 text-slate-800 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-[#1b5e20]/20 focus:border-[#1b5e20] transition">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divide-y divide-slate-100">
|
<!-- List Antrean Kendaraan -->
|
||||||
|
<div id="queueListContainer" class="divide-y divide-slate-100">
|
||||||
@forelse($pendingActivities as $act)
|
@forelse($pendingActivities as $act)
|
||||||
<div class="p-5 hover:bg-slate-50/70 transition flex flex-col lg:flex-row justify-between items-start lg:items-center gap-4">
|
<div class="queue-card p-5 hover:bg-slate-50/70 transition flex flex-col lg:flex-row justify-between items-start lg:items-center gap-5"
|
||||||
<div class="space-y-2 flex-1">
|
data-search="{{ strtolower($act->vehicle->code . ' ' . $act->vehicle->license_plate . ' ' . $act->driver->name . ' ' . $act->vehicle->brand_type . ' ' . $act->purpose) }}">
|
||||||
|
|
||||||
|
<div class="space-y-3 flex-1 w-full">
|
||||||
|
<!-- Baris 1: Badge Kode Unit, Plat Nomor, Arah, & Waktu Input -->
|
||||||
<div class="flex flex-wrap items-center gap-2">
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
<span class="text-sm font-black font-mono bg-slate-900 text-white px-2.5 py-1 rounded-lg">
|
<span class="text-xs font-black font-mono bg-slate-900 text-white px-2.5 py-1 rounded-lg shadow-xs">
|
||||||
{{ $act->vehicle->code }}
|
{{ $act->vehicle->code }}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-xs font-bold text-amber-700 bg-amber-50 border border-amber-200 px-2 py-0.5 rounded font-mono">
|
<span class="text-xs font-bold text-amber-800 bg-amber-50 border border-amber-200 px-2 py-0.5 rounded font-mono">
|
||||||
{{ $act->vehicle->license_plate ?? 'Tanpa Plat' }}
|
{{ $act->vehicle->license_plate ?? 'Tanpa Plat' }}
|
||||||
</span>
|
</span>
|
||||||
@if($act->direction === 'in')
|
@if($act->direction === 'in')
|
||||||
@@ -72,70 +172,132 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Baris 2: Informasi Detail Unit, Driver, dan KM Odometer -->
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-3 text-xs text-slate-600 pt-1">
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-3 text-xs text-slate-600 pt-1">
|
||||||
<div><span class="text-slate-400 block text-[11px]">Unit:</span> <strong class="text-slate-800">{{ $act->vehicle->brand_type }}</strong></div>
|
<div>
|
||||||
<div><span class="text-slate-400 block text-[11px]">Pengemudi:</span> <strong class="text-slate-800">{{ $act->driver->name }}</strong> ({{ $act->driver->division ?? '-' }})</div>
|
<span class="text-slate-400 block text-[11px]">Unit:</span>
|
||||||
<div><span class="text-slate-400 block text-[11px]">KM Odometer Input:</span> <strong class="text-emerald-700 text-sm font-mono font-bold">{{ number_format($act->current_km, 0, ',', '.') }} KM</strong></div>
|
<strong class="text-slate-800">{{ $act->vehicle->brand_type }}</strong>
|
||||||
<div><span class="text-slate-400 block text-[11px]">Jarak Sesi Ini:</span> <strong class="text-slate-800 font-mono">+{{ number_format($act->distance, 0, ',', '.') }} KM</strong></div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="text-slate-400 block text-[11px]">Pengemudi:</span>
|
||||||
|
<strong class="text-slate-800">{{ $act->driver->name }}</strong>
|
||||||
|
<span class="text-slate-500">({{ $act->driver->division ?? '-' }})</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="text-slate-400 block text-[11px]">KM Odometer Input:</span>
|
||||||
|
<strong class="text-[#1b5e20] text-sm font-mono font-bold">{{ number_format($act->current_km, 0, ',', '.') }} KM</strong>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="text-slate-400 block text-[11px]">Jarak Sesi Ini:</span>
|
||||||
|
<strong class="text-slate-800 font-mono">+{{ number_format($act->distance, 0, ',', '.') }} KM</strong>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Baris 3: Keperluan Kerja -->
|
||||||
<div class="text-xs bg-slate-50 p-2.5 rounded-xl border border-slate-200 text-slate-700">
|
<div class="text-xs bg-slate-50 p-2.5 rounded-xl border border-slate-200 text-slate-700">
|
||||||
<span class="font-bold text-slate-800">Keperluan Kerja:</span> {{ $act->purpose }}
|
<span class="font-bold text-slate-800">Keperluan Kerja:</span> {{ $act->purpose }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tombol Aksi Verifikasi Satpam -->
|
<!-- Tombol Aksi Verifikasi Satpam -->
|
||||||
<div class="flex items-center space-x-2 self-end lg:self-center">
|
<div class="flex items-center space-x-2 self-end lg:self-center flex-shrink-0">
|
||||||
<button onclick="openVerificationModal({{ $act->id }}, '{{ $act->vehicle->code }}', '{{ $act->current_km }}', '{{ $act->driver->name }}')"
|
<button onclick="openVerificationModal({{ $act->id }}, '{{ $act->vehicle->code }}', '{{ $act->current_km }}', '{{ addslashes($act->driver->name) }}', '{{ $act->vehicle->license_plate ?? 'Tanpa Plat' }}', '{{ addslashes($act->vehicle->brand_type) }}', '{{ $act->direction }}')"
|
||||||
class="bg-emerald-600 hover:bg-emerald-700 text-white font-bold text-xs py-2.5 px-4 rounded-xl shadow-sm transition flex items-center space-x-1.5">
|
class="bg-[#1b5e20] hover:bg-[#144919] text-white font-bold text-xs py-2.5 px-4 rounded-xl shadow-sm transition flex items-center space-x-2 cursor-pointer">
|
||||||
<i class="fa-solid fa-clipboard-check"></i>
|
<i class="fa-solid fa-clipboard-check"></i>
|
||||||
<span>Verifikasi Satpam</span>
|
<span>Verifikasi Satpam</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<div class="p-12 text-center text-slate-400">
|
<!-- Tampilan Bersih & Ramah Saat Antrean Kosong -->
|
||||||
<i class="fa-solid fa-circle-check text-4xl text-emerald-400 mb-2 block"></i>
|
<div class="py-16 px-4 text-center">
|
||||||
<p class="text-sm font-bold text-slate-700">Tidak ada kendaraan yang menunggu verifikasi saat ini.</p>
|
<div class="w-14 h-14 rounded-2xl bg-[#eef7ee] text-[#2e7d32] mx-auto flex items-center justify-center text-2xl mb-3 shadow-xs">
|
||||||
<span class="text-xs text-slate-400">Semua aktivitas kendaraan di pos gerbang ini telah diperiksa.</span>
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
</div>
|
||||||
|
<h4 class="text-sm font-extrabold text-slate-800">
|
||||||
|
Tidak Ada Kendaraan Menunggu Verifikasi
|
||||||
|
</h4>
|
||||||
|
<p class="text-xs text-slate-500 max-w-md mx-auto mt-1">
|
||||||
|
Semua aktivitas kendaraan di pos gerbang ini telah diperiksa. Sistem siap memantau kedatangan armada berikutnya.
|
||||||
|
</p>
|
||||||
|
<button onclick="window.location.reload()"
|
||||||
|
class="mt-4 inline-flex items-center space-x-2 px-3.5 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 text-xs font-bold rounded-xl transition cursor-pointer">
|
||||||
|
<i class="fa-solid fa-arrows-rotate text-[#1b5e20]"></i>
|
||||||
|
<span>Cek Antrean Sekarang</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Dialog Verifikasi Satpam -->
|
<!-- Modal Dialog Verifikasi Satpam (Friendly, Simple & Professional) -->
|
||||||
<div id="verificationModal" class="hidden fixed inset-0 z-50 bg-slate-900/60 backdrop-blur-sm flex items-center justify-center p-4">
|
<div id="verificationModal" class="hidden fixed inset-0 z-50 bg-slate-900/60 backdrop-blur-sm flex items-center justify-center p-4">
|
||||||
<div class="bg-white rounded-2xl shadow-2xl max-w-md w-full overflow-hidden border border-slate-200 animate-in fade-in zoom-in duration-150">
|
<div class="bg-white rounded-2xl shadow-2xl max-w-lg w-full overflow-hidden border border-slate-200 animate-in fade-in zoom-in duration-150">
|
||||||
<div class="bg-[#06213f] text-white p-4 flex justify-between items-center">
|
<!-- Header Modal Bersih -->
|
||||||
<h3 class="text-sm font-bold flex items-center">
|
<div class="bg-white px-5 py-4 border-b border-slate-100 flex justify-between items-center">
|
||||||
<i class="fa-solid fa-user-shield text-emerald-400 mr-2"></i> Pemeriksaan Fisik Satpam
|
<div class="flex items-center space-x-2.5">
|
||||||
</h3>
|
<div class="w-8 h-8 rounded-lg bg-emerald-50 text-[#1b5e20] flex items-center justify-center text-sm">
|
||||||
<button onclick="closeVerificationModal()" class="text-slate-400 hover:text-white transition">
|
<i class="fa-solid fa-user-shield"></i>
|
||||||
<i class="fa-solid fa-xmark text-base"></i>
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 class="text-sm font-bold text-slate-900">
|
||||||
|
Pemeriksaan Fisik Satpam
|
||||||
|
</h3>
|
||||||
|
<p class="text-[11px] text-slate-500">
|
||||||
|
Pos Gerbang: {{ $gate ? $gate->name : 'Pos Jaga' }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button onclick="closeVerificationModal()" class="w-7 h-7 rounded-lg text-slate-400 hover:text-slate-700 hover:bg-slate-100 flex items-center justify-center transition cursor-pointer">
|
||||||
|
<i class="fa-solid fa-xmark text-sm"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-5 space-y-4">
|
<div class="p-5 space-y-4">
|
||||||
<div class="bg-slate-50 p-3.5 rounded-xl border border-slate-200 text-xs space-y-1.5">
|
<!-- Box Ringkasan Unit & Driver -->
|
||||||
<div><span class="text-slate-500">Unit:</span> <strong id="modalUnitCode" class="text-slate-800 font-mono font-bold"></strong></div>
|
<div class="bg-slate-50 p-4 rounded-xl border border-slate-200 text-xs space-y-2">
|
||||||
<div><span class="text-slate-500">Driver:</span> <strong id="modalDriverName" class="text-slate-800 font-bold"></strong></div>
|
<div class="flex items-center justify-between pb-2 border-b border-slate-200/60">
|
||||||
<div><span class="text-slate-500">KM Odometer Input:</span> <strong id="modalKmInput" class="text-emerald-700 font-mono text-sm font-bold"></strong> KM</div>
|
<div>
|
||||||
|
<span class="text-slate-400 block text-[10px] uppercase font-bold tracking-wider">Unit & Plat Nomor:</span>
|
||||||
|
<div class="flex items-center space-x-2 mt-0.5">
|
||||||
|
<span id="modalUnitCode" class="text-slate-900 font-mono font-black text-sm"></span>
|
||||||
|
<span id="modalPlate" class="text-amber-800 bg-amber-50 border border-amber-200 px-2 py-0.5 rounded text-[11px] font-mono font-bold"></span>
|
||||||
|
<span id="modalDirectionBadge"></span>
|
||||||
|
</div>
|
||||||
|
<div id="modalBrandType" class="text-slate-500 text-[11px] mt-0.5"></div>
|
||||||
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<span class="text-slate-400 block text-[10px] uppercase font-bold tracking-wider">Pengemudi:</span>
|
||||||
|
<strong id="modalDriverName" class="text-slate-800 text-xs block mt-0.5"></strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Highlight Angka Odometer KM -->
|
||||||
|
<div class="pt-1 flex items-center justify-between bg-white p-3 rounded-lg border border-slate-200/80">
|
||||||
|
<div>
|
||||||
|
<span class="text-slate-500 text-[11px] font-semibold block">Angka Odometer Input Driver:</span>
|
||||||
|
<span class="text-[10px] text-slate-400">Cocokkan dengan speedometer fisik di dashboard kendaraan</span>
|
||||||
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<span id="modalKmInput" class="text-emerald-700 font-mono text-lg font-black block"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Identitas Petugas Satpam Pemeriksa -->
|
<!-- Petugas Pemeriksa -->
|
||||||
@if($currentGuard)
|
@if($currentGuard)
|
||||||
<div class="p-3 bg-emerald-50 rounded-xl border border-emerald-200 text-xs flex items-center justify-between">
|
<div class="p-3 bg-emerald-50/70 rounded-xl border border-emerald-200/70 text-xs flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<span class="text-slate-500 block text-[10px] font-semibold uppercase tracking-wider">Petugas Pemeriksa:</span>
|
<span class="text-slate-500 block text-[10px] font-semibold uppercase tracking-wider">Petugas Piket:</span>
|
||||||
<strong class="text-emerald-800 font-bold text-sm">{{ $currentGuard->name }}</strong>
|
<strong class="text-emerald-900 font-bold text-xs">{{ $currentGuard->name }}</strong>
|
||||||
<div class="text-slate-600 text-[11px] font-mono mt-0.5">
|
<span class="text-slate-500 text-[11px] font-mono ml-1">
|
||||||
ID: {{ $currentGuard->badge_id }} • Regu {{ $currentGuard->team }}
|
(ID: {{ $currentGuard->badge_id }} • Regu {{ $currentGuard->team }})
|
||||||
</div>
|
</span>
|
||||||
</div>
|
|
||||||
<div class="w-8 h-8 rounded-full bg-emerald-100 flex items-center justify-center text-emerald-600">
|
|
||||||
<i class="fa-solid fa-circle-check text-base"></i>
|
|
||||||
</div>
|
</div>
|
||||||
|
<span class="text-emerald-600 text-xs font-bold flex items-center">
|
||||||
|
<i class="fa-solid fa-circle-check mr-1"></i> Terverifikasi
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@@ -145,10 +307,10 @@
|
|||||||
|
|
||||||
@if(!$currentGuard)
|
@if(!$currentGuard)
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label for="security_guard_id" class="block text-xs font-bold text-slate-700 mb-1">
|
<label for="security_guard_id" class="block text-xs font-bold text-slate-700 mb-1.5">
|
||||||
Pilih Nama Satpam Pemeriksa <span class="text-rose-500">*</span>
|
Pilih Nama Satpam Pemeriksa <span class="text-rose-500">*</span>
|
||||||
</label>
|
</label>
|
||||||
<select name="security_guard_id" id="security_guard_id" required class="w-full text-xs rounded-xl border-slate-200 border p-2.5 bg-slate-50/50 hover:bg-white focus:bg-white">
|
<select name="security_guard_id" id="security_guard_id" required class="w-full text-xs rounded-xl border-slate-200 border p-2.5 bg-slate-50 hover:bg-white focus:bg-white focus:ring-2 focus:ring-[#1b5e20]/20 focus:border-[#1b5e20] transition">
|
||||||
<option value="" disabled selected>-- Pilih Petugas Satpam --</option>
|
<option value="" disabled selected>-- Pilih Petugas Satpam --</option>
|
||||||
@foreach($guards as $guard)
|
@foreach($guards as $guard)
|
||||||
<option value="{{ $guard->id }}">{{ $guard->name }} (Regu {{ $guard->team }})</option>
|
<option value="{{ $guard->id }}">{{ $guard->name }} (Regu {{ $guard->team }})</option>
|
||||||
@@ -158,30 +320,59 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="flex items-center space-x-2 pt-2 border-t border-slate-100">
|
<div class="flex items-center space-x-2 pt-2 border-t border-slate-100">
|
||||||
<button type="submit" class="flex-1 bg-emerald-600 hover:bg-emerald-700 text-white font-bold text-xs py-2.5 px-4 rounded-xl transition flex items-center justify-center space-x-1.5 shadow-sm">
|
<button type="submit" class="flex-1 bg-[#1b5e20] hover:bg-[#144919] text-white font-bold text-xs py-2.5 px-4 rounded-xl transition flex items-center justify-center space-x-2 shadow-sm cursor-pointer">
|
||||||
<i class="fa-solid fa-check"></i>
|
<i class="fa-solid fa-check"></i>
|
||||||
<span>Setujui (Buka Portal)</span>
|
<span>Setujui (Buka Portal)</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onclick="showRejectSection()" class="bg-rose-50 hover:bg-rose-100 text-rose-700 border border-rose-200 font-bold text-xs py-2.5 px-3.5 rounded-xl transition">
|
<button type="button" onclick="showRejectSection()" class="bg-rose-50 hover:bg-rose-100 text-rose-700 border border-rose-200 font-bold text-xs py-2.5 px-3.5 rounded-xl transition cursor-pointer">
|
||||||
Tolak
|
Tolak
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Section Form Reject (Hidden by default) -->
|
<!-- Form Tolak (Hidden by default) -->
|
||||||
<form id="rejectForm" method="POST" action="" class="hidden border-t border-rose-100 pt-3">
|
<form id="rejectForm" method="POST" action="" class="hidden border-t border-rose-100 pt-3">
|
||||||
@csrf
|
@csrf
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-bold text-rose-800 mb-1">Alasan Penolakan <span class="text-rose-500">*</span></label>
|
<div class="flex items-center justify-between mb-1.5">
|
||||||
<textarea name="rejection_note" required rows="2" placeholder="Contoh: Angka KM di dashboard tidak cocok, driver tidak memiliki SIMPER aktif..." class="w-full text-xs rounded-xl border-rose-300 border p-2.5 focus:ring-rose-500 focus:border-rose-500 bg-rose-50/20"></textarea>
|
<label class="block text-xs font-bold text-rose-800">
|
||||||
|
Alasan Penolakan <span class="text-rose-500">*</span>
|
||||||
|
</label>
|
||||||
|
<span class="text-[10px] text-slate-400">Pilih opsi cepat atau ketik sendiri</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Template Alasan Cepat (Friendly UX untuk Satpam) -->
|
||||||
|
<div class="flex flex-wrap gap-1.5 mb-2">
|
||||||
|
<button type="button" onclick="setRejectReason('Angka odometer fisik pada kendaraan tidak sesuai dengan sistem.')" class="text-[10px] bg-slate-100 hover:bg-rose-50 hover:text-rose-700 text-slate-600 px-2 py-1 rounded-lg border border-slate-200 transition cursor-pointer">
|
||||||
|
KM Fisik Tidak Sesuai
|
||||||
|
</button>
|
||||||
|
<button type="button" onclick="setRejectReason('Driver tidak memiliki izin SIMPER aktif.')" class="text-[10px] bg-slate-100 hover:bg-rose-50 hover:text-rose-700 text-slate-600 px-2 py-1 rounded-lg border border-slate-200 transition cursor-pointer">
|
||||||
|
SIMPER Expired / Tidak Ada
|
||||||
|
</button>
|
||||||
|
<button type="button" onclick="setRejectReason('Kondisi unit tidak laik jalan / ada kendala keselamatan fisik.')" class="text-[10px] bg-slate-100 hover:bg-rose-50 hover:text-rose-700 text-slate-600 px-2 py-1 rounded-lg border border-slate-200 transition cursor-pointer">
|
||||||
|
Unit Tidak Laik Jalan
|
||||||
|
</button>
|
||||||
|
<button type="button" onclick="setRejectReason('Tanpa surat izin dinas / operasional resmi.')" class="text-[10px] bg-slate-100 hover:bg-rose-50 hover:text-rose-700 text-slate-600 px-2 py-1 rounded-lg border border-slate-200 transition cursor-pointer">
|
||||||
|
Tanpa Izin Operasional
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<textarea name="rejection_note" id="rejectionNoteInput" required rows="2" placeholder="Tuliskan catatan alasan penolakan secara jelas..." class="w-full text-xs rounded-xl border-rose-300 border p-2.5 focus:ring-2 focus:ring-rose-500/20 focus:border-rose-500 bg-rose-50/20 text-slate-800"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(!$currentGuard)
|
@if(!$currentGuard)
|
||||||
<input type="hidden" name="security_guard_id" id="rejectGuardId">
|
<input type="hidden" name="security_guard_id" id="rejectGuardId">
|
||||||
@endif
|
@endif
|
||||||
<button type="submit" class="w-full bg-rose-600 hover:bg-rose-700 text-white font-bold text-xs py-2.5 px-3 rounded-xl transition shadow-sm">
|
|
||||||
Konfirmasi Tolak Kendaraan
|
<div class="flex items-center space-x-2">
|
||||||
</button>
|
<button type="submit" class="flex-1 bg-rose-600 hover:bg-rose-700 text-white font-bold text-xs py-2.5 px-3 rounded-xl transition shadow-sm cursor-pointer">
|
||||||
|
Konfirmasi Tolak Kendaraan
|
||||||
|
</button>
|
||||||
|
<button type="button" onclick="document.getElementById('rejectForm').classList.add('hidden')" class="px-3 py-2.5 text-xs text-slate-500 hover:text-slate-700 transition cursor-pointer">
|
||||||
|
Batal
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -190,13 +381,80 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
let currentActivityId = null;
|
let currentActivityId = null;
|
||||||
|
let autoRefreshTimer = null;
|
||||||
|
let countdownSeconds = 30;
|
||||||
|
let isModalOpen = false;
|
||||||
|
|
||||||
function openVerificationModal(activityId, unitCode, kmInput, driverName) {
|
// Jam Digital Pos Gerbang
|
||||||
|
function updateClock() {
|
||||||
|
const now = new Date();
|
||||||
|
const hours = String(now.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||||
|
const clockEl = document.getElementById('posDigitalClock');
|
||||||
|
if (clockEl) {
|
||||||
|
clockEl.textContent = `${hours}:${minutes}:${seconds} WIB`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setInterval(updateClock, 1000);
|
||||||
|
updateClock();
|
||||||
|
|
||||||
|
// Auto Refresh Countdown (30 Detik)
|
||||||
|
function startAutoRefresh() {
|
||||||
|
const countdownEl = document.getElementById('refreshCountdown');
|
||||||
|
autoRefreshTimer = setInterval(() => {
|
||||||
|
if (!isModalOpen) {
|
||||||
|
countdownSeconds--;
|
||||||
|
if (countdownEl) countdownEl.textContent = `${countdownSeconds}s`;
|
||||||
|
if (countdownSeconds <= 0) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
startAutoRefresh();
|
||||||
|
|
||||||
|
// Filter Pencarian Cepat Client-Side
|
||||||
|
const searchInput = document.getElementById('searchQueueInput');
|
||||||
|
if (searchInput) {
|
||||||
|
searchInput.addEventListener('input', function(e) {
|
||||||
|
const term = e.target.value.toLowerCase().trim();
|
||||||
|
const cards = document.querySelectorAll('.queue-card');
|
||||||
|
cards.forEach(card => {
|
||||||
|
const searchData = card.getAttribute('data-search') || '';
|
||||||
|
if (searchData.includes(term)) {
|
||||||
|
card.style.display = '';
|
||||||
|
} else {
|
||||||
|
card.style.display = 'none';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modal Functions
|
||||||
|
function openVerificationModal(activityId, unitCode, kmInput, driverName, plate = '', brandType = '', direction = 'in') {
|
||||||
currentActivityId = activityId;
|
currentActivityId = activityId;
|
||||||
|
isModalOpen = true;
|
||||||
|
|
||||||
document.getElementById('modalUnitCode').textContent = unitCode;
|
document.getElementById('modalUnitCode').textContent = unitCode;
|
||||||
document.getElementById('modalKmInput').textContent = Number(kmInput).toLocaleString('id-ID');
|
document.getElementById('modalKmInput').textContent = Number(kmInput).toLocaleString('id-ID') + ' KM';
|
||||||
document.getElementById('modalDriverName').textContent = driverName;
|
document.getElementById('modalDriverName').textContent = driverName;
|
||||||
|
|
||||||
|
const plateEl = document.getElementById('modalPlate');
|
||||||
|
if (plateEl) plateEl.textContent = plate;
|
||||||
|
|
||||||
|
const brandEl = document.getElementById('modalBrandType');
|
||||||
|
if (brandEl) brandEl.textContent = brandType;
|
||||||
|
|
||||||
|
const dirEl = document.getElementById('modalDirectionBadge');
|
||||||
|
if (dirEl) {
|
||||||
|
if (direction === 'in') {
|
||||||
|
dirEl.innerHTML = '<span class="text-xs font-bold bg-emerald-50 text-emerald-700 px-2 py-0.5 rounded-full border border-emerald-200">MASUK</span>';
|
||||||
|
} else {
|
||||||
|
dirEl.innerHTML = '<span class="text-xs font-bold bg-blue-50 text-blue-700 px-2 py-0.5 rounded-full border border-blue-200">KELUAR</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('approveForm').action = `/pg/gate-inspection/${activityId}/approve`;
|
document.getElementById('approveForm').action = `/pg/gate-inspection/${activityId}/approve`;
|
||||||
document.getElementById('rejectForm').action = `/pg/gate-inspection/${activityId}/reject`;
|
document.getElementById('rejectForm').action = `/pg/gate-inspection/${activityId}/reject`;
|
||||||
|
|
||||||
@@ -206,6 +464,7 @@
|
|||||||
|
|
||||||
function closeVerificationModal() {
|
function closeVerificationModal() {
|
||||||
document.getElementById('verificationModal').classList.add('hidden');
|
document.getElementById('verificationModal').classList.add('hidden');
|
||||||
|
isModalOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showRejectSection() {
|
function showRejectSection() {
|
||||||
@@ -223,5 +482,20 @@
|
|||||||
|
|
||||||
document.getElementById('rejectForm').classList.toggle('hidden');
|
document.getElementById('rejectForm').classList.toggle('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setRejectReason(reason) {
|
||||||
|
const textarea = document.getElementById('rejectionNoteInput');
|
||||||
|
if (textarea) {
|
||||||
|
textarea.value = reason;
|
||||||
|
textarea.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tutup modal jika tombol Escape ditekan
|
||||||
|
document.addEventListener('keydown', function(event) {
|
||||||
|
if (event.key === 'Escape' && isModalOpen) {
|
||||||
|
closeVerificationModal();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
Reference in New Issue
Block a user