[add] All 2603 to 2780
This commit is contained in:
parent
cc9d53b881
commit
5b1d90b273
|
@ -27,4 +27,17 @@ public function register(): void
|
||||||
//
|
//
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function render($request, Throwable $exception)
|
||||||
|
{
|
||||||
|
if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException) {
|
||||||
|
$statusCode = $exception->getStatusCode();
|
||||||
|
if (view()->exists("errors.{$statusCode}")) {
|
||||||
|
return response()->view("errors.{$statusCode}", [], $statusCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::render($request, $exception);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public function processCounting(Request $request)
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'year' => 'required|integer',
|
'year' => 'required|integer',
|
||||||
'alquran' => 'required|integer|min:0|max:606', // maksimal 606 halaman
|
'alquran' => 'required|integer|min:0|max:606', // maksimal 606 halaman
|
||||||
'alhadis' => 'required|integer|min:0|max:1997', // maksimal 1997 halaman
|
'alhadis' => 'required|integer|min:0|max:2174', // maksimal 2174 halaman
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Buat objek Carbon dari "1 Januari [tahun angkatan]"
|
// Buat objek Carbon dari "1 Januari [tahun angkatan]"
|
||||||
|
@ -46,19 +46,19 @@ public function processCounting(Request $request)
|
||||||
$n = 0;
|
$n = 0;
|
||||||
$status = 'Tidak Tercapai';
|
$status = 'Tidak Tercapai';
|
||||||
|
|
||||||
// 1) Jika jumlah halaman (y) >= 2603, langsung "Tercapai"
|
// 1) Jika jumlah halaman (y) >= 2780, langsung "Tercapai"
|
||||||
if ($y >= 2603) {
|
if ($y >= 2780) {
|
||||||
$n = 100; // Anda dapat mengganti nilai sesuai kebutuhan
|
$n = 100; // Anda dapat mengganti nilai sesuai kebutuhan
|
||||||
$status = 'Tercapai';
|
$status = 'Tercapai';
|
||||||
}
|
}
|
||||||
// 2) Jika y < 2603 dan x > 0, hitung kecepatan pencapaian
|
// 2) Jika y < 2780 dan x > 0, hitung kecepatan pencapaian
|
||||||
elseif ($x > 0) {
|
elseif ($x > 0) {
|
||||||
$userSpeed = $y / $x;
|
$userSpeed = $y / $x;
|
||||||
$targetSpeed = 2603 / 1095;
|
$targetSpeed = 2780 / 1095;
|
||||||
$n = ($userSpeed / $targetSpeed) * 100;
|
$n = ($userSpeed / $targetSpeed) * 100;
|
||||||
$status = $n >= 100 ? 'Tercapai' : 'Tidak Tercapai';
|
$status = $n >= 100 ? 'Tercapai' : 'Tidak Tercapai';
|
||||||
}
|
}
|
||||||
// 3) Jika x == 0 dan y < 2603, nilai default tetap 0 dengan status "Tidak Tercapai"
|
// 3) Jika x == 0 dan y < 2780, nilai default tetap 0 dengan status "Tidak Tercapai"
|
||||||
|
|
||||||
// Simpan data ke database
|
// Simpan data ke database
|
||||||
Riwayat::create([
|
Riwayat::create([
|
||||||
|
|
|
@ -45,16 +45,15 @@
|
||||||
<td>{{ $index + 1 }}</td>
|
<td>{{ $index + 1 }}</td>
|
||||||
<td>{{ $santri->name }}</td>
|
<td>{{ $santri->name }}</td>
|
||||||
<td>{{ $santri->email }}</td>
|
<td>{{ $santri->email }}</td>
|
||||||
<td>{{ $santri->asal_daerah }}</td>
|
<td>{{ $santri->asal_daerah == 'dalamProvinsi' ? 'Dalam Daerah' : 'Luar Provinsi' }}</td>
|
||||||
<td>{{ $santri->jenis_kelamin }}</td>
|
<td>{{ $santri->jenis_kelamin }}</td>
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ route('santri.delete', $santri->id) }}" method="POST"
|
<!-- Tombol Delete dengan Form -->
|
||||||
onsubmit="return confirmDelete({{ $santri->id }})">
|
<form action="{{ route('santri.delete', $santri->id) }}" method="POST" class="delete-form">
|
||||||
@csrf
|
@csrf
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
<button class="btn btn-danger btn-sm" type="button"
|
<button type="button" class="btn btn-danger btn-sm btn-delete">
|
||||||
onclick="confirmDelete({{ $santri->id }})">
|
<i class='bx bx-trash'></i> Hapus
|
||||||
<i class='bx bx-trash'></i>
|
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
@ -64,16 +63,13 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DataTables CSS & JS -->
|
<!-- DataTables & SweetAlert2 -->
|
||||||
<!-- SweetAlert2 CSS & JS -->
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.css">
|
||||||
<link rel="stylesheet"
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>
|
||||||
href="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.css">
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js">
|
|
||||||
</script>
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#addSantriTable').DataTable({
|
$('#addSantriTable').DataTable({
|
||||||
|
@ -91,27 +87,31 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function confirmDelete(santriId) {
|
document.querySelectorAll('.btn-delete').forEach(button => {
|
||||||
Swal.fire({
|
button.addEventListener('click', function() {
|
||||||
title: 'Yakin ingin menghapus Santri ini?',
|
let form = this.closest('form');
|
||||||
text: 'Data yang dihapus tidak bisa dikembalikan!',
|
|
||||||
icon: 'warning',
|
Swal.fire({
|
||||||
showCancelButton: true,
|
title: 'Yakin ingin menghapus Santri ini?',
|
||||||
confirmButtonText: 'Ya, hapus!',
|
text: 'Data yang dihapus tidak bisa dikembalikan!',
|
||||||
cancelButtonText: 'Batal',
|
icon: 'warning',
|
||||||
reverseButtons: true
|
showCancelButton: true,
|
||||||
}).then((result) => {
|
confirmButtonText: 'Ya, hapus!',
|
||||||
if (result.isConfirmed) {
|
cancelButtonText: 'Batal',
|
||||||
// Submit the form if confirmed
|
reverseButtons: true
|
||||||
document.getElementById('deleteSantriForm' + santriId).submit();
|
}).then((result) => {
|
||||||
}
|
if (result.isConfirmed) {
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -92,9 +92,9 @@
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $item->tahun_angkatan }}</td>
|
<td>{{ $item->tahun_angkatan }}</td>
|
||||||
<td>{{ number_format(($item->alhadis / 1997) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alhadis / 2174) * 100, 2) }}%</td>
|
||||||
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
||||||
<td>{{ number_format(((($item->alhadis / 1997) * 100) + (($item->alquran / 606) *
|
<td>{{ number_format(((($item->alhadis / 2174) * 100) + (($item->alquran / 606) *
|
||||||
100)) / 2, 2) }}%</td>
|
100)) / 2, 2) }}%</td>
|
||||||
<td>{{ $item->status }}</td>
|
<td>{{ $item->status }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<td>{{ $item->alquran }}</td>
|
<td>{{ $item->alquran }}</td>
|
||||||
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
||||||
<td>{{ $item->alhadis }}</td>
|
<td>{{ $item->alhadis }}</td>
|
||||||
<td>{{ number_format(($item->alhadis / 1997) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alhadis / 2174) * 100, 2) }}%</td>
|
||||||
<td>{{ number_format($item->nilai_n, 2) }}</td>
|
<td>{{ number_format($item->nilai_n, 2) }}</td>
|
||||||
<td>{{ $item->status }}</td>
|
<td>{{ $item->status }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
<td>{{ $item->alquran }}</td>
|
<td>{{ $item->alquran }}</td>
|
||||||
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
||||||
<td>{{ $item->alhadis }}</td>
|
<td>{{ $item->alhadis }}</td>
|
||||||
<td>{{ number_format(($item->alhadis / 1997) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alhadis / 2174) * 100, 2) }}%</td>
|
||||||
<td>{{ number_format($item->nilai_n, 2) }}</td>
|
<td>{{ number_format($item->nilai_n, 2) }}</td>
|
||||||
<td>{{ $item->status }}</td>
|
<td>{{ $item->status }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
<td>{{ $item->alquran }}</td>
|
<td>{{ $item->alquran }}</td>
|
||||||
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alquran / 606) * 100, 2) }}%</td>
|
||||||
<td>{{ $item->alhadis }}</td>
|
<td>{{ $item->alhadis }}</td>
|
||||||
<td>{{ number_format(($item->alhadis / 1997) * 100, 2) }}%</td>
|
<td>{{ number_format(($item->alhadis / 2174) * 100, 2) }}%</td>
|
||||||
<td>{{ number_format($item->nilai_n, 2) }}</td>
|
<td>{{ number_format($item->nilai_n, 2) }}</td>
|
||||||
<td>{{ $item->status }}</td>
|
<td>{{ $item->status }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -101,7 +101,7 @@ class="btn btn-warning w-100 d-flex align-items-center justify-content-center ga
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $item->tahun_angkatan }}</td>
|
<td>{{ $item->tahun_angkatan }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $item->alhadis >= 1997 ? 'Khatam' : 'Belum Khatam' }}
|
{{ $item->alhadis >= 2174 ? 'Khatam' : 'Belum Khatam' }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $item->alquran >= 606 ? 'Khatam' : 'Belum Khatam' }}
|
{{ $item->alquran >= 606 ? 'Khatam' : 'Belum Khatam' }}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('layouts.app-none')
|
@extends('layouts.app-none')
|
||||||
<title>Login | SR Klasifikasi</title>
|
<title>Login | SR Klasifikasi</title>
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
<section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
|
<section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form class="row g-3 needs-validation" action="{{ route('register.post') }}" method="POST"
|
<form class="row g-3 needs-validation" action="{{ route('register.post') }}" method="POST"
|
||||||
novalidate id="registerForm">
|
novalidate>
|
||||||
@csrf
|
@csrf
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<label for="nameSantri" class="form-label">Nama</label>
|
<label for="nameSantri" class="form-label">Nama</label>
|
||||||
|
@ -59,8 +59,8 @@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<label for="passwordSantri" class="form-label">Password</label>
|
<label for="passwordSantri" class="form-label">Password</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="password" name="password" class="form-control" id="passwordSantri"
|
<input type="password" name="password" class="form-control" id="passwordSantri"
|
||||||
required>
|
required>
|
||||||
<span class="input-group-text toggle-password" data-target="passwordSantri">
|
<span class="input-group-text toggle-password" data-target="passwordSantri">
|
||||||
<i class="bx bx-hide"></i>
|
<i class="bx bx-hide"></i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button class="btn btn-primary w-100" type="submit">Daftar</button>
|
<button class="btn btn-primary w-100" type="submit" id="btnRegister" disabled>Daftar</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 d-flex justify-content-center">
|
<div class="col-12 d-flex justify-content-center">
|
||||||
|
@ -118,8 +118,31 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- SweetAlert2 -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
const nisInput = document.getElementById("NISSantri");
|
||||||
|
const btnRegister = document.getElementById("btnRegister");
|
||||||
|
|
||||||
|
nisInput.addEventListener("input", function() {
|
||||||
|
let nisValue = this.value.trim();
|
||||||
|
|
||||||
|
if (nisValue.length > 0 && !/^([IA])/i.test(nisValue)) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Data Tidak Valid',
|
||||||
|
confirmButtonColor: '#d33'
|
||||||
|
});
|
||||||
|
|
||||||
|
this.value = ""; // Kosongkan input NIS
|
||||||
|
btnRegister.disabled = true; // Nonaktifkan tombol daftar
|
||||||
|
} else {
|
||||||
|
btnRegister.disabled = false; // Aktifkan tombol daftar jika valid
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
// Show/Hide Password
|
// Show/Hide Password
|
||||||
document.querySelectorAll(".toggle-password").forEach(button => {
|
document.querySelectorAll(".toggle-password").forEach(button => {
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
name="alquran" value="{{ old('alquran') }}" max="606" required>
|
name="alquran" value="{{ old('alquran') }}" max="606" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="number" class="form-control" placeholder="Jumlah Al-Hadis Isi : Max 1997"
|
<input type="number" class="form-control" placeholder="Jumlah Al-Hadis Isi : Max 2174"
|
||||||
name="alhadis" value="{{ old('alhadis') }}" max="1997" required>
|
name="alhadis" value="{{ old('alhadis') }}" max="2174" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<button type="submit" class="btn btn-primary">Hitung & Simpan</button>
|
<button type="submit" class="btn btn-primary">Hitung & Simpan</button>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
<td>{{ $latest->alhadis }}</td>
|
<td>{{ $latest->alhadis }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><i class="bx bx-line-chart"></i> Nilai (n)</th>
|
<th><i class="bx bx-line-chart"></i>Angka Capaian</th>
|
||||||
<td>
|
<td>
|
||||||
<strong>
|
<strong>
|
||||||
{{ number_format($latest->nilai_n, 2) }}%
|
{{ number_format($latest->nilai_n, 2) }}%
|
||||||
|
@ -97,11 +97,11 @@
|
||||||
$now = \Carbon\Carbon::today();
|
$now = \Carbon\Carbon::today();
|
||||||
$x = $start->diffInDays($now);
|
$x = $start->diffInDays($now);
|
||||||
$y = $latest->alquran + $latest->alhadis;
|
$y = $latest->alquran + $latest->alhadis;
|
||||||
$targetSpeed = 2603 / 1095;
|
$targetSpeed = 2780 / 1095;
|
||||||
|
|
||||||
// Hitung nilai kecepatan (nCheck) sebagai persentase
|
// Hitung nilai kecepatan (nCheck) sebagai persentase
|
||||||
$nCheck = 0;
|
$nCheck = 0;
|
||||||
if ($y >= 2603) {
|
if ($y >= 2780) {
|
||||||
$nCheck = 100;
|
$nCheck = 100;
|
||||||
} elseif ($x > 0) {
|
} elseif ($x > 0) {
|
||||||
$userSpeed = $y / $x;
|
$userSpeed = $y / $x;
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
// Tentukan status detail untuk target keseluruhan
|
// Tentukan status detail untuk target keseluruhan
|
||||||
$detailStatus = '';
|
$detailStatus = '';
|
||||||
$badgeClass = '';
|
$badgeClass = '';
|
||||||
if ($y >= 2603) {
|
if ($y >= 2780) {
|
||||||
$detailStatus = "Sesuai Target (Halaman penuh)";
|
$detailStatus = "Sesuai Target (Halaman penuh)";
|
||||||
$badgeClass = 'bg-success';
|
$badgeClass = 'bg-success';
|
||||||
} elseif ($x == 0) {
|
} elseif ($x == 0) {
|
||||||
|
@ -132,20 +132,11 @@
|
||||||
|
|
||||||
// Hitung kekurangan halaman untuk Quran dan Hadis
|
// Hitung kekurangan halaman untuk Quran dan Hadis
|
||||||
$quranShort = $latest->alquran < 606 ? (606 - $latest->alquran) : 0;
|
$quranShort = $latest->alquran < 606 ? (606 - $latest->alquran) : 0;
|
||||||
$hadisShort = $latest->alhadis < 1997 ? (1997 - $latest->alhadis) : 0;
|
$hadisShort = $latest->alhadis < 2174 ? (2174 - $latest->alhadis) : 0;
|
||||||
$quranStatus = $latest->alquran >= 606 ? 'Khatam' : 'Belum Khatam';
|
$quranStatus = $latest->alquran >= 606 ? 'Khatam' : 'Belum Khatam';
|
||||||
$hadisStatus = $latest->alhadis >= 1997 ? 'Khatam' : 'Belum Khatam';
|
$hadisStatus = $latest->alhadis >= 2174 ? 'Khatam' : 'Belum Khatam';
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th><i class="bx bx-info-circle"></i> Status Detail</th>
|
|
||||||
<td>
|
|
||||||
<span class="badge {{ $badgeClass }}">
|
|
||||||
{{ $detailStatus }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{{-- Kolom tambahan: Status Quran --}}
|
{{-- Kolom tambahan: Status Quran --}}
|
||||||
<tr>
|
<tr>
|
||||||
<th><i class="bx bx-book"></i> Status Quran</th>
|
<th><i class="bx bx-book"></i> Status Quran</th>
|
||||||
|
@ -173,6 +164,38 @@
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$totalHalaman = 2780;
|
||||||
|
$halamanDikerjakan = $latest->alquran + $latest->alhadis;
|
||||||
|
$sisaHalaman = max(0, $totalHalaman - $halamanDikerjakan);
|
||||||
|
$targetPerHari = 2.38;
|
||||||
|
$estimasiHari = ceil($sisaHalaman / $targetPerHari);
|
||||||
|
|
||||||
|
// Estimasi tanggal lulus
|
||||||
|
$estimasiTanggal = now()->addDays($estimasiHari)->format('d-m-Y');
|
||||||
|
|
||||||
|
$statusKhatam = $halamanDikerjakan >= $totalHalaman ? "Sudah Khatam" : "Belum Khatam";
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><i class="bx bx-hourglass"></i> Perkiraan Lulus</th>
|
||||||
|
<td>
|
||||||
|
<span class="badge bg-primary">
|
||||||
|
{{ $estimasiHari }} hari lagi ({{ $estimasiTanggal }})
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><i class="bx bx-info-circle"></i> Status Detail</th>
|
||||||
|
<td>
|
||||||
|
<span class="badge {{ $badgeClass }}">
|
||||||
|
{{ $detailStatus }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><i class='bx bx-calculator'></i> Hasil</th>
|
<th><i class='bx bx-calculator'></i> Hasil</th>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.time-text{
|
||||||
|
color:#012970;
|
||||||
|
}
|
||||||
|
|
||||||
.verification-card .card-icon {
|
.verification-card .card-icon {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -22,6 +26,28 @@
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.estimation-card {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border-left: 5px solid #8B07FFFF;
|
||||||
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.estimation-card:hover {
|
||||||
|
transform: scale(1.02);
|
||||||
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.estimation-card .card-icon {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
background-color: #8B07FFFF;
|
||||||
|
color: white;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
.qr-container {
|
.qr-container {
|
||||||
display: none;
|
display: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -92,6 +118,40 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card info-card estimation-card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Estimasi Lulus</h5>
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
|
||||||
|
<i class='bx bx-calendar-check'></i>
|
||||||
|
</div>
|
||||||
|
<div class="ps-3">
|
||||||
|
@php
|
||||||
|
$totalHalaman = 2780;
|
||||||
|
$halamanDikerjakan = $latestRiwayat ? ($latestRiwayat->alquran + $latestRiwayat->alhadis) : 0;
|
||||||
|
$sisaHalaman = max(0, $totalHalaman - $halamanDikerjakan);
|
||||||
|
$targetPerHari = 2.38;
|
||||||
|
$estimasiHari = ceil($sisaHalaman / $targetPerHari);
|
||||||
|
$estimasiTanggal = now()->addDays($estimasiHari)->format('d-m-Y');
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if($halamanDikerjakan >= $totalHalaman)
|
||||||
|
<h4 class=" fw-bold time-text">Sudah Lulus 🎉</h4>
|
||||||
|
@else
|
||||||
|
<h4 class="fw-bold time-text">
|
||||||
|
{{ $estimasiHari }} Hari Lagi
|
||||||
|
</h4>
|
||||||
|
<p class="text-muted">Perkiraan <b>{{ $estimasiTanggal }}</b></p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Akhir Kartu Estimasi Lulus -->
|
||||||
|
|
||||||
|
|
||||||
<div class="col-12 dashboard">
|
<div class="col-12 dashboard">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xxl-12 col-md-12">
|
<div class="col-xxl-12 col-md-12">
|
||||||
|
|
|
@ -23,7 +23,33 @@
|
||||||
{{ session('success') }}
|
{{ session('success') }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
<div class="col-12 d-md-flex gap-2">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title text-center">Perkembangan Capaian</h5>
|
||||||
|
<div id="chartNilaiN" style="height: 350px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title text-center">Perkembangan Al-Qur'an</h5>
|
||||||
|
<div id="chartQuran" style="height: 350px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title text-center">Perkembangan Al-Hadis</h5>
|
||||||
|
<div id="chartHadis" style="height: 350px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Riwayat Hitung</h5>
|
<h5 class="card-title">Riwayat Hitung</h5>
|
||||||
|
@ -174,5 +200,36 @@
|
||||||
// Tampilkan modal
|
// Tampilkan modal
|
||||||
$('#sendModal').modal('show');
|
$('#sendModal').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
var categories = {!! json_encode($riwayat->pluck('created_at')->map(function($date) { return \Carbon\Carbon::parse($date)->format('Y-m-d'); })->toArray()) !!};
|
||||||
|
|
||||||
|
// Grafik Perkembangan Al-Qur'an
|
||||||
|
new ApexCharts(document.querySelector("#chartQuran"), {
|
||||||
|
chart: { type: 'area', height: 350, zoom: { enabled: true } },
|
||||||
|
colors: ['#007bff'],
|
||||||
|
series: [{ name: "Al-Qur'an", data: {!! json_encode($riwayat->pluck('alquran')->toArray()) !!} }],
|
||||||
|
xaxis: { categories: categories},
|
||||||
|
yaxis: { title: { text: 'Jumlah Halaman' } }
|
||||||
|
}).render();
|
||||||
|
|
||||||
|
// Grafik Perkembangan Al-Hadis
|
||||||
|
new ApexCharts(document.querySelector("#chartHadis"), {
|
||||||
|
chart: { type: 'area', height: 350, zoom: { enabled: true } },
|
||||||
|
colors: ['#28a745'],
|
||||||
|
series: [{ name: "Al-Hadis", data: {!! json_encode($riwayat->pluck('alhadis')->toArray()) !!} }],
|
||||||
|
xaxis: { categories: categories},
|
||||||
|
yaxis: { title: { text: 'Jumlah Hadis' } }
|
||||||
|
}).render();
|
||||||
|
|
||||||
|
// Grafik Perkembangan Nilai N
|
||||||
|
new ApexCharts(document.querySelector("#chartNilaiN"), {
|
||||||
|
chart: { type: 'area', height: 350, zoom: { enabled: true } },
|
||||||
|
colors: ['#ffc107'],
|
||||||
|
series: [{ name: "Nilai N", data: {!! json_encode($riwayat->pluck('nilai_n')->map(function($value) { return number_format($value, 2); })->toArray()) !!} }],
|
||||||
|
xaxis: { categories: categories},
|
||||||
|
yaxis: { title: { text: 'Nilai' } }
|
||||||
|
}).render();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
|
@ -36,7 +36,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><i class="bi bi-book-half text-warning"></i> <b>Hadis</b></td>
|
<td><i class="bi bi-book-half text-warning"></i> <b>Hadis</b></td>
|
||||||
<td>1997 Halaman</td>
|
<td>2174 Halaman</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue