mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-02-01 16:48:39 +00:00
formatting fixes, bug fixes and support impl.
This commit is contained in:
parent
2cdbd83244
commit
f08e412011
|
|
@ -97,7 +97,7 @@ final class ApiController extends Controller
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function createTaskFromRequest(RequestAbstract $request) : Task
|
||||
public function createTaskFromRequest(RequestAbstract $request) : Task
|
||||
{
|
||||
$task = new Task();
|
||||
$task->title = (string) ($request->getData('title') ?? '');
|
||||
|
|
@ -277,7 +277,7 @@ final class ApiController extends Controller
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function createTaskElementFromRequest(RequestAbstract $request, Task $task) : TaskElement
|
||||
public function createTaskElementFromRequest(RequestAbstract $request, Task $task) : TaskElement
|
||||
{
|
||||
$element = new TaskElement();
|
||||
$element->createdBy = new NullAccount($request->header->account);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Modules\Tasks\Controller;
|
|||
use phpOMS\Module\ModuleAbstract;
|
||||
|
||||
/**
|
||||
* Task class.
|
||||
* Task controller class.
|
||||
*
|
||||
* @package Modules\Tasks
|
||||
* @license OMS License 1.0
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class Task implements \JsonSerializable
|
|||
* @var Account
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected Account $createdBy;
|
||||
public Account $createdBy;
|
||||
|
||||
/**
|
||||
* Created.
|
||||
|
|
|
|||
|
|
@ -336,7 +336,8 @@ final class TaskMapper extends DataMapperAbstract
|
|||
string $order = 'ASC',
|
||||
int $relations = RelationType::ALL,
|
||||
int $depth = 3
|
||||
) : array {
|
||||
) : array
|
||||
{
|
||||
$depth = 3;
|
||||
$userWhere = new Where(self::$db);
|
||||
$userWhere->where(AccountRelationMapper::getTable() . '.task_account_account', '=', $user)
|
||||
|
|
@ -378,7 +379,8 @@ final class TaskMapper extends DataMapperAbstract
|
|||
string $order = 'ASC',
|
||||
int $relations = RelationType::ALL,
|
||||
int $depth = 3
|
||||
) : array {
|
||||
) : array
|
||||
{
|
||||
$depth = 3;
|
||||
$userWhere = new Where(self::$db);
|
||||
$userWhere->where(AccountRelationMapper::getTable() . '.task_account_account', '=', $user)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
|||
namespace Modules\Tasks\Models;
|
||||
|
||||
/**
|
||||
* Task class.
|
||||
* Task template class.
|
||||
*
|
||||
* @package Modules\Tasks\Models
|
||||
* @license OMS License 1.0
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->getCreatedBy()->name1); ?></a>
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdBy->name1); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Created'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a>
|
||||
<?php endforeach; if ($c == 0) : ?>
|
||||
|
|
|
|||
|
|
@ -58,10 +58,10 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="portlet-head">
|
||||
<div class="row middle-xs">
|
||||
<span class="col-xs-0">
|
||||
<img class="profile-image" loading="lazy" alt="<?= $this->getHtml('User', '0', '0'); ?>" src="<?= $this->getAccountImage($task->getCreatedBy()->getId()); ?>">
|
||||
<img class="profile-image" loading="lazy" alt="<?= $this->getHtml('User', '0', '0'); ?>" src="<?= $this->getAccountImage($task->createdBy->getId()); ?>">
|
||||
</span>
|
||||
<span>
|
||||
<?= $this->printHtml($task->getCreatedBy()->name1); ?> - <?= $this->printHtml($task->createdAt->format('Y/m/d H:i')); ?>
|
||||
<?= $this->printHtml($task->createdBy->name1); ?> - <?= $this->printHtml($task->createdAt->format('Y/m/d H:i')); ?>
|
||||
</span>
|
||||
<span class="col-xs end-xs plain-grid">
|
||||
<span id="task-status-badge" class="nobreak tag task-status-<?= $task->getStatus(); ?>">
|
||||
|
|
@ -103,7 +103,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-xs-0 end-xs plain-grid">
|
||||
<?php if ($task->isEditable && $this->request->header->account === $task->getCreatedBy()->getId()) : ?>
|
||||
<?php if ($task->isEditable && $this->request->header->account === $task->createdBy->getId()) : ?>
|
||||
<div class="col-xs end-xs plain-grid">
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user