Fix: Исправлено добавление пользователей в группы

 Проверка на дубликаты (не добавлять если уже в группе)
 Фильтрация поиска по организации группы
 UserSearchController фильтрует по organization_id
 Подсказка в modal для групп организации

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mirivlad
2026-03-31 15:57:39 +08:00
co-authored by Qwen-Coder
parent fff890e950
commit 98b0e7f9a9
3 changed files with 25 additions and 5 deletions
+9 -1
View File
@@ -85,7 +85,15 @@
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<x-tags-input name="user_ids" url="{{ route('api.users.search') }}" placeholder="Начните вводить имя..." badge_color="success" />
<x-tags-input
name="user_ids"
url="{{ route('api.users.search') }}?{{ $group->organization_id ? 'organization_id=' . $group->organization_id : '' }}"
placeholder="{{ $group->organization_id ? 'Начните вводить имя (только ваша организация)...' : 'Начните вводить имя...' }}"
badge_color="success"
/>
@if($group->organization_id)
<small class="text-muted">Показываются только пользователи вашей организации</small>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>