source: resources/views/web/artist/profile.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: 10.8 KB
Line 
1@extends('layouts.app')
2
3@section('content')
4 <div class="container">
5 <div class="row justify-content-center">
6 <div class="user-details">
7 <div class="d-flex justify-content-between mb-2">
8 <h3>{{ $artist->user->name }} | Details</h3>
9
10 @auth
11 @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value)
12 <button class="btn btn-primary d-inline-flex">
13 <a href="/offers/create/{{ $artist->user->username }}" style="color: white">Send
14 Proposal</a>
15 </button>
16 @endif
17
18 @if(Auth::user()->type === \App\Enum\UserType::ARTIST->value && Auth::id() === $artist->user->id)
19 <button class="btn btn-primary d-inline-flex">
20 <a href="/{{ Auth::user()->username }}/manager" style="color: white">Manager</a>
21 </button>
22 @endif
23 @endauth
24 </div>
25 <table class="table">
26 <thead>
27 <tr>
28 <th scope="col">Property</th>
29 <th scope="col">Value</th>
30 </tr>
31 </thead>
32 <tbody>
33 <tr>
34 <td><strong>Name</strong></td>
35 <td>{{ $artist->user->name }}</td>
36 </tr>
37 <tr>
38 <td><strong>Home City & Country</strong></td>
39 <td>{{ $artist->city }}, {{ $artist->country }}</td>
40 </tr>
41 <tr>
42 <td><strong>Birthdate</strong></td>
43 <td>{{ $artist->birth_date ? $artist->birth_date->isoFormat('Do MMMM Y') : ''}}</td>
44 </tr>
45 <tr>
46 <td><strong>Price Per Hour (USD)</strong></td>
47 <td>
48 @if($artist->price_per_hour != null)
49 @currency($artist->price_per_hour)
50 @else
51 Not yet defined
52 @endif
53 </td>
54 </tr>
55 <tr>
56 <td><strong>Artist Type</strong></td>
57 <td>{{ $artist->artist_type ? $artist->artist_type->name : ''}}</td>
58 </tr>
59 @if(!(is_null($artist->instagram_link) ||
60 is_null($artist->spotify_link) ||
61 is_null($artist->apple_music_link) ||
62 is_null($artist->youtube_link) ||
63 is_null($artist->soundcloud_link)))
64 <tr>
65 <td><strong>Artist is available on</strong></td>
66 <td class="d-flex">
67 @if(!is_null($artist->instagram_link))
68 <a href="{{ $artist->instagram_link }}" class="badge bg-light text-dark m-1">
69 Instagram
70 </a>
71 <br>
72 @endif
73
74 @if(!is_null($artist->spotify_link))
75 <a href="{{ $artist->spotify_link }}" class="badge bg-light text-dark m-1">
76 Spotify
77 </a>
78 <br>
79 @endif
80
81 @if(!is_null($artist->apple_music_link))
82 <a href="{{ $artist->apple_music_link }}" class="badge bg-light text-dark m-1">
83 Apple Music
84 </a>
85 <br>
86 @endif
87
88 @if(!is_null($artist->youtube_link))
89 <a href="{{ $artist->youtube_link }}" class="badge bg-light text-dark m-1">
90 YouTube
91 </a>
92 <br>
93 @endif
94
95 @if(!is_null($artist->soundcloud_link))
96 <a href="{{ $artist->soundcloud_link }}" class="badge bg-light text-dark m-1">
97 Soundcloud
98 </a>
99 <br>
100 @endif
101 </td>
102 </tr>
103 @endif
104 <tr>
105 <td><strong>Genres</strong></td>
106 <td>
107 @foreach($artist->genres as $genre)
108 <p class="badge bg-light text-dark">{{ $genre->name }}</p>
109 @endforeach
110 </td>
111 </tr>
112 </tbody>
113 </table>
114 </div>
115 </div>
116
117 <div class="reviews row justify-content-center mt-5">
118 <div class="reviews mb-4">
119 <h4 class="mb-2">Reviews</h4>
120 <table class="table">
121 <thead>
122 <tr>
123 <th scope="col">Review</th>
124 <th scope="col">Rating</th>
125 <th scope="col">By</th>
126 <th scope="col">Date & Time</th>
127 </tr>
128 </thead>
129 <tbody>
130 @foreach($artist->reviews as $review)
131 <tr>
132 <td>{{ $review->content }}</td>
133 <td><span class="badge bg-info text-dark">{{ $review->rating }}</span></td>
134 <td>{{ $review->organizer->user->name }}</td>
135 <td>{{ $review->created_at->isoFormat('DD-MMM-Y') }}</td>
136 </tr>
137 @endforeach
138 </tbody>
139 </table>
140 </div>
141
142 @if ($abilityToPostReview)
143 <div class="post-review">
144 <form action="/artists/review" method="POST">
145 @csrf
146 <input type="hidden" name="artist_id" value="{{ $artist->user_id }}">
147 <textarea name="comment" id="" cols="30" rows="5" placeholder="Type your comment..."
148 class="form-control mb-3 w-100" required></textarea>
149 <input type="radio" name="rating" value="1" class="form-check-input" required>1
150 <input type="radio" name="rating" value="2" class="form-check-input">2
151 <input type="radio" name="rating" value="3" class="form-check-input">3
152 <input type="radio" name="rating" value="4" class="form-check-input">4
153 <input type="radio" name="rating" value="5" class="form-check-input">5
154 <br><br>
155 <button type="submit" class="btn btn-success">Submit</button>
156 </form>
157 </div>
158 @endif
159 </div>
160
161 @if($abilityToSeeAndManageOffers)
162 <div class="offers row justify-content-center mt-5">
163 <div class="offers mb-4">
164 <h4 class="mb-2">Offers</h4>
165 <table class="table table-hover">
166 <thead>
167 <tr>
168 <th scope="col">#</th>
169 <th scope="col">From</th>
170 <th scope="col">Event Name</th>
171 <th scope="col">Status</th>
172 <th scope="col">Price (USD)</th>
173 <th scope="col">Event Date & Start Time</th>
174 <th scope="col">City & Country</th>
175 <th scope="col">Event Type</th>
176 <th scope="col">Options</th>
177 </tr>
178 </thead>
179 <tbody>
180 @foreach($offers as $offer)
181 <tr>
182 <td>{{ $loop->index+1 }}</td>
183 <td>{{ $offer->event->organizer->user->name }}</td>
184 <td>{{ $offer->event->title }}</td>
185 @if($offer->status === \App\Enum\OfferStatus::IN_PROGRESS->value)
186 <td><p class="badge bg-warning">In Progress</p></td>
187 @elseif($offer->status === \App\Enum\OfferStatus::COMPLETED->value)
188 <td><p class="badge bg-success">Completed</p></td>
189 @elseif($offer->status === \App\Enum\OfferStatus::DECLINED->value)
190 <td><p class="badge bg-danger">Declined</p></td>
191 @elseif($offer->status === \App\Enum\OfferStatus::WAITING_FOR_PAYMENT->value)
192 <td><p class="badge bg-warning">Waiting for payment</p></td>
193 @endif
194 <td>
195 @if($offer->price != null)
196 @currency($offer->price)
197 @else
198 Not yet defined
199 @endif
200 </td>
201 <td>{{ $offer->event->event_date->isoFormat('DD-MMM-Y') . ", " . $offer->event->start_time->isoFormat('H:mm') }}</td>
202 <td>{{ $offer->event->city }}, {{ $offer->event->country }}</td>
203 <td><span class="badge bg-info text-dark">{{ $offer->event->event_type->name }}</span>
204 <td>
205 <a href="/offers/{{ $offer->slug }}">
206 <button type="button" class="btn btn-primary">Details</button>
207 </a>
208 </td>
209 </tr>
210 @endforeach
211 </tbody>
212 </table>
213 <div class="d-flex justify-content-center">
214 {!! $offers->links() !!}
215 </div>
216 </div>
217 </div>
218 @endif
219 </div>
220@endsection
Note: See TracBrowser for help on using the repository browser.