1 | @extends('layouts.app')
|
---|
2 |
|
---|
3 | @section('content')
|
---|
4 | <div class="container">
|
---|
5 | <div class="row justify-content-center">
|
---|
6 | <div class="offer-container">
|
---|
7 | <h3 class="mb-3">My Offers</h3>
|
---|
8 | <table class="table table-hover">
|
---|
9 | <thead>
|
---|
10 | <tr>
|
---|
11 | <th scope="col">#</th>
|
---|
12 | @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
|
---|
13 | <th scope="col">To</th>
|
---|
14 | @else
|
---|
15 | <th scope="col">From</th>
|
---|
16 | @endif
|
---|
17 | <th scope="col">Event Name</th>
|
---|
18 | <th scope="col">Status</th>
|
---|
19 | <th scope="col">Price (USD)</th>
|
---|
20 | <th scope="col">Event Date & Start Time</th>
|
---|
21 | <th scope="col">City & Country</th>
|
---|
22 | <th scope="col">Event Type</th>
|
---|
23 | <th scope="col">Options</th>
|
---|
24 | </tr>
|
---|
25 | </thead>
|
---|
26 | <tbody>
|
---|
27 | @foreach($offers as $offer)
|
---|
28 | <tr>
|
---|
29 | <td>{{ $loop->index+1 }}</td>
|
---|
30 | @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
|
---|
31 | <td>
|
---|
32 | <a href="/{{ $offer->artist->user->username }}">
|
---|
33 | {{ $offer->artist->user->name }}
|
---|
34 | </a>
|
---|
35 | </td>
|
---|
36 | @else
|
---|
37 | <td>{{ $offer->event->organizer->user->name }}</td>
|
---|
38 | @endif
|
---|
39 | <td>{{ $offer->event->title }}</td>
|
---|
40 | @if($offer->status === \App\Enum\OfferStatus::IN_PROGRESS->value)
|
---|
41 | <td><p class="badge bg-warning">In Progress</p></td>
|
---|
42 | @elseif($offer->status === \App\Enum\OfferStatus::COMPLETED->value)
|
---|
43 | <td><p class="badge bg-success">Completed</p></td>
|
---|
44 | @elseif($offer->status === \App\Enum\OfferStatus::DECLINED->value)
|
---|
45 | <td><p class="badge bg-danger">Declined</p></td>
|
---|
46 | @elseif($offer->status === \App\Enum\OfferStatus::WAITING_FOR_PAYMENT->value)
|
---|
47 | <td><p class="badge bg-warning">Waiting for payment</p></td>
|
---|
48 | @endif
|
---|
49 | <td>
|
---|
50 | @if($offer->price != null)
|
---|
51 | @currency($offer->price)
|
---|
52 | @else
|
---|
53 | Not yet defined
|
---|
54 | @endif
|
---|
55 | </td>
|
---|
56 | <td>{{ $offer->event->event_date->isoFormat('DD-MMM-Y') . ", " . $offer->event->start_time->isoFormat('H:mm') }}</td>
|
---|
57 | <td>{{ $offer->event->city }}, {{ $offer->event->country }}</td>
|
---|
58 | <td><span class="badge bg-info text-dark">{{ $offer->event->event_type->name }}</span>
|
---|
59 | <td>
|
---|
60 | <a href="/offers/{{ $offer->slug }}">
|
---|
61 | <button type="button" class="btn btn-primary">Details</button>
|
---|
62 | </a>
|
---|
63 | </td>
|
---|
64 | </tr>
|
---|
65 | @endforeach
|
---|
66 | </tbody>
|
---|
67 | </table>
|
---|
68 |
|
---|
69 | <div class="d-flex justify-content-center">
|
---|
70 | {!! $offers->links() !!}
|
---|
71 | </div>
|
---|
72 | </div>
|
---|
73 | </div>
|
---|
74 | </div>
|
---|
75 | @endsection
|
---|