source: resources/views/web/payments/payments.blade.php@ dfae77e

Last change on this file since dfae77e was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 22 months ago
  • Initial commit;
  • Property mode set to 100644
File size: 3.2 KB
Line 
1@extends('layouts.app')
2
3@section('content')
4 <div class="container">
5 <div class="row justify-content-center">
6 <div class="payments-container">
7 @if(sizeof($payments) !== 0)
8 <h3 class="mb-3">My Payments</h3>
9 <table class="table table-hover">
10 <thead>
11 <tr>
12 <th scope="col">#</th>
13 <th scope="col">Payment ID</th>
14 <th scope="col">Price (USD)</th>
15 @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
16 <th scope="col">Invoice Number</th>
17 <th scope="col">Status</th>
18 @endif
19 <th scope="col">Paid At</th>
20 <th scope="col">Offer</th>
21 @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
22 <th scope="col">Download Invoice</th>
23 @endif
24 </tr>
25 </thead>
26 <tbody>
27 @foreach($payments as $payment)
28 @php
29 if (Auth::user()->type === \App\Enum\UserType::ORGANIZER->value) {
30 $invoice = Auth::user()->findInvoice($payment->invoice_id);
31 }
32 @endphp
33 <tr>
34 <td>{{ $loop->index+1 }}</td>
35 <td>{{ $payment->name }}</td>
36 <td>@currency($payment->stripe_price)</td>
37 @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
38 <td>{{ $invoice->number }}</td>
39 <td><span class="badge bg-success">{{ ucfirst($invoice->status) }}</span></td>
40 @endif
41 <td>{{ $payment->created_at->isoFormat('DD-MMM-Y HH:mm') }}</td>
42 <td>
43 <a href="/offers/{{ $payment->offer->slug }}">
44 <button type="button" class="btn btn-primary">View Offer</button>
45 </a>
46 </td>
47 @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
48 <td>
49 <a href="/invoices/{{ $invoice->id }}">
50 <button type="button" class="btn btn-primary">Download</button>
51 </a>
52 </td>
53 @endif
54 </tr>
55 @endforeach()
56 </tbody>
57 </table>
58 @else
59 <h3 class="mb-3">You have no payments at the moment</h3>
60 @endif
61 </div>
62 </div>
63 </div>
64@endsection
Note: See TracBrowser for help on using the repository browser.