Update orders states

@if (count($selected) > 0) @if (auth()->user()->user_type == 'admin' || (auth()->user()->user_type == 'manager' && canUpdate()) || (auth()->user()->user_type == 'seller' && canUpdate()))
You are about to update the order state of these orders:

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

@elseif (in_array(auth()->user()->user_type, ['manager', 'seller']))
You are not authorized to update these orders:

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

@else Unauthorized! @endif @else

Please select at least one order!

@endif
@if (count($selected) > 0 && $authorized)
@else
@endif