Fixes missing titles

This commit is contained in:
James Brooks
2016-01-03 12:26:27 +00:00
parent 3e15b84867
commit 5ccd601695
2 changed files with 17 additions and 7 deletions
+6 -6
View File
@@ -24,8 +24,8 @@ class ComponentGroupPresenter extends AbstractPresenter
*/
public function lowest_status()
{
if ($enabledComponents = $this->wrappedObject->enabled_components()->orderBy('status', 'desc')->first()) {
return $enabledComponents->status;
if ($component = $this->wrappedObject->enabled_components_lowest->first()) {
return $component->status;
}
}
@@ -36,8 +36,8 @@ class ComponentGroupPresenter extends AbstractPresenter
*/
public function lowest_human_status()
{
if ($enabledComponents = $this->wrappedObject->enabled_components()->orderBy('status', 'desc')->first()) {
return $enabledComponents->human_status;
if ($component = $this->wrappedObject->enabled_components_lowest->first()) {
return $component->human_status;
}
}
@@ -48,8 +48,8 @@ class ComponentGroupPresenter extends AbstractPresenter
*/
public function lowest_status_color()
{
if ($enabledComponents = $this->wrappedObject->enabled_components()->orderBy('status', 'desc')->first()) {
return $enabledComponents->status_color;
if ($component = $this->wrappedObject->enabled_components_lowest->first()) {
return $component->status_color;
}
}