refactor: remove unnecessary closure and disable condition for role column in UserTable

This commit is contained in:
Yoga Pangestu 2026-04-06 14:36:26 +07:00
parent 586f8844a4
commit 70cf767111

View File

@ -66,8 +66,7 @@ public static function configure(Table $table): Table
$state ? CheerfulNotification::getByKey('user.activated') : CheerfulNotification::getByKey('user.deactivated'),
$state ? CheerfulNotification::getByKey('user.status_activated_success') : CheerfulNotification::getByKey('user.status_activated_success')
)->send();
})
->disabled(fn (User $record): bool => $record->hasRole(RoleEnum::PERUSAHAAN->value)),
}),
TextColumn::make('roles.name')
->label('Peran')