@extends('app.shell') @section('body') @php /** @var \Illuminate\Support\Collection $activities */ /** @var \App\Models\Person|null $mePerson */ $locale = app()->getLocale(); $displayCurrency = request()->user()?->profile?->currency ?: 'USD'; @endphp

{{ __('Activity') }}

@if ($activities->count() === 0)

{{ __('No activity yet') }}

{{ __('Add an expense to see it here.') }}

@else
@foreach ($activities as $i => $a)
{{ $a->user?->avatar ?? '๐Ÿ™‚' }}

{{ ($mePerson && $a->user_person_id === $mePerson->id) ? __('You') : ($a->user?->name ?? __('Someone')) }} {{ $a->description }}

@if ($a->list_name || $a->group_name) {{ $a->list_name ?? $a->group_name }} ยท @endif {{ optional($a->activity_at)->format('M j') }}

@if ($a->amount !== null)

@php $fmt = \App\Support\Money::formatConvertedWithOriginal((float) $a->amount, $displayCurrency, $displayCurrency, $locale); @endphp {{ $fmt['primary'] }}

@endif
@if ($i < $activities->count() - 1)
@endif
@endforeach
@endif
@endsection