Perbaikan Dashboard & Hasil (Admin)
This commit is contained in:
parent
79fcc4e6b5
commit
ce194889a0
|
@ -14,12 +14,19 @@ class AdminResultController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$results = Hasil::with('user')->get();
|
||||
$results = Hasil::with('user')->with('periode')->get();
|
||||
$results = $results->map(function ($result) {
|
||||
$result->formatted_created_at = Carbon::parse($result->created_at)->format('M d, Y');
|
||||
if ($result->periode->semester == 1) {
|
||||
$result->periode->semester = 'Ganjil';
|
||||
} else {
|
||||
$result->periode->semester = 'Genap';
|
||||
}
|
||||
return $result;
|
||||
});
|
||||
|
||||
|
||||
|
||||
return view('admin_backend.admin_result', compact('results'));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,4 +30,9 @@ public function user()
|
|||
{
|
||||
return $this->belongsTo(User::class, 'id_user');
|
||||
}
|
||||
|
||||
public function periode()
|
||||
{
|
||||
return $this->belongsTo(Periode::class, 'id_periode');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
show: false
|
||||
}
|
||||
},
|
||||
labels: ['High', 'Medium', 'Low'],
|
||||
labels: kmClass,
|
||||
colors: ['#00e396', '#F8DC1A', '#FA240C']
|
||||
}).render();
|
||||
});
|
||||
|
@ -67,7 +67,7 @@
|
|||
return item.total;
|
||||
});
|
||||
new ApexCharts(document.querySelector("#rmPieChart"), {
|
||||
series: [13, 43, 22],
|
||||
series: rmTotal,
|
||||
chart: {
|
||||
height: 350,
|
||||
type: 'pie',
|
||||
|
@ -75,7 +75,7 @@
|
|||
show: false
|
||||
}
|
||||
},
|
||||
labels: ['High', 'Medium', 'Low'],
|
||||
labels: rmClass,
|
||||
colors: ['#00e396', '#F8DC1A', '#FA240C']
|
||||
}).render();
|
||||
});
|
||||
|
|
|
@ -5,12 +5,14 @@
|
|||
<h4 style="font-weight: bold">Hasil Kategori Metakognitif</h4>
|
||||
<p class="text-secondary fs-6">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo, tempora.</p>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead class="table-light">
|
||||
<th>NAMA</th>
|
||||
<th>ANGKATAN</th>
|
||||
<th>TANGGAL</th>
|
||||
<th>Periode</th>
|
||||
<th>KM</th>
|
||||
<th>RM</th>
|
||||
<th>ACTION</th>
|
||||
|
@ -21,6 +23,7 @@
|
|||
<td style="font-weight: bold">{{ $result->user->nama_lengkap }}</td>
|
||||
<td>{{ $result->user->angkatan }}</td>
|
||||
<td>{{ $result->formatted_created_at }}</td>
|
||||
<td>{{ $result->periode->semester.' '.$result->periode->tahun }}</td>
|
||||
<td>{{ $result->km_class }}</td>
|
||||
<td>{{ $result->rm_class }}</td>
|
||||
<td><a href="{{ route('adminResult.show', ['admin_result' => $result->id]) }}" class="btn btn-primary btn-sm">Download</a></td>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<input value="2" type="radio" class="form-check-input" id="radio2{{ $kuesioner->id }}" name="optionsGroup{{ $kuesioner->id }}">
|
||||
<label class="form-check-label pe-1 pe-sm-5 ps-1" for="radio2{{ $kuesioner->id }}">2</label>
|
||||
|
||||
<input value="3" type="radio" class="form-check-input" id="radio3{{ $kuesioner->id }}" name="optionsGroup{{ $kuesioner->id }}" checked>
|
||||
<input value="3" type="radio" class="form-check-input" id="radio3{{ $kuesioner->id }}" name="optionsGroup{{ $kuesioner->id }}">
|
||||
<label class="form-check-label pe-1 pe-sm-5 ps-1" for="radio3{{ $kuesioner->id }}">3</label>
|
||||
|
||||
<input value="4" type="radio" class="form-check-input" id="radio4{{ $kuesioner->id }}" name="optionsGroup{{ $kuesioner->id }}">
|
||||
|
|
Loading…
Reference in New Issue