Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Controllers/RoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class RoleController extends Controller
*/
public function changeRole($role, Request $request)
{
if ((Pengelola::cache()->get('all')->where('user_id', Auth::user()->id)->where('role', $role)->whereNull('inactive')->first() !== null)) {
if (Pengelola::cache()->get('all')->where('user_id', Auth::user()->id)->where('role', $role)->whereNull('inactive')->first() !== null) {
session(['role' => $role]);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Models/DataPegawai.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}

/**
* Get the unit kerja that owns the user.
*/
Expand All @@ -44,5 +45,4 @@ public static function cacheEntities(): array
}),
];
}

}
1 change: 0 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Models;

use App\Helpers\Helper;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
Expand Down
1 change: 0 additions & 1 deletion app/Nova/Dashboards/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Helpers\Helper;
use App\Helpers\Inspiring;
use App\Models\Pengelola;
use DigitalCreative\NovaWelcomeCard\WelcomeCard;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
Expand Down
31 changes: 15 additions & 16 deletions app/Nova/DataPegawai.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Http\Request;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Select;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
Expand Down Expand Up @@ -52,21 +51,21 @@ public static function label()
public function fields(NovaRequest $request)
{
return [
Date::make('Tanggal Perubahan', 'tanggal')
->rules('required')
->displayUsing(fn ($tanggal) => Helper::terbilangTanggal($tanggal)),
Select::make('Golongan')
->options(Helper::$golongan)
->rules('required')
->searchable(),
Text::make('Pangkat')
->hideWhenCreating()
->hideWhenUpdating(),
Text::make('Jabatan')
->rules('required'),
BelongsTo::make('Unit Kerja')
->filterable()
->rules('required'),
Date::make('Tanggal Perubahan', 'tanggal')
->rules('required')
->displayUsing(fn ($tanggal) => Helper::terbilangTanggal($tanggal)),
Select::make('Golongan')
->options(Helper::$golongan)
->rules('required')
->searchable(),
Text::make('Pangkat')
->hideWhenCreating()
->hideWhenUpdating(),
Text::make('Jabatan')
->rules('required'),
BelongsTo::make('Unit Kerja')
->filterable()
->rules('required'),
];
}

Expand Down
1 change: 0 additions & 1 deletion app/Nova/Pengelola.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\Select;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;

class Pengelola extends Resource
Expand Down
1 change: 0 additions & 1 deletion app/Nova/TataNaskah.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Laravel\Nova\Fields\HasMany;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
use ShuvroRoy\NovaTabs\Tab;
use ShuvroRoy\NovaTabs\Tabs;
use ShuvroRoy\NovaTabs\Traits\HasTabs;

Expand Down
5 changes: 1 addition & 4 deletions app/Nova/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

namespace App\Nova;

use App\Helpers\Helper;
use Illuminate\Validation\Rules;
use Laravel\Nova\Fields\Avatar;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\HasMany;
use Laravel\Nova\Fields\Password;
use Laravel\Nova\Fields\PasswordConfirmation;
use Laravel\Nova\Fields\Select;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Panel;
Expand Down Expand Up @@ -77,7 +74,7 @@ public function fields(NovaRequest $request)
Tabs::make('Detail', [
HasMany::make('Data Pegawai'),
HasMany::make('Pengelola'),
])
]),

];
}
Expand Down
1 change: 0 additions & 1 deletion app/Providers/NovaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Laravel\Nova\Menu\MenuItem;
use Laravel\Nova\Nova;
use Laravel\Nova\NovaApplicationServiceProvider;
use Visanduma\NovaBackNavigation\NovaBackNavigation;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
Expand Down
1 change: 0 additions & 1 deletion config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
'throw' => false,
],


'images' => [
'driver' => 'local',
'root' => storage_path('app/public/images'),
Expand Down