SPK PENILAIAN KINERJA GURU
This commit is contained in:
parent
054e5ac501
commit
1f262cf3bd
|
@ -144,6 +144,9 @@ class PenilaianAlternatifController extends Controller
|
|||
|
||||
public function update(Request $request, $kode_alternatif, $periode)
|
||||
{
|
||||
if($request->id_alternatif == null || $request->periode == null){
|
||||
return redirect()->route('penilaian_alternatif')->with('error', 'Ada data kriteria atau subkriteria yang masih kosong!');
|
||||
}
|
||||
$kriteria = $request->id_kriteria;
|
||||
$subKriteria = $request->id_sub;
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<div class="form-group">
|
||||
<label for="">Alternatif</label>
|
||||
<select name="id_alternatif" class="form-control">
|
||||
<option value="">Pilih</option>
|
||||
@foreach ($alternatif as $alt)
|
||||
<option value="{{ $alt->id }}" {{ $alt->id == $penilaian->first()->id_alternatif ? 'selected' : '' }}>{{ $alt->guru['nama_guru'] }}</option>
|
||||
@endforeach
|
||||
|
@ -53,7 +52,6 @@
|
|||
</td>
|
||||
<td>
|
||||
<select name="id_sub[]" class="form-control mb-2">
|
||||
<option value="">Pilih</option>
|
||||
@foreach ($subKriteria as $sub)
|
||||
<option value="{{ $sub->id }}" {{ $sub->id == $penilaian[$key]->id_sub ? 'selected' : '' }}>{{ $sub->id }}</option>
|
||||
@endforeach
|
||||
|
@ -74,7 +72,7 @@
|
|||
</div>
|
||||
<div class="card-footer" style="display: flex; justify-content: space-between!important;">
|
||||
<button type="button" class="btn btn-sm btn-warning" onclick="goBack()">Kembali</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="validateAndSubmit()">Simpan</button>
|
||||
<button type="submit" class="btn btn-sm btn-primary">Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -84,39 +82,6 @@
|
|||
window.history.back();
|
||||
}
|
||||
|
||||
function validateAndSubmit() {
|
||||
var isValid = validateForm();
|
||||
|
||||
if (isValid) {
|
||||
document.getElementById('penilaianForm').submit();
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Oops...',
|
||||
text: 'Ada data yang masih kosong! Silakan isi semua field.',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function validateForm() {
|
||||
var periode = document.getElementsByName('periode')[0].value;
|
||||
var idAlternatif = document.getElementsByName('id_alternatif')[0].value;
|
||||
var idSubValues = document.getElementsByName('id_sub[]');
|
||||
|
||||
// Check if periode and idAlternatif are not empty
|
||||
if (periode.trim() === '' || idAlternatif.trim() === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if at least one id_sub is selected for each kriteria
|
||||
for (var i = 0; i < idSubValues.length; i++) {
|
||||
if (idSubValues[i].value.trim() === '') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
|
@ -10,7 +10,7 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label for="periode">Periode</label>
|
||||
<label for="periode">Tahun Pelajaran</label>
|
||||
<select class="form-control" id="periode" name="periode">
|
||||
@php
|
||||
$tahunAkhir = date('Y');
|
||||
|
@ -77,7 +77,6 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
|
@ -85,6 +84,4 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
=======
|
||||
>>>>>>> afe2ff37056cbc2ba48d0f5e5a38a8407f5789d8
|
||||
@endsection
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
<div class="mb-2">
|
||||
<form action="{{ route('penilaian_alternatif') }}" method="GET">
|
||||
<div class="form-group">
|
||||
<label for="periodeFilter">Pilih Periode:</label>
|
||||
<label for="periodeFilter">Pilih Tahun Pelajaran:</label>
|
||||
<select name="periode" id="periodeFilter" class="form-control" onchange="this.form.submit()">
|
||||
<option value="">Pilih Periode</option>
|
||||
<option value="">Pilih Tahun Pelajaran</option>
|
||||
@foreach ($periode as $p)
|
||||
<option value="{{ $p }}">{{ $p }}</option>
|
||||
@endforeach
|
||||
|
@ -71,7 +71,6 @@
|
|||
$('#dataTable').DataTable();
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
function deletePenilaian(kodeAlternatif, periode) {
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
|
@ -112,8 +111,4 @@
|
|||
<script src="{{ url('sbAdmin/vendor/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ url('sbAdmin/vendor/datatables/dataTables.bootstrap4.min.js') }}"></script>
|
||||
|
||||
=======
|
||||
<!-- Page level custom scripts -->
|
||||
<script src="{{ url('sbAdmin/js/demo/datatables-demo.js') }}"></script>
|
||||
>>>>>>> afe2ff37056cbc2ba48d0f5e5a38a8407f5789d8
|
||||
@endpush
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
*
|
||||
!public/
|
||||
!.gitignore
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -1,9 +0,0 @@
|
|||
compiled.php
|
||||
config.php
|
||||
down
|
||||
events.scanned.php
|
||||
maintenance.php
|
||||
routes.php
|
||||
routes.scanned.php
|
||||
schedule-*
|
||||
services.json
|
|
@ -1,3 +0,0 @@
|
|||
*
|
||||
!data/
|
||||
!.gitignore
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
Loading…
Reference in New Issue