feat: require that users link their discord to apply to certain vacancies

Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
2022-10-22 03:46:44 +01:00
parent b9cc2aad46
commit ce9184c386
5 changed files with 41 additions and 3 deletions

View File

@@ -67,6 +67,10 @@
</div>
@else
@if($vacancy->requiresDiscord)
<p class="text-muted"><i class="fas fa-info-circle"></i> {{ __('Note: to apply for this position, you must sign in with your Discord account beforehand.') }}</p>
@endif
{!! $vacancy->vacancyFullDescription !!}
<p class="text-sm text-muted">
{{__('Last updated @ :vacancyUpdatedTimeValue', ['vacancyUpdatedTimeValue' => $vacancy->updated_at]) }}
@@ -257,7 +261,12 @@
<div class="card-footer text-center">
<button type="button" class="btn btn-primary btn-sm" onclick="window.location.href='{{ route('renderApplicationForm', ['vacancySlug' => $vacancy->vacancySlug]) }}'">{{__('Apply')}}</button>
@if ($vacancy->requiresDiscord && !Auth::user()->hasDiscordConnection())
<button type="button" style="background-color: #5865F2" class="btn btn-primary btn-sm" onclick="window.location.href='{{ route('renderApplicationForm', ['vacancySlug' => $vacancy->vacancySlug]) }}'"><i style="color: white" class="fab fa-discord"></i> {{__('Apply with Discord')}}</button>
@else
<button type="button" class="btn btn-primary btn-sm" onclick="window.location.href='{{ route('renderApplicationForm', ['vacancySlug' => $vacancy->vacancySlug]) }}'">{{__('Apply')}}</button>
@endif
<button type="button" class="btn btn-warning btn-sm" onclick="$('#{{ $vacancy->vacancySlug }}-details').modal('show')">{{__('Learn More')}}</button>
</div>