@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => 'LOG STATUS AUDIT'])
@if (!empty($grouped) && count($grouped))
LOG STATUS AUDIT ({{ strtoupper($audit_type) }})
@if (!empty($periode_awal) && !empty($periode_akhir)) Periode Audit : @if ($audit_type == 'external') - @else {{ \Carbon\Carbon::parse($periode_awal)->translatedFormat('d F Y') }} - {{ \Carbon\Carbon::parse($periode_akhir)->translatedFormat('d F Y') }} @endif @endif
{{-- PDF --}}
@csrf @if ($audit_type == 'external') @endif @if ($audit_type == 'external') @endif {{-- --}}
Positive Observation
@if (!empty($reportLogEditUrl)) Input Positive Observation @endif
@php $observations = array_filter( array_map('trim', preg_split('/[>\r\n]+/', $positiveObservation ?? '')), ); @endphp @forelse ($observations as $observation)
> {{ $observation }}
@empty Positive Observation masih kosong. @endforelse
@foreach ($categories as $cat) @endforeach @foreach ($grouped as $isoName => $deptGroup) @foreach ($deptGroup as $dept => $rows) @foreach ($rows as $row) {{-- NO --}} {{-- DEPT --}} {{-- CATEGORY --}} @foreach ($categories as $cat) @endforeach {{-- URAIAN --}} {{-- ANALISA --}} {{-- CORRECTION --}} {{-- ACTION --}} {{-- EVALUASI --}} {{-- STATUS --}} @endforeach @endforeach @php $isoRows = $deptGroup->flatten(1); @endphp @endforeach
No Dept Kategori Uraian Analisa Penyebab Correction Corrective Action Evaluasi Efektivitas Status
{{ str_contains(strtolower($cat->name), 'rekom') ? 'Rekom' : ucfirst(strtolower($cat->name)) }}
{{ $isoName }}
{{ $rows->first()->department_prefix ?? '-' }} {{ $dept }}
{{ $loop->iteration }} {{ $row->department_prefix ?? '-' }}
{{ $dept }}
@if (strtoupper($row->category_name) == strtoupper($cat->name)) ✔ @endif {{ $row->problem ?? '-' }} {{ $row->analysis ?? '-' }} {{ $row->correction ?? '-' }} {{ $row->corrective_action ?? '-' }} {{ $row->evaluation ?? '-' }} {{ strtoupper($row->report_status) }}
Total jumlah temuan ketidaksesuaian {{ $isoName }} sebesar {{ $isoRows->count() }} yang terdiri dari:
@foreach ($categories as $cat) @php $categoryRows = $isoRows->filter(fn($item) => strtoupper($item->category_name) === strtoupper($cat->name)); @endphp
> Ketidaksesuaian {{ $cat->name }} ada {{ $categoryRows->count() }} yaitu: @foreach ($deptGroup as $summaryDept => $summaryRows) @php $count = $summaryRows->filter(fn($item) => strtoupper($item->category_name) === strtoupper($cat->name))->count(); @endphp @if ($count > 0)
{{ $summaryRows->first()->department_prefix ?? '-' }} {{ $summaryDept }}: {{ $count }}
@endif @endforeach
@endforeach
OPEN ON PROGRESS atau IN REVIEW    CLOSED NCR telah ditutup

@else
Data tidak ditemukan
Silakan ubah filter atau pilih data yang tersedia
@endif
@endsection