69 lines
3.8 KiB
PHP
69 lines
3.8 KiB
PHP
@php
|
|
$isExport = $isExport ?? false;
|
|
@endphp
|
|
|
|
<div class="table-responsive" style="overflow-x: auto;">
|
|
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
|
<thead class="bg-header text-white text-center">
|
|
<tr>
|
|
<th></th>
|
|
<th>Populasi</th>
|
|
<th>Area<br>(km²)</th>
|
|
<th>PDB<br>($m)</th>
|
|
@if (!empty($gpcOutputRList))
|
|
@foreach (array_keys($gpcOutputRList[0]) as $column)
|
|
<th>{{ str_replace('_', '.', strtoupper($column)) }}</th>
|
|
@endforeach
|
|
@endif
|
|
<th>Credits 1</th>
|
|
<th>Credits 2</th>
|
|
<th>Credits 3</th>
|
|
<th>Credits 4</th>
|
|
<th>Credits 5</th>
|
|
<th>Credits 6</th>
|
|
<th>GPC BASIC</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($gpcOutputs as $index => $gpcOutput)
|
|
<tr>
|
|
<td class="{{ is_numeric($gpcOutput->activity_year) ? 'text-right' : 'text-center' }}">
|
|
{{ $gpcOutput->activity_year }}</td>
|
|
<td class="{{ is_numeric($gpcOutput->population) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->population : getFormattedValue($gpcOutput->population) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->area) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->area : getFormattedValue($gpcOutput->area) }}</td>
|
|
<td class="{{ is_numeric($gpcOutput->gdp) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->gdp : getFormattedValue($gpcOutput->gdp) }}</td>
|
|
@foreach ($gpcOutputRList[$index] as $value)
|
|
<td class="{{ is_numeric($value) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $value : getFormattedValue($value, 2) }}</td>
|
|
@endforeach
|
|
<td class="{{ is_numeric($gpcOutput->credits_i) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->credits_i : getFormattedValue($gpcOutput->credits_i) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->credits_ii) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->credits_ii : getFormattedValue($gpcOutput->credits_ii) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->credits_iii) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->credits_iii : getFormattedValue($gpcOutput->credits_iii) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->credits_iv) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->credits_iv : getFormattedValue($gpcOutput->credits_iv) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->credits_v) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->credits_v : getFormattedValue($gpcOutput->credits_v) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->credits_vi) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->credits_vi : getFormattedValue($gpcOutput->credits_vi) }}
|
|
</td>
|
|
<td class="{{ is_numeric($gpcOutput->gpc_basic) ? 'text-right' : 'text-center' }}">
|
|
{{ $isExport ? $gpcOutput->gpc_basic : getFormattedValue($gpcOutput->gpc_basic, 2) }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|