mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-02-08 19:08:40 +00:00
improve given / unseen display
This commit is contained in:
parent
82072cfd65
commit
4397a93538
|
|
@ -112,6 +112,21 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
|
||||
$view->data['open'] = $open;
|
||||
|
||||
// given
|
||||
// @todo: this should also include forwarded tasks
|
||||
/** @var \Modules\Tasks\Models\Task[] $given */
|
||||
$given = TaskMapper::getAll()
|
||||
->with('createdBy')
|
||||
->with('tags')
|
||||
->with('tags/title')
|
||||
->where('tags/title/language', $response->header->l11n->language)
|
||||
->where('status', TaskStatus::OPEN)
|
||||
->where('createdBy', $response->header->account, '=')
|
||||
->sort('createdAt', OrderType::DESC)
|
||||
->execute();
|
||||
|
||||
$view->data['given'] = $given;
|
||||
|
||||
/** @var \Modules\Tasks\Models\TaskSeen[] $unread */
|
||||
$unread = TaskSeenMapper::getAll()
|
||||
->where('task', \array_keys($open), 'in')
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('OpenGiven'); ?> (<?= \count($open); ?>)<i class="lni lni-download download btn end-xs"></i></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('OpenGiven'); ?> (<?= \count($this->data['given']); ?>)<i class="lni lni-download download btn end-xs"></i></div>
|
||||
<div class="slider">
|
||||
<table id="taskList" class="default sticky">
|
||||
<thead>
|
||||
|
|
@ -111,7 +111,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<tbody>
|
||||
<?php
|
||||
$c = 0;
|
||||
foreach ($open as $key => $task) : ++$c;
|
||||
foreach ($this->data['given'] as $key => $task) : ++$c;
|
||||
$url = UriFactory::build(empty($task->redirect)
|
||||
? 'task/single?{?}&id=' . $task->id
|
||||
: ('{/app}/' . $task->redirect),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user