@if(!$member)
except('class') }} class="mt-6 format format-sm sm:format-base lg:format-md dark:format-invert {{ $attributes->get('class') }}">

{!! trans('common.log_in_to_see_history', [ 'log_in' => "".trans('common.log_in')."" ]) !!}

@else @if($transactions->count() == 0)
except('class') }} class="mt-6 format format-sm sm:format-base lg:format-md dark:format-invert {{ $attributes->get('class') }}">

{{ trans('common.no_history_yet') }}

@else
    except('class') }} class="relative border-l border-gray-200 dark:border-gray-700 ml-6 {{ $attributes->get('class') }}"> @foreach($transactions as $transaction) @php $transactionExpired = ($transaction->reward_points === null && ($transaction->expires_at->isPast() || $transaction->points == $transaction->points_used)) ? true : false; @endphp
  1. @if($transaction->event == 'initial_bonus_points') @elseif(in_array($transaction->event, ['staff_credited_points_for_purchase', 'staff_credited_points'])) @elseif($transaction->event == 'staff_redeemed_points_for_reward') @endif

    @if($transaction->event == 'initial_bonus_points') {!! trans('common.received_initial_bonus_points', ['points' => '' . $transaction->points . '']) !!} @elseif($transaction->event == 'staff_credited_points_for_purchase') {!! trans('common.purchase') !!} {{ $transaction->purchase_amount_formatted }} @elseif($transaction->event == 'staff_credited_points') {!! trans('common.points_issued') !!} @elseif($transaction->event == 'staff_redeemed_points_for_reward') {!! trans('common.reward') !!} @endif

    {{ ($transaction->points > 0) ? '+' : '' }}{!! trans('common.amount_points', ['points' => '' . $transaction->points . '']) !!}

    @if(in_array($transaction->event, ['staff_redeemed_points_for_reward'])) {{ $transaction->reward_title }} @endif @if(in_array($transaction->event, ['initial_bonus_points', 'staff_credited_points_for_purchase', 'staff_credited_points'])) @if($transaction->expires_at->isPast() && $transaction->points_used == 0) {!! trans('common.points_expired', ['points' => '' . $transaction->points . '', 'dateDiffFromNow' => $transaction->expires_at->diffForHumans()]) !!} @elseif($transaction->expires_at->isPast() && $transaction->points_used > 0) @if($transaction->points - $transaction->points_used == 0) {!! trans('common.points_used', ['points_used' => '' . $transaction->points_used . '', 'points' => '' . ($transaction->points - $transaction->points_used) . '']) !!} @else {!! trans('common.points_used_and_expired', ['points_used' => '' . $transaction->points_used . '', 'points' => '' . ($transaction->points - $transaction->points_used) . '', 'dateDiffFromNow' => $transaction->expires_at->diffForHumans()]) !!} @endif @elseif($transaction->expires_at->isFuture() && $transaction->points_used == 0) {!! trans('common.points_expire', ['points' => '' . $transaction->points . '', 'dateDiffFromNow' => $transaction->expires_at->diffForHumans()]) !!} @elseif($transaction->expires_at->isFuture() && $transaction->points_used > 0) @if($transaction->points - $transaction->points_used == 0) {!! trans('common.points_used', ['points_used' => '' . $transaction->points_used . '', 'points' => '' . ($transaction->points - $transaction->points_used) . '']) !!} @else {!! trans('common.points_used_points_expire', ['points_used' => '' . $transaction->points_used . '', 'points' => '' . ($transaction->points - $transaction->points_used) . '', 'dateDiffFromNow' => $transaction->expires_at->diffForHumans()]) !!} @endif @endif @endif

    @if($showStaff) @endif @if($showNotes && $transaction->note)
    {{ $transaction->note }}
    @endif @if($showAttachments && $transaction->image) {{ trans('common.attachment') }} @endif
  2. @endforeach
@endif @endif