Skip to content

Commit

Permalink
#185 Editing routes was broken because of old way of fetching active …
Browse files Browse the repository at this point in the history
…AffixGroups.
  • Loading branch information
Wotuu committed Jun 18, 2019
1 parent fefe2cd commit 7b3d1d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resources/views/common/group/affixes.blade.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
@inject('seasonService', 'App\Service\Season\SeasonService')
<?php
/** @var $seasonService \App\Service\Season\SeasonService */
/** This is the display of affixes when selecting them when creating a new route */
$affixGroups = \App\Models\AffixGroup::active()->with(['affixes:affixes.id,affixes.name,affixes.description'])->get();
$affixgroups = $seasonService->getCurrentSeason()->affixgroups()->with(['affixes:affixes.id,affixes.name,affixes.description'])->get();
$affixes = \App\Models\Affix::all();
?>

@include('common.general.inline', ['path' => 'common/group/affixes', 'options' => ['teemingSelector' => $teemingselector]])

<div class="form-group">
{!! Form::label('affixes[]', __('Select affixes')) !!}
{!! Form::select('affixes[]', \App\Models\AffixGroup::active()->get()->pluck('id', 'id'),
{!! Form::select('affixes[]', $affixgroups->pluck('id', 'id'),
!isset($dungeonroute) ? 0 : $dungeonroute->affixgroups->pluck(['affix_group_id']),
['id' => 'affixes', 'class' => 'form-control affixselect d-none', 'multiple'=>'multiple']) !!}
{{--<select name="affixes[]" id="affixes" class="form-control affixselect hidden" multiple--}}
{{--data-selected-text-format="count > 2">--}}
{{--@foreach($affixGroups as $group)--}}
{{--@foreach($affixgroups as $group)--}}
{{--<option value="{{ $group->id }}">{{ $group->id }}</option>--}}
{{--@endforeach--}}
{{--</select>--}}

<div id="affixes_list_custom" class="affix_list col-lg-12">
@foreach($affixGroups as $affixGroup)
@foreach($affixgroups as $affixGroup)
<div class="row affix_list_row {{ $affixGroup->isTeeming() ? 'affix_row_teeming' : 'affix_row_no_teeming' }}"
{{ $affixGroup->isTeeming() ? 'style="display: none;"' : '' }}
data-id="{{ $affixGroup->id }}">
Expand Down

0 comments on commit 7b3d1d9

Please sign in to comment.