source: resources/views/web/organizer/event/event.blade.php

Last change on this file was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago
  • Initial commit;
  • Property mode set to 100644
File size: 5.0 KB
Line 
1@extends('layouts.app')
2
3@section('content')
4 <div class="container">
5 <div class="row justify-content-center">
6 <div class="event-details">
7 <div class="d-flex justify-content-between">
8 <h3 class="mb-3">Event Details</h3>
9
10 @auth
11 @if (Auth::user()->type === \App\Enum\UserType::ORGANIZER->value && $event->organizer_id === Auth::id())
12 <a href="/events/edit/{{ $event->slug }}">
13 <button type="button" class="btn btn-primary">Edit Event</button>
14 </a>
15 @endif
16 @endauth
17 </div>
18 <table class="table">
19 <thead>
20 <tr>
21 <th scope="col">Property</th>
22 <th scope="col">Value</th>
23 </tr>
24 </thead>
25 <tbody>
26 <tr>
27 <td><strong>Title</strong></td>
28 <td>{{ $event->title }}</td>
29 </tr>
30 <tr>
31 <td><strong>Date</strong></td>
32 <td>{{ $event->event_date->isoFormat('dddd, MMMM Do Y') }}</td>
33 </tr>
34 <tr>
35 <td><strong>City</strong></td>
36 <td>{{ $event->city }}</td>
37 </tr>
38 <tr>
39 <td><strong>Country</strong></td>
40 <td>{{ $event->country }}</td>
41 </tr>
42 <tr>
43 <td><strong>Starting Time</strong></td>
44 <td>{{ $event->start_time->isoFormat('H:mm') }}</td>
45 </tr>
46 <tr>
47 <td><strong>Ending Time</strong></td>
48 <td>{{ $event->end_time->isoFormat('H:mm') }}</td>
49 </tr>
50 <tr>
51 <td><strong>Event Type</strong></td>
52 <td>{{ $event->event_type->name }}</td>
53 </tr>
54 <tr>
55 <td><strong>Description</strong></td>
56 <td>{{ $event->description }}</td>
57 </tr>
58 </tbody>
59 </table>
60 </div>
61 </div>
62
63 @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
64 <div class="row justify-content-center">
65 <div class="offers">
66 <h3 class="mb-3 mt-5">Offers for this event</h3>
67 <table class="table">
68 <thead>
69 <tr>
70 <th><strong>Artist Name</strong></th>
71 <th><strong>Current Offer Price (USD)</strong></th>
72 <th><strong>Status</strong></th>
73 <th><strong>Options</strong></th>
74 </tr>
75 </thead>
76 <tbody>
77 @foreach($event->offers as $eventOffer)
78 <tr>
79 <!-- DB MAGIC WHEN RELATIONSHIPS ARE DONE AS IT SHOULD -->
80 <td>{{ $eventOffer->artist->user->name }}</td>
81 <td>
82 @if($eventOffer->price != null)
83 @currency($eventOffer->price)
84 @else
85 Not yet defined
86 @endif
87 </td>
88 @if($eventOffer->status === \App\Enum\OfferStatus::IN_PROGRESS->value)
89 <td><p class="badge bg-warning">In Progress</p></td>
90 @elseif($eventOffer->status === \App\Enum\OfferStatus::COMPLETED->value)
91 <td><p class="badge bg-success">Completed</p></td>
92 @elseif($eventOffer->status === \App\Enum\OfferStatus::DECLINED->value)
93 <td><p class="badge bg-danger">Declined</p></td>
94 @elseif($eventOffer->status === \App\Enum\OfferStatus::WAITING_FOR_PAYMENT->value)
95 <td><p class="badge bg-info text-dark">Waiting for payment</p></td>
96 @endif
97 <td>
98 <a href="/offers/{{ $eventOffer->slug }}">
99 <button type="button" class="btn btn-primary">Manage Offer</button>
100 </a>
101 </td>
102 </tr>
103 @endforeach
104 </tbody>
105 </table>
106 </div>
107 </div>
108 @endif
109 </div>
110@endsection
Note: See TracBrowser for help on using the repository browser.