phase 8 and 9
This commit is contained in:
@@ -8,22 +8,22 @@
|
||||
$overallRate = $totalSessions > 0 ? round(($totalCompletions / $totalSessions) * 100, 2) : 0;
|
||||
@endphp
|
||||
<div class="grid gap-4 sm:grid-cols-3">
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-5">
|
||||
<div class="bg-white rounded-xl border border-gray-200 p-5">
|
||||
<dt class="text-sm font-medium text-gray-500">Total Completions</dt>
|
||||
<dd class="mt-1 text-2xl font-bold text-gray-900">{{ number_format($totalCompletions) }}</dd>
|
||||
</div>
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-5">
|
||||
<div class="bg-white rounded-xl border border-gray-200 p-5">
|
||||
<dt class="text-sm font-medium text-gray-500">Overall Conversion Rate</dt>
|
||||
<dd class="mt-1 text-2xl font-bold text-gray-900">{{ $overallRate }}%</dd>
|
||||
</div>
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-5">
|
||||
<div class="bg-white rounded-xl border border-gray-200 p-5">
|
||||
<dt class="text-sm font-medium text-gray-500">Total Goal Value</dt>
|
||||
<dd class="mt-1 text-2xl font-bold text-gray-900">${{ number_format($totalValue, 2) }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Completions Chart --}}
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6">
|
||||
<div class="bg-white rounded-xl border border-gray-200 p-6">
|
||||
<h3 class="text-base font-semibold text-gray-900 mb-4">Goal Completions Over Time</h3>
|
||||
<div style="height: 240px;">
|
||||
<canvas id="conversions-chart"></canvas>
|
||||
@@ -31,12 +31,11 @@
|
||||
</div>
|
||||
|
||||
{{-- Per-Goal Table --}}
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="bg-white rounded-xl border border-gray-200">
|
||||
@if ($goals->isEmpty())
|
||||
<div class="px-6 py-12 text-center text-sm text-gray-500">
|
||||
No goals configured.
|
||||
<a href="{{ route('goals.create', $website) }}" class="text-indigo-600 hover:text-indigo-800">Create one</a>.
|
||||
</div>
|
||||
<x-empty-state message="No goals configured.">
|
||||
<a href="{{ route('goals.create', $website) }}" class="text-sm text-indigo-600 hover:text-indigo-800">Create one</a>
|
||||
</x-empty-state>
|
||||
@else
|
||||
@php
|
||||
$typeLabels = [
|
||||
|
||||
Reference in New Issue
Block a user