Enable editing of supplier products and listing services connected to them
This commit is contained in:
@@ -183,11 +183,10 @@ class Product extends Model implements IDs
|
||||
* Return the type of service is provided. eg: Broadband, Phone.
|
||||
*
|
||||
* @return string
|
||||
* @todo Does type need to be a mandatory attribute on a model - then we can remove this condition
|
||||
*/
|
||||
public function getCategoryAttribute(): string
|
||||
{
|
||||
return $this->type ? $this->type->getCategoryAttribute() : 'generic';
|
||||
return $this->supplied->getCategoryAttribute();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,11 +194,10 @@ class Product extends Model implements IDs
|
||||
* other logic of these types.
|
||||
*
|
||||
* @return string
|
||||
* @todo Does type need to be a mandatory attribute on a model - then we can remove this condition
|
||||
*/
|
||||
public function getCategoryNameAttribute(): string
|
||||
{
|
||||
return $this->type ? $this->type->getCategoryNameAttribute() : 'Generic';
|
||||
return $this->supplied->getCategoryNameAttribute();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user