Decorate the components

This commit is contained in:
James Brooks 2016-01-05 20:30:28 +00:00
parent 4c924ad13d
commit 44456fbb7a

View File

@ -12,6 +12,7 @@
namespace CachetHQ\Cachet\Presenters;
use CachetHQ\Cachet\Presenters\Traits\TimestampsTrait;
use McCool\LaravelAutoPresenter\Facades\AutoPresenter;
class ComponentGroupPresenter extends AbstractPresenter
{
@ -25,7 +26,7 @@ class ComponentGroupPresenter extends AbstractPresenter
public function lowest_status()
{
if ($component = $this->wrappedObject->enabled_components_lowest()->first()) {
return $component->status;
return AutoPresenter::decorate($component)->status;
}
}
@ -37,7 +38,7 @@ class ComponentGroupPresenter extends AbstractPresenter
public function lowest_human_status()
{
if ($component = $this->wrappedObject->enabled_components_lowest()->first()) {
return $component->human_status;
return AutoPresenter::decorate($component)->human_status;
}
}
@ -49,7 +50,7 @@ class ComponentGroupPresenter extends AbstractPresenter
public function lowest_status_color()
{
if ($component = $this->wrappedObject->enabled_components_lowest()->first()) {
return $component->status_color;
return AutoPresenter::decorate($component)->status_color;
}
}