first commit from hostslim
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<x-report-layout :website="$website" :from="$from" :to="$to" title="Events Overview">
|
||||
|
||||
<div class="rounded-xl border border-gray-200 bg-white overflow-hidden">
|
||||
@if ($events->isEmpty())
|
||||
<x-empty-state message="No events tracked for this period." />
|
||||
@else
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Event Name</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</th>
|
||||
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Total</th>
|
||||
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Unique Visitors</th>
|
||||
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Total Value</th>
|
||||
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@foreach ($events as $row)
|
||||
<tr>
|
||||
<td class="px-6 py-3 text-sm text-gray-900 font-medium">{{ $row->name }}</td>
|
||||
<td class="px-6 py-3 text-sm text-gray-500">{{ $row->category ?? '—' }}</td>
|
||||
<td class="px-6 py-3 text-sm text-gray-900 text-right">{{ number_format($row->total) }}</td>
|
||||
<td class="px-6 py-3 text-sm text-gray-900 text-right">{{ number_format($row->unique_visitors) }}</td>
|
||||
<td class="px-6 py-3 text-sm text-gray-900 text-right">{{ $row->total_value ? number_format($row->total_value, 2) : '—' }}</td>
|
||||
<td class="px-6 py-3 text-sm text-right">
|
||||
<a href="{{ route('reports.event-detail', [$website, $row->name] + request()->only(['range', 'from', 'to'])) }}" class="text-indigo-600 hover:text-indigo-800">Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</x-report-layout>
|
||||
Reference in New Issue
Block a user