Deploy Ladill Frontdesk / deploy (push) Successful in 40s
Populate the dropdown from team members and linked hosts, show name and email labels, and block linking a user already tied to another employee. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
1.2 KiB
PHP
27 lines
1.2 KiB
PHP
@php
|
|
$selectedUserRef = old('user_ref', $selectedUserRef ?? '');
|
|
@endphp
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700">Linked Ladill user (optional)</label>
|
|
<select name="user_ref" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
<option value="">None</option>
|
|
@foreach ($linkableUsers as $linkableUser)
|
|
<option value="{{ $linkableUser['user_ref'] }}"
|
|
@selected($selectedUserRef === $linkableUser['user_ref'])
|
|
@disabled($linkableUser['taken'] && $selectedUserRef !== $linkableUser['user_ref'])>
|
|
{{ $linkableUser['label'] }}@if ($linkableUser['taken']) (linked to another employee) @endif
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
@if (count($linkableUsers) === 0)
|
|
<p class="mt-1 text-xs text-amber-700">
|
|
No Ladill users available yet.
|
|
<a href="{{ route('frontdesk.members.create') }}" class="font-medium underline">Add a team member</a>
|
|
so they can be linked here.
|
|
</p>
|
|
@else
|
|
<p class="mt-1 text-xs text-slate-500">Enables the My presence portal when this person signs in with the selected Ladill account.</p>
|
|
@endif
|
|
</div>
|