mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-01-10 16:48:41 +00:00
fix templates
This commit is contained in:
parent
8160489812
commit
ec5e074fe6
|
|
@ -83,7 +83,7 @@ final class BackendController extends Controller
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
|
||||||
|
|
||||||
// @todo Use ticket implementation "getAnyRelatedToUser($request->header->account)
|
// @todo Use ticket implementation "getAnyRelatedToUser($request->header->account)
|
||||||
$mapperQuery = TicketMapper::getAnyRelatedToUser($request->header->account)
|
$view->data['tickets'] = TicketMapper::getAnyRelatedToUser($request->header->account)
|
||||||
->with('task')
|
->with('task')
|
||||||
->with('task/createdBy')
|
->with('task/createdBy')
|
||||||
->with('task/for')
|
->with('task/for')
|
||||||
|
|
@ -92,17 +92,13 @@ final class BackendController extends Controller
|
||||||
->with('task/taskElements/accRelation/relation')
|
->with('task/taskElements/accRelation/relation')
|
||||||
->with('app')
|
->with('app')
|
||||||
->sort('task/createdAt', OrderType::DESC)
|
->sort('task/createdAt', OrderType::DESC)
|
||||||
->limit(25);
|
->limit(50)
|
||||||
|
->paginate(
|
||||||
if ($request->getData('ptype') === 'p') {
|
'id',
|
||||||
$mapperQuery->where('id', $request->getDataInt('offset') ?? 0, '<');
|
$request->getData('ptype'),
|
||||||
} elseif ($request->getData('ptype') === 'n') {
|
$request->getDataInt('offset')
|
||||||
$mapperQuery->where('id', $request->getDataInt('offset') ?? 0, '>');
|
)
|
||||||
} else {
|
->executeGetArray();
|
||||||
$mapperQuery->where('id', 0, '>');
|
|
||||||
}
|
|
||||||
|
|
||||||
$view->data['tickets'] = $mapperQuery->execute();
|
|
||||||
|
|
||||||
$openQuery = new Builder($this->app->dbPool->get(), true);
|
$openQuery = new Builder($this->app->dbPool->get(), true);
|
||||||
$openQuery->innerJoin(TaskMapper::TABLE, TaskMapper::TABLE . '_d2_task')
|
$openQuery->innerJoin(TaskMapper::TABLE, TaskMapper::TABLE . '_d2_task')
|
||||||
|
|
@ -113,8 +109,7 @@ final class BackendController extends Controller
|
||||||
->on(TaskElementMapper::TABLE . '.' . TaskElementMapper::PRIMARYFIELD, '=', AccountRelationMapper::TABLE . '.task_account_task_element')
|
->on(TaskElementMapper::TABLE . '.' . TaskElementMapper::PRIMARYFIELD, '=', AccountRelationMapper::TABLE . '.task_account_task_element')
|
||||||
->andWhere(AccountRelationMapper::TABLE . '.task_account_account', '=', $request->header->account);
|
->andWhere(AccountRelationMapper::TABLE . '.task_account_account', '=', $request->header->account);
|
||||||
|
|
||||||
/** @var \Modules\Tasks\Models\Task[] $open */
|
$view->data['open'] = TicketMapper::getAll()
|
||||||
$open = TicketMapper::getAll()
|
|
||||||
->with('task')
|
->with('task')
|
||||||
->with('task/createdBy')
|
->with('task/createdBy')
|
||||||
->where('task/type', TaskType::TEMPLATE, '!=')
|
->where('task/type', TaskType::TEMPLATE, '!=')
|
||||||
|
|
@ -123,8 +118,6 @@ final class BackendController extends Controller
|
||||||
->query($openQuery)
|
->query($openQuery)
|
||||||
->executeGetArray();
|
->executeGetArray();
|
||||||
|
|
||||||
$view->data['open'] = $open;
|
|
||||||
|
|
||||||
$view->data['stats'] = TicketMapper::getStatOverview();
|
$view->data['stats'] = TicketMapper::getStatOverview();
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
@ -154,11 +147,10 @@ final class BackendController extends Controller
|
||||||
->with('task/createdBy')
|
->with('task/createdBy')
|
||||||
->with('task/tags')
|
->with('task/tags')
|
||||||
->with('task/tags/title')
|
->with('task/tags/title')
|
||||||
->with('ticketElements')
|
->with('task/taskElements')
|
||||||
->with('ticketElements/taskElement')
|
->with('task/taskElements/createdBy')
|
||||||
->with('ticketElements/taskElement/createdBy')
|
->with('task/taskElements/media')
|
||||||
->with('ticketElements/taskElement/media')
|
->with('task/attributes')
|
||||||
->with('attributes')
|
|
||||||
->with('task/for')
|
->with('task/for')
|
||||||
->with('app')
|
->with('app')
|
||||||
->where('task/tags/title/language', $request->header->l11n->language);
|
->where('task/tags/title/language', $request->header->l11n->language);
|
||||||
|
|
@ -226,27 +218,6 @@ final class BackendController extends Controller
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Routing end-point for application behavior.
|
|
||||||
*
|
|
||||||
* @param RequestAbstract $request Request
|
|
||||||
* @param ResponseAbstract $response Response
|
|
||||||
* @param array $data Generic data
|
|
||||||
*
|
|
||||||
* @return RenderableInterface
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
*/
|
|
||||||
public function viewSupportAnalysis(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
|
||||||
{
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
|
||||||
$view->setTemplate('/Modules/Support/Theme/Backend/support-analysis');
|
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
|
|
||||||
|
|
||||||
return $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behavior.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<?php $c = 0; $previous = null;
|
<?php $c = 0; $previous = null;
|
||||||
foreach ($elements as $key => $element) : ++$c; ?>
|
foreach ($elements as $key => $element) : ++$c; ?>
|
||||||
<?php if (($c === 1 && $element->status !== TaskStatus::OPEN)
|
<?php if (($c === 1 && $element->status !== TaskStatus::OPEN)
|
||||||
|| ($previous !== null && $element->status !== $previous->taskElement->status)
|
|| ($previous !== null && $element->status !== $previous->status)
|
||||||
) : ?>
|
) : ?>
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
@ -194,7 +194,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (($c === 1 && $element->priority !== $task->priority)
|
<?php if (($c === 1 && $element->priority !== $task->priority)
|
||||||
|| ($previous !== null && $element->priority !== $previous->taskElement->priority)
|
|| ($previous !== null && $element->priority !== $previous->priority)
|
||||||
) : ?>
|
) : ?>
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
@ -266,7 +266,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
)
|
)
|
||||||
) : ?>
|
) : ?>
|
||||||
<?= $this->getHtml('Due'); ?>: <?= $this->printHtml($element->due->format('Y/m/d H:i')); ?>
|
<?= $this->getHtml('Due'); ?>: <?= $this->printHtml($element->due->format('Y/m/d H:i')); ?>
|
||||||
<?php elseif ($previous !== null && $previous->taskElement->priority !== $element->priority) : ?>
|
<?php elseif ($previous !== null && $previous->priority !== $element->priority) : ?>
|
||||||
<?= $this->getHtml('Priority'); ?>: <?= $this->getHtml('P' . $element->priority, 'Tasks'); ?>
|
<?= $this->getHtml('Priority'); ?>: <?= $this->getHtml('P' . $element->priority, 'Tasks'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,19 +20,9 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<form action="<?= \phpOMS\Uri\UriFactory::build('{/api}helper/template?csrf={$CSRF}'); ?>" method="post">
|
<form action="<?= \phpOMS\Uri\UriFactory::build('{/api}support/ticket?csrf={$CSRF}'); ?>" method="post">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Ticket'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Ticket'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="form-group">
|
|
||||||
<label for="iDepartment"><?= $this->getHtml('Department'); ?></label>
|
|
||||||
<select id="iDepartment" name="department"></select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="iTopic"><?= $this->getHtml('Topic'); ?></label>
|
|
||||||
<select id="iTopic" name="topic"></select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iTitle"><?= $this->getHtml('Title'); ?></label>
|
<label for="iTitle"><?= $this->getHtml('Title'); ?></label>
|
||||||
<input id="iTitle" name="name" type="text" required>
|
<input id="iTitle" name="name" type="text" required>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user