refactor observers, fix policy, add feature tests

This commit is contained in:
2026-05-07 05:31:22 +07:00
parent f5615038b4
commit 8cb9c0eb96
9 changed files with 216 additions and 36 deletions
-5
View File
@@ -12,11 +12,6 @@ class UserObserver
{
public function updated(User $user): void
{
// Pastikan role anggota selalu ada
if (! $user->hasRole('anggota')) {
$user->assignRole('anggota');
}
// Log perubahan status anggota
if ($user->wasChanged('status')) {
MemberStatusLog::create([