navigation roles uda ada
This commit is contained in:
parent
54dc34b7b1
commit
ee4b4c2404
|
@ -3,10 +3,21 @@
|
||||||
namespace App\Filament\Pages\Auth;
|
namespace App\Filament\Pages\Auth;
|
||||||
|
|
||||||
use Filament\Pages\Auth\Register as BaseRegister;
|
use Filament\Pages\Auth\Register as BaseRegister;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class Register extends BaseRegister
|
class Register extends BaseRegister
|
||||||
{
|
{
|
||||||
// Kustomisasi form registrasi jika diperlukan
|
public ?array $data = [];
|
||||||
|
|
||||||
|
protected function handleRegistration(array $data): Model
|
||||||
|
{
|
||||||
|
$user = parent::handleRegistration($data);
|
||||||
|
$user->assignRole('mahasiswa');
|
||||||
|
return $user;
|
||||||
|
}
|
||||||
|
|
||||||
protected function getForms(): array
|
protected function getForms(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
@ -22,4 +33,4 @@ protected function getForms(): array
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -32,16 +32,11 @@ public static function form(Form $form): Form
|
||||||
return $form
|
return $form
|
||||||
->schema([
|
->schema([
|
||||||
TextInput::make('nama')
|
TextInput::make('nama')
|
||||||
->required()
|
->required(),//kolom wajib diisi
|
||||||
->label('Nama Kriteria'),
|
|
||||||
TextInput::make('prioritas')
|
TextInput::make('prioritas')
|
||||||
->numeric()
|
->required(),
|
||||||
->required()
|
|
||||||
->label('Prioritas (Urutan)')
|
|
||||||
->helperText('Masukkan angka prioritas (1 untuk prioritas tertinggi)'),
|
|
||||||
TextInput::make('bobot')
|
TextInput::make('bobot')
|
||||||
->disabled()
|
// ->required(),
|
||||||
->helperText('Bobot akan dihitung otomatis menggunakan metode SMARTER'),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,19 +45,14 @@ public static function table(Table $table): Table
|
||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('nama')
|
TextColumn::make('nama')
|
||||||
->label('Nama Kriteria')
|
->searchable(),
|
||||||
->searchable()
|
TextColumn::make('prioritas'),
|
||||||
->sortable(),
|
TextColumn::make('bobot'),
|
||||||
TextColumn::make('prioritas')
|
|
||||||
->label('Prioritas')
|
])
|
||||||
->sortable(),
|
->filters([
|
||||||
TextColumn::make('bobot')
|
//
|
||||||
->label('Bobot')
|
|
||||||
->formatStateUsing(fn ($state) => number_format($state, 4))
|
|
||||||
->sortable(),
|
|
||||||
])
|
])
|
||||||
->defaultSort('prioritas')
|
|
||||||
->filters([])
|
|
||||||
->actions([
|
->actions([
|
||||||
Tables\Actions\EditAction::make(),
|
Tables\Actions\EditAction::make(),
|
||||||
])
|
])
|
||||||
|
|
|
@ -30,10 +30,7 @@ class ParameterResource extends Resource
|
||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-list';
|
protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-list';
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Perangkingan';
|
protected static ?string $navigationLabel = 'Form Penilaian KIP-K';
|
||||||
protected static ?string $modelLabel = 'Perangkingan';
|
|
||||||
protected static ?string $pluralModelLabel = 'Perangkingan';
|
|
||||||
protected static ?string $breadcrumb = 'Perangkingan';
|
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'Penilaian';
|
protected static ?string $navigationGroup = 'Penilaian';
|
||||||
|
|
||||||
|
@ -301,6 +298,16 @@ public static function table(Table $table): Table
|
||||||
->label('Total Nilai')
|
->label('Total Nilai')
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
|
Tables\Columns\TextColumn::make('hasil')
|
||||||
|
->label('Hasil')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'Layak' => 'success',
|
||||||
|
'Dipertimbangkan' => 'warning',
|
||||||
|
'Tidak Layak' => 'danger',
|
||||||
|
default => 'gray',
|
||||||
|
}),
|
||||||
|
|
||||||
Tables\Columns\TextColumn::make('status')
|
Tables\Columns\TextColumn::make('status')
|
||||||
->label('Status Validasi')
|
->label('Status Validasi')
|
||||||
->badge()
|
->badge()
|
||||||
|
|
|
@ -52,12 +52,10 @@ public static function form(Form $form): Form
|
||||||
->required(),
|
->required(),
|
||||||
TextInput::make('prioritas')
|
TextInput::make('prioritas')
|
||||||
->numeric()
|
->numeric()
|
||||||
->required()
|
->required(),
|
||||||
->label('Prioritas (Urutan)')
|
|
||||||
->helperText('Masukkan angka prioritas (1 untuk prioritas tertinggi)'),
|
|
||||||
TextInput::make('bobot')
|
TextInput::make('bobot')
|
||||||
->disabled()
|
->numeric()
|
||||||
->helperText('Bobot akan dihitung otomatis menggunakan metode SMARTER'),
|
// ->required(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,14 +75,10 @@ public static function table(Table $table): Table
|
||||||
->sortable()
|
->sortable()
|
||||||
->searchable(),
|
->searchable(),
|
||||||
TextColumn::make('prioritas')
|
TextColumn::make('prioritas')
|
||||||
->label('Prioritas')
|
|
||||||
->sortable(),
|
->sortable(),
|
||||||
TextColumn::make('bobot')
|
TextColumn::make('bobot')
|
||||||
->label('Bobot')
|
|
||||||
->formatStateUsing(fn ($state) => number_format($state, 4))
|
|
||||||
->sortable(),
|
->sortable(),
|
||||||
])
|
])
|
||||||
->defaultSort('kriteria_id', 'prioritas')
|
|
||||||
->filters([
|
->filters([
|
||||||
//
|
//
|
||||||
])
|
])
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
|
use Filament\Forms\Components\Select;
|
||||||
|
|
||||||
class UserResource extends Resource
|
class UserResource extends Resource
|
||||||
{
|
{
|
||||||
|
@ -44,7 +45,12 @@ public static function form(Form $form): Form
|
||||||
TextInput::make('password')
|
TextInput::make('password')
|
||||||
->password()
|
->password()
|
||||||
->required()
|
->required()
|
||||||
// ->hiddenOn('edit'),
|
->hiddenOn('edit'),
|
||||||
|
Select::make('roles')
|
||||||
|
->multiple()
|
||||||
|
->relationship('roles', 'name')
|
||||||
|
->preload()
|
||||||
|
->helperText('Biarkan kosong untuk role default (mahasiswa)'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +64,9 @@ public static function table(Table $table): Table
|
||||||
TextColumn::make('email')
|
TextColumn::make('email')
|
||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
TextColumn::make('roles.name')
|
||||||
|
->badge()
|
||||||
|
->color('primary'),
|
||||||
TextColumn::make('password'),
|
TextColumn::make('password'),
|
||||||
TextColumn::make('created_at')
|
TextColumn::make('created_at')
|
||||||
->dateTime()
|
->dateTime()
|
||||||
|
|
|
@ -6,11 +6,12 @@
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
use Spatie\Permission\Traits\HasRoles;
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||||
use HasFactory, Notifiable;
|
use HasFactory, Notifiable, HasRoles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
|
|
|
@ -118,11 +118,11 @@ protected static function boot()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Kondisi Ekonomi':
|
case 'Kondisi Ekonomi':
|
||||||
// Hitung jumlah berkas yang diupload
|
// Hitung jumlah berkas yang diupload
|
||||||
$berkasCount = 0;
|
$berkasCount = 0;
|
||||||
if (!empty($parameter->berkas_1)) $berkasCount++;
|
if (!empty($parameter->berkas_1)) $berkasCount++;
|
||||||
if (!empty($parameter->berkas_2)) $berkasCount++;
|
if (!empty($parameter->berkas_2)) $berkasCount++;
|
||||||
if (!empty($parameter->berkas_3)) $berkasCount++;
|
if (!empty($parameter->berkas_3)) $berkasCount++;
|
||||||
|
|
||||||
// Tentukan kondisi ekonomi berdasarkan jumlah berkas
|
// Tentukan kondisi ekonomi berdasarkan jumlah berkas
|
||||||
if ($berkasCount === 0) {
|
if ($berkasCount === 0) {
|
||||||
|
@ -131,7 +131,7 @@ protected static function boot()
|
||||||
$kondisiEkonomi = 'Sangat Kurang Mampu';
|
$kondisiEkonomi = 'Sangat Kurang Mampu';
|
||||||
} elseif ($berkasCount === 2) {
|
} elseif ($berkasCount === 2) {
|
||||||
$kondisiEkonomi = 'Kurang Mampu';
|
$kondisiEkonomi = 'Kurang Mampu';
|
||||||
} else {
|
} else {
|
||||||
$kondisiEkonomi = 'Cukup Mampu';
|
$kondisiEkonomi = 'Cukup Mampu';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ protected static function boot()
|
||||||
$statusOrangTua = 'Kedua Orang Tua Wafat';
|
$statusOrangTua = 'Kedua Orang Tua Wafat';
|
||||||
} elseif ($parameter->status_ayah === 'Wafat' || $parameter->status_ibu === 'Wafat') {
|
} elseif ($parameter->status_ayah === 'Wafat' || $parameter->status_ibu === 'Wafat') {
|
||||||
$statusOrangTua = 'Salah Satu Orang Tua Wafat';
|
$statusOrangTua = 'Salah Satu Orang Tua Wafat';
|
||||||
} else {
|
} else {
|
||||||
$statusOrangTua = 'Kedua Orang Tua Masih Hidup';
|
$statusOrangTua = 'Kedua Orang Tua Masih Hidup';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ protected static function boot()
|
||||||
if ($subKriteria) {
|
if ($subKriteria) {
|
||||||
$totalNilai += $subKriteria->bobot;
|
$totalNilai += $subKriteria->bobot;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Spatie\Permission\Models\Role;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class RolePolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_any_role');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
|
public function view(User $user, Role $role): bool
|
||||||
|
{
|
||||||
|
return $user->can('view_role');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('create_role');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the model.
|
||||||
|
*/
|
||||||
|
public function update(User $user, Role $role): bool
|
||||||
|
{
|
||||||
|
return $user->can('update_role');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Role $role): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_role');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk delete.
|
||||||
|
*/
|
||||||
|
public function deleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('delete_any_role');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete.
|
||||||
|
*/
|
||||||
|
public function forceDelete(User $user, Role $role): bool
|
||||||
|
{
|
||||||
|
return $user->can('{{ ForceDelete }}');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently bulk delete.
|
||||||
|
*/
|
||||||
|
public function forceDeleteAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('{{ ForceDeleteAny }}');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore.
|
||||||
|
*/
|
||||||
|
public function restore(User $user, Role $role): bool
|
||||||
|
{
|
||||||
|
return $user->can('{{ Restore }}');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can bulk restore.
|
||||||
|
*/
|
||||||
|
public function restoreAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('{{ RestoreAny }}');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can replicate.
|
||||||
|
*/
|
||||||
|
public function replicate(User $user, Role $role): bool
|
||||||
|
{
|
||||||
|
return $user->can('{{ Replicate }}');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can reorder.
|
||||||
|
*/
|
||||||
|
public function reorder(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->can('{{ Reorder }}');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
class UserPolicy
|
||||||
|
{
|
||||||
|
public function viewAny(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->hasRole(['admin', 'super_admin']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function view(User $user, User $model): bool
|
||||||
|
{
|
||||||
|
return $user->hasRole(['admin', 'super_admin']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create(User $user): bool
|
||||||
|
{
|
||||||
|
return $user->hasRole(['admin', 'super_admin']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(User $user, User $model): bool
|
||||||
|
{
|
||||||
|
return $user->hasRole(['admin', 'super_admin']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(User $user, User $model): bool
|
||||||
|
{
|
||||||
|
return $user->hasRole(['admin', 'super_admin']);
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Providers\Filament;
|
namespace App\Providers\Filament;
|
||||||
|
|
||||||
|
use BezhanSalleh\FilamentShield\FilamentShieldPlugin;
|
||||||
use Filament\Http\Middleware\Authenticate;
|
use Filament\Http\Middleware\Authenticate;
|
||||||
use Filament\Http\Middleware\AuthenticateSession;
|
use Filament\Http\Middleware\AuthenticateSession;
|
||||||
use Filament\Http\Middleware\DisableBladeIconComponents;
|
use Filament\Http\Middleware\DisableBladeIconComponents;
|
||||||
|
@ -29,24 +30,20 @@ public function panel(Panel $panel): Panel
|
||||||
->id('admin')
|
->id('admin')
|
||||||
->path('admin')
|
->path('admin')
|
||||||
->login()
|
->login()
|
||||||
->registration()
|
->plugin(FilamentShieldPlugin::make())
|
||||||
// ->brandName('POLIJE')
|
|
||||||
->brandLogo(asset('images/logo-polije.png'))
|
->brandLogo(asset('images/logo-polije.png'))
|
||||||
->brandLogoHeight('3rem')
|
->brandLogoHeight('3rem')
|
||||||
->colors([
|
->colors([
|
||||||
// 'primary' => Color::Amber,
|
|
||||||
'primary' => Color::Blue,
|
'primary' => Color::Blue,
|
||||||
])
|
])
|
||||||
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
||||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
||||||
->pages([
|
->pages([
|
||||||
// Pages\Dashboard::class,
|
|
||||||
WizardForm::class,
|
WizardForm::class,
|
||||||
])
|
])
|
||||||
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
||||||
->widgets([
|
->widgets([
|
||||||
CustomAccountWidget::class,
|
CustomAccountWidget::class,
|
||||||
// Widgets\FilamentInfoWidget::class,
|
|
||||||
])
|
])
|
||||||
->spa()
|
->spa()
|
||||||
->middleware([
|
->middleware([
|
||||||
|
|
|
@ -7,12 +7,15 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
|
"bezhansalleh/filament-shield": "^3.3",
|
||||||
"filament/filament": "^3.2",
|
"filament/filament": "^3.2",
|
||||||
"laravel/framework": "^11.31",
|
"laravel/framework": "^11.31",
|
||||||
"laravel/tinker": "^2.9"
|
"laravel/tinker": "^2.9",
|
||||||
|
"spatie/laravel-permission": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.23",
|
"fakerphp/faker": "^1.23",
|
||||||
|
"laravel/breeze": "*",
|
||||||
"laravel/pail": "^1.1",
|
"laravel/pail": "^1.1",
|
||||||
"laravel/pint": "^1.13",
|
"laravel/pint": "^1.13",
|
||||||
"laravel/sail": "^1.26",
|
"laravel/sail": "^1.26",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "0cefc8f8c8f7320e732db22110e017ed",
|
"content-hash": "b7799fc8d95c29ec920219812daf4b93",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "anourvalar/eloquent-serialize",
|
"name": "anourvalar/eloquent-serialize",
|
||||||
|
@ -72,6 +72,93 @@
|
||||||
},
|
},
|
||||||
"time": "2025-02-25T05:18:46+00:00"
|
"time": "2025-02-25T05:18:46+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "bezhansalleh/filament-shield",
|
||||||
|
"version": "3.3.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/bezhanSalleh/filament-shield.git",
|
||||||
|
"reference": "88b6714e4d14abcb614ff3ac45114866763d1ba5"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/bezhanSalleh/filament-shield/zipball/88b6714e4d14abcb614ff3ac45114866763d1ba5",
|
||||||
|
"reference": "88b6714e4d14abcb614ff3ac45114866763d1ba5",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"filament/filament": "^3.2",
|
||||||
|
"php": "^8.1",
|
||||||
|
"spatie/laravel-package-tools": "^1.9",
|
||||||
|
"spatie/laravel-permission": "^6.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"larastan/larastan": "^2.0",
|
||||||
|
"laravel/pint": "^1.0",
|
||||||
|
"nunomaduro/collision": "^7.0|^8.0",
|
||||||
|
"orchestra/testbench": "^8.0|^9.0",
|
||||||
|
"pestphp/pest": "^2.34",
|
||||||
|
"pestphp/pest-plugin-laravel": "^2.3",
|
||||||
|
"phpstan/extension-installer": "^1.3",
|
||||||
|
"phpstan/phpstan-deprecation-rules": "^1.1",
|
||||||
|
"phpstan/phpstan-phpunit": "^1.3",
|
||||||
|
"phpunit/phpunit": "^10.1",
|
||||||
|
"spatie/laravel-ray": "^1.37"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"aliases": {
|
||||||
|
"FilamentShield": "BezhanSalleh\\FilamentShield\\Facades\\FilamentShield"
|
||||||
|
},
|
||||||
|
"providers": [
|
||||||
|
"BezhanSalleh\\FilamentShield\\FilamentShieldServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"BezhanSalleh\\FilamentShield\\": "src",
|
||||||
|
"BezhanSalleh\\FilamentShield\\Database\\Factories\\": "database/factories"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Bezhan Salleh",
|
||||||
|
"email": "bezhan_salleh@yahoo.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Filament support for `spatie/laravel-permission`.",
|
||||||
|
"homepage": "https://github.com/bezhansalleh/filament-shield",
|
||||||
|
"keywords": [
|
||||||
|
"acl",
|
||||||
|
"bezhanSalleh",
|
||||||
|
"filament",
|
||||||
|
"filament-shield",
|
||||||
|
"laravel",
|
||||||
|
"permission",
|
||||||
|
"permissions",
|
||||||
|
"rbac",
|
||||||
|
"roles",
|
||||||
|
"security"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/bezhanSalleh/filament-shield/issues",
|
||||||
|
"source": "https://github.com/bezhanSalleh/filament-shield/tree/3.3.5"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/bezhanSalleh",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-02-17T21:06:24+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "blade-ui-kit/blade-heroicons",
|
"name": "blade-ui-kit/blade-heroicons",
|
||||||
"version": "2.6.0",
|
"version": "2.6.0",
|
||||||
|
@ -4885,6 +4972,89 @@
|
||||||
],
|
],
|
||||||
"time": "2025-02-06T14:58:20+00:00"
|
"time": "2025-02-06T14:58:20+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/laravel-permission",
|
||||||
|
"version": "6.17.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/laravel-permission.git",
|
||||||
|
"reference": "02ada8f638b643713fa2fb543384738e27346ddb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/02ada8f638b643713fa2fb543384738e27346ddb",
|
||||||
|
"reference": "02ada8f638b643713fa2fb543384738e27346ddb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/auth": "^8.12|^9.0|^10.0|^11.0|^12.0",
|
||||||
|
"illuminate/container": "^8.12|^9.0|^10.0|^11.0|^12.0",
|
||||||
|
"illuminate/contracts": "^8.12|^9.0|^10.0|^11.0|^12.0",
|
||||||
|
"illuminate/database": "^8.12|^9.0|^10.0|^11.0|^12.0",
|
||||||
|
"php": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"laravel/passport": "^11.0|^12.0",
|
||||||
|
"laravel/pint": "^1.0",
|
||||||
|
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0",
|
||||||
|
"phpunit/phpunit": "^9.4|^10.1|^11.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Spatie\\Permission\\PermissionServiceProvider"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "6.x-dev",
|
||||||
|
"dev-master": "6.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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.17.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-04-08T15:06:14+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/clock",
|
"name": "symfony/clock",
|
||||||
"version": "v7.2.0",
|
"version": "v7.2.0",
|
||||||
|
@ -7640,6 +7810,67 @@
|
||||||
},
|
},
|
||||||
"time": "2020-07-09T08:09:16+00:00"
|
"time": "2020-07-09T08:09:16+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "laravel/breeze",
|
||||||
|
"version": "v2.3.6",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/laravel/breeze.git",
|
||||||
|
"reference": "390cbc433cb72fa6050965000b2d56c9ba6fd713"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/laravel/breeze/zipball/390cbc433cb72fa6050965000b2d56c9ba6fd713",
|
||||||
|
"reference": "390cbc433cb72fa6050965000b2d56c9ba6fd713",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/console": "^11.0|^12.0",
|
||||||
|
"illuminate/filesystem": "^11.0|^12.0",
|
||||||
|
"illuminate/support": "^11.0|^12.0",
|
||||||
|
"illuminate/validation": "^11.0|^12.0",
|
||||||
|
"php": "^8.2.0",
|
||||||
|
"symfony/console": "^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"laravel/framework": "^11.0|^12.0",
|
||||||
|
"orchestra/testbench-core": "^9.0|^10.0",
|
||||||
|
"phpstan/phpstan": "^2.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Laravel\\Breeze\\BreezeServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Laravel\\Breeze\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Taylor Otwell",
|
||||||
|
"email": "taylor@laravel.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Minimal Laravel authentication scaffolding with Blade and Tailwind.",
|
||||||
|
"keywords": [
|
||||||
|
"auth",
|
||||||
|
"laravel"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/laravel/breeze/issues",
|
||||||
|
"source": "https://github.com/laravel/breeze"
|
||||||
|
},
|
||||||
|
"time": "2025-03-06T14:02:32+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/pail",
|
"name": "laravel/pail",
|
||||||
"version": "v1.2.2",
|
"version": "v1.2.2",
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'shield_resource' => [
|
||||||
|
'should_register_navigation' => true,
|
||||||
|
'slug' => 'shield/roles',
|
||||||
|
'navigation_sort' => -1,
|
||||||
|
'navigation_badge' => true,
|
||||||
|
'navigation_group' => true,
|
||||||
|
'is_globally_searchable' => false,
|
||||||
|
'show_model_path' => true,
|
||||||
|
'is_scoped_to_tenant' => true,
|
||||||
|
'cluster' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'tenant_model' => null,
|
||||||
|
|
||||||
|
'auth_provider_model' => [
|
||||||
|
'fqcn' => 'App\\Models\\User',
|
||||||
|
],
|
||||||
|
|
||||||
|
'super_admin' => [
|
||||||
|
'enabled' => true,
|
||||||
|
'name' => 'super_admin',
|
||||||
|
'define_via_gate' => false,
|
||||||
|
'intercept_gate' => 'before', // after
|
||||||
|
],
|
||||||
|
|
||||||
|
'panel_user' => [
|
||||||
|
'enabled' => true,
|
||||||
|
'name' => 'panel_user',
|
||||||
|
],
|
||||||
|
|
||||||
|
'permission_prefixes' => [
|
||||||
|
'resource' => [
|
||||||
|
'view',
|
||||||
|
'view_any',
|
||||||
|
'create',
|
||||||
|
'update',
|
||||||
|
'restore',
|
||||||
|
'restore_any',
|
||||||
|
'replicate',
|
||||||
|
'reorder',
|
||||||
|
'delete',
|
||||||
|
'delete_any',
|
||||||
|
'force_delete',
|
||||||
|
'force_delete_any',
|
||||||
|
],
|
||||||
|
|
||||||
|
'page' => 'page',
|
||||||
|
'widget' => 'widget',
|
||||||
|
],
|
||||||
|
|
||||||
|
'entities' => [
|
||||||
|
'pages' => true,
|
||||||
|
'widgets' => true,
|
||||||
|
'resources' => true,
|
||||||
|
'custom_permissions' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'generator' => [
|
||||||
|
'option' => 'policies_and_permissions',
|
||||||
|
'policy_directory' => 'Policies',
|
||||||
|
'policy_namespace' => 'Policies',
|
||||||
|
],
|
||||||
|
|
||||||
|
'exclude' => [
|
||||||
|
'enabled' => true,
|
||||||
|
|
||||||
|
'pages' => [
|
||||||
|
'Dashboard',
|
||||||
|
],
|
||||||
|
|
||||||
|
'widgets' => [
|
||||||
|
'AccountWidget', 'FilamentInfoWidget',
|
||||||
|
],
|
||||||
|
|
||||||
|
'resources' => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'discovery' => [
|
||||||
|
'discover_all_resources' => false,
|
||||||
|
'discover_all_widgets' => false,
|
||||||
|
'discover_all_pages' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'register_role_policy' => [
|
||||||
|
'enabled' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
|
function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,6 @@
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use App\Http\Controllers\PdfViewController;
|
use App\Http\Controllers\PdfViewController;
|
||||||
use App\Http\Controllers\PengumumanController;
|
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return view('welcome');
|
return view('welcome');
|
||||||
|
@ -24,7 +23,3 @@
|
||||||
'Content-Disposition' => 'inline; filename="' . basename($path) . '"'
|
'Content-Disposition' => 'inline; filename="' . basename($path) . '"'
|
||||||
]);
|
]);
|
||||||
})->where('path', '.*');
|
})->where('path', '.*');
|
||||||
|
|
||||||
Route::middleware(['auth'])->group(function () {
|
|
||||||
Route::get('/pengumuman', [PengumumanController::class, 'show'])->name('pengumuman');
|
|
||||||
});
|
|
||||||
|
|
Loading…
Reference in New Issue