parent
fb16ffdb0d
commit
b815d0396f
.gitea/workflows
app
Http/Controllers
AdminController.phpLayananPengajuanDpuDpaController.phpMahasiswaController.phpSesiLoginController.phpUserController.php
Models
config
database
migrations
2024_01_31_051701_update_user_table_add_roles_id.php2024_03_01_090609_create_permission_tables.php2024_03_01_135113_create_pengajuan_dpu_dpas_table.php2024_03_01_140831_create_table_bagian.php
seeders
resources/views
admin
layanan-dpudpa
layout
mahasiswa
user
routes
storage/debugbar
|
@ -1,22 +1,22 @@
|
|||
# name: Run Action to Production
|
||||
# run-name: ${{ gitea.actor }} is deploy application to production
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
# workflow_dispatch:
|
||||
name: Run Action to Production
|
||||
run-name: ${{ gitea.actor }} is deploy application to production
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
# jobs:
|
||||
# format:
|
||||
# name: run pull to sync on target message
|
||||
# runs-on: ubuntu-latest
|
||||
# if: "contains(github.event.head_commit.message, 'Production')"
|
||||
# steps:
|
||||
# - name: install ssh keys
|
||||
# # check this thread to understand why its needed:
|
||||
# # https://stackoverflow.com/a/70447517
|
||||
# run: install -m 600 -D /dev/null ~/.ssh/id_rsa && echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
||||
# - name: connect and pull
|
||||
# run: ssh fikyb-ssh@103.241.205.253 "if cd /home/fikyb-dev/htdocs/pintuv2; then git checkout main && git pull && exit; else git clone https://gitea.unej.ac.id/efbe/pintuv2.git && exit; fi"
|
||||
# - name: cleanup
|
||||
# run: rm -rf ~/.ssh
|
||||
jobs:
|
||||
format:
|
||||
name: run pull to sync on target message
|
||||
runs-on: ubuntu-latest
|
||||
if: "contains(github.event.head_commit.message, 'Production')"
|
||||
steps:
|
||||
- name: install ssh keys
|
||||
# check this thread to understand why its needed:
|
||||
# https://stackoverflow.com/a/70447517
|
||||
run: install -m 600 -D /dev/null ~/.ssh/id_rsa && echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
||||
- name: connect and pull
|
||||
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.HOST }} "if cd /home/fikyb-dev/htdocs/pintu2; then git checkout master && git pull && exit; else git clone ${{ gitea.repository }} && exit; fi"
|
||||
- name: cleanup
|
||||
run: rm -rf ~/.ssh
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
|
||||
|
@ -11,4 +12,5 @@ public function index(){
|
|||
return view('admin.index',['title'=> 'Admin Dashboard']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,19 +2,91 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Mahasiswa;
|
||||
use App\Models\PengajuanDpuDpa;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class LayananPengajuanDpuDpaController extends Controller
|
||||
{
|
||||
|
||||
public function index(){
|
||||
return view('layanan-dpudpa.index',['title' => 'Pengajuan DPU/DPA | Admin Dashboard']);
|
||||
$data = PengajuanDpuDpa::
|
||||
select('pengajuan_dpu_dpas.*',
|
||||
'mahasiswas.nim as nim',
|
||||
'mahasiswas.nama as nama',
|
||||
'dosen_dpu.nama_gelar as dpu_nama_gelar',
|
||||
'dosen_dpa.nama_gelar as dpa_nama_gelar'
|
||||
)
|
||||
->join('mahasiswas','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')
|
||||
->get();
|
||||
return view('layanan-dpudpa.index',['title' => 'Pengajuan DPU/DPA | Admin Dashboard','data' => $data]);
|
||||
}
|
||||
public function tambah(){
|
||||
return view('layanan-dpudpa.tambah');
|
||||
$dosen = User::role('Dosen')->get();
|
||||
return view('layanan-dpudpa.tambah',['dosen'=>$dosen]);
|
||||
}
|
||||
public function store(){
|
||||
return "done";
|
||||
public function store(Request $request){
|
||||
|
||||
$request->validate([
|
||||
'nim'=>'required|numeric',
|
||||
'nama'=>'required',
|
||||
'nomor_hp'=>'required|numeric',
|
||||
'email'=>'required|email',
|
||||
'judul_seminar_proposal'=>'required',
|
||||
'bagian'=>'required|numeric',
|
||||
'dosen_dpu'=>'required|numeric',
|
||||
'dosen_dpa'=>'required|numeric',
|
||||
'file_transkrip' => 'required|mimes:pdf|max:4096',
|
||||
],[
|
||||
'nim.required'=>'NIP Wajib Diisi',
|
||||
'nim.numeric'=>'NIM Wajib Berisi Angka saja',
|
||||
'nomor_hp.numeric'=>'Nomor HP Wajib Menggunakan Angka, Contoh 089xxxxx',
|
||||
'email.email'=>'Format email tidak sesuai, cek lagi email anda, Contoh mahasiswa@mail.com/ mahasiswa@mail.unej.ac.id',
|
||||
'bagian.numeric'=>'Bagian tidak valid, cek kembali Bagian yang dipilih',
|
||||
'dosen_dpu.numeric'=>'Dosen Pembimbing tidak valid, cek kembali Dosen Pembimbing Utama yang dipilih',
|
||||
'dosen_dpa.numeric'=>'Dosen Pembimbing tidak valid, cek kembali Dosen Pembimbing Anggota yang dipilih',
|
||||
'file_transkrip.mimes'=>'Format File Bukan PDF, Cek Ulang file anda',
|
||||
'file_transkrip.max'=>'Ukuran File Anda lebih dari 4Mb, Cek Ulang File anda',
|
||||
]);
|
||||
|
||||
$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');
|
||||
}
|
||||
return redirect()->route('layanan-dpudpa.tambah')->with('error','Gagal Tambah data, Cek kembali data yang anda masukkan');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,10 +19,7 @@ public function index(){
|
|||
->join('users as user_dosen_dpu','mahasiswas.dosen_dpu_id','=','user_dosen_dpu.id')
|
||||
->get();
|
||||
//Ambil Semua Data User Dengan Role Name DOSEN
|
||||
$dosen = User::where('user_roles_id','2')
|
||||
->select('users.id','nama_gelar')
|
||||
->orderBy('users.id')
|
||||
->get();
|
||||
$dosen = User::role('Dosen')->get();
|
||||
return view('mahasiswa.index',['title'=> 'Manajemen Mahasiswa | Admin Dashboard','user'=> $user,'dosen' => $dosen]);
|
||||
}
|
||||
|
||||
|
@ -52,34 +49,83 @@ public function store(Request $request){
|
|||
'dosen_penguji1_id.numeric'=>'Dosen Penguji tidak valid, cek kembali Dosen Penguji yang dipilih',
|
||||
'dosen_penguji2_id.numeric'=>'Dosen Penguji tidak valid, cek kembali Dosen Penguji yang dipilih',
|
||||
]);
|
||||
$user = new Mahasiswa;
|
||||
$user->nim = $request->nim;
|
||||
$user->nama = $request->nama;
|
||||
$user->nomor_hp = $request->nomor_hp;
|
||||
$user->email = $request->email;
|
||||
$user->bagian = $request->bagian;
|
||||
$user->dosen_dpu_id = $request->dosen_dpu_id;
|
||||
$user->dosen_dpa_id = $request->dosen_dpa_id;
|
||||
$user->dosen_penguji1_id = $request->dosen_penguji1_id;
|
||||
$user->dosen_penguji2_id = $request->dosen_penguji2_id;
|
||||
$user->judul_seminar_proposal = $request->judul_seminar_proposal;
|
||||
$user->judul_skripsi_id = $request->judul_skripsi_id;
|
||||
$user->judul_skripsi_en= $request->judul_skripsi_en;
|
||||
$user->judul_jurnal = $request->judul_jurnal;
|
||||
$user->judul_artikel = $request->judul_artikel;
|
||||
|
||||
if($user->save()){
|
||||
return redirect()->route('mahasiswa.index')->with('success','Data Telah Berhasil Disimpan');
|
||||
$mahasiswa = new Mahasiswa;
|
||||
$mahasiswa->nim = $request->nim;
|
||||
$mahasiswa->nama = $request->nama;
|
||||
$mahasiswa->nomor_hp = $request->nomor_hp;
|
||||
$mahasiswa->email = $request->email;
|
||||
$mahasiswa->bagian = $request->bagian;
|
||||
$mahasiswa->dosen_dpu_id = $request->dosen_dpu_id;
|
||||
$mahasiswa->dosen_dpa_id = $request->dosen_dpa_id;
|
||||
$mahasiswa->dosen_penguji1_id = $request->dosen_penguji1_id;
|
||||
$mahasiswa->dosen_penguji2_id = $request->dosen_penguji2_id;
|
||||
$mahasiswa->judul_seminar_proposal = $request->judul_seminar_proposal;
|
||||
$mahasiswa->judul_skripsi_id = $request->judul_skripsi_id;
|
||||
$mahasiswa->judul_skripsi_en= $request->judul_skripsi_en;
|
||||
$mahasiswa->judul_jurnal = $request->judul_jurnal;
|
||||
$mahasiswa->judul_artikel = $request->judul_artikel;
|
||||
|
||||
if($mahasiswa->save()){
|
||||
return redirect()->route('mahasiswa.index')->with('success','Data Telah Berhasil Disimpan');
|
||||
}
|
||||
return back()->withInput();
|
||||
}
|
||||
|
||||
public function update(Request $request){
|
||||
//
|
||||
$request->validate([
|
||||
'nim'=>'required|numeric',
|
||||
'nama'=>'required',
|
||||
'nomor_hp'=>'required|numeric',
|
||||
'email'=>'required|email',
|
||||
'judul_seminar_proposal'=>'required',
|
||||
'judul_skripsi_id'=>'required',
|
||||
'judul_skripsi_en'=>'required',
|
||||
'judul_jurnal'=>'required',
|
||||
'judul_artikel'=>'required',
|
||||
'bagian'=>'required|numeric',
|
||||
'dosen_dpu_id'=>'required|numeric',
|
||||
'dosen_dpa_id'=>'required|numeric',
|
||||
'dosen_penguji1_id'=>'required|numeric',
|
||||
'dosen_penguji2_id'=>'required|numeric',
|
||||
],[
|
||||
'nim.required'=>'NIP Wajib Diisi',
|
||||
'nim.numeric'=>'NIM Wajib Berisi Angka saja',
|
||||
'nomor_hp.numeric'=>'Nomor HP Wajib Menggunakan Angka, Contoh 089xxxxx',
|
||||
'email.email'=>'Format email tidak sesuai, cek lagi email anda, Contoh mahasiswa@mail.com/ mahasiswa@mail.unej.ac.id',
|
||||
'dosen_dpu_id.numeric'=>'Dosen Pembimbing tidak valid, cek kembali Dosen Pembimbing yang dipilih',
|
||||
'dosen_dpa_id.numeric'=>'Dosen Pembimbing tidak valid, cek kembali Dosen Pembimbing yang dipilih',
|
||||
'dosen_penguji1_id.numeric'=>'Dosen Penguji tidak valid, cek kembali Dosen Penguji yang dipilih',
|
||||
'dosen_penguji2_id.numeric'=>'Dosen Penguji tidak valid, cek kembali Dosen Penguji yang dipilih',
|
||||
]);
|
||||
|
||||
$mahasiswa = Mahasiswa::find($request->id);
|
||||
$mahasiswa->nim = $request->nim;
|
||||
$mahasiswa->nama = $request->nama;
|
||||
$mahasiswa->nomor_hp = $request->nomor_hp;
|
||||
$mahasiswa->email = $request->email;
|
||||
$mahasiswa->bagian = $request->bagian;
|
||||
$mahasiswa->dosen_dpu_id = $request->dosen_dpu_id;
|
||||
$mahasiswa->dosen_dpa_id = $request->dosen_dpa_id;
|
||||
$mahasiswa->dosen_penguji1_id = $request->dosen_penguji1_id;
|
||||
$mahasiswa->dosen_penguji2_id = $request->dosen_penguji2_id;
|
||||
$mahasiswa->judul_seminar_proposal = $request->judul_seminar_proposal;
|
||||
$mahasiswa->judul_skripsi_id = $request->judul_skripsi_id;
|
||||
$mahasiswa->judul_skripsi_en= $request->judul_skripsi_en;
|
||||
$mahasiswa->judul_jurnal = $request->judul_jurnal;
|
||||
$mahasiswa->judul_artikel = $request->judul_artikel;
|
||||
|
||||
if($mahasiswa->save()){
|
||||
return redirect()->route('mahasiswa.index')->with('success','Data Telah Berhasil Disimpan');
|
||||
}
|
||||
return back()->withInput();
|
||||
}
|
||||
|
||||
public function destroy(Request $request){
|
||||
//
|
||||
$mahasiswa = Mahasiswa::findOrFail($request->id);
|
||||
if($mahasiswa->delete()){
|
||||
return redirect()->route('mahasiswa.index')->with('success','Data Telah Dihapus');
|
||||
}
|
||||
return redirect()->route('mahasiswa.index')->with('error','Data Gagal Dihapus');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
41
app/Http/Controllers/SesiLoginController.php
Normal file
41
app/Http/Controllers/SesiLoginController.php
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class SesiLoginController extends Controller
|
||||
{
|
||||
public function login(){
|
||||
return view('admin.login',['title'=> 'PINTU2 Admin Login Page']);
|
||||
}
|
||||
|
||||
public function ceklogin(Request $request){
|
||||
$request->validate([
|
||||
'email' => 'required|email',
|
||||
'password' => 'required',
|
||||
],[
|
||||
'email.required' => 'Email Tidak Boleh kosong',
|
||||
'password.required' => 'Email Tidak Boleh kosong',
|
||||
'email.email' => 'Email harus berupa Email, Contoh abc@mail.com'
|
||||
]
|
||||
);
|
||||
$infologin = [
|
||||
'email' => $request->email,
|
||||
'password' => $request->password,
|
||||
];
|
||||
if(Auth::attempt($infologin)){
|
||||
return redirect()->route('admin.dashboard');
|
||||
}
|
||||
else{
|
||||
return redirect()->route('login')->withErrors('Email atau password Salah, Cek kembali')->withInput();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function logout(){
|
||||
Auth::logout();
|
||||
return redirect()->route('login');
|
||||
}
|
||||
}
|
|
@ -3,21 +3,17 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\UserRole;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Permission\Models\Role;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
||||
public function index(){
|
||||
$user = User::join('user_roles','user_roles_id','=','user_roles.id')
|
||||
->select('users.*', 'user_roles.nama as nama_roles')
|
||||
->orderBy('users.id', 'desc')
|
||||
->get();
|
||||
$role = UserRole::get();
|
||||
return view('user.index',['title'=> 'Manajemen User | Admin Dashboard','user'=> $user,'role' => $role]);
|
||||
$user = User::with('roles')->get();
|
||||
return view('user.index',['title'=> 'Manajemen User | Admin Dashboard','user'=> $user]);
|
||||
}
|
||||
|
||||
public function store(Request $request){
|
||||
|
@ -45,7 +41,6 @@ public function store(Request $request){
|
|||
$user->email = $request->email;
|
||||
$user->ettd = $request->ettd;
|
||||
$user->password = Str::random(12);
|
||||
$user->user_roles_id = $request->user_roles_id;
|
||||
|
||||
if($user->save()){
|
||||
return redirect()->route('users.index')->with('success','Data Telah Berhasil Disimpan');
|
||||
|
@ -80,7 +75,6 @@ public function update(Request $request){
|
|||
$user->email = $request->email;
|
||||
$user->ettd = $request->ettd;
|
||||
$user->password = Str::random(12);
|
||||
$user->user_roles_id = $request->user_roles_id;
|
||||
|
||||
if($user->save()){
|
||||
return redirect()->route('users.index')->with('success','Data Telah Berhasil Diubah');
|
||||
|
@ -98,8 +92,29 @@ public function destroy(Request $request){
|
|||
}
|
||||
|
||||
public function userroles_index(){
|
||||
$data = UserRole::get();
|
||||
return view('user.user_roles_index',['title'=> 'Admin Dashboard','data'=> $data]);
|
||||
$user = User::select('id','nama_gelar')->get();
|
||||
$data = Role::get();
|
||||
return view('user.user_roles_index',['title'=> 'Manajemen Role User | Admin Dashboard','data'=> $data,'user'=>$user]);
|
||||
}
|
||||
|
||||
public function userroles_store(Request $request){
|
||||
$user_roles = new Role;
|
||||
$user_roles->nama = $request->role_name;
|
||||
|
||||
if($user_roles->save()){
|
||||
return redirect()->route('users-roles.index')->with('success','Data Telah Berhasil Disimpan');
|
||||
}
|
||||
return back()->withInput();
|
||||
}
|
||||
|
||||
public function userroles_assign(Request $request){
|
||||
$listUser = $request->input('checkboxes', []);
|
||||
$listUser = $request->input('checkboxes', []);
|
||||
foreach($listUser as $listUsers) {
|
||||
$user = User::find($listUsers);
|
||||
$user->assignRole($request->roles_user);
|
||||
}
|
||||
return redirect()->route('users-roles.index')->with('success','Sukses Memberi Role User');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,4 +8,21 @@
|
|||
class Mahasiswa extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'nim',
|
||||
'nama',
|
||||
'nomor_hp',
|
||||
'email',
|
||||
'bagian',
|
||||
'judul_seminar_proposal',
|
||||
'judul_skripsi_id',
|
||||
'judul_skripsi_en',
|
||||
'judul_jurnal',
|
||||
'judul_artikel',
|
||||
'dosen_dpu_id',
|
||||
'dosen_dpa_id',
|
||||
'dosen_penguji1_id',
|
||||
'dosen_penguji2_id',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -5,7 +5,12 @@
|
|||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserRole extends Model
|
||||
class PengajuanDpuDpa extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'mahasiswas_id',
|
||||
'bukti_transkrip_nilai',
|
||||
];
|
||||
}
|
|
@ -7,10 +7,11 @@
|
|||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
use HasApiTokens, HasFactory, Notifiable, HasRoles;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
|
@ -42,4 +43,5 @@ class User extends Authenticatable
|
|||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"barryvdh/laravel-debugbar": "^3.10",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"laravel/framework": "^10.10",
|
||||
"laravel/sanctum": "^3.3",
|
||||
"laravel/tinker": "^2.8"
|
||||
"laravel/tinker": "^2.8",
|
||||
"spatie/laravel-permission": "^6.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
|
|
236
composer.lock
generated
236
composer.lock
generated
|
@ -4,8 +4,92 @@
|
|||
"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": "8ea36d387a8498c6177a03aae1a59e91",
|
||||
"packages": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v3.10.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||
"reference": "d1a48965f2b25a6cec2eea07d719b568a37c9a88"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/d1a48965f2b25a6cec2eea07d719b568a37c9a88",
|
||||
"reference": "d1a48965f2b25a6cec2eea07d719b568a37c9a88",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/routing": "^9|^10|^11",
|
||||
"illuminate/session": "^9|^10|^11",
|
||||
"illuminate/support": "^9|^10|^11",
|
||||
"maximebf/debugbar": "~1.20.1",
|
||||
"php": "^8.0",
|
||||
"symfony/finder": "^6|^7"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.3.3",
|
||||
"orchestra/testbench-dusk": "^5|^6|^7|^8|^9",
|
||||
"phpunit/phpunit": "^8.5.30|^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.10-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Barryvdh\\Debugbar\\ServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/helpers.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Barryvdh\\Debugbar\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Barry vd. Heuvel",
|
||||
"email": "barryvdh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP Debugbar integration for Laravel",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"debugbar",
|
||||
"laravel",
|
||||
"profiler",
|
||||
"webprofiler"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.10.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://fruitcake.nl",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/barryvdh",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-02-15T10:45:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.11.0",
|
||||
|
@ -1893,6 +1977,72 @@
|
|||
],
|
||||
"time": "2024-01-28T23:22:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.20.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||
"reference": "484625c23a4fa4f303617f29fcacd42951c9c01d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/484625c23a4fa4f303617f29fcacd42951c9c01d",
|
||||
"reference": "484625c23a4fa4f303617f29fcacd42951c9c01d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/var-dumper": "^4|^5|^6|^7"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=7.5.20 <10.0",
|
||||
"twig/twig": "^1.38|^2.7|^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"kriswallsmith/assetic": "The best way to manage assets",
|
||||
"monolog/monolog": "Log using Monolog",
|
||||
"predis/predis": "Redis storage"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.20-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"DebugBar\\": "src/DebugBar/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Maxime Bouroumeau-Fuseau",
|
||||
"email": "maxime.bouroumeau@gmail.com",
|
||||
"homepage": "http://maximebf.com"
|
||||
},
|
||||
{
|
||||
"name": "Barry vd. Heuvel",
|
||||
"email": "barryvdh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Debug bar in the browser for php application",
|
||||
"homepage": "https://github.com/maximebf/php-debugbar",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"debugbar"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maximebf/php-debugbar/issues",
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.20.2"
|
||||
},
|
||||
"time": "2024-02-15T10:49:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "3.5.0",
|
||||
|
@ -3184,6 +3334,88 @@
|
|||
],
|
||||
"time": "2023-11-08T05:53:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-permission",
|
||||
"version": "6.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-permission.git",
|
||||
"reference": "05cce017fe3ac78f60a3fce78c07fe6e8e6e6e52"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/05cce017fe3ac78f60a3fce78c07fe6e8e6e6e52",
|
||||
"reference": "05cce017fe3ac78f60a3fce78c07fe6e8e6e6e52",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/auth": "^8.12|^9.0|^10.0|^11.0",
|
||||
"illuminate/container": "^8.12|^9.0|^10.0|^11.0",
|
||||
"illuminate/contracts": "^8.12|^9.0|^10.0|^11.0",
|
||||
"illuminate/database": "^8.12|^9.0|^10.0|^11.0",
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/passport": "^11.0|^12.0",
|
||||
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0",
|
||||
"phpunit/phpunit": "^9.4|^10.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "6.x-dev",
|
||||
"dev-master": "6.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Spatie\\Permission\\PermissionServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/helpers.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Spatie\\Permission\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Freek Van der Herten",
|
||||
"email": "freek@spatie.be",
|
||||
"homepage": "https://spatie.be",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Permission handling for Laravel 8.0 and up",
|
||||
"homepage": "https://github.com/spatie/laravel-permission",
|
||||
"keywords": [
|
||||
"acl",
|
||||
"laravel",
|
||||
"permission",
|
||||
"permissions",
|
||||
"rbac",
|
||||
"roles",
|
||||
"security",
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/laravel-permission/issues",
|
||||
"source": "https://github.com/spatie/laravel-permission/tree/6.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/spatie",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-02-28T08:11:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v6.4.2",
|
||||
|
@ -8153,5 +8385,5 @@
|
|||
"php": "^8.1"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
Spatie\Permission\PermissionServiceProvider::class,
|
||||
])->toArray(),
|
||||
|
||||
/*
|
||||
|
|
186
config/permission.php
Normal file
186
config/permission.php
Normal file
|
@ -0,0 +1,186 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'models' => [
|
||||
|
||||
/*
|
||||
* When using the "HasPermissions" trait from this package, we need to know which
|
||||
* Eloquent model should be used to retrieve your permissions. Of course, it
|
||||
* is often just the "Permission" model but you may use whatever you like.
|
||||
*
|
||||
* The model you want to use as a Permission model needs to implement the
|
||||
* `Spatie\Permission\Contracts\Permission` contract.
|
||||
*/
|
||||
|
||||
'permission' => Spatie\Permission\Models\Permission::class,
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* Eloquent model should be used to retrieve your roles. Of course, it
|
||||
* is often just the "Role" model but you may use whatever you like.
|
||||
*
|
||||
* The model you want to use as a Role model needs to implement the
|
||||
* `Spatie\Permission\Contracts\Role` contract.
|
||||
*/
|
||||
|
||||
'role' => Spatie\Permission\Models\Role::class,
|
||||
|
||||
],
|
||||
|
||||
'table_names' => [
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your roles. We have chosen a basic
|
||||
* default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'roles' => 'roles',
|
||||
|
||||
/*
|
||||
* When using the "HasPermissions" trait from this package, we need to know which
|
||||
* table should be used to retrieve your permissions. We have chosen a basic
|
||||
* default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'permissions' => 'permissions',
|
||||
|
||||
/*
|
||||
* When using the "HasPermissions" trait from this package, we need to know which
|
||||
* table should be used to retrieve your models permissions. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'model_has_permissions' => 'model_has_permissions',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your models roles. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'model_has_roles' => 'model_has_roles',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your roles permissions. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'role_has_permissions' => 'role_has_permissions',
|
||||
],
|
||||
|
||||
'column_names' => [
|
||||
/*
|
||||
* Change this if you want to name the related pivots other than defaults
|
||||
*/
|
||||
'role_pivot_key' => null, //default 'role_id',
|
||||
'permission_pivot_key' => null, //default 'permission_id',
|
||||
|
||||
/*
|
||||
* Change this if you want to name the related model primary key other than
|
||||
* `model_id`.
|
||||
*
|
||||
* For example, this would be nice if your primary keys are all UUIDs. In
|
||||
* that case, name this `model_uuid`.
|
||||
*/
|
||||
|
||||
'model_morph_key' => 'model_id',
|
||||
|
||||
/*
|
||||
* Change this if you want to use the teams feature and your related model's
|
||||
* foreign key is other than `team_id`.
|
||||
*/
|
||||
|
||||
'team_foreign_key' => 'team_id',
|
||||
],
|
||||
|
||||
/*
|
||||
* When set to true, the method for checking permissions will be registered on the gate.
|
||||
* Set this to false if you want to implement custom logic for checking permissions.
|
||||
*/
|
||||
|
||||
'register_permission_check_method' => true,
|
||||
|
||||
/*
|
||||
* When set to true, Laravel\Octane\Events\OperationTerminated event listener will be registered
|
||||
* this will refresh permissions on every TickTerminated, TaskTerminated and RequestTerminated
|
||||
* NOTE: This should not be needed in most cases, but an Octane/Vapor combination benefited from it.
|
||||
*/
|
||||
'register_octane_reset_listener' => false,
|
||||
|
||||
/*
|
||||
* Teams Feature.
|
||||
* When set to true the package implements teams using the 'team_foreign_key'.
|
||||
* If you want the migrations to register the 'team_foreign_key', you must
|
||||
* set this to true before doing the migration.
|
||||
* If you already did the migration then you must make a new migration to also
|
||||
* add 'team_foreign_key' to 'roles', 'model_has_roles', and 'model_has_permissions'
|
||||
* (view the latest version of this package's migration file)
|
||||
*/
|
||||
|
||||
'teams' => false,
|
||||
|
||||
/*
|
||||
* Passport Client Credentials Grant
|
||||
* When set to true the package will use Passports Client to check permissions
|
||||
*/
|
||||
|
||||
'use_passport_client_credentials' => false,
|
||||
|
||||
/*
|
||||
* When set to true, the required permission names are added to exception messages.
|
||||
* This could be considered an information leak in some contexts, so the default
|
||||
* setting is false here for optimum safety.
|
||||
*/
|
||||
|
||||
'display_permission_in_exception' => false,
|
||||
|
||||
/*
|
||||
* When set to true, the required role names are added to exception messages.
|
||||
* This could be considered an information leak in some contexts, so the default
|
||||
* setting is false here for optimum safety.
|
||||
*/
|
||||
|
||||
'display_role_in_exception' => false,
|
||||
|
||||
/*
|
||||
* By default wildcard permission lookups are disabled.
|
||||
* See documentation to understand supported syntax.
|
||||
*/
|
||||
|
||||
'enable_wildcard_permission' => false,
|
||||
|
||||
/*
|
||||
* The class to use for interpreting wildcard permissions.
|
||||
* If you need to modify delimiters, override the class and specify its name here.
|
||||
*/
|
||||
// 'permission.wildcard_permission' => Spatie\Permission\WildcardPermission::class,
|
||||
|
||||
/* Cache-specific settings */
|
||||
|
||||
'cache' => [
|
||||
|
||||
/*
|
||||
* By default all permissions are cached for 24 hours to speed up performance.
|
||||
* When permissions or roles are updated the cache is flushed automatically.
|
||||
*/
|
||||
|
||||
'expiration_time' => \DateInterval::createFromDateString('24 hours'),
|
||||
|
||||
/*
|
||||
* The cache key used to store all permissions.
|
||||
*/
|
||||
|
||||
'key' => 'spatie.permission.cache',
|
||||
|
||||
/*
|
||||
* You may optionally indicate a specific cache driver to use for permission and
|
||||
* role caching using any of the `store` drivers listed in the cache.php config
|
||||
* file. Using 'default' here means to use the `default` set in cache.php.
|
||||
*/
|
||||
|
||||
'store' => 'default',
|
||||
],
|
||||
];
|
|
@ -12,7 +12,7 @@
|
|||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->foreignId('user_roles_id')->constrained();
|
||||
// $table->foreignId('user_roles_id')->constrained();
|
||||
$table->string('about')->nullable()->after('ettd');
|
||||
});
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public function up(): void
|
|||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->drop('user_roles_id');
|
||||
// $table->drop('user_roles_id');
|
||||
$table->drop('about');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$teams = config('permission.teams');
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
$pivotRole = $columnNames['role_pivot_key'] ?? 'role_id';
|
||||
$pivotPermission = $columnNames['permission_pivot_key'] ?? 'permission_id';
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
|
||||
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id'); // permission id
|
||||
$table->string('name'); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) {
|
||||
$table->bigIncrements('id'); // role id
|
||||
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
|
||||
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||
}
|
||||
$table->string('name'); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
if ($teams || config('permission.testing')) {
|
||||
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
|
||||
} else {
|
||||
$table->unique(['name', 'guard_name']);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
|
||||
|
||||
$table->primary([$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
} else {
|
||||
$table->primary([$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
|
||||
|
||||
$table->primary([$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
} else {
|
||||
$table->primary([$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
}
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('pengajuan_dpu_dpas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('mahasiswas_id')->constrained();
|
||||
$table->string('caseid')->default('-');
|
||||
$table->string('ttd_operator')->default('-');
|
||||
$table->string('ttd_dpu')->default('-');
|
||||
$table->string('ttd_dpa')->default('-');
|
||||
$table->string('ttd_kombi')->default('-');
|
||||
$table->string('bukti_transkrip_nilai');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pengajuan_dpu_dpas');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('bagians', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('nama_bagian');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('bagians');
|
||||
}
|
||||
};
|
21
database/seeders/PermissionSeeder.php
Normal file
21
database/seeders/PermissionSeeder.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
|
||||
class PermissionSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$permission = Permission::updateOrCreate(
|
||||
[ 'name' => 'view_dashboard' ],
|
||||
[ 'name' => 'view_dashboard' ]
|
||||
);
|
||||
}
|
||||
}
|
25
database/seeders/UserRoleSeeder.php
Normal file
25
database/seeders/UserRoleSeeder.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Spatie\Permission\Contracts\Role;
|
||||
use Spatie\Permission\Models\Role as ModelsRole;
|
||||
|
||||
class UserRoleSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
ModelsRole::updateOrCreate(
|
||||
['name'=> 'Super Administrator'],
|
||||
['name'=> 'Super Administrator'],
|
||||
);
|
||||
ModelsRole::create(['name'=> 'Tenaga Kependidikan']);
|
||||
ModelsRole::create(['name'=> 'Dosen']);
|
||||
ModelsRole::create(['name'=> 'Operator Akademik']);
|
||||
}
|
||||
}
|
25
database/seeders/bagianSeeder.php
Normal file
25
database/seeders/bagianSeeder.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class bagianSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Farmasi Klinik dan Komunitas' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Farmakologi dan Hewan Coba' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Farmakognosi dan Fitokimia' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Mikrobiologi dan Biologi Farmasi' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Farmasetika' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Teknologi Farmasi' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Kimia Analisis' ]);
|
||||
DB::table('bagians')->insert([ 'nama_bagian'=>'Kimia Medisinal' ]);
|
||||
}
|
||||
}
|
83
resources/views/admin/login.blade.php
Normal file
83
resources/views/admin/login.blade.php
Normal file
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<!-- Google Font: Source Sans Pro -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('/')}}plugins/fontawesome-free/css/all.min.css">
|
||||
<!-- icheck bootstrap -->
|
||||
<link rel="stylesheet" href="{{ asset('/')}}plugins/icheck-bootstrap/icheck-bootstrap.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('/')}}dist/css/adminlte.min.css">
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<!-- /.login-logo -->
|
||||
<div class="card card-outline card-primary">
|
||||
<div class="card-header text-center">
|
||||
<a href="{{ route('login') }}" class="h1"><b>PINTU</b>v2</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error )
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<p class="login-box-msg">Silahkan Login Menggunakan NIP / Email</p>
|
||||
<form action="{{ route('admin.ceklogin') }}" method="post">
|
||||
@csrf
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" class="form-control" placeholder="Email" name="email" required value="{{ old('email') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" class="form-control" placeholder="Password" name="password" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="icheck-primary">
|
||||
<input type="checkbox" id="remember" name="remember">
|
||||
<label for="remember">
|
||||
Remember Me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-4">
|
||||
<button type="submit" class="btn btn-primary btn-block">Sign In</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="{{ asset('/')}}plugins/jquery/jquery.min.js"></script>
|
||||
<!-- Bootstrap 4 -->
|
||||
<script src="{{ asset('/')}}plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('/')}}dist/js/adminlte.min.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -10,19 +10,19 @@
|
|||
<!-- Add Content Here -->
|
||||
@section('content')
|
||||
<!-- Include Sidebar -->
|
||||
@include('layout.navbars.sidebar', ['title' => 'Layanan Akademik'])
|
||||
@include('layout.navbars.sidebar')
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>Blank Page</h1>
|
||||
<h1>Pengajuan DPU / DPA</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
||||
<li class="breadcrumb-item active">Blank Page</li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Admin</a></li>
|
||||
<li class="breadcrumb-item active">Pengajuan DPU / DPA</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -31,438 +31,78 @@
|
|||
|
||||
<section class="content">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">DataTable with default features</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-info"></i> Perhatian!</h5>
|
||||
<span >CaseID Akan muncul ketika pengajuan telah diterima untuk menghindari data duplikat untuk mahasiswa yang sama</span>
|
||||
</div>
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
<th>CaseID</th>
|
||||
<th>NIM</th>
|
||||
<th>DPU</th>
|
||||
<th>DPA</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($data as $datas)
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 4.0
|
||||
</td>
|
||||
<td>Win 95+</td>
|
||||
<td> 4</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.0
|
||||
</td>
|
||||
<td>Win 95+</td>
|
||||
<td>5</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.5
|
||||
</td>
|
||||
<td>Win 95+</td>
|
||||
<td>5.5</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 6
|
||||
</td>
|
||||
<td>Win 98+</td>
|
||||
<td>6</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>Internet Explorer 7</td>
|
||||
<td>Win XP SP2+</td>
|
||||
<td>7</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>AOL browser (AOL desktop)</td>
|
||||
<td>Win XP</td>
|
||||
<td>6</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td>1.7</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.5</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 2.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 3.0</td>
|
||||
<td>Win 2k+ / OSX.3+</td>
|
||||
<td>1.9</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.0</td>
|
||||
<td>OSX.2+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.5</td>
|
||||
<td>OSX.3+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Netscape 7.2</td>
|
||||
<td>Win 95+ / Mac OS 8.6-9.2</td>
|
||||
<td>1.7</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Browser 8</td>
|
||||
<td>Win 98SE+</td>
|
||||
<td>1.7</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Navigator 9</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.1</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1.1</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.2</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1.2</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.3</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1.3</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.4</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1.4</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.5</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1.5</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.6</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>1.6</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.7</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td>1.7</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.8</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Seamonkey 1.1</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gecko</td>
|
||||
<td>Epiphany 2.20</td>
|
||||
<td>Gnome</td>
|
||||
<td>1.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.2</td>
|
||||
<td>OSX.3</td>
|
||||
<td>125.5</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.3</td>
|
||||
<td>OSX.3</td>
|
||||
<td>312.8</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>Safari 2.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td>419.3</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>Safari 3.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td>522.1</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>OmniWeb 5.5</td>
|
||||
<td>OSX.4+</td>
|
||||
<td>420</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>iPod Touch / iPhone</td>
|
||||
<td>iPod</td>
|
||||
<td>420.1</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webkit</td>
|
||||
<td>S60</td>
|
||||
<td>S60</td>
|
||||
<td>413</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.0</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.0</td>
|
||||
<td>Win 95+ / OSX.3+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.2</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.5</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Opera for Wii</td>
|
||||
<td>Wii</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Nokia N800</td>
|
||||
<td>N800</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Presto</td>
|
||||
<td>Nintendo DS browser</td>
|
||||
<td>Nintendo DS</td>
|
||||
<td>8.5</td>
|
||||
<td>C/A<sup>1</sup></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.1</td>
|
||||
<td>KDE 3.1</td>
|
||||
<td>3.1</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.3</td>
|
||||
<td>KDE 3.3</td>
|
||||
<td>3.3</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.5</td>
|
||||
<td>KDE 3.5</td>
|
||||
<td>3.5</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 4.5</td>
|
||||
<td>Mac OS 8-9</td>
|
||||
<td>-</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.1</td>
|
||||
<td>Mac OS 7.6-9</td>
|
||||
<td>1</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.2</td>
|
||||
<td>Mac OS 8-X</td>
|
||||
<td>1</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.1</td>
|
||||
<td>Embedded devices</td>
|
||||
<td>-</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.4</td>
|
||||
<td>Embedded devices</td>
|
||||
<td>-</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>Dillo 0.8</td>
|
||||
<td>Embedded devices</td>
|
||||
<td>-</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>Links</td>
|
||||
<td>Text only</td>
|
||||
<td>-</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>Lynx</td>
|
||||
<td>Text only</td>
|
||||
<td>-</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>IE Mobile</td>
|
||||
<td>Windows Mobile 6</td>
|
||||
<td>-</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Misc</td>
|
||||
<td>PSP browser</td>
|
||||
<td>PSP</td>
|
||||
<td>-</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Other browsers</td>
|
||||
<td>All others</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>U</td>
|
||||
<td>{{ $datas->caseid }}</td>
|
||||
<td>{{ $datas->nim }} </td>
|
||||
<td>{{ $datas->dpu_nama_gelar }}</td>
|
||||
<td>{{ $datas->dpa_nama_gelar }}</td>
|
||||
<td><button class="btn btn-primary" data-toggle="modal" data-target="#LY{{ $datas->id }}" >Details</button> | <button class="btn btn-success">Terima</button> | <button class="btn btn-danger">Tolak</button></td>
|
||||
</tr>
|
||||
<div class="modal fade" id="LY{{$datas->id}}">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Details Data <b>{{ $datas->caseid }}</b></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="nim">NIM:</label>
|
||||
<input type="text" class="form-control form-control-border" readonly value="{{ $datas->nim }}">
|
||||
<label for="nama">Nama Mahasiswa:</label>
|
||||
<input type="text" class="form-control form-control-border" readonly value="{{ $datas->nama }}">
|
||||
<label for="dosen_dpu">Dosen DPU: {{ $datas->ttd_dpu === '-' ? 'Belum Tanda Tangan' : 'Telah TTD Pada '.$datas->ttd_dpu }}</label>
|
||||
<input type="text" class="form-control form-control-border" readonly value="{{ $datas->dpu_nama_gelar }}">
|
||||
<label for="dosen_dpa">Dosen DPA: {{ $datas->ttd_dpa === '-' ? 'Belum Tanda Tangan' : 'Telah TTD Pada '.$datas->ttd_dpa }}</label>
|
||||
<input type="text" class="form-control form-control-border" readonly value="{{ $datas->dpa_nama_gelar }}">
|
||||
<label for="dosen_kombi">Kombi: </label>
|
||||
<input type="text" class="form-control form-control-border" readonly value="{{ $datas->ttd_kombi === '-' ? 'Belum Tanda Tangan' : 'Telah TTD Pada '.$datas->ttd_kombi }}">
|
||||
<label for="file_transkrip">Lihat File Transkrip:</label>
|
||||
<a href="{{asset('storage')}}/{{ $datas->nim }}/{{ $datas->bukti_transkrip_nilai }}" target="_blank"><input type="text" class="form-control form-control-border" readonly value="Klik Disini"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>CaseID</th>
|
||||
<th>NIM</th>
|
||||
<th>DPU</th>
|
||||
<th>DPA</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -503,6 +143,7 @@
|
|||
}
|
||||
},"csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
@ -12,12 +12,54 @@
|
|||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error )
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">
|
||||
<ul>
|
||||
<li>{{ session('success') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<li>{{ session('error') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<form action="{{ route('layanan-dpudpa.store') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="nim">NIM Mahasiswa</label>
|
||||
<input type="text" name="nim" id="nim" class="form-control" placeholder="Masukkan NIM Mahasiswa">
|
||||
<input type="text" name="nim" id="nim" class="form-control" placeholder="Masukkan NIM Mahasiswa" value="{{old('nim')}}" required>
|
||||
<label for="nama">Nama Mahasiswa</label>
|
||||
<input type="text" name="nama" id="nama" class="form-control" placeholder="Masukkan Nama Mahasiswa">
|
||||
<input type="text" name="nama" id="nama" class="form-control" placeholder="Masukkan Nama Mahasiswa" value="{{old('nama')}}" required>
|
||||
<label for="nomor_hp">Nomor Handphone Mahasiswa (WhatsApp)</label>
|
||||
<input type="text" name="nomor_hp" id="nomor_hp" class="form-control" placeholder="Masukkan Nomor Handphone Mahasiswa (WhatsApp)" value="{{old('nomor_hp')}}" required>
|
||||
<label for="email">Email Mahasiswa</label>
|
||||
<input type="text" name="email" id="email" class="form-control" placeholder="Masukkan Email Mahasiswa" value="{{old('email')}}" required>
|
||||
<label for="bagian">Bagian Lab:</label>
|
||||
<select class="form-control select2" style="width: 100%;" id="bagian" name="bagian">
|
||||
<option selected>Pilih Laboratorium</option>
|
||||
<option value="1">Farmasi Klinik Dan Komunitas</option>
|
||||
<option value="2">Farmakologi Dan Hewan Coba</option>
|
||||
<option value="3">Farmakognosi dan Fitokimia</option>
|
||||
<option value="4">Mikrobiologi dan Bioteknologi Farmasi</option>
|
||||
<option value="5">Farmasetika</option>
|
||||
<option value="6">Teknologi Farmasi</option>
|
||||
<option value="7">Kimia Analisis</option>
|
||||
<option value="8">Kimia Medisinal</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
@ -25,15 +67,24 @@
|
|||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label>Dosen Pembimbing Utama</label>
|
||||
<select class="form-control select2" style="width: 100%;">
|
||||
<option selected>Pilih Dosen</option>
|
||||
<option>Alaska</option>
|
||||
<option>California</option>
|
||||
<option>Delaware</option>
|
||||
<option>Tennessee</option>
|
||||
<option>Texas</option>
|
||||
<option>Washington</option>
|
||||
<label for="dosen_dpu">Dosen Pembimbing Utama</label>
|
||||
<select class="form-control select2" style="width: 100%;" id="dosen_dpu" name="dosen_dpu">
|
||||
<option selected>Pilih Dosen Pembimbing Utama</option>
|
||||
@foreach ($dosen as $item)
|
||||
<option value="{{$item->id}}" {{ old('dosen_dpu') === $item->id ? 'selected' : '' }}>{{ $item->nama_gelar }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="dosen_dpa">Dosen Pembimbing Anggota</label>
|
||||
<select class="form-control select2" style="width: 100%;" id="dosen_dpa" name="dosen_dpa">
|
||||
<option>Pilih Dosen Pembimbing Anggota</option>
|
||||
@foreach ($dosen as $item)
|
||||
<option value="{{$item->id}}" {{ old('dosen_dpa') === $item->id ? 'selected' : '' }}>{{ $item->nama_gelar }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
@ -41,10 +92,20 @@
|
|||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
.
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="judul_seminar_proposal">Judul Skripsi / Tugas Akhir</label>
|
||||
<input type="text" name="judul_seminar_proposal" id="judul_seminar_proposal" class="form-control" placeholder="Masukkan Judul Skripsi / Tugas Akhir yang Diajukan" value="{{old('judul_seminar_proposal')}}" required>
|
||||
<label for="file_transkrip">Transkrip Nilai (*File Bertentuk PDF, Dan Ukuran Maksimal file :4Mb)</label>
|
||||
<input type="file" name="file_transkrip" id="file_transkrip" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col py-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>AdminLTE 3 | Advanced form elements</title>
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<!-- Google Font: Source Sans Pro -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
|
@ -30,9 +30,9 @@
|
|||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="{{asset('/')}}index3.html" class="brand-link">
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('/')}}dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">AdminLTE 3</span>
|
||||
<span class="brand-text font-weight-light">PINTU</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{ asset('/') }}dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">AdminLTE 3</span>
|
||||
<span class="brand-text font-weight-light">PINTU</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
@ -15,7 +15,7 @@
|
|||
<img src="{{ asset('/') }}dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">Alexander Pierce</a>
|
||||
<a href="#" class="d-block">{{ Auth::user()->nama_depan }} {{ Auth::user()->nama_belakang }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -53,7 +53,8 @@
|
|||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-header">Administrasi</li>
|
||||
<li class="nav-header">ADMINISTRASI</li>
|
||||
@role('Super Administrator')
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('users.index') }}" class="nav-link {{ Request::is('admin/users') ? 'active' : '' }}">
|
||||
<i class="nav-icon fas fa-users"></i>
|
||||
|
@ -70,6 +71,7 @@
|
|||
</p>
|
||||
</a>
|
||||
</li>
|
||||
@endrole
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('mahasiswa.index') }}" class="nav-link {{ Request::is('admin/mahasiswa') ? 'active' : '' }}">
|
||||
<i class="nav-icon fas fa-user-graduate"></i>
|
||||
|
@ -79,6 +81,18 @@
|
|||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<li class="nav-header">Lainnya</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.logout') }}" class="nav-link">
|
||||
<i class="nav-icon fas fa-power-off"></i>
|
||||
<p>
|
||||
Logout
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="#">Admin</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Admin</a></li>
|
||||
<li class="breadcrumb-item active">Manajemen Mahasiswa</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -93,7 +93,9 @@
|
|||
<div class="row">
|
||||
<div class="col">
|
||||
<form action="{{ route('mahasiswa.update')}}" method="post">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{$users->id}}">
|
||||
<label for="nim">NIM</label>
|
||||
<input type="text" name="nim" id="nim" class="form-control form-control-sm" placeholder="Masukkan NIM Mahasiswa" value="{{ $users->nim }}">
|
||||
<label for="nama">Nama</label>
|
||||
|
@ -200,10 +202,10 @@
|
|||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<form action="{{ route('users.destroy')}}" method="post">
|
||||
<form action="{{ route('mahasiswa.destroy')}}" method="post">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
Anda Yakin ingin Menghapus Data ini ?
|
||||
Anda Yakin ingin Menghapus Data ini ?
|
||||
<input type="hidden" name="id" id="id" value="{{$users->id}}">
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
|
@ -375,26 +377,9 @@
|
|||
$(function () {
|
||||
$("#example1").DataTable({
|
||||
"responsive": true, "lengthChange": false, "autoWidth": false,
|
||||
// "buttons": [{
|
||||
// // New button configuration
|
||||
// text: 'Tambah Data', // Replace with your desired button text
|
||||
// action: function ( e, dt, node, config ) {
|
||||
// // Perform your custom action here, e.g., open a new tab with the external link
|
||||
// window.location.href = "#tambahUser";
|
||||
// }
|
||||
// }
|
||||
// ,"csv", "excel", "pdf", "print", "colvis"
|
||||
// ]
|
||||
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
|
||||
}).container().appendTo('#example1_wrapper .col-md-6:eq(0)');
|
||||
$('.select2').select2();
|
||||
});
|
||||
</script>
|
||||
<!-- Select2 -->
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Initialize Select2 Elements
|
||||
|
||||
});
|
||||
@endpush
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="#">Admin</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Admin</a></li>
|
||||
<li class="breadcrumb-item active">Manajemen User</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -73,7 +73,11 @@
|
|||
<td>{{ $users->nip }}</td>
|
||||
<td>{{ $users->nama_gelar }}</td>
|
||||
<td>{{ $users->email }}</td>
|
||||
<td>{{ $users->nama_roles }}</td>
|
||||
<td>
|
||||
@foreach ($users->roles as $role)
|
||||
| {{ $role->name }}
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#user{{$users->id}}">Edit</button> |
|
||||
<button class="btn btn-sm btn-danger" data-toggle="modal" data-target="#userdestroy{{$users->id}}">Hapus</button></td>
|
||||
|
@ -94,26 +98,19 @@
|
|||
<form action="{{ route('users.update')}}" method="post">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<input type="hidden" name="id" id="id" value="{{$users->id}}">
|
||||
<input type="hidden" name="id" id="id" value="{{$users->id}}" required>
|
||||
<label for="nip">NIP</label>
|
||||
<input type="text" name="nip" id="nip" class="form-control" placeholder="Masukkan NIP Dosen" value="{{ $users->nip }}">
|
||||
<input type="text" name="nip" id="nip" class="form-control" placeholder="Masukkan NIP Dosen" value="{{ $users->nip }}" required>
|
||||
<label for="nama_depan">Nama Depan</label>
|
||||
<input type="text" name="nama_depan" id="nama_depan" class="form-control" placeholder="Masukkan Nama Depan" value="{{ $users->nama_depan }}">
|
||||
<input type="text" name="nama_depan" id="nama_depan" class="form-control" placeholder="Masukkan Nama Depan" value="{{ $users->nama_depan }}" required>
|
||||
<label for="nama_belakang">Nama Belakang</label>
|
||||
<input type="text" name="nama_belakang" id="nama_belakang" class="form-control" placeholder="Masukkan Nama Belakang" value="{{ $users->nama_belakang }}">
|
||||
<input type="text" name="nama_belakang" id="nama_belakang" class="form-control" placeholder="Masukkan Nama Belakang" value="{{ $users->nama_belakang }}" required>
|
||||
<label for="nama_gelar">Nama Lengkap Dengan Gelar</label>
|
||||
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" value="{{ $users->nama_gelar }}">
|
||||
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" value="{{ $users->nama_gelar }}" required>
|
||||
<label for="Email">Email</label>
|
||||
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" value="{{ $users->email }}">
|
||||
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" value="{{ $users->email }}" required>
|
||||
<label for="ettd">Kode E-TTD</label>
|
||||
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" value="{{ $users->ettd }}">
|
||||
<label for="user_roles_id">Role User</label>
|
||||
<select name="user_roles_id" id="user_roles_id" class="form-control">
|
||||
<option>Pilih Role User</option>
|
||||
@foreach($role as $roles)
|
||||
<option value="{{$roles->id}}" {{ $users->user_roles_id === $roles->id ? 'selected' : '' }}>{{$roles->nama}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" value="{{ $users->ettd }}" required>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
@ -197,24 +194,17 @@
|
|||
<form action="{{ route('users.store')}}" method="post">
|
||||
@csrf
|
||||
<label for="nip">NIP</label>
|
||||
<input type="text" name="nip" id="nip" class="form-control" placeholder="Masukkan NIP Dosen" value="{{ old('nip')}}">
|
||||
<input type="text" name="nip" id="nip" class="form-control" placeholder="Masukkan NIP Dosen" value="{{ old('nip')}}" required>
|
||||
<label for="nama_depan">Nama Depan</label>
|
||||
<input type="text" name="nama_depan" id="nama_depan" class="form-control" placeholder="Masukkan Nama Depan" value="{{ old('nama_depan')}}">
|
||||
<input type="text" name="nama_depan" id="nama_depan" class="form-control" placeholder="Masukkan Nama Depan" value="{{ old('nama_depan')}}" required>
|
||||
<label for="nama_belakang">Nama Belakang</label>
|
||||
<input type="text" name="nama_belakang" id="nama_belakang" class="form-control" placeholder="Masukkan Nama Belakang" value="{{ old('nama_belakang')}}">
|
||||
<input type="text" name="nama_belakang" id="nama_belakang" class="form-control" placeholder="Masukkan Nama Belakang" value="{{ old('nama_belakang')}}" required>
|
||||
<label for="nama_gelar">Nama Lengkap Dengan Gelar</label>
|
||||
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar">
|
||||
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" required>
|
||||
<label for="Email">Email</label>
|
||||
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email">
|
||||
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" required>
|
||||
<label for="ettd">Kode E-TTD</label>
|
||||
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD">
|
||||
<label for="user_roles_id">Role User</label>
|
||||
<select name="user_roles_id" id="user_roles_id" class="form-control">
|
||||
<option selected>Pilih Role User</option>
|
||||
@foreach($role as $roles)
|
||||
<option value="{{$roles->id}}">{{$roles->nama}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" required>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
|
|
@ -9,19 +9,19 @@
|
|||
<!-- Add Content Here -->
|
||||
@section('content')
|
||||
<!-- Include Sidebar -->
|
||||
@include('layout.navbars.sidebar', ['title' => 'Layanan Akademik'])
|
||||
@include('layout.navbars.sidebar')
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>Blank Page</h1>
|
||||
<h1>Manajemen User</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
||||
<li class="breadcrumb-item active">Blank Page</li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Admin</a></li>
|
||||
<li class="breadcrumb-item active">Manajemen User</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -43,10 +43,34 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error )
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">
|
||||
<ul>
|
||||
<li>{{ session('success') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<li>{{ session('error') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#modal-default">Tambah Data</button>
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>No</th>
|
||||
<th>Nama Role User</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
|
@ -54,10 +78,81 @@
|
|||
<tbody>
|
||||
@foreach ($data as $datas)
|
||||
<tr>
|
||||
<td>{{ $datas->id }}</td>
|
||||
<td>{{ $datas->nama }}</td>
|
||||
<td class="text-center"><button class="btn btn-sm btn-success">Edit</button> | <button class="btn btn-sm btn-danger">Hapus</button></td>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $datas->name }}</td>
|
||||
<td class="text-center"><button class="btn btn-success" data-toggle="modal" data-target="#modal{{ $loop->iteration }}">Edit</button> | <button class="btn btn-primary" data-toggle="modal" data-target="#assign{{ $loop->iteration }}">Assign Roles</button>
|
||||
</tr>
|
||||
<div class="modal fade" id="modal{{ $loop->iteration }}">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Edit Nama Roles</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<form action="#" method="post">
|
||||
@csrf
|
||||
<label for="role_name">Nama Role:</label>
|
||||
<input type="text" name="role_name" id="role_name" class="form-control" placeholder="Masukkan nama Role" value="{{ $datas->name }}" required>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Tambah</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
<div class="modal fade" id="assign{{ $loop->iteration }}">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Assign <b>{{ $datas->name }}</b> Ke:</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<form action="{{ route('users-roles.assign')}}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="roles_user" value="{{ $datas->name }}">
|
||||
<label class="col-form-label">User: </label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="checkAll">
|
||||
<label for="checkAll" class="form-check-label">Check All</label>
|
||||
</div>
|
||||
@foreach ($user as $users)
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="itemCheckbox form-check-input" name="checkboxes[]" value="{{$users->id}}">
|
||||
<label for="{{$users->id}}" class="form-check-label">{{ $users->nama_gelar }}</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Tambah</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
@ -76,6 +171,37 @@
|
|||
<!-- /.card-footer-->
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<!-- /.Modal ADD DATA -->
|
||||
<div class="modal fade" id="modal-default">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Tambah Data</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<form action="{{ route('users-roles.store') }}" method="post">
|
||||
@csrf
|
||||
<label for="role_name">Nama Role:</label>
|
||||
<input type="text" name="role_name" id="role_name" class="form-control" placeholder="Masukkan nama Role" value="{{ old('role_name')}}" required>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Tambah</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
@ -101,17 +227,23 @@
|
|||
$(function () {
|
||||
$("#example1").DataTable({
|
||||
"responsive": true, "lengthChange": false, "autoWidth": false,
|
||||
"buttons": [{
|
||||
// New button configuration
|
||||
text: 'Tambah Data', // Replace with your desired button text
|
||||
action: function ( e, dt, node, config ) {
|
||||
// Perform your custom action here, e.g., open a new tab with the external link
|
||||
window.location.href = "#tambahUser";
|
||||
}
|
||||
}
|
||||
//,"csv", "excel", "pdf", "print", "colvis"
|
||||
]
|
||||
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
|
||||
}).container().appendTo('#example1_wrapper .col-md-6:eq(0)');
|
||||
//checkAll button
|
||||
});
|
||||
const checkAll = document.getElementById('checkAll');
|
||||
const itemCheckboxes = document.querySelectorAll('.itemCheckbox');
|
||||
|
||||
checkAll.addEventListener('change', function() {
|
||||
for (const checkbox of itemCheckboxes) {
|
||||
checkbox.checked = this.checked;
|
||||
}
|
||||
});
|
||||
|
||||
// Optionally, update the "Check All" text based on checked items:
|
||||
itemCheckboxes.forEach(checkbox => {
|
||||
checkbox.addEventListener('change', function() {
|
||||
checkAll.checked = [...itemCheckboxes].every(box => box.checked);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
use App\Http\Controllers\UserController;
|
||||
use App\Http\Controllers\LayananPengajuanDpuDpaController;
|
||||
use App\Http\Controllers\MahasiswaController;
|
||||
use App\Http\Controllers\SesiLoginController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -19,23 +20,39 @@
|
|||
|
|
||||
*/
|
||||
|
||||
Route::group(['prefix' => 'admin'], function () {
|
||||
Route::get('/', [AdminController::class, 'index'])->name('admin.dashboard');
|
||||
Route::get('/layanan-dpudpa', [LayananPengajuanDpuDpaController::class, 'index'])->name('layanan-dpudpa.index');
|
||||
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::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');
|
||||
//User
|
||||
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');
|
||||
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');
|
||||
//Mahasiswa
|
||||
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');
|
||||
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');
|
||||
//User Roles
|
||||
Route::get('/users-roles', [UserController::class, 'userroles_index'])->name('users-roles.index');
|
||||
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('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'tambah'])->name('layanan-dpudpa.tambah');
|
||||
Route::post('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'store'])->name('layanan-dpudpa.store');
|
2
storage/debugbar/.gitignore
vendored
Normal file
2
storage/debugbar/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
Loading…
Reference in New Issue
Block a user