Files
2026-09-02 17:08:57 +00:00

68 lines
4.1 KiB
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<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">Colour</th>
<th class="px-4 py-3">Default</th>
<th class="px-4 py-3">Members</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-4 align-top">
<div class="font-semibold text-zinc-900 dark:text-zinc-100">{{ $item->name }}</div>
@if($item->description)
<div class="mt-1 max-w-sm text-xs leading-5 text-zinc-500">{{ $item->description }}</div>
@endif
</td>
<td class="px-4 py-4 align-top">
<span class="inline-flex items-center gap-2 rounded-full border border-zinc-200 bg-white px-2.5 py-1 text-xs font-semibold text-zinc-700 shadow-sm dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-200">
<span class="h-3 w-3 rounded-full" style="background-color: {{ \Modules\Helpdesk\Support\Color::css($item->color) }}"></span>
{{ \Illuminate\Support\Str::of(\Modules\Helpdesk\Support\Color::normalise($item->color))->headline() }}
</span>
</td>
<td class="px-4 py-4 align-top">
<flux:badge color="{{ $item->is_default ?? false ? 'emerald' : 'zinc' }}">
{{ $item->is_default ?? false ? 'Default' : 'No' }}</flux:badge>
</td>
<td class="px-4 py-4 align-top">
<div class="flex max-w-xl flex-wrap gap-1.5">
@forelse($item->users as $member)
<span class="inline-flex items-center gap-1.5 rounded-full border border-zinc-700 bg-zinc-900 px-2.5 py-1 text-xs font-medium text-zinc-200">
{{ $member->name }}
<button
type="button"
wire:click="removeUserFromTeam({{ $item->id }}, {{ $member->id }})"
wire:confirm="Remove {{ $member->name }} from {{ $item->name }}?"
class="inline-flex h-4 w-4 items-center justify-center rounded-full text-zinc-500 transition hover:bg-red-500/15 hover:text-red-300"
title="Remove {{ $member->name }} from team"
>×</button>
</span>
@empty
<span class="text-xs text-zinc-500">No members</span>
@endforelse
</div>
</td>
<td class="px-4 py-4 align-top text-zinc-500">{{ $item->tickets_count ?? 0 }}</td>
<td class="px-4 py-4 align-top text-right">
<div class="flex justify-end gap-1.5"><button type="button"
wire:click="editTeam({{ $item->id }})"
class="hd-btn hd-btn-sm hd-btn-blue">Edit</button><button type="button"
wire:click="deleteTeam({{ $item->id }})"
class="hd-btn hd-btn-sm hd-btn-red">Delete</button></div>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="px-3 py-8 text-center text-zinc-500">No teams yet.</td>
</tr>
@endforelse
</tbody>
</table>
</div>