Files
WebAPP/resources/views/admin/support/show.blade.php
Rhino 2e24a40d68 Stand: SMTP-Test, Admin-Mail-Tab, Notifiable-Fix, Lazy-Quill
- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er)
- Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link
- Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest
- Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen)
- Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 07:30:37 +01:00

93 lines
4.7 KiB
PHP

<x-layouts.admin :title="($ticket['subject'] ?? __('admin.support_title'))">
<div class="mb-6">
<a href="{{ route('admin.support.index') }}" class="text-sm text-blue-600 hover:underline">&larr; {{ __('admin.support_back_to_list') }}</a>
</div>
{{-- Ticket-Header --}}
<div class="bg-white rounded-lg shadow p-6 mb-6">
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
<div>
<h1 class="text-xl font-bold text-gray-900">{{ $ticket['subject'] ?? '-' }}</h1>
<p class="text-sm text-gray-500 mt-1">
#{{ $ticket['id'] ?? '-' }} &middot; {{ $ticket['created_at'] ?? '-' }}
</p>
</div>
<div class="flex items-center gap-2">
@php
$statusColors = [
'open' => 'bg-green-100 text-green-800',
'in_progress' => 'bg-blue-100 text-blue-800',
'waiting' => 'bg-yellow-100 text-yellow-800',
'closed' => 'bg-gray-100 text-gray-800',
];
$categoryColors = [
'bug' => 'bg-red-100 text-red-800',
'feature' => 'bg-purple-100 text-purple-800',
'question' => 'bg-blue-100 text-blue-800',
'other' => 'bg-gray-100 text-gray-800',
];
$status = $ticket['status'] ?? 'open';
$category = $ticket['category'] ?? 'other';
@endphp
<span class="inline-block px-2.5 py-1 rounded-full text-xs font-medium {{ $statusColors[$status] ?? 'bg-gray-100 text-gray-800' }}">
{{ __('admin.support_status_' . $status) }}
</span>
<span class="inline-block px-2.5 py-1 rounded-full text-xs font-medium {{ $categoryColors[$category] ?? 'bg-gray-100 text-gray-800' }}">
{{ __('admin.support_category_' . $category) }}
</span>
</div>
</div>
</div>
{{-- Nachrichten-Thread --}}
<div class="space-y-4 mb-6">
@foreach (($ticket['messages'] ?? []) as $msg)
@php
$isSupport = ($msg['sender'] ?? '') === 'support';
@endphp
<div class="rounded-lg p-4 {{ $isSupport ? 'bg-blue-50 border border-blue-200 ml-0 mr-4 sm:mr-12' : 'bg-white border border-gray-200 ml-4 sm:ml-12 mr-0' }}">
<div class="flex items-center justify-between mb-2">
<span class="text-sm font-medium {{ $isSupport ? 'text-blue-800' : 'text-gray-900' }}">
{{ $isSupport ? __('admin.support_sender_support') : __('admin.support_sender_you') }}
</span>
<span class="text-xs text-gray-500">{{ $msg['created_at'] ?? '' }}</span>
</div>
<div class="text-sm text-gray-700 whitespace-pre-wrap">{{ $msg['message'] ?? '' }}</div>
</div>
@endforeach
@if (empty($ticket['messages'] ?? []))
<div class="text-center text-gray-500 text-sm py-8">
{{ __('admin.support_no_messages') }}
</div>
@endif
</div>
{{-- Antwort-Formular --}}
@if (($ticket['status'] ?? 'open') !== 'closed')
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-lg font-semibold mb-4">{{ __('admin.support_reply') }}</h2>
<form method="POST" action="{{ route('admin.support.reply', $ticket['id'] ?? 0) }}">
@csrf
<div class="mb-4">
<textarea name="message" rows="4" required maxlength="5000"
placeholder="{{ __('admin.support_reply_placeholder') }}"
class="w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">{{ old('message') }}</textarea>
@error('message')
<p class="text-red-600 text-xs mt-1">{{ $message }}</p>
@enderror
</div>
<div class="flex justify-end">
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 text-sm font-medium">
{{ __('admin.support_send_reply') }}
</button>
</div>
</form>
</div>
@else
<div class="bg-gray-50 border border-gray-200 rounded-lg p-4 text-center text-sm text-gray-500">
{{ __('admin.support_ticket_closed') }}
</div>
@endif
</x-layouts.admin>