14-04-2026

This commit is contained in:
Kevin Adametz 2026-04-14 18:07:45 +02:00
parent f58c709945
commit 0f82fea88a
72 changed files with 7414 additions and 148 deletions

View file

@ -1,4 +1,7 @@
@if (isset($activeIncentive) && $activeIncentive)
@php
$hasConfirmedDash = $incentiveParticipant && $incentiveParticipant->accepted_terms_at !== null;
@endphp
<div class="d-flex col-xl-12 align-items-stretch">
<div class="w-100 mb-4 inc-dash-widget">
@ -60,6 +63,33 @@
</div>
@endif
{{-- Notice: Teilnahme noch nicht bestätigt --}}
@if (!$hasConfirmedDash)
<div class="inc-dash-notice mb-3">
<div class="d-flex align-items-start">
<i class="ion ion-md-alert inc-dash-notice-icon mr-2 mt-1"></i>
<div class="flex-grow-1">
@if ($incentiveParticipant)
<strong
class="inc-dash-notice-title">{{ __('incentive.dash_notice_unconfirmed_title') }}</strong>
<p class="mb-2 small">{{ __('incentive.dash_notice_unconfirmed_body') }}</p>
@else
<strong
class="inc-dash-notice-title">{{ __('incentive.dash_notice_unregistered_title') }}</strong>
<p class="mb-2 small">{{ __('incentive.dash_notice_unregistered_body') }}</p>
@endif
@if ($activeIncentive->isActive())
<button type="button" class="btn inc-dash-btn-notice" data-toggle="modal"
data-target="#incParticipateModal">
<i class="ion ion-md-checkmark-circle mr-1"></i>
{{ __('incentive.dash_notice_btn') }}
</button>
@endif
</div>
</div>
</div>
@endif
{{-- Bilder-Leiste --}}
@php
$dashGallery = [];
@ -99,6 +129,13 @@
<i class="ion ion-md-list mr-1"></i>
{{ __('incentive.dashboard_btn_ranking') }}
</a>
@if ($incentiveParticipant)
<a href="{{ route('user_incentive_details', [$activeIncentive->slug]) }}"
class="btn inc-dash-btn-secondary">
<i class="ion ion-md-list mr-1"></i>
{{ __('incentive.my_calculation') }}
</a>
@endif
</div>
</div>
@ -106,7 +143,117 @@
</div>
</div>
{{-- Teilnahme-Modal --}}
@if (!$hasConfirmedDash && $activeIncentive->isActive())
<div class="modal fade" id="incParticipateModal" tabindex="-1" role="dialog"
aria-labelledby="incParticipateModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header" style="background: linear-gradient(135deg, #6b7758, #4a5340);">
<h5 class="modal-title text-white" id="incParticipateModalLabel">
<i class="ion ion-md-trophy mr-2" style="color: #d7d700;"></i>
{{ __('incentive.dash_modal_title') }}
</h5>
<button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form id="incDashParticipateForm"
action="{{ route('user_incentive_participate', [$activeIncentive->slug]) }}" method="POST">
@csrf
<div class="modal-body">
<p class="mb-3 small">{{ __('incentive.dash_modal_intro') }}</p>
@if ($activeIncentive->getLang('description'))
<div class="mb-3" style="line-height: 1.6;">
{!! $activeIncentive->getLang('description') !!}
</div>
<hr>
@endif
@if ($activeIncentive->getLang('terms'))
<div class="card mb-4" style="border: 1px solid #e0e0d8;">
<div class="card-header py-2 px-3" style="cursor: pointer; background: #f4f5f0;"
data-toggle="collapse" data-target="#dashTermsCollapse">
<div class="d-flex align-items-center">
<i class="ion ion-md-document mr-2" style="color: #6b7758;"></i>
<strong class="small">{{ __('incentive.terms') }}</strong>
<i class="ion ion-md-chevron-down ml-auto text-muted"></i>
</div>
</div>
<div id="dashTermsCollapse" class="collapse">
<div class="card-body small"
style="max-height: 280px; overflow-y: auto; line-height: 1.6;">
{!! $activeIncentive->getLang('terms') !!}
</div>
</div>
</div>
@endif
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="dashAcceptTerms"
name="accept_terms" value="1" required>
<label class="custom-control-label" for="dashAcceptTerms">
{{ __('incentive.accept_terms') }}
@if ($activeIncentive->getLang('terms'))
(<a href="#dashTermsCollapse" data-toggle="collapse"
class="text-muted">{{ __('incentive.show_terms') }}</a>)
@endif
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">
{{ __('incentive.dash_modal_cancel') }}
</button>
<button type="submit" class="btn inc-dash-btn-primary px-4">
<i class="ion ion-md-checkmark mr-1"></i>
{{ __('incentive.participate_now') }}
</button>
</div>
</form>
</div>
</div>
</div>
@endif
<style>
.inc-dash-notice {
background: rgba(215, 185, 0, 0.10);
border: 1px solid rgba(215, 185, 0, 0.35);
border-radius: .6rem;
padding: .9rem 1rem;
color: #555;
}
.inc-dash-notice-icon {
color: #c8a000;
font-size: 1.2rem;
}
.inc-dash-notice-title {
display: block;
color: #444;
margin-bottom: .2rem;
font-size: .9rem;
}
.inc-dash-btn-notice {
background: linear-gradient(135deg, #6b7758, #4a5340);
color: #fff !important;
border: none;
border-radius: 50px;
padding: .4rem 1.2rem;
font-weight: 700;
font-size: .82rem;
transition: transform .2s, box-shadow .2s;
}
.inc-dash-btn-notice:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(107, 119, 88, 0.35);
}
.inc-dash-widget {
border-radius: .75rem;
overflow: hidden;