mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-25 05:38:39 +00:00
Fix empty task elements
This commit is contained in:
parent
0765760591
commit
1e5c8f807c
|
|
@ -130,7 +130,8 @@ class Task implements \JsonSerializable
|
|||
public function __construct()
|
||||
{
|
||||
$this->createdAt = new \DateTime('now');
|
||||
$this->due = (new \DateTime('now'))->modify('+1 day');
|
||||
$this->due = new \DateTime('now');
|
||||
$this->due->modify('+1 day');
|
||||
$this->schedule = new Schedule();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ class TaskElement implements \JsonSerializable
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->due = (new \DateTime('now'))->modify('+1 day');
|
||||
$this->due = new \DateTime('now');
|
||||
$this->due->modify('+1 day');
|
||||
$this->createdAt = new \DateTime('now');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><label for="iMessage"><?= $this->getText('Message'); ?></label>
|
||||
<tr><td><textarea id="iMessage" name="description"></textarea>
|
||||
<tr><td><label for="iDue"><?= $this->getText('Due'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= end($elements)->getDue()->format('Y-m-d\TH:i:s'); ?>">
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= !empty($elements) ? end($elements)->getDue()->format('Y-m-d\TH:i:s') : $task->getDue()->format('Y-m-d\TH:i:s'); ?>">
|
||||
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
|
||||
<tr><td><select id="iStatus" name="status">
|
||||
<option value="<?= \Modules\Tasks\Models\TaskStatus::OPEN; ?>" selected>Open
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user