Show the scheduled time if applicable. Closes #799
This commit is contained in:
@@ -160,7 +160,7 @@ class IncidentPresenter extends AbstractPresenter
|
||||
public function toArray()
|
||||
{
|
||||
return array_merge($this->wrappedObject->toArray(), [
|
||||
'scheduled_at' => $this->created_at(),
|
||||
'scheduled_at' => $this->scheduled_at(),
|
||||
'created_at' => $this->created_at(),
|
||||
'updated_at' => $this->updated_at(),
|
||||
]);
|
||||
|
||||
@@ -26,6 +26,17 @@ trait TimestampsTrait
|
||||
->setTimezone($this->setting->get('app_timezone'))->toDateTimeString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Present formatted date time.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function scheduled_at()
|
||||
{
|
||||
return (new Date($this->wrappedObject->scheduled_at))
|
||||
->setTimezone($this->setting->get('app_timezone'))->toDateTimeString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Present formatted date time.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user