diff --git a/app/Http/Controllers/layananPemutihanController.php b/app/Http/Controllers/layananPemutihanController.php
index e94cf53..c78e738 100644
--- a/app/Http/Controllers/layananPemutihanController.php
+++ b/app/Http/Controllers/layananPemutihanController.php
@@ -2,16 +2,44 @@
namespace App\Http\Controllers;
+use App\Models\PengajuanPemutihan;
use App\Models\User;
use Illuminate\Http\Request;
-class layananPemutihanController extends Controller
+class LayananPemutihanController extends Controller
{
+public function index(){
+ $data = PengajuanPemutihan::get();
+ return view('layanan-pemutihan.index',['title' => 'Pengajuan Pemutihan | Admin Dashboard','data' => $data]);
+}
+
public function tambah(){
$dosen = User::role('Dosen')->get();
-
- return view('layanan-pemutihan.tambah',['title'=> 'Pengajuan Pemutihan Kelas','dosen'=>$dosen]);
+ return view('layanan-pemutihan.tambah',['title' => 'Pengajuan Pemutihan','dosen' => $dosen]);
}
+public function store(Request $request){
+ $request->validate([
+ 'mata_kuliah'=>'required',
+ 'ruang_kelas'=>'required',
+ 'jurnal_kuliah'=>'required',
+ 'dosen_pengampu'=>'required|numeric',
+ 'program_studi'=>'required',
+ 'tanggal_kelas'=>'required|date',
+ 'jam_kelas'=>'required|date_format:H:i',
+ 'alasan'=>'required',
+ 'bukti_pemutihan'=>'required|mimes:pdf,jpg|max:4096',
+
+ ],[
+ 'dosen.numeric' => 'Dosen tidak valid, cek kembali Dosen yang dipilih',
+ 'tanggal_kelas.date' => 'Tanggal Tidak Valid, Cek kembali tanggal perkuliahan yang anda masukkan',
+ 'jam_kelas.date_format' => 'Jam tidak valid, cek kembali jam perkuliahan yang anda masukkan',
+ 'bukti_pemutihan.mimes' => 'Format File tidak berupa file JPG / PDF, cek kembali file anda',
+ 'bukti_pemutihan.max' => 'Ukuran File Anda lebih dari 4Mb, Cek Ulang File anda',
+ ]);
+
+
+ dd($request->all());
+}
}
diff --git a/app/Models/PengajuanPemutihan.php b/app/Models/PengajuanPemutihan.php
index e05a242..adf7006 100644
--- a/app/Models/PengajuanPemutihan.php
+++ b/app/Models/PengajuanPemutihan.php
@@ -8,4 +8,17 @@
class PengajuanPemutihan extends Model
{
use HasFactory;
+
+ protected $fillable = [
+ 'dosen_id',
+ 'program_studi',
+ 'mata_kuliah',
+ 'ruang_kelas',
+ 'tanggal_kelas',
+ 'jam_kelas',
+ 'jurnal_kuliah',
+ 'alasan',
+ 'keterangan',
+ 'bukti_izin_dosen',
+ ];
}
diff --git a/app/Models/RuangKelas.php b/app/Models/RuangKelas.php
deleted file mode 100644
index 3e9b409..0000000
--- a/app/Models/RuangKelas.php
+++ /dev/null
@@ -1,11 +0,0 @@
-id();
+ $table->string('caseid');
+ $table->unsignedBigInteger('dosen_id');
+ $table->string('program_studi');
+ $table->string('mata_kuliah');
+ $table->string('ruang_kelas');
+ $table->string('tanggal_kelas');
+ $table->string('jam_kelas');
+ $table->string('jurnal_kuliah');
+ $table->string('alasan');
+ $table->text('keterangan');
+ $table->string('bukti_izin_dosen');
+ $table->foreign('dosen_id')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
diff --git a/database/migrations/2024_04_04_125324_create_ruang_kelas_table.php b/database/migrations/2024_04_04_125324_create_ruang_kelas_table.php
deleted file mode 100644
index d0bdb6a..0000000
--- a/database/migrations/2024_04_04_125324_create_ruang_kelas_table.php
+++ /dev/null
@@ -1,27 +0,0 @@
-id();
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('ruang_kelas');
- }
-};
diff --git a/resources/views/layanan-pemutihan/index.blade.php b/resources/views/layanan-pemutihan/index.blade.php
new file mode 100644
index 0000000..baf872d
--- /dev/null
+++ b/resources/views/layanan-pemutihan/index.blade.php
@@ -0,0 +1,274 @@
+
+@extends('layout.app')
+
+@push('css')
+
+
+
+
+@endpush
+
+@section('content')
+
+@include('layout.navbars.sidebar')
+
+
+
+
+
+
+
+
+
+
+
Perhatian!
+ CaseID Akan muncul ketika pengajuan telah diterima untuk menghindari data duplikat untuk mahasiswa yang sama.
+
+ @if ($errors->any())
+
+
+ @foreach ($errors->all() as $error )
+ - {{ $error }}
+ @endforeach
+
+
+ @endif
+ @if(session('success'))
+
+
+ - {{ session('success') }}
+
+
+ @endif
+ @if(session('error'))
+
+
+ - {{ session('error') }}
+
+
+ @endif
+
+
+
+ CaseID |
+ NIM |
+ Nama |
+ DPU |
+ Action |
+
+
+
+ @foreach ($data as $datas)
+
+ {{ $datas->caseid }} |
+ {{ $datas->nim }} |
+ {{ $datas->nama }} |
+ {{ $datas->dpu_nama_gelar }} |
+
+ |
+ @if($datas->ttd_operator=="-")
+ |
+
+ @endif
+ |
+
+
+
+
+
+
+
+
+
+
+
+
Klik Disini
+
+
+
+
+
+
+
+
Klik Disini
+
+
+
+
Klik Disini
+
+
+
+ @if($datas->ttd_operator != '-')
+
+
+
+
+
+
+
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Perhatian!
+ Alasan yang Dimasukkan Disini, Akan dikirimkan melalui Email Kepada Mahasiswa Terkait.
+
+
+
+
+
+
+
+
+ @endforeach
+
+
+
+ CaseID |
+ NIM |
+ DPU |
+ DPA |
+ Action |
+
+
+
+
+
+
+
+
+
+
+@endsection
+
+
+@push('js')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endpush
+
diff --git a/resources/views/layanan-pemutihan/tambah.blade.php b/resources/views/layanan-pemutihan/tambah.blade.php
index bfb18e2..562bbd2 100644
--- a/resources/views/layanan-pemutihan/tambah.blade.php
+++ b/resources/views/layanan-pemutihan/tambah.blade.php
@@ -35,50 +35,52 @@
@endif
-