diff --git a/app/Livewire/Fixtures/Create.php b/app/Livewire/Fixtures/Create.php index 4e8ecb29..a4cb64e6 100644 --- a/app/Livewire/Fixtures/Create.php +++ b/app/Livewire/Fixtures/Create.php @@ -38,7 +38,7 @@ public function save(): void $divisionId = $this->form->fixtureModel->division_id; $this->redirectRoute( - name: 'divisions.index', + name: 'fixtures.index', parameters: array_merge( SeasonsFilter::buildQueryParam($seasonId), CompetitionsFilter::buildQueryParam($competitionId), diff --git a/app/Livewire/Fixtures/Edit.php b/app/Livewire/Fixtures/Edit.php index d7bf4940..477eb209 100644 --- a/app/Livewire/Fixtures/Edit.php +++ b/app/Livewire/Fixtures/Edit.php @@ -32,7 +32,7 @@ public function save(): void $divisionId = $this->form->fixtureModel->division_id; $this->redirectRoute( - name: 'divisions.index', + name: 'fixtures.index', parameters: array_merge( SeasonsFilter::buildQueryParam($seasonId), CompetitionsFilter::buildQueryParam($competitionId), diff --git a/app/Livewire/Forms/FixtureForm.php b/app/Livewire/Forms/FixtureForm.php index 55d42725..c8f893d5 100644 --- a/app/Livewire/Forms/FixtureForm.php +++ b/app/Livewire/Forms/FixtureForm.php @@ -39,7 +39,7 @@ public function rules(): array 'home_team_id' => 'required|uuid|exists:teams,id', 'away_team_id' => 'required|uuid|exists:teams,id', 'match_date' => 'required|date', - 'start_time' => 'required|time', + 'start_time' => 'required|date_format:H:i', 'venue_id' => 'required|uuid|exists:venues,id', ]; } diff --git a/app/Models/Fixture.php b/app/Models/Fixture.php index 3460dbc6..86c29025 100644 --- a/app/Models/Fixture.php +++ b/app/Models/Fixture.php @@ -20,7 +20,7 @@ * @property string home_team_id * @property string away_team_id * @property CarbonImmutable $match_date - * @property-read CarbonImmutable $match_datetime + * @property-read CarbonImmutable $matchDateTime * @property string venue_id * @property-read Division $division * @property-read Team homeTeam diff --git a/resources/views/components/crud/content.blade.php b/resources/views/components/crud/content.blade.php index 9b9e9e99..b25c120b 100644 --- a/resources/views/components/crud/content.blade.php +++ b/resources/views/components/crud/content.blade.php @@ -1,4 +1,4 @@ -
merge(['class' => 'px-1 overflow-x-auto']) }}> +
merge(['class' => 'mx-1 flex w-full items-center overflow-x-auto']) }}>
{{ $slot }}
diff --git a/resources/views/components/crud/index/cell.blade.php b/resources/views/components/crud/index/cell.blade.php index 05833baa..af67c9da 100644 --- a/resources/views/components/crud/index/cell.blade.php +++ b/resources/views/components/crud/index/cell.blade.php @@ -1 +1 @@ -merge(['class' => 'whitespace-nowrap py-2 pr-3 text-sm']) }}>{{ $slot }} +merge(['class' => 'whitespace-nowrap py-2 pr-3 text-sm grow']) }}>{{ $slot }} diff --git a/resources/views/components/crud/index/table.blade.php b/resources/views/components/crud/index/table.blade.php index b6919845..3109524b 100644 --- a/resources/views/components/crud/index/table.blade.php +++ b/resources/views/components/crud/index/table.blade.php @@ -1,24 +1,14 @@ -@props([ -'columns', -]) +@props(['columns']) -@php -$columns = explode(',', $columns) -@endphp - +
merge(['class' => 'w-full divide-y divide-gray-100 dark:divide-gray-700']) }}> - @foreach($columns as $column) + @foreach(explode(',', $columns) as $column) @endforeach - - diff --git a/resources/views/livewire/club/index.blade.php b/resources/views/livewire/club/index.blade.php index 6bb5f336..9e1d77c0 100644 --- a/resources/views/livewire/club/index.blade.php +++ b/resources/views/livewire/club/index.blade.php @@ -5,7 +5,26 @@ - + + @foreach ($clubs as $club) + + + {{ $club->name }} +
+ at {{ $club->venue->name }} +
+
+ + + + Are you sure you want to delete the {{ $club->name }} club? + +
+
+
+ @endforeach +
+ -
+
{!! $clubs->withQueryString()->links() !!}
diff --git a/resources/views/livewire/competition/index.blade.php b/resources/views/livewire/competition/index.blade.php index 13ad8cd0..70d15674 100644 --- a/resources/views/livewire/competition/index.blade.php +++ b/resources/views/livewire/competition/index.blade.php @@ -9,7 +9,24 @@ - + + @foreach ($competitions as $competition) + + + {{ $competition->name }} +
+
+ + + + Are you sure you want to delete the {{ $competition->name }} competition in + the {{ $competition->season->name }} season? + +
+
+ @endforeach +
+
{{ $column }} - Actions -