This commit is contained in:
Mark Gregory
2026-06-15 17:55:36 +01:00
parent 578a977c59
commit 0a9746fa77
25 changed files with 844 additions and 106 deletions
@@ -1,7 +1,14 @@
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700">
<thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300">
<tr><th class="px-4 py-3">Name</th><th class="px-4 py-3">Slug</th><th class="px-4 py-3">Colour</th><th class="px-4 py-3">Tickets</th><th class="px-4 py-3 text-right">Actions</th></tr>
<tr>
<th class="px-4 py-3">Name</th>
<th class="px-4 py-3">Slug</th>
<th class="px-4 py-3">Colour</th>
<th class="px-4 py-3">Default</th>
<th class="px-4 py-3">Tickets</th>
<th class="px-4 py-3 text-right">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
@forelse ($items as $item)
@@ -9,11 +16,19 @@
<td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->name }}</td>
<td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td>
<td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td>
<td class="px-4 py-3">
<flux:badge color="{{ ($item->is_default ?? false) ? 'emerald' : 'zinc' }}">
{{ ($item->is_default ?? false) ? 'Default' : 'No' }}
</flux:badge>
</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count ?? 0 }}</td>
<td class="px-4 py-3 text-right"><flux:button size="sm" wire:click="{{ $edit }}({{ $item->id }})" variant="primary">Edit</flux:button><flux:button size="sm" wire:click="{{ $delete }}({{ $item->id }})" variant="danger">Delete</flux:button></td>
<td class="px-4 py-3 text-right">
<flux:button size="sm" wire:click="{{ $edit }}({{ $item->id }})" variant="primary">Edit</flux:button>
<flux:button size="sm" wire:click="{{ $delete }}({{ $item->id }})" variant="danger">Delete</flux:button>
</td>
</tr>
@empty
<tr><td colspan="5" class="px-4 py-10 text-center text-zinc-500">No records yet.</td></tr>
<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No records yet.</td></tr>
@endforelse
</tbody>
</table>
@@ -1 +1,37 @@
<div class="overflow-x-auto"><table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700"><thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300"><tr><th class="px-4 py-3">Project</th><th class="px-4 py-3">Team</th><th class="px-4 py-3">Slug</th><th class="px-4 py-3">Colour</th><th class="px-4 py-3">Tickets</th><th class="px-4 py-3 text-right">Actions</th></tr></thead><tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">@forelse ($items as $item)<tr><td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->title }}</td><td class="px-4 py-3 text-zinc-500">{{ $item->team?->name ?? 'No team' }}</td><td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td><td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td><td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count }}</td><td class="px-4 py-3 text-right"><flux:button size="sm" wire:click="editProject({{ $item->id }})" variant="primary">Edit</flux:button><flux:button size="sm" wire:click="deleteProject({{ $item->id }})" variant="danger">Delete</flux:button></td></tr>@empty<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No projects yet.</td></tr>@endforelse</tbody></table></div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700">
<thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300">
<tr>
<th class="px-4 py-3">Project</th>
<th class="px-4 py-3">Team</th>
<th class="px-4 py-3">Slug</th>
<th class="px-4 py-3">Colour</th>
<th class="px-4 py-3">Default</th>
<th class="px-4 py-3">Tickets</th>
<th class="px-4 py-3 text-right">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
@forelse ($items as $item)
<tr>
<td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->title }}</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->team?->name ?? 'No team' }}</td>
<td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td>
<td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td>
<td class="px-4 py-3">
<flux:badge color="{{ ($item->is_default ?? false) ? 'emerald' : 'zinc' }}">
{{ ($item->is_default ?? false) ? 'Default' : 'No' }}
</flux:badge>
</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count }}</td>
<td class="px-4 py-3 text-right">
<flux:button size="sm" wire:click="editProject({{ $item->id }})" variant="primary">Edit</flux:button>
<flux:button size="sm" wire:click="deleteProject({{ $item->id }})" variant="danger">Delete</flux:button>
</td>
</tr>
@empty
<tr><td colspan="7" class="px-4 py-10 text-center text-zinc-500">No projects yet.</td></tr>
@endforelse
</tbody>
</table>
</div>
@@ -1 +1,37 @@
<div class="overflow-x-auto"><table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700"><thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300"><tr><th class="px-4 py-3">Team</th><th class="px-4 py-3">Slug</th><th class="px-4 py-3">Colour</th><th class="px-4 py-3">Projects</th><th class="px-4 py-3">Tickets</th><th class="px-4 py-3 text-right">Actions</th></tr></thead><tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">@forelse ($items as $item)<tr><td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->name }}</td><td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td><td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td><td class="px-4 py-3 text-zinc-500">{{ $item->projects_count }}</td><td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count }}</td><td class="px-4 py-3 text-right"><flux:button size="sm" wire:click="editTeam({{ $item->id }})" variant="primary">Edit</flux:button><flux:button size="sm" wire:click="deleteTeam({{ $item->id }})" variant="danger">Delete</flux:button></td></tr>@empty<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No teams yet.</td></tr>@endforelse</tbody></table></div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700">
<thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300">
<tr>
<th class="px-4 py-3">Team</th>
<th class="px-4 py-3">Slug</th>
<th class="px-4 py-3">Colour</th>
<th class="px-4 py-3">Default</th>
<th class="px-4 py-3">Projects</th>
<th class="px-4 py-3">Tickets</th>
<th class="px-4 py-3 text-right">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
@forelse ($items as $item)
<tr>
<td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->name }}</td>
<td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td>
<td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td>
<td class="px-4 py-3">
<flux:badge color="{{ ($item->is_default ?? false) ? 'emerald' : 'zinc' }}">
{{ ($item->is_default ?? false) ? 'Default' : 'No' }}
</flux:badge>
</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->projects_count }}</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count }}</td>
<td class="px-4 py-3 text-right">
<flux:button size="sm" wire:click="editTeam({{ $item->id }})" variant="primary">Edit</flux:button>
<flux:button size="sm" wire:click="deleteTeam({{ $item->id }})" variant="danger">Delete</flux:button>
</td>
</tr>
@empty
<tr><td colspan="7" class="px-4 py-10 text-center text-zinc-500">No teams yet.</td></tr>
@endforelse
</tbody>
</table>
</div>