@extends('dashboard.layouts.app') @section('title', 'Data Sekolah') @section('content')
{{ session('import_errors') }}
| No | NPSN | Nama Sekolah | Jenjang | Status | Kecamatan | Desa | Treatment | Aksi |
|---|---|---|---|---|---|---|---|---|
| {{ ($sekolahs->currentPage() - 1) * $sekolahs->perPage() + $loop->iteration }} | {{ $sekolah->npsn }} | {{ $sekolah->nama_sekolah }} | {{ ucfirst($sekolah->jenjang) }} | {{ ucfirst($sekolah->status) }} | {{ $sekolah->kecamatan?->nama_kecamatan ?? '-' }} | {{ $sekolah->desa?->nama_desa ?? '-' }} |
@php
$treatments = [];
if (strtolower($sekolah->rusak_ringan ?? '') === 'ya') {
$treatments[] = ['label' => 'Rusak Ringan', 'color' => 'warning', 'custom' => false];
}
if (strtolower($sekolah->rusak_sedang ?? '') === 'ya') {
$treatments[] = ['label' => 'Rusak Sedang', 'color' => 'warning', 'custom' => true, 'bg' => '#ff9800'];
}
if (strtolower($sekolah->rusak_berat ?? '') === 'ya') {
$treatments[] = ['label' => 'Rusak Berat', 'color' => 'danger', 'custom' => false];
}
if (strtolower($sekolah->kelas_baru ?? '') === 'ya') {
$treatments[] = ['label' => 'Kelas Baru', 'color' => 'success', 'custom' => false];
}
if (strtolower($sekolah->air_garam ?? '') === 'ya') {
$treatments[] = ['label' => 'Air Garam', 'color' => 'info', 'custom' => false];
}
@endphp
@if(count($treatments) > 0)
@foreach($treatments as $treatment)
@if(isset($treatment['custom']) && $treatment['custom'])
{{ $treatment['label'] }}
@else
{{ $treatment['label'] }}
@endif
@endforeach
@else
-
@endif
|
|
| Tidak ada data | ||||||||