improvements

This commit is contained in:
Mark Gregory
2026-08-26 09:04:25 +01:00
parent 5844aeb621
commit 53a11ae0c7
13 changed files with 479 additions and 36 deletions
@@ -16,6 +16,19 @@
<label><input type="checkbox" name="helpdesk_admin" value="1" @checked(old('helpdesk_admin', $user->helpdesk_admin ?? false))> <span><strong>Administrator</strong><small>Full Helpdesk, settings and user administration.</small></span></label>
</div>
<div>
<h2 class="mb-3 text-lg font-semibold">Custom roles</h2>
<div class="hd-role-options">
@foreach($roles as $roleOption)
<label>
<input type="checkbox" name="roles[]" value="{{ $roleOption->id }}"
@checked(in_array($roleOption->id, old('roles', isset($user) ? $user->roles->pluck('id')->all() : [])))>
<span><strong>{{ $roleOption->name }}</strong><small>{{ $roleOption->description ?: $roleOption->slug }}</small></span>
</label>
@endforeach
</div>
</div>
<div class="flex flex-wrap justify-between gap-3"><div></div><button class="hd-action hd-action-blue" type="submit"><i class="fa-solid fa-floppy-disk"></i> Save changes</button></div></form>
@if(auth()->id() !== $user->id)<form method="POST" action="{{ route('user-management.destroy', $user) }}" onsubmit="return confirm('Delete this user?')">@csrf @method('DELETE')<button class="hd-action hd-action-red" type="submit">Delete user</button></form>@endif
</div>