#53, #52, #51 change Points

This commit is contained in:
Kevin Adametz 2022-07-21 10:37:34 +02:00
parent 582ca8299d
commit 263cf93a1e
41 changed files with 812 additions and 288 deletions

View file

@ -62,8 +62,8 @@ class WizardController extends Controller
$data = [
'user' => Auth::user(),
'step' => $step,
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', ['7', '8'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '9')->orderBy('pos', 'ASC')->get(),
'userHistoryWizardPayment' => $userHistoryWizardPayment,
];
@ -97,8 +97,8 @@ class WizardController extends Controller
$data = [
'user' => Auth::user(),
'step' => $step,
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', ['7', '8'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '9')->orderBy('pos', 'ASC')->get(),
];
if($step == 5){
if($user->active){
@ -139,8 +139,8 @@ class WizardController extends Controller
$data = [
'user' => Auth::user(),
'step' => 0,
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', ['7', '8'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '9')->orderBy('pos', 'ASC')->get(),
'userHistoryWizardPayment' => $userHistoryWizardPayment,
'yard_info' => UserService::getYardInfo(),
];
@ -192,8 +192,8 @@ class WizardController extends Controller
$data = [
'user' => Auth::user(),
'step' => $step,
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', ['7', '8'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '9')->orderBy('pos', 'ASC')->get(),
];
$user->wizard = 0;
$user->save();
@ -369,8 +369,8 @@ class WizardController extends Controller
$data = [
'user' => Auth::user(),
'step' => $step,
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', ['7', '8'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '9')->orderBy('pos', 'ASC')->get(),
];
$user->wizard = 10;
$user->save();
@ -408,8 +408,8 @@ class WizardController extends Controller
$data = [
'user' => Auth::user(),
'step' => $step,
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', ['7', '8'])->orderBy('pos', 'ASC')->get(),
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '9')->orderBy('pos', 'ASC')->get(),
];
return view('user.wizard.create', $data)->withErrors($validator);
}