@extends('layouts.app')

@section('content')
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <div class="panel panel-default">
          <div class="panel-heading">
            <h2 class="panel-title">Dashboard</h2>
          </div>
          <div class="panel-body">
            Selamat datang di GeMakan.
            <table class="table">
              <tbody>
                <tr>
                  <td class="text-muted">Makanan yang dipesan.</td>
                  <td>
                    @if($beliLogs->count() == 0)
                    Tidak ada makanan dipesan
                    @endif
                    <ul>
                      @foreach($beliLogs as $beliLog)
                      <li>
                        {!! Form::open(['url' => route('member.menu.batal', $beliLog->menu_id),
                        'method' => 'put',
                        'class' => 'form-inline js-confirm',
                        'data-confirm' => "Anda yakin hendak membatalkan pesanan " . $beliLog->menu->title . "?"] ) !!}
                        {{ $beliLog->menu->title }}
                        {!! Form::submit('Batalkan', ['class'=>'btn btn-xs btn-default']) !!}
                        {!! Form::close() !!}
                      </li>
                      @endforeach
                    </ul>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>

@endsection
