Products multi-actions

{{count($selected) > 0 ? 'Selected products:' : 'No products selected.'}}

@for ($i = 0; $i < count($selected); $i++) {{ $i != (count($selected)-1) ? ($selected[$i] . ', ') : $selected[$i]}} @endfor


@if (count($selected) > 0) {{--enable/disable/delete--}} @if (auth()->user()->user_type == 'admin' || (auth()->user()->user_type == 'manager' && isAuthorizedEnableDisable()) || (auth()->user()->user_type == 'seller' && isAuthorizedEnableDisable()))
@elseif (in_array(auth()->user()->user_type, ['manager', 'seller'])) You are not authorized to enable/disable{{auth()->user()->user_type != 'seller' ? '/delete' : ''}} these orders: @for ($i = 0; $i < count($errors); $i++) {{ $i != (count($errors)-1) ? ($errors[$i] . ', ') : $errors[$i]}} @endfor . Deselect them and try again! @endif
{{--enable/disable/delete--}} {{--increase total quantity--}} @if (auth()->user()->user_type == 'admin' || (auth()->user()->user_type == 'manager' && canIncreaseQuantity()) || (auth()->user()->user_type == 'seller' && canIncreaseQuantity()))
@elseif (in_array(auth()->user()->user_type, ['manager', 'seller'])) You are not authorized to increase/decrease the total quantity of these orders: @for ($i = 0; $i < count($errors); $i++) {{ $i != (count($errors)-1) ? ($errors[$i] . ', ') : $errors[$i]}} @endfor . Deselect them and try again! @endif {{--increase total quantity--}} @else

Please select at least one order!

@endif
{{--change values of CleanProductsDB--}} @if (in_array(auth()->user()->user_type, ['admin']))