diff --git a/app/Http/Controllers/LayananPengajuanDpuDpaController.php b/app/Http/Controllers/LayananPengajuanDpuDpaController.php
index 342adf0..3ee411a 100644
--- a/app/Http/Controllers/LayananPengajuanDpuDpaController.php
+++ b/app/Http/Controllers/LayananPengajuanDpuDpaController.php
@@ -2,15 +2,21 @@
namespace App\Http\Controllers;
+use App\Jobs\layananPengajuanDpuDpaJob;
+
use App\Models\Mahasiswa;
use App\Models\PengajuanDpuDpa;
use App\Models\User;
+use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
+use PhpParser\Node\Expr\Cast\Object_;
+use Spatie\Permission\Models\Role;
class LayananPengajuanDpuDpaController extends Controller
{
+//done
public function index(){
$data = PengajuanDpuDpa::
select('pengajuan_dpu_dpas.*',
@@ -25,10 +31,54 @@ public function index(){
->get();
return view('layanan-dpudpa.index',['title' => 'Pengajuan DPU/DPA | Admin Dashboard','data' => $data]);
}
+//done
public function tambah(){
$dosen = User::role('Dosen')->get();
return view('layanan-dpudpa.tambah',['dosen'=>$dosen]);
}
+
+//done
+public function terima(Request $request){
+ $id = $request->id;
+ $countcaseid = PengajuanDpuDpa::where('updated_at','<=',Carbon::today())->count();
+ $caseid = "LS".date_format(date_create(),"ymd").$countcaseid+1;
+
+ $cekData = PengajuanDpuDpa::where('caseid',$caseid)->first();
+ $data = PengajuanDpuDpa::where('id',$id)->first();
+ //cek apakah ada caseid yang sama sebelum disave
+ if(!is_null($cekData)){
+ $data->updated_at = Carbon::now();
+ $data->save();
+ return redirect()->route('layanan-dpudpa.index')->with('error','Gagal simpan Data, Cek kembali Detail Data yang akan diterima');
+ }
+ //save CASEID dan kirim email
+
+ $data->caseid = $caseid;
+ $data->ttd_operator = Carbon::now();
+ if($data->save()){
+ $data_job = [
+ [
+ 'jenis' => 'mahasiswa',
+ 'id' => $id,
+ ],
+ [
+ 'jenis' => 'dpu',
+ 'id' => $id,
+ ],
+ [
+ 'jenis' => 'dpa',
+ 'id' => $id,
+ ],
+ ];
+ foreach($data_job as $item){
+ dispatch(new layananPengajuanDpuDpaJob($item));
+ }
+ return redirect()->route('layanan-dpudpa.index')->with('success','Data Berhasil Disimpan, Email Akan Dikirimkan ke Mahasiswa, DPU dan DPA');
+ }
+
+}
+
+//done
public function store(Request $request){
$request->validate([
@@ -52,41 +102,202 @@ public function store(Request $request){
'file_transkrip.mimes'=>'Format File Bukan PDF, Cek Ulang file anda',
'file_transkrip.max'=>'Ukuran File Anda lebih dari 4Mb, Cek Ulang File anda',
]);
+ //Cek Apakah Data Mahasiswa Tersebut sudah ada, jika ada maka diminta untuk menggunakan fitur cari
+ $mahasiswas_id = Mahasiswa::where('nim',$request->nim)->first();
+ if(!is_null($mahasiswas_id)){
+ return redirect()->route('layanan-dpudpa.tambah')->with('error','Data Anda Sudah Ada, Gunakan Fitur Cari');
+ }
+ $data_mhs['nim'] = $request->nim;
+ $data_mhs['nama'] = $request->nama;
+ $data_mhs['nomor_hp'] = $request->nomor_hp;
+ $data_mhs['email'] = $request->email;
+ $data_mhs['judul_seminar_proposal'] = $request->judul_seminar_proposal;
+ $data_mhs['bagian'] = $request->bagian;
+ $data_mhs['dosen_dpu_id'] = $request->dosen_dpu;
+ $data_mhs['dosen_dpa_id'] = $request->dosen_dpa;
+ //set default to 0
+ $data_mhs['dosen_penguji1_id'] = 1;
+ $data_mhs['dosen_penguji2_id'] = 1;
+ $data_mhs['judul_skripsi_id'] = '-';
+ $data_mhs['judul_skripsi_en'] = '-';
+ $data_mhs['judul_jurnal'] = '-';
+ $data_mhs['judul_artikel'] = '-';
+
+ //set penyimpanan file
$file_transkrip = $request->file('file_transkrip');
$file_transkrip_name = 'LS_'.str_replace(' ', '_',$file_transkrip->getClientOriginalName());
$path = $request->nim.'/'.$file_transkrip_name;
- //jika berhasil save file maka data mhs akan disimpan, dan pengajuan akan diisi
- if(Storage::disk('public')->put($path, file_get_contents($file_transkrip))){
-
- $data_mhs['nim'] = $request->nim;
- $data_mhs['nama'] = $request->nama;
- $data_mhs['nomor_hp'] = $request->nomor_hp;
- $data_mhs['email'] = $request->email;
- $data_mhs['judul_seminar_proposal'] = $request->judul_seminar_proposal;
- $data_mhs['bagian'] = $request->bagian;
- $data_mhs['dosen_dpu_id'] = $request->dosen_dpu;
- $data_mhs['dosen_dpa_id'] = $request->dosen_dpa;
-
- //set default to -
- $data_mhs['dosen_penguji1_id'] = 1;
- $data_mhs['dosen_penguji2_id'] = 1;
- $data_mhs['judul_skripsi_id'] = '-';
- $data_mhs['judul_skripsi_en'] = '-';
- $data_mhs['judul_jurnal'] = '-';
- $data_mhs['judul_artikel'] = '-';
-
-
- if(Mahasiswa::create($data_mhs)){
- $mahasiswas_id = Mahasiswa::where('nim',$request->nim)->first();
- $data_dpudpa['mahasiswas_id'] = $mahasiswas_id->id;
- $data_dpudpa['bukti_transkrip_nilai'] = $file_transkrip_name;
- PengajuanDpuDpa::create($data_dpudpa);
- return redirect()->route('layanan-dpudpa.tambah')->with('success','Sukses Tambah Data, Silahkan Menunggu Email Konfirmasi setelah disetujui Oleh Operator');
- }
- return redirect()->route('layanan-dpudpa.tambah')->with('error','Gagal Tambah data, Cek kembali data yang anda masukkan');
+ //jika berhasil save file dan save data mhs maka pengajuan akan diisi
+ if(Storage::disk('public')->put($path, file_get_contents($file_transkrip)) && Mahasiswa::create($data_mhs)){
+ $mahasiswas_id = Mahasiswa::where('nim',$request->nim)->first();
+ $data_dpudpa['mahasiswas_id'] = $mahasiswas_id->id;
+ $data_dpudpa['bukti_transkrip_nilai'] = $file_transkrip_name;
+ PengajuanDpuDpa::create($data_dpudpa);
+ return redirect()->route('layanan-dpudpa.tambah')->with('success','Sukses Tambah Data, Silahkan Menunggu Email Konfirmasi setelah disetujui Oleh Operator');
+ }
+ return redirect()->route('layanan-dpudpa.tambah')->with('error','Gagal Tambah data, Cek kembali data yang anda masukkan');
+}
+
+//done
+public function destroy(Request $request){
+ $id = $request->id;
+ //cari data dan kirim notif sebelum dihapus
+ $data = PengajuanDpuDpa::where('pengajuan_dpu_dpas.id',$id)
+ ->join('mahasiswas','mahasiswas_id','=','mahasiswas.id')
+ ->first();
+ $data_job = [
+ 'jenis' => 'penolakan',
+ 'nama' => $data->nama,
+ 'email' => $data->email,
+ 'created_at' => $data->created_at,
+ 'alasan' => $request->alasan,
+ ];
+ $path = $data->nim."/".$data->bukti_transkrip_nilai;
+ //hapus file yang diupload mahasiswa
+ if(Storage::disk('public')->exists($path)){
+ Storage::disk('public')->delete($path);
+ //hapus data pengajuan mahasiswa
+ return redirect()->route('layanan-dpudpa.index')->with('error','Gagal Hapus Data, File Mahasiswa Yang akan dihapus tidak ditemukan');
+ }
+ $dataDelete = PengajuanDpuDpa::findOrFail($id);
+
+ //kirim notifikasi jika data berhasil dihapus
+ if($dataDelete->delete()){
+ dispatch(new layananPengajuanDpuDpaJob($data_job));
+ return redirect()->route('layanan-dpudpa.index')->with('success','Permintaan Sudah Diproses, Email akan segera dikirim ke penerima');
+ }
+ return redirect()->route('layanan-dpudpa.index')->with('error','Gagal Hapus Data, coba cek data yang akan dihapus lalu coba lagi!');
+}
+
+public function ettd($url, $caseid){
+ $role_untuk_ettd = ['dpu','dpa','kombi'];
+ $data = PengajuanDpuDpa::where('caseid','=',$caseid)
+ ->select('pengajuan_dpu_dpas.id',
+ 'pengajuan_dpu_dpas.caseid',
+ 'mahasiswas.nama',
+ 'mahasiswas.nim',
+ 'mahasiswas.judul_seminar_proposal',
+ 'dosen_dpu.nama_gelar as dosen_dpu_nama_gelar',
+ 'dosen_dpa.nama_gelar as dosen_dpa_nama_gelar',
+ )
+ ->join('mahasiswas','pengajuan_dpu_dpas.mahasiswas_id','=','mahasiswas.id')
+ ->join('users as dosen_dpu','mahasiswas.dosen_dpu_id','=','dosen_dpu.id')
+ ->join('users as dosen_dpa','mahasiswas.dosen_dpa_id','=','dosen_dpa.id')
+ ->first();
+ if(in_array($url, $role_untuk_ettd) && !is_null($data)){
+ //jika URL DPU maka render ini
+ if($url=='dpu'){
+ $jenis = 'Dosen Pembimbing Utama';
+ return view('layanan-dpudpa.ettd',['title'=> 'INPUT E-Signature','jenis'=>$jenis,'data'=> $data]);
+ }
+ //jika URL DPA maka render ini
+ elseif($url=='dpa'){
+ $jenis = 'Dosen Pembimbing Anggota';
+ return view('layanan-dpudpa.ettd',['title'=> 'INPUT E-Signature','jenis'=>$jenis,'data'=> $data]);
+ }
+ //jika URL Kombi maka render ini
+ elseif($url=='kombi'){
+ $jenis = 'Komisi Bimbingan';
+ $kombiRole = Role::findByName('Ketua Kombi')->users;
+ $dataKombi = [
+ 'caseid' => $data->caseid,
+ 'nama' => $data->nama,
+ 'nim' => $data->nim,
+ 'judul_seminar_proposal' => $data->judul_seminar_proposal,
+ 'dosen_kombi_nama_gelar' => $kombiRole[0]->nama_gelar,
+
+ ];
+ $jenis = 'Komisi Bimbingan';
+ return view('layanan-dpudpa.ettd',['title'=> 'INPUT E-Signature','jenis'=>$jenis,'data'=> $dataKombi]);
+ }
+ }
+ //jika URL tidak diantara ketika itu maka render ini
+ return redirect()->route('laman-awal')->with(['error'=>'Invalid CASEID, Atau CaseID Tidak Ditemukan']);
+
+}
+public function submitettd($url, $caseid, Request $request){
+ $role_untuk_ettd = ['dpu','dpa','kombi'];
+ $data = PengajuanDpuDpa::where('caseid','=',$caseid)->first();
+ if(in_array($url, $role_untuk_ettd) && !is_null($data)){
+ //jika URL DPU maka render ini
+ if($url=='dpu'){
+ //jika sudah pernah ETTD Akan Dikembalikan Ke laman TTD Dengan error
+ if($data->ttd_dpu!='-'){
+ return redirect()->route('layanan-dpudpa.ettd',['url'=>$url, 'caseid'=>$caseid])->with(['error'=>'CaseID Ini Sudah Pernah Anda Tandatangani Pada '.$data->ttd_dpu]);
+ }
+ //ambil data ETTD sesuai url
+ $ttd = Mahasiswa::where('nim',$request->nim)->join('users as dosen_dpu','mahasiswas.dosen_dpu_id','=','dosen_dpu.id')->first();
+ //jika Belum Pernah maka TTD akan diproses
+ if($ttd->ettd==$request->ettd){
+ $data->ttd_dpu = Carbon::now();
+ $data->save();
+ $this->cek_dpa_dpu($caseid);
+ return redirect()->route('laman-awal')->with(['success'=>'Terimakasih Telah Melakukan Tanda Tangan']);
+ }
+ //jika ETTD Tidak sesuai Akan Dikembalikan Ke laman TTD Dengan error
+ else{
+ return redirect()->route('layanan-dpudpa.ettd',['url'=>$url, 'caseid'=>$caseid])->with(['error'=>'E-TTD Tidak Sesuai, Cek Kembali ETTD Anda']);
+ }
+ }
+ //jika URL DPa maka render ini
+ if($url=='dpa'){
+ //jika sudah pernah ETTD Akan Dikembalikan Ke laman TTD Dengan error
+ if($data->ttd_dpa!='-'){
+ return redirect()->route('layanan-dpudpa.ettd',['url'=>$url, 'caseid'=>$caseid])->with(['error'=>'CaseID Ini Sudah Pernah Anda Tandatangani Pada '.$data->ttd_dpa]);
+ }
+ //ambil data ETTD sesuai url
+ $ttd = Mahasiswa::where('nim',$request->nim)->join('users as dosen_dpa','mahasiswas.dosen_dpa_id','=','dosen_dpa.id')->first();
+ //jika Belum Pernah maka TTD akan diproses
+ if($ttd->ettd==$request->ettd){
+ $data->ttd_dpa = Carbon::now();
+ $data->save();
+ $this->cek_dpa_dpu($caseid);
+ return redirect()->route('laman-awal')->with(['success'=>'Terimakasih Telah Melakukan Tanda Tangan']);
+ }
+ //jika ETTD Tidak sesuai Akan Dikembalikan Ke laman TTD Dengan error
+ else{
+ return redirect()->route('layanan-dpudpa.ettd',['url'=>$url, 'caseid'=>$caseid])->with(['error'=>'E-TTD Tidak Sesuai, Cek Kembali ETTD Anda']);
+ }
+ }
+ //jika URL Kombi maka render ini
+ if($url=='kombi'){
+ //jika sudah pernah ETTD Akan Dikembalikan Ke laman TTD Dengan error
+ if($data->ttd_kombi!='-'){
+ return redirect()->route('layanan-dpudpa.ettd',['url'=>$url, 'caseid'=>$caseid])->with(['error'=>'CaseID Ini Sudah Pernah Anda Tandatangani Pada '.$data->ttd_kombi]);
+ }
+ //ambil data ETTD sesuai url
+ $ttd = Role::findByName('Ketua Kombi')->users;
+ //jika Belum Pernah maka TTD akan diproses
+ if($ttd[0]->ettd==$request->ettd){
+ $data->ttd_kombi = Carbon::now();
+ $data->save();
+ $data = [
+ 'jenis' => 'mahasiswa selesai',
+ 'id' => $data->id,
+ ];
+ dispatch(new layananPengajuanDpuDpaJob($data));
+ return redirect()->route('laman-awal')->with(['success'=>'Terimakasih Telah Melakukan Tanda Tangan']);
+ }
+ //jika ETTD Tidak sesuai Akan Dikembalikan Ke laman TTD Dengan error
+ else{
+ return redirect()->route('layanan-dpudpa.ettd',['url'=>$url, 'caseid'=>$caseid])->with(['error'=>'E-TTD Tidak Sesuai, Cek Kembali ETTD Anda']);
+ }
+ }
+ }
+}
+//cek apakah DPU dan DPU sudah Tanda tangan, jika sudah maka akan mengirim notifikasi ke Kombi
+private function cek_dpa_dpu($caseid){
+ $status = PengajuanDpuDpa::where('caseid',$caseid)
+ ->select('id','ttd_dpu','ttd_dpa')
+ ->first();
+ if($status->ttd_dpu!='-' && $status->ttd_dpa!='-'){
+ $data = [
+ 'jenis' => 'kombi',
+ 'id' => $status->id,
+ ];
+ dispatch(new layananPengajuanDpuDpaJob($data));
}
- return redirect()->route('layanan-dpudpa.tambah')->with('error','Gagal Tambah data, Cek kembali data yang anda masukkan');
}
}
diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php
index bdb87e0..b4743fc 100644
--- a/app/Http/Controllers/UserController.php
+++ b/app/Http/Controllers/UserController.php
@@ -99,7 +99,7 @@ public function userroles_index(){
public function userroles_store(Request $request){
$user_roles = new Role;
- $user_roles->nama = $request->role_name;
+ $user_roles->name = $request->role_name;
if($user_roles->save()){
return redirect()->route('users-roles.index')->with('success','Data Telah Berhasil Disimpan');
diff --git a/app/Jobs/layananPengajuanDpuDpaJob.php b/app/Jobs/layananPengajuanDpuDpaJob.php
new file mode 100644
index 0000000..2cec5fd
--- /dev/null
+++ b/app/Jobs/layananPengajuanDpuDpaJob.php
@@ -0,0 +1,94 @@
+data = $data;
+ }
+
+ /**
+ * Execute the job.
+ */
+ public function handle(): void
+ {
+ if($this->data['jenis']==="penolakan"){
+ $text = "BETA\n".
+ "Penolakan Pengajuan Mahasiswa: ".$this->data['nama']."\n".
+ "Dengan Email : ".$this->data['email']."\n\n".
+ "Alasan : ".$this->data['alasan'];
+ Curl::to('https://api.telegram.org/bot6161516511:AAGZhf_o31HupIogjUbEgvwjukes-3P3zPo/sendMessage')
+ ->withData( array( 'chat_id' => '-1001903808078', 'text' => $text, 'parse_mode' => 'Markdown') )
+ ->get();
+ }
+ elseif($this->data['jenis'] == 'dpu'){
+ $data = PengajuanDpuDpa::where('pengajuan_dpu_dpas.id',$this->data['id'])->select('mahasiswas.nama','mahasiswas.nim','mahasiswas.judul_seminar_proposal','mahasiswas.dosen_dpu_id','users.nama_gelar','users.email')->join('mahasiswas','mahasiswas.id','=','mahasiswas_id')->join('users','users.id','=','dosen_dpu_id')->first();
+ $text = "BETA\n".
+ "Kirim Pengajuan A/N Mahasiswa: ".$data->nama."\n".
+ "Kepada DPU : ".$data->nama_gelar."\n\n".
+ "Alamat Email : ".$data->email;
+ Curl::to('https://api.telegram.org/bot6161516511:AAGZhf_o31HupIogjUbEgvwjukes-3P3zPo/sendMessage')
+ ->withData( array( 'chat_id' => '-1001903808078', 'text' => $text, 'parse_mode' => 'Markdown') )
+ ->get();
+ }
+ elseif($this->data['jenis'] == 'dpa'){
+ $data = PengajuanDpuDpa::where('pengajuan_dpu_dpas.id',$this->data['id'])->select('mahasiswas.nama','mahasiswas.nim','mahasiswas.judul_seminar_proposal','mahasiswas.dosen_dpa_id','users.nama_gelar','users.email')->join('mahasiswas','mahasiswas.id','=','mahasiswas_id')->join('users','users.id','=','dosen_dpa_id')->first();
+ $text = "BETA\n".
+ "Kirim Pengajuan A/N Mahasiswa: ".$data->nama."\n".
+ "Kepada DPA : ".$data->nama_gelar."\n\n".
+ "Alamat Email : ".$data->email;
+ Curl::to('https://api.telegram.org/bot6161516511:AAGZhf_o31HupIogjUbEgvwjukes-3P3zPo/sendMessage')
+ ->withData( array( 'chat_id' => '-1001903808078', 'text' => $text, 'parse_mode' => 'Markdown') )
+ ->get();
+ }
+ elseif($this->data['jenis'] == 'kombi'){
+ $kombiRole = Role::findByName('Ketua Kombi')->users;
+ $data = PengajuanDpuDpa::where('pengajuan_dpu_dpas.id',$this->data['id'])->select('mahasiswas.nama','mahasiswas.nim','mahasiswas.judul_seminar_proposal')->join('mahasiswas','mahasiswas.id','=','mahasiswas_id')->first();
+ $text = "BETA\n".
+ "Kirim Pengajuan A/N Mahasiswa: ".$data->nama."\n".
+ "Kepada Komisi Bimbingan : ".$kombiRole[0]->nama_gelar."\n\n".
+ "Alamat Email : ".$kombiRole[0]->email;
+ Curl::to('https://api.telegram.org/bot6161516511:AAGZhf_o31HupIogjUbEgvwjukes-3P3zPo/sendMessage')
+ ->withData( array( 'chat_id' => '-1001903808078', 'text' => $text, 'parse_mode' => 'Markdown') )
+ ->get();
+ }
+ elseif($this->data['jenis'] == 'mahasiswa'){
+ $data = PengajuanDpuDpa::where('pengajuan_dpu_dpas.id',$this->data['id'])->select('mahasiswas.nama','mahasiswas.nim','mahasiswas.judul_seminar_proposal','mahasiswas.email')->join('mahasiswas','mahasiswas.id','=','mahasiswas_id')->first();
+ $text = "BETA\n".
+ "Kirim Pengajuan A/N Mahasiswa: ".$data->nama."\n".
+ "Kepada Mahasiswa : ".$data->nama."\n\n".
+ "Alamat Email : ".$data->email;
+ Curl::to('https://api.telegram.org/bot6161516511:AAGZhf_o31HupIogjUbEgvwjukes-3P3zPo/sendMessage')
+ ->withData( array( 'chat_id' => '-1001903808078', 'text' => $text, 'parse_mode' => 'Markdown') )
+ ->get();
+ }
+ elseif($this->data['jenis'] == 'mahasiswa selesai'){
+ $data = PengajuanDpuDpa::where('pengajuan_dpu_dpas.id',$this->data['id'])->select('mahasiswas.nama','mahasiswas.nim','mahasiswas.judul_seminar_proposal','mahasiswas.email')->join('mahasiswas','mahasiswas.id','=','mahasiswas_id')->first();
+ $text = "BETA\n".
+ "Kirim Notifikasi Pengajuan Selesai A/N Mahasiswa: ".$data->nama."\n".
+ "Kepada Mahasiswa : ".$data->nama."\n\n".
+ "Alamat Email : ".$data->email;
+ Curl::to('https://api.telegram.org/bot6161516511:AAGZhf_o31HupIogjUbEgvwjukes-3P3zPo/sendMessage')
+ ->withData( array( 'chat_id' => '-1001903808078', 'text' => $text, 'parse_mode' => 'Markdown') )
+ ->get();
+ }
+
+ }
+}
diff --git a/composer.json b/composer.json
index e18c53c..a8fdd8c 100644
--- a/composer.json
+++ b/composer.json
@@ -8,6 +8,7 @@
"php": "^8.1",
"barryvdh/laravel-debugbar": "^3.10",
"guzzlehttp/guzzle": "^7.2",
+ "ixudra/curl": "^6.22",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
diff --git a/composer.lock b/composer.lock
index 8743d21..1c97cc7 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": "8ea36d387a8498c6177a03aae1a59e91",
+ "content-hash": "87ff4862c07e8d4eb3091ca090ed4ac9",
"packages": [
{
"name": "barryvdh/laravel-debugbar",
@@ -1129,6 +1129,64 @@
],
"time": "2023-12-03T19:50:20+00:00"
},
+ {
+ "name": "ixudra/curl",
+ "version": "6.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ixudra/curl.git",
+ "reference": "0b2cc89ed5eb91d617295e7e745f3acd3ab47180"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ixudra/curl/zipball/0b2cc89ed5eb91d617295e7e745f3acd3ab47180",
+ "reference": "0b2cc89ed5eb91d617295e7e745f3acd3ab47180",
+ "shasum": ""
+ },
+ "require": {
+ "ext-curl": "*",
+ "illuminate/support": ">=4.0",
+ "php": ">=5.4.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Ixudra\\Curl\\CurlServiceProvider"
+ ],
+ "aliases": {
+ "Curl": "Ixudra\\Curl\\Facades\\Curl"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Ixudra\\Curl\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jan Oris",
+ "email": "jan.oris@ixudra.be"
+ }
+ ],
+ "description": "Custom PHP Curl library for the Laravel framework - developed by Ixudra",
+ "homepage": "http://ixudra.be",
+ "keywords": [
+ "Ixudra",
+ "curl",
+ "laravel"
+ ],
+ "support": {
+ "issues": "https://github.com/ixudra/curl/issues",
+ "source": "https://github.com/ixudra/curl/tree/6.22.1"
+ },
+ "time": "2022-07-31T09:58:52+00:00"
+ },
{
"name": "laravel/framework",
"version": "v10.43.0",
@@ -8385,5 +8443,5 @@
"php": "^8.1"
},
"platform-dev": [],
- "plugin-api-version": "2.6.0"
+ "plugin-api-version": "2.2.0"
}
diff --git a/config/app.php b/config/app.php
index be60792..477f1df 100644
--- a/config/app.php
+++ b/config/app.php
@@ -70,7 +70,7 @@
|
*/
- 'timezone' => 'UTC',
+ 'timezone' => 'Asia/Jakarta',
/*
|--------------------------------------------------------------------------
diff --git a/database/seeders/MahasiswaSeeder.php b/database/seeders/MahasiswaSeeder.php
new file mode 100644
index 0000000..2f7a59c
--- /dev/null
+++ b/database/seeders/MahasiswaSeeder.php
@@ -0,0 +1,20 @@
+insert([
+ // 'name' => Str::random(10),
+ // 'email' => Str::random(10).'@example.com',
+ // ]);
+ }
+}
diff --git a/database/seeders/UserRoleSeeder.php b/database/seeders/UserRoleSeeder.php
index 21bf35b..d0062d0 100644
--- a/database/seeders/UserRoleSeeder.php
+++ b/database/seeders/UserRoleSeeder.php
@@ -18,8 +18,17 @@ public function run(): void
['name'=> 'Super Administrator'],
['name'=> 'Super Administrator'],
);
- ModelsRole::create(['name'=> 'Tenaga Kependidikan']);
- ModelsRole::create(['name'=> 'Dosen']);
- ModelsRole::create(['name'=> 'Operator Akademik']);
+ ModelsRole::updateOrCreate(
+ ['name'=> 'Tenaga Kependidikan'],
+ ['name'=> 'Tenaga Kependidikan']
+ );
+ ModelsRole::updateOrCreate(
+ ['name'=> 'Dosen'],
+ ['name'=> 'Dosen']
+ );
+ ModelsRole::updateOrCreate(
+ ['name'=> 'Operator Akademik'],
+ ['name'=> 'Operator Akademik']
+ );
}
}
diff --git a/resources/views/layanan-dpudpa/ettd.blade.php b/resources/views/layanan-dpudpa/ettd.blade.php
new file mode 100644
index 0000000..33b62fa
--- /dev/null
+++ b/resources/views/layanan-dpudpa/ettd.blade.php
@@ -0,0 +1,171 @@
+
+
+
+
+
+ {{ $title }}
+
+
+
+
+
+
+
+
+ @if($jenis!="Komisi Bimbingan")
+
+ @elseif($jenis=="Komisi Bimbingan")
+
+ @endif
+
+
+
+@include('layout.navbars.footer')
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/views/layanan-dpudpa/index.blade.php b/resources/views/layanan-dpudpa/index.blade.php
index d0e9afe..7b7509d 100644
--- a/resources/views/layanan-dpudpa/index.blade.php
+++ b/resources/views/layanan-dpudpa/index.blade.php
@@ -38,6 +38,29 @@
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
@@ -55,8 +78,14 @@
{{ $datas->nim }} |
{{ $datas->dpu_nama_gelar }} |
{{ $datas->dpa_nama_gelar }} |
- | | |
+
+ |
+ @if($datas->ttd_operator=="-")
+ |
+ @endif
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Perhatian!
+ Alasan yang Dimasukkan Disini, Akan dikirimkan melalui Email Kepada Mahasiswa Terkait.
+
+
+
diff --git a/resources/views/layout/navbars/footer.blade.php b/resources/views/layout/navbars/footer.blade.php
index f785347..9d19e30 100644
--- a/resources/views/layout/navbars/footer.blade.php
+++ b/resources/views/layout/navbars/footer.blade.php
@@ -3,5 +3,5 @@
Version 3.2.0
-
Copyright © 2014-2021 AdminLTE.io. All rights reserved.
+
Copyright © 2014-2021 AdminLTE.io | tes. All rights reserved.
diff --git a/routes/web.php b/routes/web.php
index 9f51ce1..589de7b 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -20,39 +20,46 @@
|
*/
-Route::get('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'tambah'])->name('layanan-dpudpa.tambah');
-Route::post('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'store'])->name('layanan-dpudpa.store');
-
-
Route::middleware(['guest'])->group(function () {
route::get('/admin/login',[SesiLoginController::class, 'login'])->name('login');
- route::post('/admin/login',[SesiLoginController::class, 'ceklogin'])->name('admin.ceklogin');
-
-
+ route::post('/admin/login',[SesiLoginController::class, 'ceklogin'])->name('admin.ceklogin');
});
+route::get('/', function(){
+ return "PROGRESS";
+})->name('laman-awal');
+
Route::get('/home', function(){
return redirect('/admin');
});
-Route::middleware(['auth'])->group( function () {
- Route::get('/admin', [AdminController::class, 'index'])->name('admin.dashboard');
- Route::get('/admin/logout', [SesiLoginController::class, 'logout'])->name('admin.logout');
- Route::get('/admin/layanan-dpudpa', [LayananPengajuanDpuDpaController::class, 'index'])->name('layanan-dpudpa.index');
+Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
+ Route::get('/', [AdminController::class, 'index'])->name('admin.dashboard');
+ Route::get('/logout', [SesiLoginController::class, 'logout'])->name('admin.logout');
+ //layanan Pengajuan DPU DPA
+ Route::get('/layanan-dpudpa', [LayananPengajuanDpuDpaController::class, 'index'])->name('layanan-dpudpa.index');
+ Route::DELETE('/layanan-dpudpa', [LayananPengajuanDpuDpaController::class, 'destroy'])->name('layanan-dpudpa.destroy');
+ Route::POST('/layanan-dpudpa', [LayananPengajuanDpuDpaController::class, 'terima'])->name('layanan-dpudpa.terima');
+
//User
- Route::get('/admin/users', [UserController::class, 'index'])->name('users.index');
- Route::POST('/admin/users', [UserController::class, 'store'])->name('users.store');
- Route::PUT('/admin/users', [UserController::class, 'update'])->name('users.update');
- Route::DELETE('/admin/users', [UserController::class, 'destroy'])->name('users.destroy');
+ Route::get('/users', [UserController::class, 'index'])->name('users.index');
+ Route::POST('/users', [UserController::class, 'store'])->name('users.store');
+ Route::PUT('/users', [UserController::class, 'update'])->name('users.update');
+ Route::DELETE('/users', [UserController::class, 'destroy'])->name('users.destroy');
//Mahasiswa
- Route::get('/admin/mahasiswa', [MahasiswaController::class, 'index'])->name('mahasiswa.index');
- Route::POST('/admin/mahasiswa', [MahasiswaController::class, 'store'])->name('mahasiswa.store');
- Route::PUT('/admin/mahasiswa', [MahasiswaController::class, 'update'])->name('mahasiswa.update');
- Route::DELETE('/admin/mahasiswa', [MahasiswaController::class, 'destroy'])->name('mahasiswa.destroy');
+ Route::get('/mahasiswa', [MahasiswaController::class, 'index'])->name('mahasiswa.index');
+ Route::POST('/mahasiswa', [MahasiswaController::class, 'store'])->name('mahasiswa.store');
+ Route::PUT('/mahasiswa', [MahasiswaController::class, 'update'])->name('mahasiswa.update');
+ Route::DELETE('/mahasiswa', [MahasiswaController::class, 'destroy'])->name('mahasiswa.destroy');
//User Roles
- Route::get('/admin/users-roles', [UserController::class, 'userroles_index'])->name('users-roles.index');
- Route::POST('/admin/users-roles', [UserController::class, 'userroles_store'])->name('users-roles.store');
- Route::POST('/admin/users-roles/assign', [UserController::class, 'userroles_assign'])->name('users-roles.assign');
+ Route::get('/users-roles', [UserController::class, 'userroles_index'])->name('users-roles.index');
+ Route::POST('/users-roles', [UserController::class, 'userroles_store'])->name('users-roles.store');
+ Route::POST('/users-roles/assign', [UserController::class, 'userroles_assign'])->name('users-roles.assign');
});
+//Layanan Pengajuan DPU/DPA
+Route::get('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'tambah'])->name('layanan-dpudpa.tambah');
+Route::post('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'store'])->name('layanan-dpudpa.store');
+Route::get('/layanan-dpudpa/{url}/{caseid}', [LayananPengajuanDpuDpaController::class, 'ettd'])->name('layanan-dpudpa.ettd');
+Route::POST('/layanan-dpudpa/{url}/{caseid}', [LayananPengajuanDpuDpaController::class, 'submitettd'])->name('layanan-dpudpa.submitettd');
\ No newline at end of file