Fix user switch for resellers and company name on order

This commit is contained in:
Deon George
2018-08-12 11:09:44 +10:00
parent 5373e6b246
commit b737375be5
3 changed files with 4 additions and 4 deletions

View File

@@ -87,8 +87,8 @@
<label for="order_email">Client Account</label>
<select class="form-control" id="order_email" name="order_email">
<option value="">&nbsp;</option>
@foreach ($user->all_clients()->sortBy('sur_first_name') as $o)
<option value="{{ $o->email }}" @if($o->email == old('order_email')) selected @endif>{{ $o->sur_first_name }}</option>
@foreach ($user->all_accounts()->sortBy('company') as $o)
<option value="{{ $o->user->email }}" @if($o->user->email == old('order_email')) selected @endif>{{ $o->company }}</option>
@endforeach
</select>
<span class="help-block">{{ $errors->first('order_email') }}</span>