<table id="data" class="table table-bordered dt-responsive"
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead class="text-center">
<tr>
<th>KASUS COVID-19 MENURUT MENURUT KECAMATAN DAN PUSKESMAS</th>
</tr>
<tr>
<th>Kabupaten/Kota Kutai Timur</th>
</tr>
<tr>
<th>Tahun {{Session::get('year')}}</th>
</tr>
<tr>
<th rowspan="1" style="vertical-align: middle">Kecamatan</th>
@role('Admin|superadmin')
<th rowspan="1" style="vertical-align: middle">Puskesmas</th>
@endrole
@role('Puskesmas|Pihak Wajib Pajak')
<th rowspan="1" style="vertical-align: middle">Desa</th>
@endrole
<th>KASUS</th>
<th>SEMBUH</th>
<th>MENIGGAL</th>
<th>ANGKA KESEMBUHAN (RR)</th>
<th>ANGKA KEMATIAN (CFR)</th>
</tr>
</thead>
<tbody>
@php
$GrandKasus = 0;
$GrandSembuh = 0;
$GrandMeninggal = 0;
@endphp
@role('Admin|superadmin')
@foreach ($unit_kerja as $key => $item)
<tr style='{{ $key % 2 == 0 ? 'background: #e9e9e9' : '' }}'>
<td>{{ $item->kecamatan }}</td>
<td class="unit_kerja">{{ $item->nama }}</td>
<td>
@php
$kasus = $item->unitKerjaAmbilPart2('filterTable84', Session::get('year'), 'kasus')['total'];
$GrandKasus += $kasus;
echo $kasus;
@endphp
</td>
<td>
@php
$sembuh = $item->unitKerjaAmbilPart2('filterTable84', Session::get('year'), 'sembuh')['total'];
$GrandSembuh += $sembuh;
echo $sembuh;
@endphp
</td>
<td>
@php
$meninggal = $item->unitKerjaAmbilPart2('filterTable84', Session::get('year'), 'meninggal')['total'];
$GrandMeninggal += $meninggal;
echo $meninggal;
@endphp
</td>
<td>
{{$kasus>0?number_format(($sembuh / $kasus) * 100, 2) . '%':0}}
</td>
<td>
{{$kasus>0?number_format(($meninggal / $kasus) * 100, 2) . '%':0}}
</td>
</tr>
@endforeach
@endrole
@role('Puskesmas|Pihak Wajib Pajak')
@foreach ($desa as $key => $item)
@if ($item->filterTable84(Session::get('year'), $item->id))
<tr style='{{ $key % 2 == 0 ? 'background: #e9e9e9' : '' }}'>
<td>{{ $item->UnitKerja->kecamatan }}</td>
<td class="unit_kerja">{{ $item->nama }}</td>
<td>
@php
$kasus = $item
->filterTable84(
Session::get('year'),
$item->id,
)
->kasus;
$GrandKasus += $kasus;
@endphp
{{ $kasus }}
</td>
<td>
@php
$sembuh = $item
->filterTable84(
Session::get('year'),
$item->id,
)
->sembuh;
$GrandSembuh += $sembuh;
@endphp
{{ $sembuh }}
</td>
<td>
@php
$meninggal = $item
->filterTable84(
Session::get('year'),
$item->id,
)
->meninggal;
$GrandMeninggal += $meninggal;
@endphp
{{ $meninggal }}
</td>
<td id="AngkaPersen_1_{{ $item->filterTable84(Session::get('year'), $item->id)->id }}">
{{$kasus>0?number_format(($sembuh / $kasus) * 100, 2) . '%':0}}
</td>
<td id="AngkaPersen_2_{{ $item->filterTable84(Session::get('year'), $item->id)->id }}">
{{$kasus>0?number_format(($meninggal / $kasus) * 100, 2) . '%':0}}
</td>
</tr>
@endif
@endforeach
@endrole
<tr>
<th colspan="2">Jumlah</th>
<th id="GrandKasus">{{ $GrandKasus }} </th>
<th id="GrandSembuh">{{ $GrandSembuh }} </th>
<th id="GrandMeninggal">{{ $GrandMeninggal }} </th>
<th id="GrandAngkaPersen_1">
{{$GrandKasus>0?number_format(($GrandSembuh / $GrandKasus) * 100, 2) . '%':0}}
</th>
<th id="GrandAngkaPersen_2">
{{$GrandKasus>0?number_format(($GrandMeninggal / $GrandKasus) * 100, 2) . '%':0}}
</th>
</tr>
</tbody>
</table>
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]