mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-11 15:38:40 +00:00
datetime is jsonserializable, didn't know that :)
This commit is contained in:
parent
a583ea590d
commit
a25e67a602
|
|
@ -794,14 +794,14 @@ class Task implements \JsonSerializable
|
|||
return [
|
||||
'id' => $this->id,
|
||||
'createdBy' => $this->createdBy,
|
||||
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'),
|
||||
'createdAt' => $this->createdAt,
|
||||
'title' => $this->title,
|
||||
'description' => $this->description,
|
||||
'status' => $this->status,
|
||||
'type' => $this->type,
|
||||
'priority' => $this->priority,
|
||||
'due' => $this->due->format('Y-m-d H:i:s'),
|
||||
'done' => (!isset($this->done) ? null : $this->done->format('Y-m-d H:i:s')),
|
||||
'due' => $this->due,
|
||||
'done' => $this->done,
|
||||
'elements' => $this->taskElements,
|
||||
'tags' => $this->tags,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ class TaskElement implements \JsonSerializable
|
|||
'status' => $this->status,
|
||||
'to' => $this->getTo(),
|
||||
'cc' => $this->getCC(),
|
||||
'due' => isset($this->due) ? $this->due->format('Y-m-d H:i:s') : null,
|
||||
'due' => $this->due,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,15 +12,14 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
use \Modules\Tasks\Models\AccountRelation;
|
||||
use \Modules\Tasks\Models\GroupRelation;
|
||||
use \Modules\Tasks\Models\TaskPriority;
|
||||
use \Modules\Tasks\Models\TaskStatus;
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
* @var \Modules\Tasks\Models\Task $task
|
||||
* @var \Modules\Tasks\Views\TaskView $this
|
||||
* @var \Modules\Tasks\Models\Task $task
|
||||
*/
|
||||
$task = $this->getData('task');
|
||||
$taskMedia = $task->getMedia();
|
||||
|
|
@ -66,7 +65,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<span id="task-status-badge" class="floatRight nobreak tag task-status-<?= $this->printHtml($task->getStatus()); ?>">
|
||||
<?= $this->getHtml('S' . $task->getStatus()) ?>
|
||||
</span>
|
||||
<div><?= $this->printHtml($task->getCreatedBy()->getName1()); ?> - <?= $this->printHtml($task->getCreatedAt()->format('Y/m/d H:i')); ?></div>
|
||||
<div>
|
||||
<?= $this->printHtml($task->getCreatedBy()->getName1()); ?> - <?= $this->printHtml($task->getCreatedAt()->format('Y/m/d H:i')); ?>
|
||||
</div>
|
||||
</div>
|
||||
<header>
|
||||
<h1 data-tpl-text="/title" data-tpl-value="/title" data-value=""><?= $this->printHtml($task->getTitle()); ?></h1>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user