feat: add UserResource with is_admin toggle and delete
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

User management resource with editable is_admin field, postcode support,
admin filter, and inline delete action. Includes list and edit pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ovidiu U
2026-04-04 18:31:55 +01:00
parent fb4c413926
commit c2c16c928b
10 changed files with 2172 additions and 41 deletions

View File

@@ -4,7 +4,7 @@ use App\Models\Station;
use App\Services\StationTaggingService;
beforeEach(function (): void {
$this->service = new StationTaggingService();
$this->service = new StationTaggingService;
});
it('marks tesco station as supermarket and normalises brand', function (): void {
@@ -54,10 +54,23 @@ it('handles case insensitive matching', function (): void {
->and($station->brand_name)->toBe('Morrisons');
});
it('marks station as supermarket when brand_name matches even if trading_name does not', function (): void {
$station = new Station([
'trading_name' => 'PETERBOROUGH EXTRA - PETROL FILLING STATION',
'brand_name' => 'TESCO',
'is_supermarket' => false,
]);
$this->service->tag($station);
expect($station->is_supermarket)->toBeTrue()
->and($station->brand_name)->toBe('Tesco');
});
it('does not overwrite brand_name for non-supermarket stations', function (): void {
$station = new Station([
'trading_name' => 'Shell Garage',
'brand_name' => 'Shell',
'trading_name' => 'Shell Garage',
'brand_name' => 'Shell',
'is_supermarket' => false,
]);