From f824852e8f83fe8d4a53001a06d03f571ef2a081 Mon Sep 17 00:00:00 2001 From: Ilham Wara Nugroho Date: Wed, 17 Jun 2026 13:11:20 +0700 Subject: [PATCH] update --- resources/views/modules/form/index.blade.php | 89 ++++++++++---------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/resources/views/modules/form/index.blade.php b/resources/views/modules/form/index.blade.php index f49468a..a8b6780 100644 --- a/resources/views/modules/form/index.blade.php +++ b/resources/views/modules/form/index.blade.php @@ -41,55 +41,58 @@
-
- - - - - - - @foreach ($formDetails as $detail) - @php - $unitCode = $detail->unit_code; - $unitCategory = $unitsMap[$unitCode]->category ?? null; - @endphp - - @endforeach - - @php - $years = activityYearRange($inventoryYear); - @endphp - @foreach ($years as $k => $year) + @if (@request()->instansi || @$instansi) +
+
#No.Tahun - {{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }}) - - @if ($unitCategory) - - @else - {{ $unitCode }} - @endif -
+ - - - + + + @foreach ($formDetails as $detail) @php - $activity_value = isset($activityFormDetails[$year]) - ? $activityFormDetails[$year] - ->where('activity_code', $detail->activity_code) - ->where('activity_unit_code', $detail->unit_code) - ->first()->activity_value ?? '' - : '' + $unitCode = $detail->unit_code; + $unitCategory = $unitsMap[$unitCode]->category ?? null; @endphp - + @endforeach - @endforeach -
{{ $k+1 }}{{ $year }}#No.Tahun -
- {{ @$activity_value == "" ? "" : getFormattedValue($activity_value)}} -
-
+ {{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }}) + + @if ($unitCategory) + + @else + {{ $unitCode }} + @endif +
+ @php + $years = activityYearRange($inventoryYear); + @endphp + @foreach ($years as $k => $year) + + + {{ $k+1 }} + {{ $year }} + @foreach ($formDetails as $detail) + @php + $activity_value = isset($activityFormDetails[$year]) + ? $activityFormDetails[$year] + ->where('activity_code', $detail->activity_code) + ->where('activity_unit_code', $detail->unit_code) + ->first()->activity_value ?? '' + : '' + @endphp + +
+ {{ @$activity_value == "" ? "" : getFormattedValue($activity_value)}} +
+ + @endforeach + + @endforeach + +
+ @endif
{{-- @include('modules.form.table') --}} {{-- @include('modules.form.copy') --}}