Working client list.

This commit is contained in:
Matt Young 2026-01-28 02:54:26 -06:00
parent a44f3e77df
commit 9b80414ff1
2 changed files with 48 additions and 1 deletions

View File

@ -1,3 +1,3 @@
<x-layouts::app :title="__('Clients')">
<livewire:client-list />
</x-layouts::app>

View File

@ -0,0 +1,47 @@
<?php
use App\Models\Client;
use Livewire\Component;
new class extends Component {
#[Computed]
public function clients()
{
return Client::all();
}
};
?>
<div>
<flux:table>
<flux:table.columns>
<flux:table.column>Name</flux:table.column>
<flux:table.column>
Abbreviation
</flux:table.column>
<flux:table.column>
Audition Date
</flux:table.column>
<flux:table.column>
Status
</flux:table.column>
<flux:table.column>
Created
</flux:table.column>
</flux:table.columns>
<flux:table.rows>
@foreach($this->clients() as $client)
<flux:table.row :key="$client->id">
<flux:table.cell>{{ $client->name }}</flux:table.cell>
<flux:table.cell>{{ $client->abbreviation }}</flux:table.cell>
<flux:table.cell>{{ $client->audition_date->local()->format('m/d/Y') }}</flux:table.cell>
<flux:table.cell>
{{ $client->status }}
</flux:table.cell>
<flux:table.cell>{{ $client->created_at->local()->format('m/d/Y | g:i A') }}</flux:table.cell>
</flux:table.row>
@endforeach
</flux:table.rows>
</flux:table>
</div>