Skip to content

Commit

Permalink
fix(characters): prevent orphan character to show errors on page
Browse files Browse the repository at this point in the history
  • Loading branch information
warlof committed Aug 21, 2020
1 parent a682d00 commit bbf32f6
Show file tree
Hide file tree
Showing 17 changed files with 187 additions and 119 deletions.
18 changes: 11 additions & 7 deletions src/resources/views/character/assets/assets.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/blueprint.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/bookmarks.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/calendar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/contacts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/contracts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/fittings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/industry.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/intel/summary.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>
</div>
Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/killmails.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/market.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/mining-ledger.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>
Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/notifications.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/research.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ class="btn btn-sm btn-light">
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
18 changes: 11 additions & 7 deletions src/resources/views/character/standings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@
<div class="card-body">
<div class="mb-3">
<select multiple="multiple" id="dt-character-selector" class="form-control" style="width: 100%;">
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@if($character->refresh_token)
@foreach($character->refresh_token->user->characters as $character_info)
@if($character_info->character_id == $character->character_id)
<option selected="selected" value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@else
<option value="{{ $character_info->character_id }}">{{ $character_info->name }}</option>
@endif
@endforeach
@else
<option selected="selected" value="{{ $character->character_id }}">{{ $character->name }}</option>
@endif
</select>
</div>

Expand Down
Loading

0 comments on commit bbf32f6

Please sign in to comment.