Show the scheduled time if applicable. Closes #799

This commit is contained in:
James Brooks
2015-08-13 23:23:18 +01:00
parent 1965dbb3e7
commit b68647df8e
5 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -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(),
]);
+11
View File
@@ -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.
*