Core UI updates

This commit is contained in:
Mark Gregory
2026-06-16 08:49:52 +01:00
parent a96369c90a
commit a787303ba5
19 changed files with 182 additions and 113 deletions
@@ -23,8 +23,23 @@
</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- class="!bg-blue-600 !text-white hover:!bg-blue-700 focus:!ring-blue-400/60">id }})" variant="primary">Edit</flux:button>
<flux:button size="sm" wire:click="{{ $delete }}({{ $item- class="!bg-red-600 !text-white hover:!bg-red-700 focus:!ring-red-400/60">id }})" variant="danger">Delete</flux:button>
<div class="flex justify-end gap-2">
<button
type="button"
wire:click="{{ $edit }}({{ $item->id }})"
class="inline-flex items-center rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400/60"
>
Edit
</button>
<button
type="button"
wire:click="{{ $delete }}({{ $item->id }})"
class="inline-flex items-center rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-400/60"
>
Delete
</button>
</div>
</td>
</tr>
@empty
@@ -3,9 +3,8 @@
<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">Company</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>
@@ -15,22 +14,19 @@
@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->company?->name ?? 'Global' }}</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"><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="editProject({{ $item- class="!bg-blue-600 !text-white hover:!bg-blue-700 focus:!ring-blue-400/60">id }})" variant="primary">Edit</flux:button>
<flux:button size="sm" wire:click="deleteProject({{ $item- class="!bg-red-600 !text-white hover:!bg-red-700 focus:!ring-red-400/60">id }})" variant="danger">Delete</flux:button>
<div class="flex justify-end gap-2">
<button type="button" wire:click="editProject({{ $item->id }})" class="inline-flex items-center rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400/60">Edit</button>
<button type="button" wire:click="deleteProject({{ $item->id }})" class="inline-flex items-center rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-400/60">Delete</button>
</div>
</td>
</tr>
@empty
<tr><td colspan="7" class="px-4 py-10 text-center text-zinc-500">No projects yet.</td></tr>
<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No projects yet.</td></tr>
@endforelse
</tbody>
</table>
@@ -1,15 +1,12 @@
@props(['items'])
<div class="overflow-hidden rounded-2xl border border-zinc-200 bg-white dark:border-zinc-700 dark:bg-zinc-900">
<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">Repository</th>
<th class="px-4 py-3">Project</th>
<th class="px-4 py-3">Provider</th>
<th class="px-4 py-3">Project</th>
<th class="px-4 py-3">Branch</th>
<th class="px-4 py-3">Commits</th>
<th class="px-4 py-3">Webhook</th>
<th class="px-4 py-3 text-right">Actions</th>
</tr>
</thead>
@@ -17,21 +14,19 @@
@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 text-zinc-600 dark:text-zinc-300">{{ $item->project?->title ?? 'Global' }}</td>
<td class="px-4 py-3 text-zinc-600 dark:text-zinc-300">{{ $item->provider }}</td>
<td class="px-4 py-3 text-zinc-600 dark:text-zinc-300">{{ $item->default_branch }}</td>
<td class="px-4 py-3"><flux:badge color="zinc">{{ $item->commits_count }}</flux:badge></td>
<td class="px-4 py-3 text-xs text-zinc-600 dark:text-zinc-300">
<div class="font-medium text-zinc-800 dark:text-zinc-100">{{ $item->webhook_logs_count ?? 0 }} deliveries</div>
<code class="mt-1 block max-w-xs truncate rounded bg-zinc-100 px-2 py-1 text-[11px] text-zinc-700 dark:bg-zinc-800 dark:text-zinc-200">{{ route('api.helpdesk.git.webhook', ['repository' => $item->id]) }}</code>
</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->provider }}</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->project?->title ?? 'No project' }}</td>
<td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->default_branch }}</td>
<td class="px-4 py-3 text-zinc-500">{{ $item->commits_count ?? 0 }}</td>
<td class="px-4 py-3 text-right">
<flux:button size="sm" variant="primary" wire:click="editRepository({{ $item- class="!bg-blue-600 !text-white hover:!bg-blue-700 focus:!ring-blue-400/60">id }})">Edit</flux:button>
<flux:button size="sm" variant="danger" wire:click="deleteRepository({{ $item- class="!bg-red-600 !text-white hover:!bg-red-700 focus:!ring-red-400/60">id }})" wire:confirm="Delete this repository?">Delete</flux:button>
<div class="flex justify-end gap-2">
<button type="button" wire:click="editRepository({{ $item->id }})" class="inline-flex items-center rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400/60">Edit</button>
<button type="button" wire:click="deleteRepository({{ $item->id }})" class="inline-flex items-center rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-400/60">Delete</button>
</div>
</td>
</tr>
@empty
<tr><td colspan="7" class="px-4 py-8 text-center text-zinc-500">No repositories yet.</td></tr>
<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No repositories yet.</td></tr>
@endforelse
</tbody>
</table>
@@ -3,10 +3,9 @@
<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">Company</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>
@@ -15,22 +14,19 @@
@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 text-zinc-500">{{ $item->company?->name ?? 'Global' }}</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"><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="editTeam({{ $item- class="!bg-blue-600 !text-white hover:!bg-blue-700 focus:!ring-blue-400/60">id }})" variant="primary">Edit</flux:button>
<flux:button size="sm" wire:click="deleteTeam({{ $item- class="!bg-red-600 !text-white hover:!bg-red-700 focus:!ring-red-400/60">id }})" variant="danger">Delete</flux:button>
<div class="flex justify-end gap-2">
<button type="button" wire:click="editTeam({{ $item->id }})" class="inline-flex items-center rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400/60">Edit</button>
<button type="button" wire:click="deleteTeam({{ $item->id }})" class="inline-flex items-center rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-400/60">Delete</button>
</div>
</td>
</tr>
@empty
<tr><td colspan="7" class="px-4 py-10 text-center text-zinc-500">No teams yet.</td></tr>
<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No teams yet.</td></tr>
@endforelse
</tbody>
</table>