improvements

This commit is contained in:
Mark Gregory
2026-08-26 09:25:29 +01:00
parent 53a11ae0c7
commit 21d7b6eba9
6 changed files with 209 additions and 38 deletions
@@ -209,7 +209,7 @@
@if ($section === 'teams')
<x-helpdesk.settings-section title="Teams"
description="Create support teams and assign projects to them.">
description="Create support teams, assign users and organise projects.">
<x-slot:form>
<form wire:submit.prevent="saveTeam" class="grid gap-3 xl:grid-cols-12">
<div class="xl:col-span-3">
@@ -224,6 +224,43 @@
<div class="xl:col-span-12">
<flux:textarea wire:model="teamForm.description" label="Description" rows="3" />
</div>
<div class="xl:col-span-12">
<div class="rounded-xl border border-zinc-700/80 bg-zinc-950/35 p-4">
<div class="mb-3 flex flex-wrap items-center justify-between gap-2">
<div>
<div class="text-sm font-semibold text-zinc-100">Team members</div>
<div class="mt-0.5 text-xs text-zinc-500">Select one or more users to assign to this team.</div>
</div>
<div class="rounded-full bg-blue-500/10 px-2.5 py-1 text-xs font-semibold text-blue-300">
{{ count($teamForm['user_ids'] ?? []) }} selected
</div>
</div>
<div class="grid gap-2 sm:grid-cols-2 xl:grid-cols-3">
@forelse ($teamUsers as $teamUser)
<label class="flex cursor-pointer items-center gap-3 rounded-lg border border-zinc-700 bg-zinc-900/60 p-3 transition hover:border-blue-500/60 hover:bg-zinc-900">
<input
type="checkbox"
wire:model="teamForm.user_ids"
value="{{ $teamUser->id }}"
class="h-4 w-4 rounded border-zinc-600 bg-zinc-950 text-blue-600 focus:ring-blue-500"
>
<div class="min-w-0 flex-1">
<div class="truncate text-sm font-semibold text-zinc-100">{{ $teamUser->name }}</div>
<div class="truncate text-xs text-zinc-500">{{ $teamUser->email }}</div>
</div>
@if ($teamUser->helpdesk_admin)
<span class="rounded-full bg-purple-500/10 px-2 py-0.5 text-[10px] font-bold uppercase text-purple-300">Admin</span>
@elseif ($teamUser->helpdesk_agent)
<span class="rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-bold uppercase text-blue-300">Agent</span>
@endif
</label>
@empty
<div class="text-sm text-zinc-500">No users are available.</div>
@endforelse
</div>
</div>
</div>
<label class="flex min-h-9 items-center gap-2 rounded-lg border border-zinc-200 bg-white px-3 py-2 text-xs font-semibold text-zinc-700 shadow-sm dark:border-zinc-700 dark:bg-zinc-950/60 dark:text-zinc-200 xl:col-span-4">
<input type="checkbox" wire:model="teamForm.is_default"
class="rounded border-zinc-300 bg-zinc-950 text-blue-600 focus:ring-blue-500">