Some product rework
This commit is contained in:
@@ -775,7 +775,7 @@ class Service extends Model implements IDs
|
||||
*/
|
||||
public function getNameShortAttribute()
|
||||
{
|
||||
return $this->type->getServiceNameAttribute() ?: 'SID:'.$this->sid;
|
||||
return ($this->type && $this->type->getServiceNameAttribute()) ? $this->type->getServiceNameAttribute() : 'SID:'.$this->sid;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -790,7 +790,7 @@ class Service extends Model implements IDs
|
||||
*/
|
||||
public function getNameDetailAttribute()
|
||||
{
|
||||
return $this->type->getServiceDescriptionAttribute();
|
||||
return ($this->type && $this->type->getServiceDescriptionAttribute()) ? $this->type->getServiceDescriptionAttribute() : 'No Description';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -53,6 +53,10 @@ class SupplierDetail extends Model
|
||||
$item = $this->broadbands->where('id',$id);
|
||||
break;
|
||||
|
||||
case 'phone':
|
||||
$item = $this->phones->where('id',$id);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \Exception('Unknown type: '.$type);
|
||||
}
|
||||
|
Reference in New Issue
Block a user