diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 2937cc8..f51a51b 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -303,7 +303,7 @@ public function updateOnboardingToggle(Request $request) \App\Models\Setting::set('onboarding_enabled', $enabled); $msg = $enabled === '1' ? 'Onboarding & Offboarding module enabled.' : 'Onboarding & Offboarding module disabled.'; - return redirect()->route('admin.dashboard')->with('success', $msg); + return redirect()->back(fallback: route('admin.dashboard'))->with('success', $msg); } /** @@ -315,7 +315,7 @@ public function updateScreenshotToggle(Request $request) \App\Models\Setting::set('enable_candidate_screenshots', $enabled); $msg = $enabled === '1' ? 'Candidate System Screenshot Capture ENABLED globally.' : 'Candidate System Screenshot Capture DISABLED globally by Admin.'; - return redirect()->route('admin.dashboard')->with('success', $msg); + return redirect()->back(fallback: route('admin.dashboard'))->with('success', $msg); } /** diff --git a/resources/views/components/interview/admin-settings-card.blade.php b/resources/views/components/interview/admin-settings-card.blade.php index a4eb9fd..cd8cf89 100644 --- a/resources/views/components/interview/admin-settings-card.blade.php +++ b/resources/views/components/interview/admin-settings-card.blade.php @@ -1,71 +1,75 @@ -
-
-
-

- Global Admin Proctoring & System Settings -

-
Master control panel for candidate assessment rules, system screen capturing, and module toggles
-
- - ADMIN CONTROL PANEL - -
+@php + $screenshotActive = \App\Models\Setting::get('enable_candidate_screenshots', '1') === '1'; + $onboardingActive = \App\Models\Setting::get('onboarding_enabled', '1') === '1'; + $isAdmin = Auth::check() && Auth::user()->isAdmin(); +@endphp -
- -
-
- @csrf -
-
- Candidate System Screenshot Capture -
-
- Captures candidate system desktop screen automatically on call start & tab switches. Admin can stop taking screenshots anytime across all candidates. -
-
-
- - {{ \App\Models\Setting::get('enable_candidate_screenshots', '1') === '1' ? '🟢 ENABLED (Active)' : '🔴 STOPPED / DISABLED' }} - - @if(Auth::check() && Auth::user()->isAdmin()) - +
+ +
+
+
+ +
+
+
+

Screenshot Capture

+ @if($screenshotActive) + Active + @else + Stopped @endif
- -
+

+ Captures candidate's desktop automatically on call start & tab switches. +

+
- -
-
- @csrf -
-
- Candidate Provisioning & Onboarding Module -
-
- Master toggle to enable/disable automated candidate provisioning, onboarding checklists, and 1-click revocation. -
-
-
- - {{ \App\Models\Setting::get('onboarding_enabled', '1') === '1' ? '🟢 ENABLED' : '🔴 DISABLED' }} - - @if(Auth::check() && Auth::user()->isAdmin()) - - @endif -
-
+ @if($isAdmin) +
+
+ @csrf + +
+
+ @endif
-
+ + +
+
+
+ +
+
+
+

Candidate Onboarding

+ @if($onboardingActive) + Active + @else + Disabled + @endif +
+

+ Automatic provisioning checklist and one-click revocation. +

+
+ + @if($isAdmin) +
+
+ @csrf + +
+
+ @endif +
+
+ diff --git a/resources/views/interview/index.blade.php b/resources/views/interview/index.blade.php index d289ef1..60a5353 100644 --- a/resources/views/interview/index.blade.php +++ b/resources/views/interview/index.blade.php @@ -15,17 +15,17 @@ - +
- - - - - - + + + + + +
Candidate & Temp PassUnique Submission IDStatus & ValidityLanguageProctoring AlertsReview & ActionsCandidate & Temp PassUnique Submission IDStatus & ValidityLanguageProctoring AlertsReview & Actions