diff --git a/app/Http/Controllers/LayananPengajuanAduanController.php b/app/Http/Controllers/LayananPengajuanAduanController.php new file mode 100644 index 0000000..37a71d4 --- /dev/null +++ b/app/Http/Controllers/LayananPengajuanAduanController.php @@ -0,0 +1,78 @@ + 'Pengajuan Aduan | Admin Dashboard','data' => $data]); +} + +public function tambah(){ + return view('layanan-aduan.tambah',['title' => 'Pengajuan Aduan']); +} + +public function store(Request $request){ + $request->validate([ + 'nama'=>'required', + 'nomor_telepon'=>'required|numeric', + 'subjek'=>'required', + 'lokasi'=>'required', + 'kategori'=>'required', + 'deskripsi_laporan'=>'required', + 'bukti_laporan'=>'required|mimes:pdf,png,jpg|max:4096', + ],[ + 'nomor_telepon.numeric' => 'nomor telepon tidak valid, harap menggunakan format 089xxxxx', + 'bukti_laporan.max' => 'Ukuran File Anda lebih dari 4Mb, Cek Ulang File anda', + 'bukti_laporan.mimes' => 'Format file tidak valid, pastikan file berupa gambar(JPG/PNG) atau pdf', + ]); + //get lastid + 1 + $countcaseid = PengajuanAduan::max('id')+1; + $caseid = "A".date_format(date_create(),"Y").$countcaseid; + + $data_aduan['caseid'] = $caseid; + $data_aduan['nama'] = $request->nama; + $data_aduan['nomor_telepon'] = $request->nomor_telepon; + $data_aduan['subjek'] = $request->subjek; + $data_aduan['lokasi'] = $request->lokasi; + $data_aduan['kategori'] = $request->kategori; + $data_aduan['deskripsi_laporan'] = $request->deskripsi_laporan; + + $bukti_laporan = $request->file('bukti_laporan'); + $bukti_laporan_name = $caseid.'_'.str_replace(' ', '_',$bukti_laporan->getClientOriginalName()); + $path = 'aduan/'.$bukti_laporan_name; + if(Storage::disk('public')->put($path, file_get_contents($bukti_laporan))){ + $data_aduan['bukti_laporan'] = $bukti_laporan_name; + PengajuanAduan::create($data_aduan); + return redirect()->route('layanan-aduan.tambah')->with('success','Sukses Tambah Data, Silahkan Monitoring Pengajuan Anda melalui menu monitoring'); + } + return redirect()->route('layanan-aduan.tambah')->with('error','Gagal Tambah data, Cek kembali data yang anda masukkan'); +} + +public function selesai(Request $request){ + $request->validate([ + 'keterangan_selesai'=>'required', + ],[ + 'keterangan_selesai.required' => 'Alasan Tidak boleh kosong, harap masukkan keterangan penyelesaian', + ]); + $data_aduan = PengajuanAduan::where('id',$request->id)->first(); + $data_aduan['keterangan_selesai'] = $request->keterangan_selesai; + if($data_aduan->save()){ + return redirect()->route('layanan-aduan.index')->with('success','Sukses Menyelesaikan Laporan Aduan'); + } + return redirect()->route('layanan-aduan.tambah')->with('error','Gagal Menyelesaikan Laporan aduan, silahkan coba klik selesaikan kembali'); +} + +public function destroy(Request $request){ + dd($request->all()); +} + +} diff --git a/app/Models/PengajuanAduan.php b/app/Models/PengajuanAduan.php new file mode 100644 index 0000000..fb97130 --- /dev/null +++ b/app/Models/PengajuanAduan.php @@ -0,0 +1,25 @@ + 'Diproses', + ]; +} diff --git a/app/Models/PengajuanWisuda.php b/app/Models/PengajuanWisuda.php index 9cddbe0..545d52d 100644 --- a/app/Models/PengajuanWisuda.php +++ b/app/Models/PengajuanWisuda.php @@ -15,5 +15,6 @@ class PengajuanWisuda extends Model 'bukti_spp', 'bukti_sertifikat_kkn', 'bukti_toefl', + 'bukti_bebas_lab', ]; } diff --git a/database/migrations/2024_01_31_051701_update_user_table_add_roles_id.php b/database/migrations/2024_01_31_051701_update_user_table_add_roles_id.php index efbe078..48f9f53 100644 --- a/database/migrations/2024_01_31_051701_update_user_table_add_roles_id.php +++ b/database/migrations/2024_01_31_051701_update_user_table_add_roles_id.php @@ -24,7 +24,7 @@ public function down(): void { Schema::table('users', function (Blueprint $table) { // $table->drop('user_roles_id'); - $table->drop('about'); + $table->dropColumn('about'); }); } }; diff --git a/database/migrations/2024_05_14_132120_alter_table_pengajuan_pemutihans_add_column_status_operator.php b/database/migrations/2024_05_14_132120_alter_table_pengajuan_pemutihans_add_column_status_operator.php index 759be7c..a65f4b2 100644 --- a/database/migrations/2024_05_14_132120_alter_table_pengajuan_pemutihans_add_column_status_operator.php +++ b/database/migrations/2024_05_14_132120_alter_table_pengajuan_pemutihans_add_column_status_operator.php @@ -24,7 +24,7 @@ public function down(): void { Schema::table('pengajuan_pemutihans', function (Blueprint $table) { // $table->drop('user_roles_id'); - $table->drop('status_operator'); + $table->dropColumn('status_operator'); }); } }; diff --git a/database/migrations/2024_07_13_175101_create_pengajuan_aduans_table.php b/database/migrations/2024_07_13_175101_create_pengajuan_aduans_table.php new file mode 100644 index 0000000..5ce6ac2 --- /dev/null +++ b/database/migrations/2024_07_13_175101_create_pengajuan_aduans_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('caseid'); + $table->string('status'); + $table->string('nama'); + $table->string('nomor_telepon'); + $table->string('subjek'); + $table->string('lokasi'); + $table->string('kategori'); + $table->string('bukti_laporan'); + $table->text('deskripsi_laporan'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('pengajuan_aduans'); + } +}; diff --git a/database/migrations/2024_07_31_151308_edit_pengajuanwisuda_tables.php b/database/migrations/2024_07_31_151308_edit_pengajuanwisuda_tables.php new file mode 100644 index 0000000..a3f9a59 --- /dev/null +++ b/database/migrations/2024_07_31_151308_edit_pengajuanwisuda_tables.php @@ -0,0 +1,28 @@ +string('bukti_bebas_lab')->after('bukti_toefl'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('pengajuan_wisudas', function (Blueprint $table) { + $table->dropColumn('bukti_bebas_lab'); + }); + } +}; diff --git a/database/migrations/2024_08_04_102219_alter_pengajuan_aduans_tables.php b/database/migrations/2024_08_04_102219_alter_pengajuan_aduans_tables.php new file mode 100644 index 0000000..2e2113d --- /dev/null +++ b/database/migrations/2024_08_04_102219_alter_pengajuan_aduans_tables.php @@ -0,0 +1,28 @@ +string('keterangan_selesai')->nullable()->after('deskripsi_laporan'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('pengajuan_aduans', function (Blueprint $table) { + $table->dropColumn('keterangan_selesai'); + }); + } +}; diff --git a/resources/views/layanan-aduan/index.blade.php b/resources/views/layanan-aduan/index.blade.php new file mode 100644 index 0000000..8ea0b3e --- /dev/null +++ b/resources/views/layanan-aduan/index.blade.php @@ -0,0 +1,262 @@ + +@extends('layout.app') + +@push('css') + + + + +@endpush + +@section('content') + +@include('layout.navbars.sidebar') +
+ +
+
+
+
+

Layanan Aduan

+
+
+ +
+
+
+
+ +
+
+ +
+ @if ($errors->any()) +
+
    + @foreach ($errors->all() as $error ) +
  • {{ $error }}
  • + @endforeach +
+
+ @endif + @if(session('success')) +
+
    +
  • {{ session('success') }}
  • +
+
+ @endif + + + + + + + + + + + + + @foreach ($data as $datas) + + + + + + + + + + + + + + + @endforeach + + + + + + + + + + + +
CaseIDNama PelaporNomor PelaporKategoriSubjekAction
{{ $datas->caseid }}{{ $datas->nama }} {{ $datas->nomor_telepon }} {{ $datas->kategori }}{{ $datas->subjek }} + + @if($datas->keterangan_selesai==NULL) + | | + + @endif +
CaseIDNIMNama MahasiswaDPUDPAAction
+
+ +
+ +
+ +
+@endsection + + +@push('js') + + + + + + + + + + + + + + + +@endpush + diff --git a/resources/views/layanan-aduan/tambah.blade.php b/resources/views/layanan-aduan/tambah.blade.php new file mode 100644 index 0000000..05c1ee1 --- /dev/null +++ b/resources/views/layanan-aduan/tambah.blade.php @@ -0,0 +1,81 @@ + +@extends('layout.app_guest',['title' => $title]) +@section('content') + + +
+
+ +
+
+

{{ $title }}

+
+ +
+ @if($errors->any()) +
+
    + @foreach ($errors->all() as $error ) +
  • {{ $error }}
  • + @endforeach +
+
+ @endif + @if(session('success')) +
+
    +
  • {{ session('success') }}
  • +
+
+ @endif + @if(session('error')) +
+
    +
  • {{ session('error') }}
  • +
+
+ @endif +
+ @csrf +
+
+ + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+
+
+
+
+ +
+ +
+ + +@endsection diff --git a/resources/views/layanan-dpudpa/index.blade.php b/resources/views/layanan-dpudpa/index.blade.php index c0ac9f3..b17108b 100644 --- a/resources/views/layanan-dpudpa/index.blade.php +++ b/resources/views/layanan-dpudpa/index.blade.php @@ -65,6 +65,7 @@ CaseID + Tanggal Pengajuan NIM Nama Mahasiswa DPU @@ -76,6 +77,7 @@ @foreach ($data as $datas) {{ $datas->caseid }} + {{ \Carbon\Carbon::parse($datas->created_at)->format('d-m-Y') }} {{ $datas->nim }} {{ $datas->nama }} {{ $datas->dpu_nama_gelar }} @@ -214,6 +216,7 @@ CaseID + Tanggal Pengajuan NIM Nama Mahasiswa DPU @@ -251,6 +254,7 @@ $(function () { $("#example1").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, + "order":[[1,'asc']], "buttons": [{ // New button configuration text: 'Tambah Data', // Replace with your desired button text diff --git a/resources/views/layanan-pemutihan/tambah.blade.php b/resources/views/layanan-pemutihan/tambah.blade.php index df0bf56..9f57227 100644 --- a/resources/views/layanan-pemutihan/tambah.blade.php +++ b/resources/views/layanan-pemutihan/tambah.blade.php @@ -59,7 +59,7 @@