@php
if(Auth::guard('web')->check())
{
    $layout = 'bmviews.layouts.user';
}
elseif(Auth::guard('admin')->check())
{
 $layout = 'bmviews.layouts.admin';
 }
 elseif(Auth::guard('customer')->check())
 {
 $layout = 'bmviews.layouts.customer';
 }
@endphp
@extends($layout)
@section('content')
<div class="main-panel">
    <div class="content">
            <div class="panel-header">
                <div class="page-inner py-5 text-white"  style="background:#313232">
                    <div class="d-flex align-items-left align-items-md-center flex-column flex-md-row">
                        <div><div class="page-header">
                            <h4 class="page-title text-white">Wallets</h4>
                            <ul class="breadcrumbs">
                                    <li class="nav-home">
                                        <a class="text-white" href="{{ route('admin-dashboard')}}">
                                            <i class="flaticon-home"></i>
                                        </a>
                                    </li>
                                    <li class="separator">
                                        <i class="flaticon-right-arrow"></i>
                                    </li>
                                    <li class="nav-item">
                                        <a class="text-white" href="{{ route('wallet.index')}}">Wallets</a>
                                    </li>
                                    <li class="separator">
                                        <i class="flaticon-right-arrow"></i>
                                    </li>
                                    <li class="nav-item">
                                        <a class="text-white" href="">View Wallet</a>
                                    </li>
                                </ul>
                        </div></div>
                        <div class="ml-md-auto py-2 py-md-0">
                            <a href="{{ route('wallet.index') }}" class="btn btn-white btn-border btn-round mr-2"><i class="fas fa-arrow-circle-left"></i> Back</a>
                        </div>
                    </div>
                </div>
            <div class="page-category">
                <div class="page-inner mt--5">
                    <div class="row mt--2">
                            <div class="col-md-12">
                                <div class="card full-height">
                                    <div class="card-body">
                                        <div class="card-title">View Wallet</div>
                                        <table  id="table" class="display table table-striped table-hover">
                                            <thead>
                                                <tr>
                                                    <th>ID#</th>
                                                    <th>Transaction type</th>
                                                    <th>Amount [Kes.]</th>
                                                    <th>Reference</th>
                                                    <th>Status</th>
                                                </tr>
                                            </thead>
                                            <tfoot>
                                                <tr>
                                                <th>ID#</th>
                                                <th>Transaction type</th>
                                                <th>Amount [Kes.]</th>
                                                <th>Reference</th>
                                                <th>Status</th>
                                                </tr>
                                            </tfoot>
                                            <tbody>
                                            
                                            @foreach($transacts as $transact)
                                            <tr>
                                            <td>{{ $transact['wallet_trans_id']}}</td>
                                            <td>{{ $transact['wallet_trans_type']}}</td>
                                            <td>{{ $transact['wallet_trans_amount']}}</td>
                                            <td>{{ $transact['wallet_trans_ref']}}</td>
                                            <td>@if($transact['wallet_trans_status'] == 0)
                                                <span class="badge badge-danger">Pending</span>
                                             @elseif($transact['wallet_trans_status'] == 1)
                                                <span class="badge badge-success">Paid</span>
                                             @endif
                                             </td>
                                           </tr>
                                           @endforeach
                                          </table>
                                    </div>
                                </div>
                            </div>
                        </div>
            </div>
            </div>
        </div>
    </div>
    @endsection