@extends('layouts.keska') @section('title', 'Denetim Sonucu · ' . $audit->original_filename) @php $totalIssues = $audit->error_count + $audit->warning_count; $isClean = $totalIssues === 0; $scorePct = $isClean ? 100 : max(0, 100 - min(100, $audit->error_count * 15 + $audit->warning_count * 5)); $checkLabels = [ 'project_name' => 'Proje Adı', 'location' => 'Konum', 'parcel' => 'Pafta/Ada/Parsel', 'metadata' => 'Rapor Metadata', 'page_number' => 'Sayfa Numarası', ]; $fieldLabels = [ 'project_name' => 'Proje Adı', 'province' => 'İl', 'district' => 'İlçe', 'neighborhood' => 'Mahalle', 'pafta' => 'Pafta', 'ada' => 'Ada', 'parsel' => 'Parsel', 'report_no' => 'Rapor No', 'report_date' => 'Tarih', 'engineer_name' => 'Mühendis', ]; $ringColor = $isClean ? '#10B981' : ($audit->error_count > 0 ? '#F43F5E' : '#F59E0B'); @endphp @section('content')
← Geçmiş Denetimler

{{ $audit->project_name ?: 'İsimsiz Proje' }}

{{ $audit->original_filename }} · {{ $audit->created_at->format('d.m.Y H:i') }}
@if(auth()->user()->hasPermission('upload')) Yeni Denetim @else 🔒 Yeni Denetim @endif @if(auth()->user()->hasPermission('delete'))
@csrf @method('DELETE')
@else @endif
0
Skor / 100
@if($isClean)
Tüm kontroller temiz
@else
{{ $audit->error_count }} hata · {{ $audit->warning_count }} uyarı
@endif
{{ $audit->total_sections }} bölüm tarandı
Tespit Edilen Kapak Bilgileri
@foreach($fieldLabels as $key => $label) @php $val = $audit->{$key} ?? null; @endphp
{{ $label }}
{{ $val ?: '—' }}
@endforeach
@php $issueFindings = $audit->findings->whereIn('severity', ['error', 'warning']); $infoFindings = $audit->findings->where('severity', 'info'); @endphp @if($issueFindings->isEmpty())

Hiçbir tutarsızlık bulunamadı

Bu rapor proje adı, konum, pafta/ada/parsel, metadata ve sayfa numarası kontrollerinden temiz geçti.

@endif @if($audit->findings->isNotEmpty())
Bulgular ({{ $audit->findings->count() }})
@if($audit->error_count > 0){{ $audit->error_count }} hata@endif @if($audit->warning_count > 0){{ $audit->warning_count }} uyarı@endif @if($infoFindings->count() > 0){{ $infoFindings->count() }} bilgi@endif
@endif
@endsection @push('scripts') @endpush