@extends('layouts.app') @section('page_title', 'Fuel Price Update Logs') @section('content')

Price Update History

@forelse($logs ?? [] as $log) @empty @endforelse
Station Fuel Type Old Price New Price Change Update Type Updated By Updated At
{{ $log['station_name'] }} {{ $log['fuel_type'] }} {{ number_format($log['old_price'], 2) }} {{ number_format($log['new_price'], 2) }} @php $change = $log['new_price'] - $log['old_price']; $changeClass = $change > 0 ? 'text-danger' : ($change < 0 ? 'text-success' : 'text-secondary'); @endphp {{ $change > 0 ? '+' : '' }}{{ number_format($change, 2) }} @php $typeClass = [ 'manual' => 'info', 'scheduled' => 'warning', 'import' => 'primary' ][$log['update_type']] ?? 'secondary'; @endphp {{ ucfirst($log['update_type']) }} {{ $log['updated_by'] }} {{ \Carbon\Carbon::parse($log['updated_at'])->format('Y-m-d H:i:s') }}
No update logs found
@if(isset($logs) && count($logs) > 0)
{{ $logs->links() }}
@endif
@endsection @push('scripts') @endpush @push('styles') @endpush