Incentive (E1): "Nur fuer VIP sichtbar" und Ranglisten-Seite mit Teilnahme-Block oben
Haken vip_only am Incentive: aktives Incentive erscheint dann nur fuer VIP-Konten in Sidenav, Dashboard, Teaser, Rangliste und Details, andere Berater bekommen 404; das Tracking laeuft fuer alle weiter. Seeder setzt den Haken fuer die Abstimmung der Recruiting Challenge. Ranglisten-Seite: solange die Teilnahme nicht bestaetigt ist, steht der Teilnahme-Block mit Praemien-Chips, Checkbox, Button und aufklappbaren Bedingungen ganz oben, darunter Trennlinie, Titel, Untertitel, Bild, Beschreibung und die Info-Kacheln. Ueberschriften vergroessert, Abo-Bloecke nur wenn Abos zaehlen. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
4e4b58e90e
commit
3341c929eb
18 changed files with 717 additions and 185 deletions
|
|
@ -34,6 +34,8 @@ class IncentiveController extends Controller
|
|||
->firstOrFail();
|
||||
|
||||
$user = Auth::user();
|
||||
abort_unless($incentive->isVisibleFor($user), 404);
|
||||
|
||||
$participant = IncentiveParticipant::where('incentive_id', $incentive->id)
|
||||
->where('user_id', $user->id)
|
||||
->first();
|
||||
|
|
@ -54,6 +56,8 @@ class IncentiveController extends Controller
|
|||
->firstOrFail();
|
||||
|
||||
$user = Auth::user();
|
||||
abort_unless($incentive->isVisibleFor($user), 404);
|
||||
|
||||
$participant = IncentiveParticipant::where('incentive_id', $incentive->id)
|
||||
->where('user_id', $user->id)
|
||||
->first();
|
||||
|
|
@ -97,14 +101,15 @@ class IncentiveController extends Controller
|
|||
->active()
|
||||
->firstOrFail();
|
||||
|
||||
$user = Auth::user();
|
||||
abort_unless($incentive->isVisibleFor($user), 404);
|
||||
|
||||
if (! Request::has('accept_terms')) {
|
||||
\Session()->flash('alert-error', __('incentive.terms_required'));
|
||||
|
||||
return redirect(route('user_incentive_show', [$slug]));
|
||||
}
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
$participant = IncentiveParticipant::firstOrCreate(
|
||||
[
|
||||
'incentive_id' => $incentive->id,
|
||||
|
|
@ -142,6 +147,8 @@ class IncentiveController extends Controller
|
|||
->firstOrFail();
|
||||
|
||||
$user = Auth::user();
|
||||
abort_unless($incentive->isVisibleFor($user), 404);
|
||||
|
||||
$participant = IncentiveParticipant::with('incentive', 'user', 'user.account')
|
||||
->where('incentive_id', $incentive->id)
|
||||
->where('user_id', $user->id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue