Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender

This commit is contained in:
2025-03-24 14:44:45 +07:00

View File

@@ -280,6 +280,10 @@ class PermohonanController extends Controller
// Retrieve data from the database
$query = Permohonan::query()->with('documents')->has('documents', '>', 0)->where('status', '=', 'order');
if (!Auth::user()->hasAnyRole(['administrator'])) {
$query = $query->where('branch_id', Auth::user()->branch_id);
}
// Apply search filter if provided
if ($request->has('search') && !empty($request->get('search'))) {
$search = $request->get('search');