@extends('backend.layouts.main') @section('title') {{ __('Transactions') }} @endsection @section('content') @if($transactions->isEmpty()) @else
@if(request()->query('type')) @foreach($types as $type => $title) @if(request()->query('type') == $type) {{ $title }} @endif @endforeach @else {{ __('All types') }} @endif
@component('components.tables.sortable-column', ['id' => 'id', 'sort' => $sort, 'order' => $order]) {{ __('ID') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'type', 'sort' => $sort, 'order' => $order]) {{ __('Type') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'amount', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Amount') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'created', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Created') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'updated', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Updated') }} @endcomponent @foreach($transactions as $transaction) @endforeach
{{ __('User') }}
{{ $transaction->id }} {{ $transaction->account->user->name }} @if($transaction->account->user->role == App\Models\User::ROLE_ADMIN) {{ __('app.user_role_'.$transaction->account->user->role) }} @elseif($transaction->account->user->role == App\Models\User::ROLE_BOT) {{ __('app.user_role_'.$transaction->account->user->role) }} @endif {{ $transaction->transactionable->title ?? '' }} {{ $transaction->_amount }} {{ $transaction->created_at->diffForHumans() }} {{ $transaction->updated_at->diffForHumans() }}
{{ $transactions->appends(request()->query())->links() }}
@endif @endsection