mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-01-10 16:48:41 +00:00
update
This commit is contained in:
parent
7e091ddacd
commit
e6943559d0
|
|
@ -47,7 +47,7 @@ final class AppController extends ModuleAbstract
|
|||
protected static array $dependencies = [];
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -67,7 +67,7 @@ final class AppController extends ModuleAbstract
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -87,7 +87,7 @@ final class AppController extends ModuleAbstract
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -107,7 +107,7 @@ final class AppController extends ModuleAbstract
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -127,7 +127,7 @@ final class AppController extends ModuleAbstract
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -147,7 +147,7 @@ final class AppController extends ModuleAbstract
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -167,7 +167,7 @@ final class AppController extends ModuleAbstract
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ echo $this->data['nav']->render(); ?>
|
|||
<div id="iSettings" class="tabview tab-2 url-rewrite">
|
||||
<div class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Applications'); ?></label></li>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('List'); ?></label></li>
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Applications'); ?></label>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('List'); ?></label>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ use phpOMS\Views\View;
|
|||
final class BackendController extends Controller
|
||||
{
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -53,7 +53,7 @@ final class BackendController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -88,11 +88,13 @@ final class BackendController extends Controller
|
|||
$view->data['tickets'] = $mapperQuery->where('id', 0, '>')->execute();
|
||||
}
|
||||
|
||||
$view->data['stats'] = TicketMapper::getStatOverview($request->header->account);
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -141,7 +143,7 @@ final class BackendController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -162,7 +164,7 @@ final class BackendController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -183,7 +185,7 @@ final class BackendController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -204,7 +206,7 @@ final class BackendController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Modules\Support\Models;
|
|||
use phpOMS\Stdlib\Base\Enum;
|
||||
|
||||
/**
|
||||
* Permision state enum.
|
||||
* Permission category enum.
|
||||
*
|
||||
* @package Modules\Support\Models
|
||||
* @license OMS License 2.0
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ namespace Modules\Support\Models;
|
|||
|
||||
use Modules\Admin\Models\AccountMapper;
|
||||
use Modules\Tasks\Models\TaskMapper;
|
||||
use Modules\Tasks\Models\TaskStatus;
|
||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||
use phpOMS\Stdlib\Base\SmartDateTime;
|
||||
|
||||
/**
|
||||
* Mapper class.
|
||||
|
|
@ -104,4 +106,17 @@ final class TicketMapper extends DataMapperFactory
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public const PRIMARYFIELD = 'support_ticket_id';
|
||||
|
||||
public static function getStatOverview(int $account) : array
|
||||
{
|
||||
$start = SmartDateTime::startOfMonth();
|
||||
|
||||
return [
|
||||
'total' => TicketMapper::count()->with('task')->where('task/createdAt', $start, '>=')->execute(),
|
||||
'unassigned' => TicketMapper::count()->with('task')->where('for', null)->execute(),
|
||||
'open' => TicketMapper::count()->with('task')->where('task/status', TaskStatus::OPEN)->execute(),
|
||||
'closed' => TicketMapper::count()->with('task')->where('task/createdAt', $start, '>=')->where('task/status', TaskStatus::DONE)->where('task/status', TaskStatus::CANCELED, '=', 'OR')->where('task/status', TaskStatus::SUSPENDED, '=', 'OR')->execute(),
|
||||
'inprogress' => TicketMapper::count()->with('task')->where('task/status', TaskStatus::WORKING)->execute(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ return ['Support' => [
|
|||
'Account' => 'الحساب',
|
||||
'All' => 'الجميع',
|
||||
'Assigned' => '',
|
||||
'AverageAmount' => 'متوسط المبلغ',
|
||||
'AverageAmount' => "متوسط \u{200b}\u{200b}المبلغ",
|
||||
'AverageProcessTime' => 'avg. وقت المعالجة',
|
||||
'Closed' => '',
|
||||
'Completion' => '',
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ return ['Support' => [
|
|||
'Settings' => 'Einstellungen',
|
||||
'Size' => 'Größe',
|
||||
'Statistics' => 'Statistiken',
|
||||
'Stats' => 'Stats',
|
||||
'Status' => 'Status',
|
||||
'Support' => 'Unterstützung',
|
||||
'Ticket' => 'Fahrkarte',
|
||||
|
|
@ -63,4 +64,6 @@ return ['Support' => [
|
|||
'Upload' => 'Hochladen',
|
||||
'Week' => 'Woche',
|
||||
'Year' => 'Jahr',
|
||||
'Total' => 'Gesamt',
|
||||
'InProgress' => 'In Bearbeitung',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ return ['Support' => [
|
|||
'Settings' => 'Settings',
|
||||
'Size' => 'Size',
|
||||
'Statistics' => 'Statistics',
|
||||
'Stats' => 'Stats',
|
||||
'Status' => 'Status',
|
||||
'Support' => 'Support',
|
||||
'Ticket' => 'Ticket',
|
||||
|
|
@ -63,4 +64,6 @@ return ['Support' => [
|
|||
'Upload' => 'Upload',
|
||||
'Week' => 'Week',
|
||||
'Year' => 'Year',
|
||||
'Total' => 'Total',
|
||||
'InProgress' => 'In Progress',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ echo $this->data['nav']->render(); ?>
|
|||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<!-- @todo necessary?
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Settings'); ?></div>
|
||||
<div class="portlet-body">
|
||||
|
|
@ -79,17 +80,17 @@ echo $this->data['nav']->render(); ?>
|
|||
</form>
|
||||
</div>
|
||||
</section>
|
||||
-->
|
||||
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Settings'); ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Stats'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="list">
|
||||
<tr><th><?= $this->getHtml('All'); ?><td>0
|
||||
<tr><th><?= $this->getHtml('Unassigned'); ?><td>0
|
||||
<tr><th><?= $this->getHtml('Open'); ?><td>0
|
||||
<tr><th><?= $this->getHtml('Unsolved'); ?><td>0
|
||||
<tr><th><?= $this->getHtml('Closed'); ?><td>0
|
||||
<tr><th><?= $this->getHtml('InTime'); ?><td>0
|
||||
<tr><th><?= $this->getHtml('Unassigned'); ?><td><?= $this->data['stats']['unassigned']; ?>
|
||||
<tr><th><?= $this->getHtml('Open'); ?><td><?= $this->data['stats']['open']; ?>
|
||||
<tr><th><?= $this->getHtml('InProgress'); ?><td><?= $this->data['stats']['inprogress']; ?>
|
||||
<tr><th><?= $this->getHtml('Closed'); ?><td><?= $this->data['stats']['closed']; ?>
|
||||
<tr><th><?= $this->getHtml('Total'); ?><td><?= $this->data['stats']['total']; ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<div class="form-group">
|
||||
<label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<div class="ipt-wrap wf-100">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" placeholder=" File"></div>
|
||||
<div class="ipt-first"><input type="text" id="iMedia" placeholder="File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ declare(strict_types=1);
|
|||
namespace Modules\Support\tests\Models;
|
||||
|
||||
use Modules\Support\Models\Ticket;
|
||||
use Modules\Support\Models\TicketAttribute;
|
||||
use Modules\Support\Models\TicketElement;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user