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
b091dd9b1a
commit
9879e6798e
18 changed files with 717 additions and 185 deletions
|
|
@ -59,6 +59,7 @@ class IncentiveController extends Controller
|
|||
'bonus_rank_2' => 'nullable|numeric|min:0|max:999999',
|
||||
'bonus_rank_3' => 'nullable|numeric|min:0|max:999999',
|
||||
'include_sales_points' => 'nullable|boolean',
|
||||
'vip_only' => 'nullable|boolean',
|
||||
'status' => 'required|integer|in:0,1,2',
|
||||
]);
|
||||
$data = $this->normalizePayoutFields($data);
|
||||
|
|
@ -122,6 +123,7 @@ class IncentiveController extends Controller
|
|||
$data[$field] = isset($data[$field]) && $data[$field] !== '' ? round((float) $data[$field], 2) : null;
|
||||
}
|
||||
$data['include_sales_points'] = filter_var($data['include_sales_points'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
$data['vip_only'] = filter_var($data['vip_only'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
@ -157,6 +159,7 @@ class IncentiveController extends Controller
|
|||
'bonus_rank_2' => 'nullable|numeric|min:0|max:999999',
|
||||
'bonus_rank_3' => 'nullable|numeric|min:0|max:999999',
|
||||
'include_sales_points' => 'nullable|boolean',
|
||||
'vip_only' => 'nullable|boolean',
|
||||
'status' => 'required|integer|in:0,1,2',
|
||||
]);
|
||||
$data = $this->normalizePayoutFields($data);
|
||||
|
|
@ -459,7 +462,12 @@ class IncentiveController extends Controller
|
|||
<a href="'.route('admin_incentive_edit', [$incentive->id]).'" class="btn icon-btn btn-sm btn-warning"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('status_label', function (Incentive $incentive) {
|
||||
return '<span class="badge badge-'.$incentive->getStatusColor().'">'.$incentive->getStatusType().'</span>';
|
||||
$badge = '<span class="badge badge-'.$incentive->getStatusColor().'">'.$incentive->getStatusType().'</span>';
|
||||
if ($incentive->vip_only) {
|
||||
$badge .= ' <span class="badge badge-dark">'.__('incentive.vip_only_badge').'</span>';
|
||||
}
|
||||
|
||||
return $badge;
|
||||
})
|
||||
->addColumn('period', function (Incentive $incentive) {
|
||||
return $incentive->qualification_start->format('d.m.Y').' - '.$incentive->qualification_end->format('d.m.Y');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue