@extends('layouts.admin') @section('title', 'QA Dashboard') @php use Illuminate\Support\Carbon; $human = function ($d, $fallback = 'Unknown') { if (empty($d)) return $fallback; if ($d instanceof \DateTimeInterface) return $d->diffForHumans(); try { return Carbon::parse($d)->diffForHumans(); } catch (\Throwable $e) { return $fallback; } }; @endphp @push('styles') @endpush @section('content')
{{-- Header --}}

QA Dashboard

Review and approve questions for publication

Export Report
{{-- Statistics --}}
{{-- Pending --}} {{-- Flagged --}} {{-- Needs Revision --}} {{-- Approved Today --}}
{{-- Filters --}}
{{-- Status --}}
@php $status = request('status'); @endphp
{{-- Type --}}
@php $type = request('type'); @endphp
{{-- Skill --}}
@php $selectedSkill = request('skill_id', request('skill')); @endphp
{{-- Level --}}
@php $selectedLevel = request('level'); @endphp
{{-- Assigned To --}}
@php $reviewer = request('reviewer'); @endphp
{{-- Sort --}}
@php $sort = request('sort','created_at'); @endphp
{{-- Reset --}}
{{-- Batch Actions --}}
0 questions selected
{{-- Questions Table --}}
@forelse($questions as $question) @php $qaStatus = $question->qa_status ?? 'unreviewed'; $issueCount = $question->qa_issues_count ?? 0; $openIssues = $question->open_qa_issues_count ?? 0; $reviewUrl = route('admin.qa.questions.review', $question->id); $statusConfig = [ 'unreviewed' => ['color' => 'warning', 'icon' => 'clock', 'text' => 'Unreviewed'], 'approved' => ['color' => 'success', 'icon' => 'check-circle', 'text' => 'Approved'], 'flagged' => ['color' => 'danger', 'icon' => 'flag', 'text' => 'Flagged'], 'needs_revision' => ['color' => 'info', 'icon' => 'edit', 'text' => 'Needs Revision'], ]; $config = $statusConfig[$qaStatus] ?? $statusConfig['unreviewed']; $isPublic = (int)($question->status_id ?? 4) === 3; @endphp @empty @endforelse
ID Question Type QA / Visibility Skill Issues Last Updated Actions
#{{ $question->id }} {{ \Illuminate\Support\Str::limit(strip_tags($question->question ?? ''), 80) }} @if(strlen(strip_tags($question->question ?? '')) > 80)…@endif @if($question->question_image) Has image @endif @if($question->is_diagnostic) Sentinel @endif {{ $question->type_id == 1 ? 'Multiple Choice' : 'Fill in Blank' }}
{{ $config['text'] }} {{ $isPublic ? 'Public' : 'Draft' }} @if($isPublic && $question->published_at) {{ $human($question->published_at) }} @endif
@if($question->skill) {{ $question->skill->skill }} @else No skill @endif @if($issueCount > 0) {{ $issueCount }} {{ $openIssues > 0 ? 'open' : 'resolved' }} @else None @endif {{ $human($question->updated_at) }}
@if($qaStatus === 'unreviewed' || $qaStatus === 'needs_revision') @endif

No questions found matching your criteria.

View All Questions
{{-- Pagination --}} @if($questions->hasPages())
{{ $questions->appends(request()->query())->links() }}
@endif
{{-- Quick Flag Modal --}} @endsection @push('scripts') @endpush