- Increased icon sizes in service items, service orders, users, and technician management for better visibility. - Added custom loading indicators with appropriate icons in search fields for vehicles, work orders, and technicians. - Introduced invoice management routes for better organization and access control. - Created a new test for the estimate PDF functionality to ensure proper rendering and data integrity.
99 lines
6.0 KiB
PHP
99 lines
6.0 KiB
PHP
<div class="bg-white dark:bg-zinc-800 rounded-lg border border-zinc-200 dark:border-zinc-700">
|
|
<div class="border-b border-zinc-200 dark:border-zinc-700 p-4">
|
|
<h3 class="text-base font-semibold text-zinc-900 dark:text-zinc-100">Performance Metrics</h3>
|
|
<p class="text-sm text-zinc-600 dark:text-zinc-400">This week vs last week</p>
|
|
</div>
|
|
|
|
<div class="p-6 space-y-6">
|
|
<!-- Jobs Completed -->
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<div class="text-2xl font-bold text-zinc-900 dark:text-white">{{ $metrics['this_week']['jobs_completed'] }}</div>
|
|
<div class="text-sm text-zinc-600 dark:text-zinc-400">Jobs Completed</div>
|
|
</div>
|
|
<div class="text-right">
|
|
@if($metrics['growth']['jobs'] > 0)
|
|
<span class="inline-flex items-center px-2 py-1 text-sm font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 rounded-full">
|
|
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"/>
|
|
</svg>
|
|
+{{ $metrics['growth']['jobs'] }}%
|
|
</span>
|
|
@elseif($metrics['growth']['jobs'] < 0)
|
|
<span class="inline-flex items-center px-2 py-1 text-sm font-medium bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 rounded-full">
|
|
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 17h-8m0 0V9m0 8l8-8 4 4 6-6"/>
|
|
</svg>
|
|
{{ $metrics['growth']['jobs'] }}%
|
|
</span>
|
|
@else
|
|
<span class="inline-flex items-center px-2 py-1 text-sm font-medium bg-zinc-100 text-zinc-800 dark:bg-zinc-700 dark:text-zinc-200 rounded-full">No change</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Revenue -->
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<div class="text-2xl font-bold text-zinc-900 dark:text-white">${{ number_format($metrics['this_week']['revenue'], 0) }}</div>
|
|
<div class="text-sm text-zinc-600 dark:text-zinc-400">Revenue</div>
|
|
</div>
|
|
<div class="text-right">
|
|
@if($metrics['growth']['revenue'] > 0)
|
|
<span class="inline-flex items-center px-2 py-1 text-sm font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 rounded-full">
|
|
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"/>
|
|
</svg>
|
|
+{{ $metrics['growth']['revenue'] }}%
|
|
</span>
|
|
@elseif($metrics['growth']['revenue'] < 0)
|
|
<span class="inline-flex items-center px-2 py-1 text-sm font-medium bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 rounded-full">
|
|
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 17h-8m0 0V9m0 8l8-8 4 4 6-6"/>
|
|
</svg>
|
|
{{ $metrics['growth']['revenue'] }}%
|
|
</span>
|
|
@else
|
|
<span class="inline-flex items-center px-2 py-1 text-sm font-medium bg-zinc-100 text-zinc-800 dark:bg-zinc-700 dark:text-zinc-200 rounded-full">No change</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Average Completion Time -->
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<div class="text-2xl font-bold text-zinc-900 dark:text-white">{{ $metrics['this_week']['avg_completion_time'] }}h</div>
|
|
<div class="text-sm text-zinc-600 dark:text-zinc-400">Avg. Completion Time</div>
|
|
</div>
|
|
<svg class="w-5 h-5 text-zinc-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
</div>
|
|
|
|
<!-- Customer Satisfaction -->
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<div class="text-2xl font-bold text-zinc-900 dark:text-white">{{ $metrics['this_week']['customer_satisfaction'] }}/5</div>
|
|
<div class="text-sm text-zinc-600 dark:text-zinc-400">Customer Satisfaction</div>
|
|
</div>
|
|
<div class="flex items-center">
|
|
@for($i = 1; $i <= 5; $i++)
|
|
@if($i <= floor($metrics['this_week']['customer_satisfaction']))
|
|
<svg class="w-6 h-6 text-yellow-400" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
|
|
</svg>
|
|
@elseif($i <= $metrics['this_week']['customer_satisfaction'])
|
|
<svg class="w-6 h-6 text-yellow-200" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
|
|
</svg>
|
|
@else
|
|
<svg class="w-6 h-6 text-zinc-300" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
|
|
</svg>
|
|
@endif
|
|
@endfor
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|