Skip to content

Commit

Permalink
Fix staff view
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Jul 15, 2024
1 parent d8d3f41 commit 4748c03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function infolist(Infolist $infolist): Infolist
->columns()
->schema([
TextEntry::make('status')
->formatStateUsing(fn ($state) => $state->label()),
->formatStateUsing(fn ($state) => $state === '-' ? $state : $state->label()),
TextEntry::make('updated_at'),
]),
Section::make()
Expand Down
2 changes: 2 additions & 0 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Database\Factories;

use App\Enums\UserStatus;
use App\Models\Organization;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
Expand All @@ -28,6 +29,7 @@ public function definition(): array
'first_name' => fake()->firstName(),
'last_name' => fake()->lastName(),
'email' => fake()->unique()->safeEmail(),
'status' => fake()->randomElement(UserStatus::values()),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
Expand Down

0 comments on commit 4748c03

Please sign in to comment.