From 96459f29a66997a329950fd330c3709986b08367 Mon Sep 17 00:00:00 2001 From: Ilham Wara Nugroho Date: Tue, 18 Aug 2026 11:02:13 +0700 Subject: [PATCH] update --- .../Controllers/Activity/FormController.php | 5 ++ resources/views/modules/form/action.blade.php | 31 +++++++++-- resources/views/modules/form/index.blade.php | 55 ++++++++++++------- 3 files changed, 67 insertions(+), 24 deletions(-) diff --git a/app/Http/Controllers/Activity/FormController.php b/app/Http/Controllers/Activity/FormController.php index 25a5da8..d830b72 100644 --- a/app/Http/Controllers/Activity/FormController.php +++ b/app/Http/Controllers/Activity/FormController.php @@ -82,6 +82,11 @@ class FormController implements HasMiddleware })->get(); // Fetch activity form and activity form details using service + if(request()->tahun){ + $inventoryYear = request()->tahun; + }else{ + $inventoryYear = request()->tahun; + } $activityForm = $this->formService->getActivityForm($sector, $code, $inventoryYear, $instansi); if ($instansi == 'all') { $activityFormId = $activityForm->pluck('id')->toArray(); diff --git a/resources/views/modules/form/action.blade.php b/resources/views/modules/form/action.blade.php index 6b68a73..c7aec78 100644 --- a/resources/views/modules/form/action.blade.php +++ b/resources/views/modules/form/action.blade.php @@ -8,13 +8,13 @@ --}}
-
+
-
- -
+ {{--
+ +
--}}
- @if ($scope === \App\Enums\LingkupAksesData::ALL->value)
+
+ {{--
+ +
--}} +
+ +
+
@include('modules.form.approve')
+
+ + + +
diff --git a/resources/views/modules/form/index.blade.php b/resources/views/modules/form/index.blade.php index a0be843..074b473 100644 --- a/resources/views/modules/form/index.blade.php +++ b/resources/views/modules/form/index.blade.php @@ -28,6 +28,8 @@ $internal = $internal ?? null; $limitInternal = ($internal !== null) && !$agencies->isNotEmpty(); + + $years = activityYearRange($inventoryYear); @endphp
@@ -46,29 +48,44 @@ - - + - @foreach ($formDetails as $detail) + + + + @foreach ($formDetails as $k => $detail) @php $unitCode = $detail->unit_code; $unitCategory = $unitsMap[$unitCode]->category ?? null; @endphp - + + + + + @php + $activity_value = isset($activityFormDetails[request()->tahun]) + ? $activityFormDetails[request()->tahun] + ->where('activity_code', $detail->activity_code) + ->where('activity_unit_code', $detail->unit_code) + ->first()->activity_value ?? '' + : ''; + @endphp + + @endforeach - - @php - $years = activityYearRange($inventoryYear); - @endphp - @foreach ($years as $k => $year) + {{-- @foreach ($years as $k => $year) @@ -80,7 +97,7 @@ ->where('activity_code', $detail->activity_code) ->where('activity_unit_code', $detail->unit_code) ->first()->activity_value ?? '' - : '' + : ''; @endphp @endforeach - @endforeach + @endforeach --}}
#No.No TahunActivityValue
- {{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }}) - - @if ($unitCategory) - - @else - {{ $unitCode }} - @endif -
{{$k+1}}{{request()->tahun}} + {{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }}) + + @if ($unitCategory) + + @else + {{ $unitCode }} + @endif + +
+ {{ @$activity_value == "" ? "" : getFormattedValue($activity_value)}} +
+
{{ $k+1 }}
@@ -89,7 +106,7 @@
@endif