Files
ladill-queue/resources/views/qms/admin/members/index.blade.php
T
isaaccladandCursor cfef8bee06
Deploy Ladill Queue / deploy (push) Successful in 1m6s
Replace ghost action links with shared btn components in Queue.
Aligns kiosk, appointment, queue, and admin destructive actions with the Frontdesk pill-button pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 06:38:09 +00:00

59 lines
2.9 KiB
PHP

@php
$canManageMembers = app(\App\Services\Qms\QmsPermissions::class)->can(
app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()),
'admin.members.manage'
);
@endphp
<x-app-layout title="Team">
<div class="space-y-6">
<x-qms.page-hero
badge="Roles · Access · Branch assignment"
title="Team"
description="Manage who can access Queue, their roles, and which branch each operator or admin belongs to."
:stats="[
['value' => number_format($heroStats['total']), 'label' => 'Members'],
['value' => number_format($heroStats['operators']), 'label' => 'Operators'],
['value' => number_format($heroStats['branches']), 'label' => 'Branches staffed'],
]">
@if ($canManageMembers)
<x-slot name="actions">
<a href="{{ route('qms.members.create') }}" class="btn-primary">Add member</a>
</x-slot>
@endif
</x-qms.page-hero>
@include('partials.flash')
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
<table class="min-w-full divide-y divide-slate-200">
<thead class="bg-slate-50"><tr>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Member</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Role</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Branch</th>
<th></th>
</tr></thead>
<tbody class="divide-y divide-slate-200">
@foreach ($members as $member)
@php
$display = str_contains($member->user_ref, '@')
? $member->user_ref
: (\App\Models\User::where('public_id', $member->user_ref)->value('email') ?? $member->user_ref);
@endphp
<tr>
<td class="px-4 py-3 text-sm">{{ $display }}</td>
<td class="px-4 py-3 text-sm">{{ $roles[$member->role] ?? $member->role }}</td>
<td class="px-4 py-3 text-sm">{{ $member->branch?->name ?? 'All' }}</td>
<td class="px-4 py-3 text-right">
@if ($member->user_ref !== auth()->user()->public_id)
<form method="POST" action="{{ route('qms.members.destroy', $member) }}">@csrf @method('DELETE')<x-btn type="submit" variant="danger" size="sm">Remove</x-btn></form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</x-app-layout>