1+ @extends (' layouts.app' )
2+
3+ @section (' title' )
4+ Dashboard
5+ @endsection
6+
7+ @section (' content' )
8+ <section class =" dashboard my-5" >
9+ <div class =" container" >
10+ <div class =" row text-left" >
11+ <div class =" col-lg-12 col-12 header-wrap mt-4" >
12+ <p class =" story" >
13+ Checkouts
14+ </p >
15+ <h2 class =" primary-header " >
16+ Checkout Lists
17+ </h2 >
18+ </div >
19+ </div >
20+ <div class =" row my-5" >
21+ @include (' components.alert' )
22+ <table class =" table table-bordered" >
23+ <thead class =" bg-dark text-white" >
24+ <tr class =" align-middle" >
25+ <th >Camp</th >
26+ <th >Name</th >
27+ <th >Price</th >
28+ <th >Register Date</th >
29+ <th >Paid Status</th >
30+ <th >Action</th >
31+ </tr >
32+ </thead >
33+ <tbody class =" bg-light" >
34+ @forelse ($checkouts as $checkout )
35+ <tr class =" align-middle" >
36+ <td >
37+ {{ $checkout -> Camp -> title } }
38+ </td >
39+ <td >
40+ {{ $checkout -> User -> name } }
41+ </td >
42+ <td >
43+ <strong ><span class =" text-danger" >$</span >{{ $checkout -> Camp -> price } } ,00</strong >
44+ </td >
45+ <td >
46+ {{ $checkout -> created_at -> format (' d M Y' )} }
47+ </td >
48+ <td class =" text-center" >
49+ @if ($checkout -> is_paid )
50+ <div class =" badge bg-success" >Success</div >
51+ @else
52+ <div class =" badge bg-warning" >Waiting</div >
53+ @endif
54+ </td >
55+ <td >
56+ @if (! $checkout -> is_paid )
57+ <form action =" {{ route (' admin.checkout.update' , $checkout -> id )} }" method =" post" >
58+ @csrf
59+ <button class =" btn btn-primary btn-sm" >Set to Paid</button >
60+ </form >
61+ @else
62+
63+ @endif
64+ </td >
65+ </tr >
66+ @empty
67+ <tr class =" align-middle" >
68+ <div class =" alert alert-info" role =" alert" >
69+ No Data!
70+ </div >
71+ </tr >
72+ @endforelse
73+ </tbody >
74+ </table >
75+ </div >
76+ </div >
77+ </section >
78+ @endsection
0 commit comments