feat: add 5-hour trip expiration timer and rbac activity deletion permissions
This commit is contained in:
@@ -46,6 +46,9 @@ class GateInspectionController extends Controller
|
||||
$needsGateSelection = true;
|
||||
}
|
||||
|
||||
// Otomatis bersihkan antrean pending yang sudah lewat batas 5 jam
|
||||
VehicleActivity::expireOverduePendingActivities();
|
||||
|
||||
$pendingActivities = collect();
|
||||
if ($gate) {
|
||||
$pendingActivities = VehicleActivity::where('gate_id', $gate->id)
|
||||
@@ -112,6 +115,9 @@ class GateInspectionController extends Controller
|
||||
?: ($user ? $user->gate_id : null);
|
||||
$gate = $gateId ? Gate::find($gateId) : Gate::first();
|
||||
|
||||
// Otomatis bersihkan antrean pending yang sudah lewat batas 5 jam
|
||||
VehicleActivity::expireOverduePendingActivities();
|
||||
|
||||
$pendingActivities = collect();
|
||||
if ($gate) {
|
||||
$pendingActivities = VehicleActivity::where('gate_id', $gate->id)
|
||||
|
||||
Reference in New Issue
Block a user