Feature: [admin][ActivityReason] improve administration for activity reason

* list alphabetically;
* show "active" in index
This commit is contained in:
2023-01-13 15:35:09 +01:00
parent e99fb75ebd
commit 25dd65fbd8
11 changed files with 91 additions and 30 deletions

View File

@@ -63,10 +63,8 @@ class ActivityReason
/**
* Get category.
*
* @return ActivityReasonCategory
*/
public function getCategory()
public function getCategory(): ?ActivityReasonCategory
{
return $this->category;
}
@@ -107,6 +105,11 @@ class ActivityReason
return $this->name;
}
public function isActiveAndParentActive(): bool
{
return $this->active && null !== $this->getCategory() && $this->getCategory()->getActive();
}
/**
* Set active.
*