- Created `quick-replies.blade.php` for managing quick replies. - Added `settings.blade.php` for admin settings management. - Implemented `ticket-show.blade.php` to display ticket details. - Introduced `timeline-card.blade.php` component for displaying timeline information. Enhance quick reply management functionality - Developed `quick-reply-manager.blade.php` for creating and editing quick replies. - Integrated Livewire for dynamic interaction and validation. Implement settings page for AI configuration - Created `settings-page.blade.php` for managing AI settings, including prompts and provider instances. - Added functionality for managing models and embeddings. Add ticket show functionality with real-time updates - Implemented ticket details view with processing status and tool call logs. - Added support for displaying article suggestions and error messages. Create unit tests for AI classifier and domain info tool - Added `AIClassifierServiceTest.php` to validate AI classifier functionality. - Implemented `DomainInfoToolTest.php` for domain parameter validation. - Created `OxxaClientTest.php` to test API interactions and password hashing.
66 lines
3.6 KiB
PHP
66 lines
3.6 KiB
PHP
<div class="space-y-6">
|
|
<div class="bg-white rounded-xl p-4 shadow">
|
|
<h2 class="font-semibold mb-3">Ticket simulatie (handmatig inschieten)</h2>
|
|
|
|
@if($submitError)
|
|
<div class="mb-3 rounded bg-red-100 text-red-700 px-3 py-2 text-sm">{{ $submitError }}</div>
|
|
@endif
|
|
|
|
@if($lastResult)
|
|
<div class="mb-3 rounded bg-green-100 text-green-800 px-3 py-2 text-sm">
|
|
Ticket #{{ $lastResult['ticket_id'] }} aangemaakt met status '{{ $lastResult['status'] }}'.
|
|
<a class="underline" href="{{ route('admin.tickets.show', ['ticket' => $lastResult['ticket_id']]) }}">Bekijk voortgang</a>
|
|
</div>
|
|
@endif
|
|
|
|
<form wire:submit="submitTicket" class="space-y-3">
|
|
<textarea wire:model="newTicketMessage" class="w-full border rounded p-2 min-h-28" placeholder="Bijv: Mijn website geeft 500 fout na plugin update"></textarea>
|
|
@error('newTicketMessage') <p class="text-red-600 text-sm">{{ $message }}</p> @enderror
|
|
<div class="grid md:grid-cols-2 gap-3">
|
|
<div>
|
|
<input wire:model="apiUser" type="text" class="w-full border rounded p-2" placeholder="API user (optioneel)">
|
|
@error('apiUser') <p class="text-red-600 text-sm">{{ $message }}</p> @enderror
|
|
</div>
|
|
<div>
|
|
<input wire:model="apiPassword" type="password" class="w-full border rounded p-2" placeholder="API password/key (optioneel)">
|
|
@error('apiPassword') <p class="text-red-600 text-sm">{{ $message }}</p> @enderror
|
|
</div>
|
|
</div>
|
|
<p class="text-xs text-slate-500">Credentials worden encrypted op het ticket opgeslagen en alleen gebruikt voor toegestane toolcalls.</p>
|
|
<button class="bg-slate-900 text-white px-4 py-2 rounded" type="submit">Ticket inschieten</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl p-4 shadow">
|
|
<div class="flex items-center justify-between mb-3">
|
|
<h2 class="font-semibold">Tickets + status</h2>
|
|
<div class="flex items-center gap-2 text-sm">
|
|
<label for="perPage">Per pagina</label>
|
|
<select id="perPage" wire:model.live="perPage" class="border rounded px-2 py-1">
|
|
<option value="10">10</option>
|
|
<option value="25">25</option>
|
|
<option value="50">50</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-y-3">
|
|
@foreach($tickets as $ticket)
|
|
<div class="border rounded p-3">
|
|
<div class="flex items-center justify-between">
|
|
<div class="font-medium">Ticket #{{ $ticket->id }}</div>
|
|
<span class="text-xs px-2 py-1 rounded bg-slate-100">{{ $ticket->status }}</span>
|
|
</div>
|
|
<div class="text-sm text-slate-700 mb-2">{{ $ticket->message }}</div>
|
|
@if($ticket->bestArticle)
|
|
<div class="text-sm">Article: #{{ $ticket->bestArticle->id }} | Confidence: {{ number_format((float) $ticket->confidence, 2) }}</div>
|
|
<div class="text-xs text-slate-500">{{ $ticket->explanation }}</div>
|
|
@endif
|
|
<a class="text-sm underline" href="{{ route('admin.tickets.show', ['ticket' => $ticket->id]) }}">Bekijk detail/progress</a>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
<div class="mt-4">{{ $tickets->links() }}</div>
|
|
</div>
|
|
</div>
|