@view('header', [ 'title' => $transaction->name . ' - Admin - Transactions' ])

<div class="breadcrumb">
    <ul>
        <li><a href="/">Banq</a></li>
        <li><a href="/admin">Admin</a></li>
        <li><a href="/admin/transactions">Transactions</a></li>
        <li class="is-active"><a href="/admin/transactions/{{ $transaction->id }}">{{ $transaction->name }}</a></li>
    </ul>
</div>

<h1 class="title">{{ $transaction->name }}</h1>

@if (is_numeric($transaction->from_account_id)):
    <p>From: <a href="/admin/accounts/{{ $transaction->from_account_id }}">{{ $transaction->from_account->name }}</a></p>
@else:
    <p>From: {{ $transaction->from_account_id }}</p>
@endif

@if (is_numeric($transaction->to_account_id)):
    <p>To: <a href="/admin/accounts/{{ $transaction->to_account_id }}">{{ $transaction->to_account->name }}</a></p>
@else:
    <p>To: {{ $transaction->to_account_id }}</p>
@endif

<p>Amount: {!! format_money($transaction->amount) !!}</p>
<p>Send at: <i>{{ $transaction->created_at }}</i></p>

@view('footer')
