Fix: Null-safe оператор для requestedBy и approvedBy
✅ requestedBy?->name ?? 'Удалён' ✅ approvedBy?->name ?? 'Удалён' Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
5187c6f784
commit
f09571e8b2
|
|
@ -67,7 +67,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td><span class="badge bg-info">{{ $request->items->count() }}</span></td>
|
<td><span class="badge bg-info">{{ $request->items->count() }}</span></td>
|
||||||
<td><small>{{ $request->created_at->format('d.m.Y H:i') }}</small></td>
|
<td><small>{{ $request->created_at->format('d.m.Y H:i') }}</small></td>
|
||||||
<td>{{ $request->requestedBy->name }}</td>
|
<td>{{ $request->requestedBy?->name ?? 'Удалён' }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-sm">
|
<div class="btn-group btn-group-sm">
|
||||||
<a href="{{ route('admin.course-requests.show', $request) }}" class="btn btn-outline-primary" title="Просмотр"><i class="bi bi-eye"></i></a>
|
<a href="{{ route('admin.course-requests.show', $request) }}" class="btn btn-outline-primary" title="Просмотр"><i class="bi bi-eye"></i></a>
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div><strong>Создана:</strong> {{ $courseRequest->created_at->format('d.m.Y H:i') }}</div>
|
<div><strong>Создана:</strong> {{ $courseRequest->created_at->format('d.m.Y H:i') }}</div>
|
||||||
<div><strong>Кем:</strong> {{ $courseRequest->requestedBy->name }}</div>
|
<div><strong>Кем:</strong> {{ $courseRequest->requestedBy?->name ?? 'Удалён' }}</div>
|
||||||
@if($courseRequest->approved_by)
|
@if($courseRequest->approved_by)
|
||||||
<div><strong>{{ $courseRequest->isApproved() ? 'Одобрена' : 'Отклонена' }}:</strong> {{ $courseRequest->approvedBy?->name }} {{ $courseRequest->approved_at->format('d.m.Y H:i') }}</div>
|
<div><strong>{{ $courseRequest->isApproved() ? 'Одобрена' : 'Отклонена' }}:</strong> {{ $courseRequest->approvedBy?->name ?? 'Удалён' }} {{ $courseRequest->approved_at->format('d.m.Y H:i') }}</div>
|
||||||
@endif
|
@endif
|
||||||
@if($courseRequest->note)
|
@if($courseRequest->note)
|
||||||
<div class="mt-3"><strong>Заметка:</strong><br>{{ $courseRequest->note }}</div>
|
<div class="mt-3"><strong>Заметка:</strong><br>{{ $courseRequest->note }}</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue