| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- @extends('layout.app')
- @section('title', 'Детали заявки #' . $submission->id)
- @section('content')
- <div style="margin-bottom: 20px;">
- <a href="{{ route('data.show') }}" style="color: #3490dc; text-decoration: none;">← Назад к списку</a>
- </div>
- <h1>Заявка #{{ $submission->id }}</h1>
- <div style="background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 20px;">
- <h2 style="margin-top: 0;">Основная информация</h2>
- <p><strong>Имя:</strong> {{ $submission->name }}</p>
- <p><strong>Email:</strong> {{ $submission->email }}</p>
- <p><strong>Сообщение:</strong> {{ $submission->message ?? 'Отсутствует' }}</p>
- <p><strong>Статус:</strong> {{ ucfirst($submission->status) }}</p>
- <p><strong>IP-адрес:</strong> {{ $submission->ip_address }}</p>
- <p><strong>Дата создания:</strong> {{ $submission->created_at->format('d.m.Y H:i:s') }}</p>
- <p><strong>Последнее обновление:</strong> {{ $submission->updated_at->format('d.m.Y H:i:s') }}</p>
- </div>
- @if($submission->tags->isNotEmpty())
- <div style="margin-bottom: 20px;">
- <h2>Теги</h2>
- @foreach($submission->tags as $tag)
- <span style="display: inline-block; padding: 5px 12px; margin: 5px; background-color: #e3f2fd; border-radius: 5px;">
- {{ $tag->name }}
- </span>
- @endforeach
- </div>
- @endif
- @if($submission->attachments->isNotEmpty())
- <div style="margin-bottom: 20px;">
- <h2>Вложения ({{ $submission->attachments->count() }})</h2>
- <ul>
- @foreach($submission->attachments as $attachment)
- <li>
- <strong>{{ $attachment->filename }}</strong>
- ({{ round($attachment->size / 1024, 2) }} KB, {{ $attachment->mime_type }})
- </li>
- @endforeach
- </ul>
- </div>
- @endif
- <div>
- <h2>Комментарии ({{ $submission->comments->count() }})</h2>
-
- @if($submission->comments->isEmpty())
- <p>Комментариев пока нет.</p>
- @else
- @foreach($submission->comments as $comment)
- <div style="background-color: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 15px;">
- <p><strong>{{ $comment->author }}</strong> <small style="color: #6c757d;">{{ $comment->created_at->format('d.m.Y H:i') }}</small></p>
- <p>{{ $comment->content }}</p>
-
- @if($comment->attachments->isNotEmpty())
- <div style="margin-top: 10px;">
- <strong>Вложения:</strong>
- <ul style="margin-top: 5px;">
- @foreach($comment->attachments as $attachment)
- <li>{{ $attachment->filename }}</li>
- @endforeach
- </ul>
- </div>
- @endif
- </div>
- @endforeach
- @endif
- </div>
- <div style="margin-top: 30px;">
- <a href="{{ route('submissions.edit', $submission->id) }}" style="padding: 10px 15px; background-color: #38c172; color: white; text-decoration: none; border-radius: 4px; margin-right: 10px;">
- Редактировать
- </a>
-
- <form method="POST" action="{{ route('submissions.destroy', $submission->id) }}" style="display: inline;">
- @csrf
- @method('DELETE')
- <button type="submit" style="padding: 10px 15px; background-color: #e3342f; color: white; border: none; border-radius: 4px; cursor: pointer;"
- onclick="return confirm('Вы уверены, что хотите удалить эту заявку?')">
- Удалить
- </button>
- </form>
- </div>
- @endsection
|