
@extends('layouts.dashboard', ['title' => 'Expense Summaries'])

@section('content')
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Main content -->
<!-- Main content -->
    <section class="content">

        <!-- /.row -->
        <!-- Main row -->
        <div class="">
            <br><br>
            @include('inc.messages')
          <!-- Left col -->

          <!-- /.Left col -->
          <!-- right col (We are only adding the ID to make the widgets sortable)-->
          <section class="col-lg-12 connectedSortable">

            <!-- Map card -->
            <div class="card">
              <div class="card-header no-border">
                <h3 class="card-title">
                  All Expense Summaries
                </h3>
                <!-- card tools -->

                <!-- /.card-tools -->
              </div>
              <div class="card-body">


                 <br>
              <div class="float-right">

              </div>

              <br><br><br>

              <div class="table-responsive">
                  <table id="dataTable" width="100%" class="table-bordered table-striped table-sm dataTable no-footer">
                      <thead>
                      <tr>
                        <th>ID</th>
                        <th>Amount</th>
                        <th>Requested By</th>
                        <th>Date Created</th>
                        <th></th>
                      </tr>
                      </thead>
                      <tbody>
                        @foreach($entries as $item)
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ number_format($item->amount) }}</td>
                            <td>{{ $item->requested_by }}</td>
                            <td>{{ $item->created_at }}</td>
                            <td>
                                <?php
                                            $parameter = Crypt::encrypt($item->id);
                                            ?>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
                                      View List
                                    </button>
                                    <div class="dropdown-menu" style="">





                                <a class="dropdown-item"  href="{{ URL::to('/expense/list/'.$parameter )}}">View Payment List</a>


                                <!-- <a class="dropdown-item"  href="{{ URL::to('beneficiaries/view/'.$parameter )}}">Preview</a> -->
                                  </div>
                                  </div>

                            </td>
                        </tr>
                        @endforeach

                       </tbody>

                    </table>
              </div>
            </div>
            <!-- /.card -->


        </div>
        <!-- /.modal-dialog -->
      </div>
      <!-- /.create modal -->

            <!-- /.card -->
          </section>
          <!-- right col -->
        </div>

    <!-- /.content -->





    @include('inc.copyright')
@endsection
