-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcertificates.blade.php
More file actions
379 lines (367 loc) · 27.8 KB
/
certificates.blade.php
File metadata and controls
379 lines (367 loc) · 27.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
@extends('layout.new_base')
@php
$list = [
(object) ['label' => 'My certificates', 'href' => ''],
];
@endphp
@section('layout.breadcrumb')
@include('layout.breadcrumb', ['list' => $list])
@endsection
@section('content')
<section class="bg-light-blue">
<section class="relative flex overflow-hidden">
<div class="flex relative transition-all w-full bg-blue-gradient py-10 tablet:py-20">
<div class="w-full overflow-hidden flex flex-col md:flex-row justify-end md:items-center flex-shrink-0">
<div class="codeweek-container-lg flex flex-col">
<h2 class="text-white font-normal text-3xl tablet:font-medium tablet:text-5xl font-['Montserrat'] mb-6">
@lang('certificates.certificates_for'){{ Auth::user()->fullName }}
</h2>
<p class="text-xl font-normal text-white p-0 max-md:max-w-full max-w-[864px]">
</p>
</div>
</div>
</div>
</section>
<section class="py-10 tablet:py-20 bg-yellow-50 font-[Blinker]">
<div class="codeweek-container">
<h2 class="text-dark-blue text-2xl font-medium tablet:text-4xl font-['Montserrat'] mb-6 tablet:mb-8">
Certificates
</h2>
@if($reported_events->isEmpty() && $excellence->isEmpty() && $participation->isEmpty())
<p class="text-slate-500 font-normal text-lg p-0">@lang('certificates.no_certificates')</p>
@else
<div class="overflow-hidden rounded-lg border-2 border-[#B399D6] hidden tablet:block">
<table class="w-full border-collapse">
<thead>
<tr class="bg-[#410098] text-white">
<th class="border-r border-[#B399D6] px-6 py-4 text-left font-['Montserrat'] font-semibold text-xl">Type</th>
<th class="border-r border-[#B399D6] px-6 py-4 text-left font-['Montserrat'] font-semibold text-xl">Activity</th>
<th class="border-r border-[#B399D6] px-6 py-4 text-left font-['Montserrat'] font-semibold text-xl">Date</th>
<th class="px-6 py-4 text-left font-['Montserrat'] font-semibold text-xl">Actions</th>
</tr>
</thead>
<tbody>
@if(!$participation->isEmpty())
@foreach($participation as $certificate_of_participation)
@if(!is_null($certificate_of_participation->event_name))
<tr class="{{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }}">
<td class="border-r border-[#B399D6] px-6 py-4 font-semibold text-xl">
<span class="text-slate-500 font-semibold">Participation</span>
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$certificate_of_participation->activity_type}}
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$certificate_of_participation->event_date}}
</td>
<td class="flex px-6 py-4 font-normal text-xl actions">
@if(!empty($certificate_of_participation->participation_url))
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$certificate_of_participation->participation_url}}">
Download
</a>
@else
@if($certificate_of_participation->status == 'FAILED' ||$certificate_of_participation->status == 'ERROR')
Error with encoding.
@else
Processing ...
@endif
@endif
</td>
</tr>
@endif
@endforeach
@endif
@if(!$excellence->isEmpty())
@foreach($excellence as $certificate_of_excellence)
@if(!empty($certificate_of_excellence->certificate_url))
<tr class="{{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }}">
<td class="border-r border-[#B399D6] px-6 py-4 font-semibold text-xl">
<span class="text-slate-500 font-semibold">Excellence</span>
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$certificate_of_excellence->activity_type}}
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$certificate_of_excellence->event_date}}
</td>
<td class="flex px-6 py-4 font-normal text-xl actions">
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$certificate_of_excellence->certificate_url}}">
Download
</a>
</td>
</tr>
@else
<tr class="{{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }}">
<td colspan="4" class="px-6 py-4 font-normal text-xl">
<a class="text-[#1C4DA1] font-semibold" href="{{route('certificate_excellence_report', ['edition'=>$certificate_of_excellence->edition])}}">
Claim your certificate of excellence for {{$certificate_of_excellence->edition}}
</a>
</td>
</tr>
@endif
@endforeach
@endif
@if(!$superOrganiser->isEmpty())
@foreach($superOrganiser as $super_organiser_certificate)
@if(!empty($super_organiser_certificate->certificate_url))
<tr class="{{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }}">
<td class="border-r border-[#B399D6] px-6 py-4 font-semibold text-xl">
<span class="text-slate-500 font-semibold">Super Organiser</span>
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$super_organiser_certificate->activity_type}}
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$super_organiser_certificate->event_date}}
</td>
<td class="flex px-6 py-4 font-normal text-xl actions">
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$super_organiser_certificate->certificate_url}}">
Download
</a>
</td>
</tr>
@else
<tr class="{{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }}">
<td colspan="4" class="px-6 py-4 font-normal text-xl">
<a class="text-[#1C4DA1] font-semibold" href="{{route('certificate_super_organiser_report', ['edition'=>$super_organiser_certificate->edition])}}">
Claim your Super Organiser certificate for {{$super_organiser_certificate->edition}}
</a>
</td>
</tr>
@endif
@endforeach
@endif
@if(!$reported_events->isEmpty())
@foreach($reported_events as $event)
<tr class="{{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }}">
<td class="border-r border-[#B399D6] px-6 py-4 font-semibold text-xl">
<span class="text-slate-500 font-semibold">Reported</span>
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">
{{$event->activity_type}}
</td>
<td class="border-r border-[#B399D6] px-6 py-4 font-normal text-xl">{{$event->event_date}}</td>
<td class="flex gap-4 px-6 py-4 font-normal text-xl actions">
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$event->certificate_url}}">
Download
</a>
<a title="Edit your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{route('report_event',$event->id)}}">
Edit
</a>
</td>
</tr>
@endforeach
@endif
</table>
</div>
<div class="tablet:hidden flex flex-col gap-y-6">
@if(!$participation->isEmpty())
@foreach($participation as $certificate_of_participation)
@if(!is_null($certificate_of_participation->event_name))
<div class="border-2 border-[#B399D6] rounded-lg overflow-hidden">
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Type
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] text-xl flex-1">
Participation
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Activity
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] text-xl flex-1">
{{$certificate_of_participation->activity_type}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Date
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 font-normal text-xl">
{{$certificate_of_participation->event_date}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Actions
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-[#B399D6] text-xl font-normal flex-1">
@if(!empty($certificate_of_participation->participation_url))
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$certificate_of_participation->participation_url}}">
Download
</a>
@else
@if($certificate_of_participation->status == 'FAILED' ||$certificate_of_participation->status == 'ERROR')
Error with encoding.
@else
Processing ...
@endif
@endif
</div>
</div>
</div>
@endif
@endforeach
@endif
@if(!$excellence->isEmpty())
@foreach($excellence as $certificate_of_excellence)
@if(!empty($certificate_of_excellence->certificate_url))
<div class="border-2 border-[#B399D6] rounded-lg overflow-hidden">
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Type
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 text-xl">
Excellence
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Activity
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 text-xl">
{{$certificate_of_excellence->activity_type}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Date
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 font-normal text-xl">
{{$certificate_of_excellence->event_date}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Actions
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-[#B399D6] font-normal flex-1">
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$certificate_of_excellence->certificate_url}}">
Download
</a>
</div>
</div>
</div>
@else
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} font-normal text-xl border-2 border-[#B399D6] rounded-lg overflow-hidden">
<a class="text-[#1C4DA1] font-semibold" href="{{route('certificate_excellence_report', ['edition'=>$certificate_of_excellence->edition])}}">
Claim your certificate of excellence for {{$certificate_of_excellence->edition}}
</a>
</div>
@endif
@endforeach
@endif
@if(!$superOrganiser->isEmpty())
@foreach($superOrganiser as $super_organiser_certificate)
@if(!empty($super_organiser_certificate->certificate_url))
<div class="border-2 border-[#B399D6] rounded-lg overflow-hidden">
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Type
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 text-xl">
Super Organiser
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Activity
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 text-xl">
{{$super_organiser_certificate->activity_type}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Date
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 font-normal text-xl">
{{$super_organiser_certificate->event_date}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Actions
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-[#B399D6] font-normal flex-1 text-xl">
<a title="Download your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$super_organiser_certificate->certificate_url}}">
Download
</a>
</div>
</div>
</div>
@else
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} font-normal text-xl border-2 border-[#B399D6] rounded-lg overflow-hidden">
<a class="text-[#1C4DA1] font-semibold" href="{{route('certificate_super_organiser_report', ['edition'=>$super_organiser_certificate->edition])}}">
Claim your Super Organiser certificate for {{$super_organiser_certificate->edition}}
</a>
</div>
@endif
@endforeach
@endif
@if(!$reported_events->isEmpty())
@foreach($reported_events as $event)
<div class="border-2 border-[#B399D6] rounded-lg overflow-hidden">
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Type
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 text-xl">
Reported
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Activity
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 text-xl">
{{$event->activity_type}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Date
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-b border-[#B399D6] flex-1 font-normal text-xl">
{{$event->event_date}}
</div>
</div>
<div class="flex">
<div class="flex items-center px-4 py-5 bg-[#410098] border-r border-b border-[#B399D6] font-['Montserrat'] font-semibold text-base text-white w-[108px]">
Actions
</div>
<div class="px-4 py-5 {{ $loop->even ? 'bg-[#F5F2FA]' : 'bg-white' }} border-[#B399D6] font-normal flex-1 text-xl">
<a title="Edit your certificate" class="mb-3 flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{$event->certificate_url}}">
Download
</a>
<a title="Edit your certificate" class="flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="{{route('report_event',$event->id)}}">
Edit
</a>
</div>
</div>
</div>
@endforeach
@endif
</div>
@endif
</div>
</section>
</section>
<script>
setTimeout(function () {
window.location.reload(1);
}, 20000);
</script>
@endsection