Added Service Reference for SUBMIT-SENT
This commit is contained in:
@@ -57,6 +57,7 @@ class Service extends Model
|
||||
|
||||
private $valid_status = [
|
||||
'ORDER-SUBMIT' => ['approve'=>'ORDER-SENT','reject'=>'ORDER-REJECTED'],
|
||||
'ORDER-SENT' => ['update_reference'=>'ORDER-SENT'],
|
||||
];
|
||||
|
||||
public function account()
|
||||
@@ -175,7 +176,12 @@ class Service extends Model
|
||||
$result = '';
|
||||
|
||||
foreach ($this->order_info as $k=>$v)
|
||||
{
|
||||
if (in_array($k,['order_reference']))
|
||||
continue;
|
||||
|
||||
$result .= sprintf('%s: <b>%s</b><br>',ucfirst($k),$v);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -198,7 +204,7 @@ class Service extends Model
|
||||
|
||||
public function getServiceIdUrlAttribute()
|
||||
{
|
||||
return sprintf('<a href="/u/service/view/%s">%s</a>',$this->id,$this->service_id);
|
||||
return sprintf('<a href="/u/service/%s">%s</a>',$this->id,$this->service_id);
|
||||
}
|
||||
|
||||
public function getServiceNumberAttribute()
|
||||
@@ -208,7 +214,12 @@ class Service extends Model
|
||||
|
||||
public function getStatusAttribute()
|
||||
{
|
||||
return $this->order_status ? $this->order_status : ( $this->active ? 'Active' : 'Inactive');
|
||||
if (! $this->order_status)
|
||||
return $this->active ? 'Active' : 'Inactive';
|
||||
|
||||
return $this->order_status=='ORDER-SENT'
|
||||
? sprintf('%s: <span class="white-space: nowrap"><small><b>#%s</b></small></span>',$this->order_status,array_get($this->order_info,'order_reference','Unknown'))
|
||||
: $this->order_status;
|
||||
}
|
||||
|
||||
public function setDateOrigAttribute($value)
|
||||
|
Reference in New Issue
Block a user