mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
Decorate the components
This commit is contained in:
parent
4c924ad13d
commit
44456fbb7a
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user