role permission belom
This commit is contained in:
parent
ee4b4c2404
commit
9214aa0a31
|
@ -1,88 +1,88 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Models;
|
// namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
// use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
// use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
// use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
|
||||||
class Listform extends Model
|
// class Listform extends Model
|
||||||
{
|
// {
|
||||||
use HasFactory;
|
// use HasFactory;
|
||||||
|
|
||||||
protected $guarded = [];
|
// protected $guarded = [];
|
||||||
|
|
||||||
protected $casts = [
|
// protected $casts = [
|
||||||
'nilai_kepemilikan_kip' => 'decimal:7',
|
// 'nilai_kepemilikan_kip' => 'decimal:7',
|
||||||
'nilai_tingkatan_desil' => 'decimal:7',
|
// 'nilai_tingkatan_desil' => 'decimal:7',
|
||||||
'nilai_kondisi_ekonomi' => 'decimal:7',
|
// 'nilai_kondisi_ekonomi' => 'decimal:7',
|
||||||
'total_nilai' => 'decimal:7',
|
// 'total_nilai' => 'decimal:7',
|
||||||
];
|
// ];
|
||||||
|
|
||||||
public function mahasiswa(): BelongsTo
|
// public function mahasiswa(): BelongsTo
|
||||||
{
|
// {
|
||||||
return $this->belongsTo(Mahasiswa::class);
|
// return $this->belongsTo(Mahasiswa::class);
|
||||||
}
|
// }
|
||||||
|
|
||||||
protected static function boot()
|
// protected static function boot()
|
||||||
{
|
// {
|
||||||
parent::boot();
|
// parent::boot();
|
||||||
|
|
||||||
static::saving(function ($listform) {
|
// static::saving(function ($listform) {
|
||||||
// Hitung jumlah berkas yang diupload
|
// // Hitung jumlah berkas yang diupload
|
||||||
$berkasCount = 0;
|
// $berkasCount = 0;
|
||||||
if (!empty($listform->berkas_sktm)) $berkasCount++;
|
// if (!empty($listform->berkas_sktm)) $berkasCount++;
|
||||||
if (!empty($listform->berkas_ppke)) $berkasCount++;
|
// if (!empty($listform->berkas_ppke)) $berkasCount++;
|
||||||
if (!empty($listform->berkas_pmk)) $berkasCount++;
|
// if (!empty($listform->berkas_pmk)) $berkasCount++;
|
||||||
if (!empty($listform->berkas_pkh)) $berkasCount++;
|
// if (!empty($listform->berkas_pkh)) $berkasCount++;
|
||||||
if (!empty($listform->berkas_kks)) $berkasCount++;
|
// if (!empty($listform->berkas_kks)) $berkasCount++;
|
||||||
|
|
||||||
// Tentukan kondisi ekonomi dan nilai berdasarkan jumlah berkas
|
// // Tentukan kondisi ekonomi dan nilai berdasarkan jumlah berkas
|
||||||
if ($berkasCount >= 4) {
|
// if ($berkasCount >= 4) {
|
||||||
$listform->kondisi_ekonomi = 'Sangat Kurang Mampu';
|
// $listform->kondisi_ekonomi = 'Sangat Kurang Mampu';
|
||||||
$listform->nilai_kondisi_ekonomi = 0.4;
|
// $listform->nilai_kondisi_ekonomi = 0.4;
|
||||||
} elseif ($berkasCount >= 2) {
|
// } elseif ($berkasCount >= 2) {
|
||||||
$listform->kondisi_ekonomi = 'Kurang Mampu';
|
// $listform->kondisi_ekonomi = 'Kurang Mampu';
|
||||||
$listform->nilai_kondisi_ekonomi = 0.3;
|
// $listform->nilai_kondisi_ekonomi = 0.3;
|
||||||
} else {
|
// } else {
|
||||||
$listform->kondisi_ekonomi = 'Cukup Mampu';
|
// $listform->kondisi_ekonomi = 'Cukup Mampu';
|
||||||
$listform->nilai_kondisi_ekonomi = 0.3;
|
// $listform->nilai_kondisi_ekonomi = 0.3;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Hitung total nilai
|
// // Hitung total nilai
|
||||||
$totalNilai = 0;
|
// $totalNilai = 0;
|
||||||
|
|
||||||
// Nilai dari Kepemilikan KIP
|
// // Nilai dari Kepemilikan KIP
|
||||||
if ($listform->kepemilikan_kip === 'Memiliki KIP') {
|
// if ($listform->kepemilikan_kip === 'Memiliki KIP') {
|
||||||
$totalNilai += 0.6;
|
// $totalNilai += 0.6;
|
||||||
} else {
|
// } else {
|
||||||
$totalNilai += 0.4;
|
// $totalNilai += 0.4;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Nilai dari Tingkatan Desil
|
// // Nilai dari Tingkatan Desil
|
||||||
switch ($listform->tingkatan_desil) {
|
// switch ($listform->tingkatan_desil) {
|
||||||
case 'Desil 1':
|
// case 'Desil 1':
|
||||||
$totalNilai += 0.35;
|
// $totalNilai += 0.35;
|
||||||
break;
|
// break;
|
||||||
case 'Desil 2':
|
// case 'Desil 2':
|
||||||
$totalNilai += 0.25;
|
// $totalNilai += 0.25;
|
||||||
break;
|
// break;
|
||||||
case 'Desil 3':
|
// case 'Desil 3':
|
||||||
$totalNilai += 0.20;
|
// $totalNilai += 0.20;
|
||||||
break;
|
// break;
|
||||||
case 'Desil 4':
|
// case 'Desil 4':
|
||||||
$totalNilai += 0.15;
|
// $totalNilai += 0.15;
|
||||||
break;
|
// break;
|
||||||
case 'Desil 5':
|
// case 'Desil 5':
|
||||||
$totalNilai += 0.05;
|
// $totalNilai += 0.05;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Tambahkan nilai kondisi ekonomi
|
// // Tambahkan nilai kondisi ekonomi
|
||||||
$totalNilai += $listform->nilai_kondisi_ekonomi;
|
// $totalNilai += $listform->nilai_kondisi_ekonomi;
|
||||||
|
|
||||||
$listform->total_nilai = $totalNilai;
|
// $listform->total_nilai = $totalNilai;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Formulir;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class FormulirPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_any_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
|
public function view(User $user, Formulir $formulir): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('create_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the model.
|
||||||
|
*/
|
||||||
|
public function update(User $user, Formulir $formulir): bool
|
||||||
|
{
|
||||||
|
return $user->can('update_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Formulir $formulir): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk delete.
|
||||||
|
*/
|
||||||
|
public function deleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_any_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete.
|
||||||
|
*/
|
||||||
|
public function forceDelete(User $user, Formulir $formulir): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently bulk delete.
|
||||||
|
*/
|
||||||
|
public function forceDeleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_any_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore.
|
||||||
|
*/
|
||||||
|
public function restore(User $user, Formulir $formulir): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk restore.
|
||||||
|
*/
|
||||||
|
public function restoreAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_any_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can replicate.
|
||||||
|
*/
|
||||||
|
public function replicate(User $user, Formulir $formulir): bool
|
||||||
|
{
|
||||||
|
return $user->can('replicate_formulir');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can reorder.
|
||||||
|
*/
|
||||||
|
public function reorder(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('reorder_formulir');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Kriteria;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class KriteriaPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_any_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
|
public function view(User $user, Kriteria $kriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('create_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the model.
|
||||||
|
*/
|
||||||
|
public function update(User $user, Kriteria $kriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('update_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Kriteria $kriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk delete.
|
||||||
|
*/
|
||||||
|
public function deleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_any_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete.
|
||||||
|
*/
|
||||||
|
public function forceDelete(User $user, Kriteria $kriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently bulk delete.
|
||||||
|
*/
|
||||||
|
public function forceDeleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_any_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore.
|
||||||
|
*/
|
||||||
|
public function restore(User $user, Kriteria $kriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk restore.
|
||||||
|
*/
|
||||||
|
public function restoreAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_any_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can replicate.
|
||||||
|
*/
|
||||||
|
public function replicate(User $user, Kriteria $kriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('replicate_kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can reorder.
|
||||||
|
*/
|
||||||
|
public function reorder(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('reorder_kriteria');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Mahasiswa;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class MahasiswaPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_any_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
|
public function view(User $user, Mahasiswa $mahasiswa): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('create_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the model.
|
||||||
|
*/
|
||||||
|
public function update(User $user, Mahasiswa $mahasiswa): bool
|
||||||
|
{
|
||||||
|
return $user->can('update_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Mahasiswa $mahasiswa): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk delete.
|
||||||
|
*/
|
||||||
|
public function deleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_any_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete.
|
||||||
|
*/
|
||||||
|
public function forceDelete(User $user, Mahasiswa $mahasiswa): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently bulk delete.
|
||||||
|
*/
|
||||||
|
public function forceDeleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_any_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore.
|
||||||
|
*/
|
||||||
|
public function restore(User $user, Mahasiswa $mahasiswa): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk restore.
|
||||||
|
*/
|
||||||
|
public function restoreAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_any_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can replicate.
|
||||||
|
*/
|
||||||
|
public function replicate(User $user, Mahasiswa $mahasiswa): bool
|
||||||
|
{
|
||||||
|
return $user->can('replicate_mahasiswa');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can reorder.
|
||||||
|
*/
|
||||||
|
public function reorder(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('reorder_mahasiswa');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\SubKriteria;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class SubKriteriaPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_any_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
|
public function view(User $user, SubKriteria $subKriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('create_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the model.
|
||||||
|
*/
|
||||||
|
public function update(User $user, SubKriteria $subKriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('update_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
|
public function delete(User $user, SubKriteria $subKriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk delete.
|
||||||
|
*/
|
||||||
|
public function deleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_any_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete.
|
||||||
|
*/
|
||||||
|
public function forceDelete(User $user, SubKriteria $subKriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently bulk delete.
|
||||||
|
*/
|
||||||
|
public function forceDeleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_any_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore.
|
||||||
|
*/
|
||||||
|
public function restore(User $user, SubKriteria $subKriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk restore.
|
||||||
|
*/
|
||||||
|
public function restoreAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_any_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can replicate.
|
||||||
|
*/
|
||||||
|
public function replicate(User $user, SubKriteria $subKriteria): bool
|
||||||
|
{
|
||||||
|
return $user->can('replicate_sub::kriteria');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can reorder.
|
||||||
|
*/
|
||||||
|
public function reorder(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('reorder_sub::kriteria');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Parameter;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class ParameterPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_any_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
|
public function view(User $user, Parameter $parameter): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('create_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the model.
|
||||||
|
*/
|
||||||
|
public function update(User $user, Parameter $parameter): bool
|
||||||
|
{
|
||||||
|
return $user->can('update_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Parameter $parameter): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk delete.
|
||||||
|
*/
|
||||||
|
public function deleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_any_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete.
|
||||||
|
*/
|
||||||
|
public function forceDelete(User $user, Parameter $parameter): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently bulk delete.
|
||||||
|
*/
|
||||||
|
public function forceDeleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('force_delete_any_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore.
|
||||||
|
*/
|
||||||
|
public function restore(User $user, Parameter $parameter): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk restore.
|
||||||
|
*/
|
||||||
|
public function restoreAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('restore_any_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can replicate.
|
||||||
|
*/
|
||||||
|
public function replicate(User $user, Parameter $parameter): bool
|
||||||
|
{
|
||||||
|
return $user->can('replicate_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can reorder.
|
||||||
|
*/
|
||||||
|
public function reorder(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('reorder_pengumuman');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show()
|
||||||
|
{
|
||||||
|
$pengumuman = Parameter::where('mahasiswa_id', auth()->user()->mahasiswa->id)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
return view('pengumuman', compact('pengumuman'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,7 @@
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
use App\Filament\Pages\WizardForm;
|
use App\Filament\Pages\WizardForm;
|
||||||
use App\Filament\Widgets\CustomAccountWidget;
|
use App\Filament\Widgets\CustomAccountWidget;
|
||||||
|
use App\Filament\Pages\Auth\Register;
|
||||||
|
|
||||||
class AdminPanelProvider extends PanelProvider
|
class AdminPanelProvider extends PanelProvider
|
||||||
{
|
{
|
||||||
|
@ -30,6 +31,7 @@ public function panel(Panel $panel): Panel
|
||||||
->id('admin')
|
->id('admin')
|
||||||
->path('admin')
|
->path('admin')
|
||||||
->login()
|
->login()
|
||||||
|
->registration(Register::class)
|
||||||
->plugin(FilamentShieldPlugin::make())
|
->plugin(FilamentShieldPlugin::make())
|
||||||
->brandLogo(asset('images/logo-polije.png'))
|
->brandLogo(asset('images/logo-polije.png'))
|
||||||
->brandLogoHeight('3rem')
|
->brandLogoHeight('3rem')
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<x-filament-panels::page>
|
||||||
|
<div class="space-y-6">
|
||||||
|
<div class="bg-white rounded-lg shadow p-6">
|
||||||
|
<h2 class="text-2xl font-bold mb-4">Selamat Datang di Sistem KIP-K</h2>
|
||||||
|
<p class="text-gray-600">
|
||||||
|
Sistem ini digunakan untuk pendaftaran dan pengelolaan Kartu Indonesia Pintar Kuliah (KIP-K).
|
||||||
|
Silakan gunakan menu navigasi di sebelah kiri untuk mengakses fitur-fitur yang tersedia.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white rounded-lg shadow p-6">
|
||||||
|
<h3 class="text-xl font-semibold mb-4">Informasi Penting</h3>
|
||||||
|
<ul class="list-disc list-inside space-y-2 text-gray-600">
|
||||||
|
<li>Pastikan data diri Anda sudah lengkap dan valid</li>
|
||||||
|
<li>Lengkapi semua berkas yang diperlukan sesuai dengan persyaratan</li>
|
||||||
|
<li>Periksa status pengajuan Anda secara berkala</li>
|
||||||
|
<li>Jika ada kendala, silakan hubungi admin</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-filament-panels::page>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<x-filament-panels::page>
|
||||||
|
<div class="space-y-6">
|
||||||
|
<div class="bg-white rounded-lg shadow p-6">
|
||||||
|
<h2 class="text-2xl font-bold mb-4">Form Pendaftaran KIP-K</h2>
|
||||||
|
<p class="text-gray-600 mb-4">
|
||||||
|
Silakan lengkapi form pendaftaran berikut untuk mengajukan KIP-K. Pastikan semua data yang Anda masukkan valid dan lengkap.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<livewire:wizard-form />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-filament-panels::page>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<x-filament-panels::page>
|
||||||
|
<div class="space-y-6">
|
||||||
|
<div class="bg-white rounded-lg shadow p-6">
|
||||||
|
<h2 class="text-2xl font-bold mb-4">Pengumuman Hasil Seleksi KIP-K</h2>
|
||||||
|
<p class="text-gray-600 mb-4">
|
||||||
|
Berikut adalah status pengajuan dan hasil seleksi KIP-K Anda. Silakan periksa secara berkala untuk mendapatkan informasi terbaru.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{{ $this->table }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-filament-panels::page>
|
Loading…
Reference in New Issue