diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php
index 269be43..be6066a 100644
--- a/app/Http/Controllers/AdminController.php
+++ b/app/Http/Controllers/AdminController.php
@@ -20,6 +20,15 @@ public function index()
return view('pages.admin.add-admin', compact('admins'));
}
+
+ public function showSantri()
+ {
+ // Ambil semua user yang ber-role admin
+ $santris = User::where('role', 'santri')->get();
+
+ return view('pages.admin.add-santri', compact('santris'));
+ }
+
public function dashboard()
{
@@ -63,6 +72,15 @@ public function destroy($id)
return redirect()->route('admin.add')->with('success', 'Admin berhasil dihapus.');
}
+
+ public function destroySantri($id)
+ {
+ $admin = User::findOrFail($id);
+ $admin->delete();
+
+ return redirect()->route('santri.add')->with('success', 'Santri berhasil dihapus.');
+ }
+
/**
* Tampilkan form ubah password (Admin).
*/
diff --git a/app/Http/Controllers/ClassifiactionController.php b/app/Http/Controllers/ClassifiactionController.php
new file mode 100644
index 0000000..7eb982e
--- /dev/null
+++ b/app/Http/Controllers/ClassifiactionController.php
@@ -0,0 +1,48 @@
+validate([
'year' => 'required|integer',
- 'alquran' => 'required|integer|min:0',
- 'alhadis' => 'required|integer|min:0',
+ 'alquran' => 'required|integer|min:0|max:606', // maksimal 606 halaman
+ 'alhadis' => 'required|integer|min:0|max:1997', // maksimal 1997 halaman
]);
- // Buat objek Carbon dari "1 Januari [year angkatan]"
+ // Buat objek Carbon dari "1 Januari [tahun angkatan]"
$start = Carbon::create($request->year, 1, 1); // 1 Jan tahun angkatan
$now = Carbon::today(); // Hari ini (tanggal saja)
$x = $start->diffInDays($now);
- // Jumlah halaman diisi
+ // Jumlah halaman yang diisi (alquran + alhadis)
$y = $request->alquran + $request->alhadis;
// Default nilai n dan status
$n = 0;
$status = 'Tidak Tercapai';
- // 1) Jika y >= 2603, langsung "Tercapai"
+ // 1) Jika jumlah halaman (y) >= 2603, langsung "Tercapai"
if ($y >= 2603) {
- $n = 100; // atau nilai lain yang Anda inginkan
+ $n = 100; // Anda dapat mengganti nilai sesuai kebutuhan
$status = 'Tercapai';
}
- // 2) Jika y < 2603 dan x > 0, hitung kecepatan
+ // 2) Jika y < 2603 dan x > 0, hitung kecepatan pencapaian
elseif ($x > 0) {
$userSpeed = $y / $x;
$targetSpeed = 2603 / 1095;
@@ -69,11 +70,6 @@ public function processCounting(Request $request)
'status' => $status,
]);
- // Ambil entri terbaru untuk ditampilkan
- $latest = Riwayat::where('user_id', Auth::id())
- ->orderBy('created_at', 'desc')
- ->first();
-
// Kembali ke halaman counting dengan pesan sukses
return redirect()->route('countingSantri')
->with('success', 'Data berhasil dihitung dan disimpan!');
@@ -89,6 +85,9 @@ public function history()
->orderBy('created_at', 'desc')
->get();
- return view('pages.santri.history', compact('riwayat'));
+ // Ambil data admin (sesuaikan query dengan struktur database Anda)
+ $admins = User::where('role', 'admin')->get();
+
+ return view('pages.santri.history', compact('riwayat', 'admins'));
}
}
diff --git a/app/Http/Controllers/MunaqosahController.php b/app/Http/Controllers/MunaqosahController.php
index b77b06b..6cd3548 100644
--- a/app/Http/Controllers/MunaqosahController.php
+++ b/app/Http/Controllers/MunaqosahController.php
@@ -7,47 +7,68 @@
class MunaqosahController extends Controller
{
- /**
- * Hapus data riwayat berdasarkan ID.
- */
+ // Method untuk menghapus data riwayat (digunakan di admin dan santri)
public function destroy($id)
{
- // Cari data Riwayat
$riwayat = Riwayat::findOrFail($id);
-
- // Hapus
$riwayat->delete();
-
- // Redirect balik dengan pesan sukses
return redirect()->back()->with('success', 'Data riwayat berhasil dihapus.');
}
/**
- * Kirim data riwayat ke admin (misalnya tandai "is_sent" atau terserah logika Anda).
+ * Kirim data riwayat ke admin yang dipilih.
*/
- public function send($id)
+ public function send(Request $request, $id)
{
- // Cari data Riwayat
- $riwayat = Riwayat::findOrFail($id);
+ $request->validate([
+ 'admin_id' => 'required|exists:users,id', // pastikan admin_id valid
+ ]);
- // Misalnya Anda punya kolom "sent_to_admin" (boolean) atau "sent_at" (datetime) untuk menandai bahwa data sudah dikirim
- // Contoh: kita set "sent_at" menjadi sekarang
+ $riwayat = Riwayat::findOrFail($id);
+ $riwayat->admin_id = $request->admin_id;
$riwayat->sent_at = now();
+ $riwayat->munaqosah_status = 'Sedang di Verifikasi';
$riwayat->save();
- // Redirect balik dengan pesan sukses
return redirect()->back()->with('success', 'Data berhasil dikirim ke admin.');
}
- // Contoh: Tampilkan semua Riwayat yang "sent_at" != null
-public function showMunaqosah()
-{
- $riwayat = Riwayat::whereNotNull('sent_at')
- ->orderBy('created_at', 'desc')
- ->get();
+ /**
+ * Tampilkan data munaqosah untuk admin.
+ */
+ public function showMunaqosah()
+ {
+ $riwayat = Riwayat::whereNotNull('sent_at')
+ ->where('admin_id', auth()->id()) // hanya data untuk admin yang sedang login
+ ->orderBy('created_at', 'desc')
+ ->get();
- return view('pages.admin.data-santri', compact('riwayat'));
-}
+ return view('pages.admin.data-santri', compact('riwayat'));
+ }
+
+ /**
+ * Verifikasi data munaqosah.
+ */
+ public function verify($id)
+ {
+ $riwayat = Riwayat::findOrFail($id);
+ $riwayat->munaqosah_status = 'Terverifikasi';
+ $riwayat->save();
+
+ return redirect()->back()->with('success', 'Data telah diverifikasi.');
+ }
+
+ /**
+ * Tolak data munaqosah.
+ */
+ public function reject($id)
+ {
+ $riwayat = Riwayat::findOrFail($id);
+ $riwayat->munaqosah_status = 'Ditolak';
+ $riwayat->save();
+
+ return redirect()->back()->with('success', 'Data telah ditolak.');
+ }
}
diff --git a/app/Models/Riwayat.php b/app/Models/Riwayat.php
index e5a8d7f..768843c 100644
--- a/app/Models/Riwayat.php
+++ b/app/Models/Riwayat.php
@@ -19,6 +19,8 @@ class Riwayat extends Model
'nilai_n',
'status',
'sent_at',
+ 'admin_id',
+ 'munaqosah_status',
];
/**
diff --git a/composer.json b/composer.json
index 8a3d72d..969c2e6 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,8 @@
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
- "laravel/tinker": "^2.8"
+ "laravel/tinker": "^2.8",
+ "maatwebsite/excel": "^3.1"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
diff --git a/composer.lock b/composer.lock
index d5fc8c1..2f74dc1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "9c491b8531eec05ba41a11d9276a5749",
+ "content-hash": "fd4872b22b5625c027fc603f79579a78",
"packages": [
{
"name": "brick/math",
@@ -135,6 +135,166 @@
],
"time": "2023-12-11T17:09:12+00:00"
},
+ {
+ "name": "composer/pcre",
+ "version": "3.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<1.11.10"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.12 || ^2",
+ "phpstan/phpstan-strict-rules": "^1 || ^2",
+ "phpunit/phpunit": "^8 || ^9"
+ },
+ "type": "library",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
+ },
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/3.3.2"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-12T16:29:46+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.4.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
+ "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.11",
+ "symfony/phpunit-bridge": "^3 || ^7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "support": {
+ "irc": "ircs://irc.libera.chat:6697/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/3.4.3"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-19T14:15:21+00:00"
+ },
{
"name": "dflydev/dot-access-data",
"version": "v3.0.3",
@@ -506,6 +666,67 @@
],
"time": "2023-10-06T06:47:41+00:00"
},
+ {
+ "name": "ezyang/htmlpurifier",
+ "version": "v4.18.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ezyang/htmlpurifier.git",
+ "reference": "cb56001e54359df7ae76dc522d08845dc741621b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b",
+ "reference": "cb56001e54359df7ae76dc522d08845dc741621b",
+ "shasum": ""
+ },
+ "require": {
+ "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
+ },
+ "require-dev": {
+ "cerdic/css-tidy": "^1.7 || ^2.0",
+ "simpletest/simpletest": "dev-master"
+ },
+ "suggest": {
+ "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.",
+ "ext-bcmath": "Used for unit conversion and imagecrash protection",
+ "ext-iconv": "Converts text to and from non-UTF-8 encodings",
+ "ext-tidy": "Used for pretty-printing HTML"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "library/HTMLPurifier.composer.php"
+ ],
+ "psr-0": {
+ "HTMLPurifier": "library/"
+ },
+ "exclude-from-classmap": [
+ "/library/HTMLPurifier/Language/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-2.1-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Edward Z. Yang",
+ "email": "admin@htmlpurifier.org",
+ "homepage": "http://ezyang.com"
+ }
+ ],
+ "description": "Standards compliant HTML filter written in PHP",
+ "homepage": "http://htmlpurifier.org/",
+ "keywords": [
+ "html"
+ ],
+ "support": {
+ "issues": "https://github.com/ezyang/htmlpurifier/issues",
+ "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0"
+ },
+ "time": "2024-11-01T03:51:45+00:00"
+ },
{
"name": "fruitcake/php-cors",
"version": "v1.3.0",
@@ -1884,6 +2105,272 @@
],
"time": "2024-09-21T08:32:55+00:00"
},
+ {
+ "name": "maatwebsite/excel",
+ "version": "3.1.62",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/SpartnerNL/Laravel-Excel.git",
+ "reference": "decfb9140161fcc117571e47e35ddf27983189ce"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/decfb9140161fcc117571e47e35ddf27983189ce",
+ "reference": "decfb9140161fcc117571e47e35ddf27983189ce",
+ "shasum": ""
+ },
+ "require": {
+ "composer/semver": "^3.3",
+ "ext-json": "*",
+ "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0",
+ "php": "^7.0||^8.0",
+ "phpoffice/phpspreadsheet": "^1.29.7",
+ "psr/simple-cache": "^1.0||^2.0||^3.0"
+ },
+ "require-dev": {
+ "laravel/scout": "^7.0||^8.0||^9.0||^10.0",
+ "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0",
+ "predis/predis": "^1.1"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "aliases": {
+ "Excel": "Maatwebsite\\Excel\\Facades\\Excel"
+ },
+ "providers": [
+ "Maatwebsite\\Excel\\ExcelServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Maatwebsite\\Excel\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Patrick Brouwers",
+ "email": "patrick@spartner.nl"
+ }
+ ],
+ "description": "Supercharged Excel exports and imports in Laravel",
+ "keywords": [
+ "PHPExcel",
+ "batch",
+ "csv",
+ "excel",
+ "export",
+ "import",
+ "laravel",
+ "php",
+ "phpspreadsheet"
+ ],
+ "support": {
+ "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
+ "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.62"
+ },
+ "funding": [
+ {
+ "url": "https://laravel-excel.com/commercial-support",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/patrickbrouwers",
+ "type": "github"
+ }
+ ],
+ "time": "2025-01-04T12:14:36+00:00"
+ },
+ {
+ "name": "maennchen/zipstream-php",
+ "version": "3.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/maennchen/ZipStream-PHP.git",
+ "reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/aeadcf5c412332eb426c0f9b4485f6accba2a99f",
+ "reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "ext-zlib": "*",
+ "php-64bit": "^8.2"
+ },
+ "require-dev": {
+ "brianium/paratest": "^7.7",
+ "ext-zip": "*",
+ "friendsofphp/php-cs-fixer": "^3.16",
+ "guzzlehttp/guzzle": "^7.5",
+ "mikey179/vfsstream": "^1.6",
+ "php-coveralls/php-coveralls": "^2.5",
+ "phpunit/phpunit": "^11.0",
+ "vimeo/psalm": "^6.0"
+ },
+ "suggest": {
+ "guzzlehttp/psr7": "^2.4",
+ "psr/http-message": "^2.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "ZipStream\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paul Duncan",
+ "email": "pabs@pablotron.org"
+ },
+ {
+ "name": "Jonatan Männchen",
+ "email": "jonatan@maennchen.ch"
+ },
+ {
+ "name": "Jesse Donat",
+ "email": "donatj@gmail.com"
+ },
+ {
+ "name": "András Kolesár",
+ "email": "kolesar@kolesar.hu"
+ }
+ ],
+ "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
+ "keywords": [
+ "stream",
+ "zip"
+ ],
+ "support": {
+ "issues": "https://github.com/maennchen/ZipStream-PHP/issues",
+ "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/maennchen",
+ "type": "github"
+ }
+ ],
+ "time": "2025-01-27T12:07:53+00:00"
+ },
+ {
+ "name": "markbaker/complex",
+ "version": "3.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/MarkBaker/PHPComplex.git",
+ "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
+ "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
+ "phpcompatibility/php-compatibility": "^9.3",
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
+ "squizlabs/php_codesniffer": "^3.7"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Complex\\": "classes/src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mark Baker",
+ "email": "mark@lange.demon.co.uk"
+ }
+ ],
+ "description": "PHP Class for working with complex numbers",
+ "homepage": "https://github.com/MarkBaker/PHPComplex",
+ "keywords": [
+ "complex",
+ "mathematics"
+ ],
+ "support": {
+ "issues": "https://github.com/MarkBaker/PHPComplex/issues",
+ "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
+ },
+ "time": "2022-12-06T16:21:08+00:00"
+ },
+ {
+ "name": "markbaker/matrix",
+ "version": "3.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/MarkBaker/PHPMatrix.git",
+ "reference": "728434227fe21be27ff6d86621a1b13107a2562c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
+ "reference": "728434227fe21be27ff6d86621a1b13107a2562c",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
+ "phpcompatibility/php-compatibility": "^9.3",
+ "phpdocumentor/phpdocumentor": "2.*",
+ "phploc/phploc": "^4.0",
+ "phpmd/phpmd": "2.*",
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
+ "sebastian/phpcpd": "^4.0",
+ "squizlabs/php_codesniffer": "^3.7"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Matrix\\": "classes/src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mark Baker",
+ "email": "mark@demon-angel.eu"
+ }
+ ],
+ "description": "PHP Class for working with matrices",
+ "homepage": "https://github.com/MarkBaker/PHPMatrix",
+ "keywords": [
+ "mathematics",
+ "matrix",
+ "vector"
+ ],
+ "support": {
+ "issues": "https://github.com/MarkBaker/PHPMatrix/issues",
+ "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
+ },
+ "time": "2022-12-02T22:17:43+00:00"
+ },
{
"name": "monolog/monolog",
"version": "3.7.0",
@@ -2384,6 +2871,112 @@
],
"time": "2023-02-08T01:06:31+00:00"
},
+ {
+ "name": "phpoffice/phpspreadsheet",
+ "version": "1.29.10",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
+ "reference": "c80041b1628c4f18030407134fe88303661d4e4e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c80041b1628c4f18030407134fe88303661d4e4e",
+ "reference": "c80041b1628c4f18030407134fe88303661d4e4e",
+ "shasum": ""
+ },
+ "require": {
+ "composer/pcre": "^1||^2||^3",
+ "ext-ctype": "*",
+ "ext-dom": "*",
+ "ext-fileinfo": "*",
+ "ext-gd": "*",
+ "ext-iconv": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-simplexml": "*",
+ "ext-xml": "*",
+ "ext-xmlreader": "*",
+ "ext-xmlwriter": "*",
+ "ext-zip": "*",
+ "ext-zlib": "*",
+ "ezyang/htmlpurifier": "^4.15",
+ "maennchen/zipstream-php": "^2.1 || ^3.0",
+ "markbaker/complex": "^3.0",
+ "markbaker/matrix": "^3.0",
+ "php": "^7.4 || ^8.0",
+ "psr/http-client": "^1.0",
+ "psr/http-factory": "^1.0",
+ "psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "dev-main",
+ "dompdf/dompdf": "^1.0 || ^2.0 || ^3.0",
+ "friendsofphp/php-cs-fixer": "^3.2",
+ "mitoteam/jpgraph": "^10.3",
+ "mpdf/mpdf": "^8.1.1",
+ "phpcompatibility/php-compatibility": "^9.3",
+ "phpstan/phpstan": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^8.5 || ^9.0",
+ "squizlabs/php_codesniffer": "^3.7",
+ "tecnickcom/tcpdf": "^6.5"
+ },
+ "suggest": {
+ "dompdf/dompdf": "Option for rendering PDF with PDF Writer",
+ "ext-intl": "PHP Internationalization Functions",
+ "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
+ "mpdf/mpdf": "Option for rendering PDF with PDF Writer",
+ "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Maarten Balliauw",
+ "homepage": "https://blog.maartenballiauw.be"
+ },
+ {
+ "name": "Mark Baker",
+ "homepage": "https://markbakeruk.net"
+ },
+ {
+ "name": "Franck Lefevre",
+ "homepage": "https://rootslabs.net"
+ },
+ {
+ "name": "Erik Tilt"
+ },
+ {
+ "name": "Adrien Crivelli"
+ }
+ ],
+ "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
+ "homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
+ "keywords": [
+ "OpenXML",
+ "excel",
+ "gnumeric",
+ "ods",
+ "php",
+ "spreadsheet",
+ "xls",
+ "xlsx"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
+ "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.10"
+ },
+ "time": "2025-02-08T02:56:14+00:00"
+ },
{
"name": "phpoption/phpoption",
"version": "1.9.3",
diff --git a/database/migrations/2025_02_08_084944_add_admin_and_munaqosah_status_to_riwayats_table.php b/database/migrations/2025_02_08_084944_add_admin_and_munaqosah_status_to_riwayats_table.php
new file mode 100644
index 0000000..08dc5eb
--- /dev/null
+++ b/database/migrations/2025_02_08_084944_add_admin_and_munaqosah_status_to_riwayats_table.php
@@ -0,0 +1,24 @@
+unsignedBigInteger('admin_id')->nullable()->after('user_id');
+ $table->string('munaqosah_status')->nullable()->after('status');
+ // Jika perlu, tambahkan relasi foreign key
+ // $table->foreign('admin_id')->references('id')->on('users')->onDelete('set null');
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('riwayats', function (Blueprint $table) {
+ $table->dropColumn(['admin_id', 'munaqosah_status']);
+ });
+ }
+};
diff --git a/database/migrations/2025_02_08_140740_create_santris_table.php b/database/migrations/2025_02_08_140740_create_santris_table.php
new file mode 100644
index 0000000..827b9f6
--- /dev/null
+++ b/database/migrations/2025_02_08_140740_create_santris_table.php
@@ -0,0 +1,27 @@
+id();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('santris');
+ }
+};
diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php
index 0987db1..6ec0fd8 100644
--- a/database/seeders/UserSeeder.php
+++ b/database/seeders/UserSeeder.php
@@ -14,16 +14,16 @@ public function run()
User::create([
'name' => null, // admin tidak butuh name, boleh dikosongi
'nis' => null, // admin tidak butuh NIS
- 'email' => 'admin@example.com',
+ 'email' => 'muhammadfirdaus@gmail.com',
'password' => Hash::make('123456'), // password: 123456
'role' => 'admin'
]);
// Santri account
User::create([
- 'name' => 'Santri Testing',
- 'nis' => '12345',
- 'email' => 'santri@example.com',
+ 'name' => 'Zhaqian',
+ 'nis' => 'A13411',
+ 'email' => 'santri@gmail.com',
'password' => Hash::make('123456'), // password: 123456
'role' => 'santri',
'jenis_kelamin' => 'Laki-laki',
diff --git a/resources/views/pages/admin/add-admin.blade.php b/resources/views/pages/admin/add-admin.blade.php
index 2198c59..1f5d68e 100644
--- a/resources/views/pages/admin/add-admin.blade.php
+++ b/resources/views/pages/admin/add-admin.blade.php
@@ -22,7 +22,11 @@
Data Admin
-
+ @if(session('success'))
+
+ {{ session('success') }}
+
+ @endif
{{-- Tabel Admin --}}
@@ -37,16 +41,33 @@
{{ $index+1 }}
{{ $admin->email }}
-
-
-
+
+
+
+
+
@endforeach
@@ -56,6 +77,9 @@
href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/pages/admin/class-result.blade.php b/resources/views/pages/admin/class-result.blade.php
new file mode 100644
index 0000000..e69de29
diff --git a/resources/views/pages/admin/dashboard.blade.php b/resources/views/pages/admin/dashboard.blade.php
index 6a365b5..c47e1ac 100644
--- a/resources/views/pages/admin/dashboard.blade.php
+++ b/resources/views/pages/admin/dashboard.blade.php
@@ -17,11 +17,221 @@
@if(session('success'))
-
- {{ session('success') }}
+
+ {{ session('success') }}
+
+ @endif
+
+
+
+
+
+
+
+
+
Klasifikasi
+
+
+
+
+
+
+
+
+
+
+
- @endif
-
+
diff --git a/resources/views/pages/admin/data-santri.blade.php b/resources/views/pages/admin/data-santri.blade.php
index 1b77dd7..ea15d87 100644
--- a/resources/views/pages/admin/data-santri.blade.php
+++ b/resources/views/pages/admin/data-santri.blade.php
@@ -53,14 +53,76 @@
{{ number_format($item->nilai_n, 2) }}
{{ $item->status }}
-
- Verifikasi
-
+ @if($item->munaqosah_status === 'Sedang di Verifikasi')
+
+
+
+
+
+
+
+
+
+
+ Delete
+
+ @else
+
+ Selesai
+ @endif
@endforeach
+
+
+
+
+
+
+
Data Latih
+
+
+ Admin
+ Data Latih
+
+
+
+
+
+
+
+
+
+
Data Latih
+
+
+
+ Nama
+ Jenis Kelamin
+ NIS
+ Asal Daerah
+ Tahun Angkatan
+ Capaian Hadis
+ Capaian Al Qur'an
+ Status
+ Aksi
+
+
+
+ @foreach($data as $santri)
+
+ {{ $santri->nama }}
+ {{ $santri->jenis_kelamin }}
+ {{ $santri->nis }}
+ {{ $santri->asal_daerah }}
+ {{ $santri->tahun_angkatan }}
+ {{ $santri->capaian_hadis }}
+ {{ $santri->capaian_quran }}
+ {{ $santri->status }}
+
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/pages/admin/train-data.blade.php b/resources/views/pages/admin/train-data.blade.php
new file mode 100644
index 0000000..7d5e166
--- /dev/null
+++ b/resources/views/pages/admin/train-data.blade.php
@@ -0,0 +1,165 @@
+@extends('layouts.app-admin')
+
Data Munaqosah | SR Klasifikasi
+
+@section('content')
+
+
+
+
Munaqosah
+
+
+ Admin
+ Munaqosah Santri
+
+
+
+
+
+
+
+
+ @if(session('success'))
+
+ {{ session('success') }}
+
+ @endif
+
+
+
+
Munaqosah Santri
+
+
+
+
+
+ Nama Santri
+ Tanggal
+ Tahun Angkatan
+ Al-Qur'an Isi
+ Al-Hadis Isi
+ Nilai N
+ Status
+ Aksi
+
+
+
+ @foreach($riwayat as $item)
+
+ {{ $item->user->name ?? '—' }}
+ {{ $item->created_at->format('Y-m-d') }}
+ {{ $item->tahun_angkatan }}
+ {{ $item->alquran }}
+ {{ $item->alhadis }}
+ {{ number_format($item->nilai_n, 2) }}
+ {{ $item->status }}
+
+ @if($item->munaqosah_status === 'Sedang di Verifikasi')
+
+
+
+
+
+
+
+
+
+
+ Delete
+
+ @else
+
+ Selesai
+ @endif
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/pages/santri/counting.blade.php b/resources/views/pages/santri/counting.blade.php
index fd48611..80d1900 100644
--- a/resources/views/pages/santri/counting.blade.php
+++ b/resources/views/pages/santri/counting.blade.php
@@ -37,7 +37,7 @@
-@endsection
+@endsection
\ No newline at end of file
diff --git a/resources/views/pages/santri/dashboard.blade.php b/resources/views/pages/santri/dashboard.blade.php
index 6b18ea8..d961f81 100644
--- a/resources/views/pages/santri/dashboard.blade.php
+++ b/resources/views/pages/santri/dashboard.blade.php
@@ -40,31 +40,36 @@
-
-
-
-
Munaqosah | Status
-
-
-
-
-
- @if($latestRiwayat)
- @if($latestRiwayat->munaqosah_status === 'ditolak')
-
Munaqosah ditolak
- @elseif($latestRiwayat->munaqosah_status === 'verified')
-
Terverifikasi
- @else
-
Belum/Tidak Terverifikasi
- @endif
- @else
-
Belum ada data
- @endif
+
+
+
+
Munaqosah | Status
+
+
+
+
+
+ @if($latestRiwayat)
+ @if($latestRiwayat->munaqosah_status === 'Ditolak')
+
Ditolak
+ @elseif($latestRiwayat->munaqosah_status === 'Terverifikasi')
+
Terverifikasi
+
Tampilkan QR
+
+
Unduh PDF
+ @else
+
Belum Diverifikasi
+ @endif
+ @else
+
Belum ada data
+ @endif
+
+
+
+
-
-
@@ -197,4 +202,64 @@ function updateTime() {
setInterval(updateTime, 1000);
updateTime();
+
+
+
@endsection
\ No newline at end of file
diff --git a/resources/views/pages/santri/history.blade.php b/resources/views/pages/santri/history.blade.php
index 3f43dae..ffc3072 100644
--- a/resources/views/pages/santri/history.blade.php
+++ b/resources/views/pages/santri/history.blade.php
@@ -39,6 +39,7 @@
Al-Hadis Isi
Nilai N
Status
+
Review
Aksi
@@ -58,9 +59,19 @@
{{ $item->status }}
@endif
-
-
+ @if($item->munaqosah_status === 'Terverifikasi')
+ {{ $item->munaqosah_status }}
+ @elseif($item->munaqosah_status === null)
+ Belum Diverifikasi
+ @else
+ {{ $item->munaqosah_status }}
+ @endif
+
+
+
+
+
-
-
+
+ @if($loop->first)
+
Kirim
-
+
+ @endif
@endforeach
@@ -115,4 +128,45 @@ class="btn btn-primary btn-sm">
+
+
+
+
+
+
@endsection
\ No newline at end of file
diff --git a/resources/views/partial/sidebar-admin.blade.php b/resources/views/partial/sidebar-admin.blade.php
index 6ad83f8..5f6d61a 100644
--- a/resources/views/partial/sidebar-admin.blade.php
+++ b/resources/views/partial/sidebar-admin.blade.php
@@ -6,8 +6,9 @@
Menu
-
-
+
+
Dashboard
@@ -27,6 +28,38 @@
+
+
+
+ Kelola Santri
+
+
+
+
Klasifikasi
+
+
+
+
+ Data Latih
+
+
+
+
+
+
+ Data Uji
+
+
+
+
+
+
+ Hasil Klasifikasi
+
+
+
+
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 76dcd3b..5bfc3e2 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -6,6 +6,7 @@
use App\Http\Controllers\SantriController;
use App\Http\Controllers\HitungController;
use App\Http\Controllers\MunaqosahController;
+use App\Http\Controllers\ClassifiactionController;
/*
|--------------------------------------------------------------------------
| Web Routes
@@ -50,6 +51,8 @@
Route::get('/admin/add', [AdminController::class, 'index'])->name('admin.add');
Route::post('/admin/add', [AdminController::class, 'store'])->name('admin.store');
Route::delete('/admin/{id}', [AdminController::class, 'destroy'])->name('admin.delete');
+ Route::get('/admin/santri', [AdminController::class, 'showSantri'])->name('santri.add');
+ Route::delete('/admin/santri/{id}', [AdminController::class, 'destroySantri'])->name('santri.delete');
Route::get('/admin/changePassword', [AdminController::class, 'showChangePassword'])
->name('changePassword');
Route::post('/admin/changePassword', [AdminController::class, 'changePassword'])
@@ -57,8 +60,17 @@
Route::get('/admin/dataMunqosah', [MunaqosahController::class, 'showMunaqosah'])
->name('dataMunaqosah');
Route::get('/admin/dashboardAdmin', [AdminController::class, 'dashboard'])
- ->name('dashboardAdmin');
+ ->name('dashboardAdmin');
+ Route::post('/admin/munaqosah/{id}/verify', [MunaqosahController::class, 'verify'])
+ ->name('munaqosah.verify');
+ Route::post('/admin/munaqosah/{id}/reject', [MunaqosahController::class, 'reject'])
+ ->name('munaqosah.reject');
+ Route::delete('/admin/munaqosah/{id}', [MunaqosahController::class, 'destroy'])
+ ->name('munaqosah.destroy');
+ Route::get('/admin/examData', [ClassifiactionController::class, 'examData'])
+ ->name('examData');
+ Route::get('/admin/trainData', [ClassifiactionController::class, 'trainData'])
+ ->name('trainData');
+ Route::get('/admin/classificationResult', [ClassifiactionController::class, 'classificationResult'])
+ ->name('classificationResult');
});
-
-
-