mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-02-17 15:18: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 [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'createdBy' => $this->createdBy,
|
'createdBy' => $this->createdBy,
|
||||||
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'),
|
'createdAt' => $this->createdAt,
|
||||||
'title' => $this->title,
|
'title' => $this->title,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
'type' => $this->type,
|
'type' => $this->type,
|
||||||
'priority' => $this->priority,
|
'priority' => $this->priority,
|
||||||
'due' => $this->due->format('Y-m-d H:i:s'),
|
'due' => $this->due,
|
||||||
'done' => (!isset($this->done) ? null : $this->done->format('Y-m-d H:i:s')),
|
'done' => $this->done,
|
||||||
'elements' => $this->taskElements,
|
'elements' => $this->taskElements,
|
||||||
'tags' => $this->tags,
|
'tags' => $this->tags,
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -670,7 +670,7 @@ class TaskElement implements \JsonSerializable
|
||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
'to' => $this->getTo(),
|
'to' => $this->getTo(),
|
||||||
'cc' => $this->getCC(),
|
'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);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
use \Modules\Tasks\Models\AccountRelation;
|
use \Modules\Tasks\Models\AccountRelation;
|
||||||
use \Modules\Tasks\Models\GroupRelation;
|
use \Modules\Tasks\Models\GroupRelation;
|
||||||
use \Modules\Tasks\Models\TaskPriority;
|
use \Modules\Tasks\Models\TaskPriority;
|
||||||
use \Modules\Tasks\Models\TaskStatus;
|
use \Modules\Tasks\Models\TaskStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \Modules\Tasks\Views\TaskView $this
|
||||||
* @var \Modules\Tasks\Models\Task $task
|
* @var \Modules\Tasks\Models\Task $task
|
||||||
*/
|
*/
|
||||||
$task = $this->getData('task');
|
$task = $this->getData('task');
|
||||||
$taskMedia = $task->getMedia();
|
$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()); ?>">
|
<span id="task-status-badge" class="floatRight nobreak tag task-status-<?= $this->printHtml($task->getStatus()); ?>">
|
||||||
<?= $this->getHtml('S' . $task->getStatus()) ?>
|
<?= $this->getHtml('S' . $task->getStatus()) ?>
|
||||||
</span>
|
</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>
|
</div>
|
||||||
<header>
|
<header>
|
||||||
<h1 data-tpl-text="/title" data-tpl-value="/title" data-value=""><?= $this->printHtml($task->getTitle()); ?></h1>
|
<h1 data-tpl-text="/title" data-tpl-value="/title" data-value=""><?= $this->printHtml($task->getTitle()); ?></h1>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user