Fix: Заявки - номер, получатели, null-safe

 Номер заявки вместо организации в списке
 Столбец Получатели (пользователи/группы/организации)
 Null-safe для organization, user, group
 Бейджи с названиями в show.blade.php

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mirivlad
2026-04-02 09:26:42 +08:00
co-authored by Qwen-Coder
parent b01d8431c8
commit 729d48ac5a
2 changed files with 26 additions and 7 deletions
@@ -28,7 +28,7 @@
<div class="card shadow-sm">
<div class="card-header bg-primary text-white"><h5 class="mb-0">Информация</h5></div>
<div class="card-body">
<div><strong>Организация:</strong> {{ $courseRequest->organization->name }}</div>
<div><strong>Организация:</strong> {{ $courseRequest->organization?->name ?? 'Без организации' }}</div>
<div><strong>Статус:</strong>
@if($courseRequest->isPending())
<span class="badge bg-warning">Ожидает</span>
@@ -103,13 +103,13 @@
</td>
<td>
@if($item->user_id)
{{ $item->user?->name ?? '—' }}
<span class="badge bg-success">{{ $item->user?->name ?? 'Пользователь #' . $item->user_id }}</span>
@elseif($item->group_id)
{{ $item->group?->name ?? '—' }}
<span class="badge bg-info">{{ $item->group?->name ?? 'Группа #' . $item->group_id }}</span>
@elseif($item->organization_id)
{{ $item->organization?->name ?? '—' }}
<span class="badge bg-primary">{{ $item->organization?->name ?? 'Организация #' . $item->organization_id }}</span>
@else
{{ $courseRequest->organization->name }}
<span class="text-muted"></span>
@endif
</td>
<td>