Files
ladill-queue/resources/views/qms/admin/members/create.blade.php
T
isaacclad 26c9edc131
Deploy Ladill Queue / deploy (push) Successful in 50s
Nest Branches and Team under Settings as Pro features.
Match Frontdesk: settings cards and nested routes, Pro-gated access,
and legacy /admin redirects to /settings/branches and /settings/team.
2026-07-16 09:48:32 +00:00

67 lines
3.7 KiB
PHP

<x-app-layout title="Add member">
<x-settings.page title="Invite team member" description="They get access only to Ladill Queue (plus Mail if they already have a Ladill mailbox).">
<div class="mb-4 flex flex-wrap items-center gap-2 text-sm">
<a href="{{ route('qms.settings.edit') }}" class="text-slate-500 hover:text-slate-800">Settings</a>
<span class="text-slate-300">/</span>
<a href="{{ route('qms.members.index') }}" class="text-slate-500 hover:text-slate-800">Team</a>
<span class="text-slate-300">/</span>
<span class="font-medium text-slate-900">Invite</span>
</div>
<x-settings.card title="Invitation">
<form method="POST" action="{{ route('qms.members.store') }}" class="space-y-4" x-data>
@csrf
@if (! empty($mailboxOptions))
<div>
<label class="block text-sm font-medium text-slate-700">From a Ladill mailbox</label>
<select x-on:change="if ($event.target.value) { $refs.email.value = $event.target.value }"
class="mt-1 w-full rounded-lg border-slate-300 text-sm">
<option value="">Choose a mailbox…</option>
@foreach ($mailboxOptions as $address)
<option value="{{ $address }}">{{ $address }}</option>
@endforeach
</select>
<p class="mt-1 text-xs text-slate-500">Or type any email below.</p>
</div>
@endif
<div>
<label class="block text-sm font-medium text-slate-700">Email address</label>
<input type="email" name="email" x-ref="email" value="{{ old('email') }}" required
class="mt-1 w-full rounded-lg border-slate-300 text-sm"
placeholder="colleague@company.com">
<p class="mt-1 text-xs text-slate-500">They will receive an email to accept and join your Queue organization.</p>
@error('email')
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Role</label>
<select name="role" required class="mt-1 w-full rounded-lg border-slate-300 text-sm">
@foreach ($roles as $v => $l)
<option value="{{ $v }}" @selected(old('role') === $v)>{{ $l }}</option>
@endforeach
</select>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Branch scope (optional)</label>
<select name="branch_id" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
<option value="">Organization-wide</option>
@foreach ($branches as $b)
<option value="{{ $b->id }}" @selected(old('branch_id') == $b->id)>{{ $b->name }}</option>
@endforeach
</select>
</div>
<div class="flex justify-end gap-3">
<a href="{{ route('qms.members.index') }}" class="rounded-xl border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Cancel</a>
<button type="submit" class="btn-primary">Send invitation</button>
</div>
</form>
</x-settings.card>
</x-settings.page>
</x-app-layout>