update
parent
ddc5a9ca43
commit
f824852e8f
|
|
@ -41,55 +41,58 @@
|
|||
<form action="{{ route('modules.form.save', ['sector' => $form->sector, 'code' => $form->code]) }}" method="POST">
|
||||
<input type="hidden" name="inventoryYear" value="{{ $inventoryYear }}">
|
||||
<input type="hidden" name="instansi" value="{{ $instansi }}">
|
||||
<div class="table-responsive mt-3" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-detail">
|
||||
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No.</th>
|
||||
<th>Tahun</th>
|
||||
@foreach ($formDetails as $detail)
|
||||
@php
|
||||
$unitCode = $detail->unit_code;
|
||||
$unitCategory = $unitsMap[$unitCode]->category ?? null;
|
||||
@endphp
|
||||
<th style="min-width: 150px; text-decoration:normal">
|
||||
{{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }})
|
||||
|
||||
@if ($unitCategory)
|
||||
|
||||
@else
|
||||
{{ $unitCode }}
|
||||
@endif
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
@php
|
||||
$years = activityYearRange($inventoryYear);
|
||||
@endphp
|
||||
@foreach ($years as $k => $year)
|
||||
@if (@request()->instansi || @$instansi)
|
||||
<div class="table-responsive mt-3" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-detail">
|
||||
|
||||
<tr>
|
||||
<td><a href="#" data-tahun="{{ $year }}" data-instansi="{{ $instansi }}" data-sector="{{ $form->sector }}" data-code="{{ $form->code }}" class="btn btn-info btn-sm edit"><i class="bx bx-pencil"></i></a></td>
|
||||
<td>{{ $k+1 }}</td>
|
||||
<td>{{ $year }}</td>
|
||||
<th>#</th>
|
||||
<th>No.</th>
|
||||
<th>Tahun</th>
|
||||
@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
|
||||
<td>
|
||||
<div class="input-group">
|
||||
{{ @$activity_value == "" ? "" : getFormattedValue($activity_value)}}
|
||||
</div>
|
||||
</td>
|
||||
<th style="min-width: 150px; text-decoration:normal">
|
||||
{{ $detail->activity ? $detail->activity->name : 'N/A' }} - ({{ $detail->unit_code }})
|
||||
|
||||
@if ($unitCategory)
|
||||
|
||||
@else
|
||||
{{ $unitCode }}
|
||||
@endif
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@php
|
||||
$years = activityYearRange($inventoryYear);
|
||||
@endphp
|
||||
@foreach ($years as $k => $year)
|
||||
<tr>
|
||||
<td><a href="#" data-tahun="{{ $year }}" data-instansi="{{ $instansi }}" data-sector="{{ $form->sector }}" data-code="{{ $form->code }}" class="btn btn-info btn-sm edit"><i class="bx bx-pencil"></i></a></td>
|
||||
<td>{{ $k+1 }}</td>
|
||||
<td>{{ $year }}</td>
|
||||
@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
|
||||
<td>
|
||||
<div class="input-group">
|
||||
{{ @$activity_value == "" ? "" : getFormattedValue($activity_value)}}
|
||||
</div>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
{{-- @include('modules.form.table') --}}
|
||||
{{-- @include('modules.form.copy') --}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue