@extends('layouts.layoutMaster') @section('title', 'Activity Log') @section('vendor-style') @endsection @php $breadcrumbs = [ ['url' => route('dashboard'), 'label' => 'Dashboard'], ['url' => route('activity-log.index'), 'label' => 'Activity Log'], ]; @endphp @section('content')
Filter Activities
Reset @can('activity-log.index') Export @endcan
Activity Timeline {{ $activities->total() }} total
Showing {{ $activities->firstItem() ?? 0 }} to {{ $activities->lastItem() ?? 0 }} of {{ $activities->total() }} activities
@if ($activities->count() > 0)
@foreach ($activities as $activity)
{{ $activity->description }}
{{ $activity->created_at->format('M d, Y H:i:s') }}
{{ $activity->causer ? $activity->causer->name : 'System' }}
{{ $activity->event }}
@can('activity-log.show') @endcan
{{-- Quick preview of changes --}} @if ($activity->properties && $activity->properties->count() > 0)
@php $summary = \App\Helpers\ActivityLogHelper::getChangeSummary($activity); @endphp @if ($summary !== 'No changes recorded') {{ $summary }} @endif {{-- Show detail change counts --}} @if ($activity->properties->has('detail_changes')) @php $detailChanges = $activity->properties->get('detail_changes'); @endphp
@if (!empty($detailChanges['added'])) {{ count($detailChanges['added']) }} Added @endif @if (!empty($detailChanges['updated'])) {{ count($detailChanges['updated']) }} Updated @endif @if (!empty($detailChanges['deleted'])) {{ count($detailChanges['deleted']) }} Deleted @endif
@endif
@endif
@endforeach
{{ $activities->appends(request()->query())->links() }}
@else

No Activity Found

@if (request()->hasAny(['search', 'model_type', 'event', 'user_id', 'start_date', 'end_date'])) No activities match your current filters. Try adjusting your search criteria. @else No activities have been logged yet. @endif

@endif
@endsection @section('page-script') @endsection