Feat: Упрощён просмотр групп пользователя
✅ Только бейджи с названиями групп ✅ Без поля поиска и удаления ✅ Отображение организации в скобках Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
0c35e31d4c
commit
f8fc503177
|
|
@ -35,24 +35,20 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if($user->groups->count() > 0)
|
@if($user->groups->count() > 0)
|
||||||
<div class="mb-3">
|
<div class="d-flex flex-wrap gap-2">
|
||||||
<x-tags-input
|
@foreach($user->groups as $group)
|
||||||
name="groups"
|
<span class="badge bg-primary px-3 py-2" style="font-size: 0.9rem;">
|
||||||
url="{{ route('api.groups.search') }}"
|
{{ $group->name }}
|
||||||
placeholder="Начните вводить название группы..."
|
@if($group->organization)
|
||||||
:value="$user->groups->pluck('id')->toArray()"
|
<small class="text-white-50 ms-1">({{ $group->organization->name }})</small>
|
||||||
:user_id="$user->id"
|
@else
|
||||||
/>
|
<small class="text-white-50 ms-1">(Общая)</small>
|
||||||
|
@endif
|
||||||
|
</span>
|
||||||
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="mb-3">
|
<p class="text-muted mb-0">Не состоит в группах</p>
|
||||||
<x-tags-input
|
|
||||||
name="groups"
|
|
||||||
url="{{ route('api.groups.search') }}"
|
|
||||||
placeholder="Начните вводить название группы..."
|
|
||||||
:user_id="$user->id"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue