Skip to content

Commit

Permalink
feat: enhance position not found indication on roster (#3546)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Calum Towers <towers@hey.com>
  • Loading branch information
AxonC and CalumTowers authored Mar 28, 2024
1 parent 6d31ea1 commit bbf5721
Show file tree
Hide file tree
Showing 15 changed files with 7,136 additions and 7,942 deletions.
4 changes: 3 additions & 1 deletion app/Livewire/Roster/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Show extends Component

public ?string $searchTerm = null;

public Position $position;
public ?Position $position;

public function mount(Account $account)
{
Expand All @@ -31,9 +31,11 @@ public function search()
$this->position = Position::where('callsign', 'LIKE', "%{$this->searchTerm}%")->firstOrFail();
} catch (ModelNotFoundException $e) {
$this->searchTerm = null;
$this->position = null;

Notification::make()
->title('Position cannot be found.')
->danger()
->send();
}
}
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"barryvdh/laravel-ide-helper": "^3.0",
"bugsnag/bugsnag-laravel": "^2.0",
"doctrine/dbal": "~3.3",
"filament/filament": "^3.0-stable",
"filament/filament": "^3.2",
"filament/notifications": "^3.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.0",
"laravel/helpers": "^1.1",
Expand All @@ -76,7 +77,7 @@
"laravel/tinker": "^2.0",
"laravel/ui": "^4.0",
"laravelcollective/html": "^6.0",
"league/csv": "^8.0",
"league/csv": "^9.0",
"league/oauth2-client": "^2.4",
"livewire/livewire": "^3.3",
"maatwebsite/excel": "~3.1.17",
Expand Down
Loading

0 comments on commit bbf5721

Please sign in to comment.