Merge pull request #3432 from CachetHQ/hotfix/duplicate-order-statement
Remove duplicate order statement
This commit is contained in:
@@ -53,7 +53,7 @@ class ComponentsComposer
|
|||||||
public function compose(View $view)
|
public function compose(View $view)
|
||||||
{
|
{
|
||||||
$componentGroups = $this->getVisibleGroupedComponents();
|
$componentGroups = $this->getVisibleGroupedComponents();
|
||||||
$ungroupedComponents = Component::ungrouped()->get();
|
$ungroupedComponents = Component::ungrouped()->orderBy('status', 'desc')->get();
|
||||||
|
|
||||||
$view->withComponentGroups($componentGroups)
|
$view->withComponentGroups($componentGroups)
|
||||||
->withUngroupedComponents($ungroupedComponents);
|
->withUngroupedComponents($ungroupedComponents);
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ class IncidentPresenter extends BasePresenter implements Arrayable
|
|||||||
public function latest()
|
public function latest()
|
||||||
{
|
{
|
||||||
if (is_bool($this->latest)) {
|
if (is_bool($this->latest)) {
|
||||||
$this->latest = $this->wrappedObject->updates()->orderBy('created_at', 'desc')->first();
|
$this->latest = $this->wrappedObject->updates()->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->latest;
|
return $this->latest;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<div class="group-items {{ $componentGroup->is_collapsed ? "hide" : null }}">
|
<div class="group-items {{ $componentGroup->is_collapsed ? "hide" : null }}">
|
||||||
@each('partials.component', $componentGroup->enabled_components()->orderBy('order')->get(), 'component')
|
@each('partials.component', $componentGroup->enabled_components, 'component')
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<strong>{{ trans('cachet.components.group.other') }}</strong>
|
<strong>{{ trans('cachet.components.group.other') }}</strong>
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<i class="ion ion-ios-circle-filled text-component-{{ $ungroupedComponents->max('status') }} {{ $ungroupedComponents->sortByDesc('status')->first()->status_color }}" data-toggle="tooltip" title="{{ $ungroupedComponents->sortByDesc('status')->first()->human_status }}"></i>
|
<i class="ion ion-ios-circle-filled text-component-{{ $ungroupedComponents->max('status') }} {{ $ungroupedComponents->first()->status_color }}" data-toggle="tooltip" title="{{ $ungroupedComponents->first()->human_status }}"></i>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user