wip
This commit is contained in:
parent
c82b4883a7
commit
5772eca363
|
|
@ -292,10 +292,9 @@ class Category extends Model
|
||||||
*/
|
*/
|
||||||
public function getDisplayNameAttribute(): string
|
public function getDisplayNameAttribute(): string
|
||||||
{
|
{
|
||||||
$typeConfig = config('type.category.' . $this->type, []);
|
$hideCode = $this->hideCodeCategoryType($this->type);
|
||||||
$hideCode = isset($typeConfig['hide']) && in_array('code', $typeConfig['hide']);
|
|
||||||
|
|
||||||
$typeNames = $this->getCategoryTypes();
|
$typeNames = $this->getCategoryTypes();
|
||||||
|
|
||||||
$typeName = $typeNames[$this->type] ?? ucfirst($this->type);
|
$typeName = $typeNames[$this->type] ?? ucfirst($this->type);
|
||||||
|
|
||||||
$prefix = (!$hideCode && $this->code) ? $this->code . ' - ' : '';
|
$prefix = (!$hideCode && $this->code) ? $this->code . ' - ' : '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue