- 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>
135 lines
8.9 KiB
PHP
135 lines
8.9 KiB
PHP
<x-layouts.admin :title="__('admin.support_title')">
|
|
<h1 class="text-2xl font-bold mb-6">{{ __('admin.support_title') }}</h1>
|
|
|
|
{{-- Nicht registriert: Hinweis --}}
|
|
@if (!$registered)
|
|
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-6 mb-6">
|
|
<div class="flex items-start gap-3">
|
|
<svg class="w-6 h-6 text-yellow-600 flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
<div>
|
|
<h2 class="text-lg font-semibold text-yellow-800 mb-1">{{ __('admin.support_not_registered') }}</h2>
|
|
<p class="text-sm text-yellow-700 mb-4">{{ __('admin.support_register_hint') }}</p>
|
|
<form method="POST" action="{{ route('admin.support.register') }}">
|
|
@csrf
|
|
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 text-sm font-medium">
|
|
{{ __('admin.register_now') }}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@else
|
|
{{-- Ticket erstellen --}}
|
|
<div class="bg-white rounded-lg shadow p-6 mb-6">
|
|
<h2 class="text-lg font-semibold mb-4">{{ __('admin.support_new_ticket') }}</h2>
|
|
<form method="POST" action="{{ route('admin.support.store') }}">
|
|
@csrf
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
|
<div>
|
|
<label for="subject" class="block text-sm font-medium text-gray-700 mb-1">{{ __('admin.support_subject') }}</label>
|
|
<input type="text" name="subject" id="subject" value="{{ old('subject') }}" required maxlength="255"
|
|
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">
|
|
@error('subject')
|
|
<p class="text-red-600 text-xs mt-1">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
<div>
|
|
<label for="category" class="block text-sm font-medium text-gray-700 mb-1">{{ __('admin.support_category') }}</label>
|
|
<select name="category" id="category" required
|
|
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">
|
|
<option value="bug" {{ old('category') === 'bug' ? 'selected' : '' }}>{{ __('admin.support_category_bug') }}</option>
|
|
<option value="feature" {{ old('category') === 'feature' ? 'selected' : '' }}>{{ __('admin.support_category_feature') }}</option>
|
|
<option value="question" {{ old('category') === 'question' ? 'selected' : '' }}>{{ __('admin.support_category_question') }}</option>
|
|
<option value="other" {{ old('category') === 'other' ? 'selected' : '' }}>{{ __('admin.support_category_other') }}</option>
|
|
</select>
|
|
@error('category')
|
|
<p class="text-red-600 text-xs mt-1">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="mb-4">
|
|
<label for="message" class="block text-sm font-medium text-gray-700 mb-1">{{ __('admin.support_message') }}</label>
|
|
<textarea name="message" id="message" rows="4" required maxlength="5000"
|
|
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 items-center justify-between">
|
|
<p class="text-xs text-gray-500">{{ __('admin.support_system_info_note') }}</p>
|
|
<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_submit') }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
{{-- Ticket-Liste --}}
|
|
<div class="bg-white rounded-lg shadow overflow-hidden">
|
|
<div class="px-6 py-4 border-b">
|
|
<h2 class="text-lg font-semibold">{{ __('admin.support_title') }}</h2>
|
|
</div>
|
|
@if (count($tickets) > 0)
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead class="bg-gray-50 border-b">
|
|
<tr>
|
|
<th class="text-left px-4 py-3 font-medium text-gray-700">#</th>
|
|
<th class="text-left px-4 py-3 font-medium text-gray-700">{{ __('admin.support_subject') }}</th>
|
|
<th class="text-center px-4 py-3 font-medium text-gray-700">{{ __('admin.support_status') }}</th>
|
|
<th class="text-center px-4 py-3 font-medium text-gray-700">{{ __('admin.support_category') }}</th>
|
|
<th class="text-left px-4 py-3 font-medium text-gray-700">{{ __('admin.support_created_at') }}</th>
|
|
<th class="text-left px-4 py-3 font-medium text-gray-700">{{ __('admin.support_last_reply') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
@foreach ($tickets as $ticket)
|
|
@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',
|
|
];
|
|
@endphp
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-4 py-3 text-gray-500">{{ $ticket['id'] ?? '-' }}</td>
|
|
<td class="px-4 py-3">
|
|
<a href="{{ route('admin.support.show', $ticket['id'] ?? 0) }}" class="text-blue-600 hover:underline font-medium">
|
|
{{ $ticket['subject'] ?? '-' }}
|
|
</a>
|
|
</td>
|
|
<td class="px-4 py-3 text-center">
|
|
<span class="inline-block px-2 py-0.5 rounded-full text-xs font-medium {{ $statusColors[$ticket['status'] ?? ''] ?? 'bg-gray-100 text-gray-800' }}">
|
|
{{ __('admin.support_status_' . ($ticket['status'] ?? 'open')) }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-center">
|
|
<span class="inline-block px-2 py-0.5 rounded-full text-xs font-medium {{ $categoryColors[$ticket['category'] ?? ''] ?? 'bg-gray-100 text-gray-800' }}">
|
|
{{ __('admin.support_category_' . ($ticket['category'] ?? 'other')) }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-xs text-gray-500">{{ $ticket['created_at'] ?? '-' }}</td>
|
|
<td class="px-4 py-3 text-xs text-gray-500">{{ $ticket['last_reply_at'] ?? '-' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@else
|
|
<div class="px-6 py-8 text-center text-gray-500 text-sm">
|
|
{{ __('admin.support_no_tickets') }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</x-layouts.admin>
|