Skip to content

Commit

Permalink
min
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Jun 17, 2024
1 parent b7f4653 commit ac96eda
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use App\Concerns\HasUlid;
use App\Concerns\MustSetInitialPassword;
use App\Enums\Role;
use App\Enums\UserStatus;
use Filament\Facades\Filament;
use Filament\Models\Contracts\FilamentUser;
Expand Down Expand Up @@ -84,8 +85,7 @@ class User extends Authenticatable implements FilamentUser, HasAvatar, HasName,
'password_set_at' => 'datetime',
'password' => 'hashed',
'is_admin' => 'boolean',
'roles' => 'json',
// 'roles' => AsEnumCollection::class . ':' . Role::class,
'roles' => AsEnumCollection::class . ':' . Role::class,
'case_permissions' => 'json',
'admin_permissions' => 'json',
'status' => UserStatus::class,
Expand Down Expand Up @@ -208,11 +208,8 @@ public function getFullNameAttribute(): string

public static function getTenantOrganizationUsers(): Collection
{
return self::whereHas(
'organizations',
fn (Builder $query) => $query->where('organizations.id', Filament::getTenant()->id)
)
->get()
return Filament::getTenant()
->users
->pluck('full_name', 'id');
}
}

0 comments on commit ac96eda

Please sign in to comment.