mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-10 15:18:40 +00:00
update
This commit is contained in:
parent
cb311125c7
commit
7fc48d26d6
|
|
@ -92,7 +92,7 @@ final class Installer extends InstallerAbstract
|
|||
|
||||
$module->apiTaskAttributeTypeCreate($request, $response);
|
||||
|
||||
$responseData = $response->get('');
|
||||
$responseData = $response->getData('');
|
||||
if (!\is_array($responseData)) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ final class Installer extends InstallerAbstract
|
|||
|
||||
$module->apiTaskAttributeValueCreate($request, $response);
|
||||
|
||||
$responseData = $response->get('');
|
||||
$responseData = $response->getData('');
|
||||
if (!\is_array($responseData)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,17 @@ return [
|
|||
],
|
||||
],
|
||||
],
|
||||
'^.*/task/reminder(\?.*|$)' => [
|
||||
[
|
||||
'dest' => '\Modules\Tasks\Controller\ApiController:apiTaskReminderCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::TASK,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/task/element.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Tasks\Controller\ApiController:apiTaskElementCreate',
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ use Modules\Tasks\Models\TaskAttributeValueMapper;
|
|||
use Modules\Tasks\Models\TaskElement;
|
||||
use Modules\Tasks\Models\TaskElementMapper;
|
||||
use Modules\Tasks\Models\TaskMapper;
|
||||
use Modules\Tasks\Models\TaskSeen;
|
||||
use Modules\Tasks\Models\TaskSeenMapper;
|
||||
use Modules\Tasks\Models\TaskStatus;
|
||||
use Modules\Tasks\Models\TaskType;
|
||||
use phpOMS\Localization\BaseStringL11n;
|
||||
|
|
@ -57,6 +59,53 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
|
|||
*/
|
||||
final class ApiController extends Controller
|
||||
{
|
||||
/**
|
||||
* Api method to remind a task
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param array $data Generic data
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function apiTaskReminderCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
||||
{
|
||||
if (!empty($val = $this->validateTaskReminderCreate($request))) {
|
||||
$response->header->status = RequestStatusCode::R_400;
|
||||
$this->createInvalidCreateResponse($request, $response, $val);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var TaskSeen[] $reminder */
|
||||
$reminder = $this->createTaskReminderFromRequest($request);
|
||||
$this->createModel($request->header->account, $reminder, TaskSeenMapper::class, 'reminder', $request->getOrigin());
|
||||
$this->createStandardCreateResponse($request, $response, $reminder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate reminder create request
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
*
|
||||
* @return array<string, bool> Returns the validation array of the request
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function validateTaskReminderCreate(RequestAbstract $request) : array
|
||||
{
|
||||
$val = [];
|
||||
if (($val['id'] = !$request->hasData('id'))) {
|
||||
return $val;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate task create request
|
||||
*
|
||||
|
|
@ -78,6 +127,34 @@ final class ApiController extends Controller
|
|||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to create remeinder from request.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
*
|
||||
* @return TaskSeen[] Returns the created reminders from the request
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function createTaskReminderFromRequest(RequestAbstract $request) : array
|
||||
{
|
||||
/** @var AccountRelation[] $responsible */
|
||||
$responsible = TaskMapper::getResponsible((int) $request->getData('id'));
|
||||
|
||||
$reminder = [];
|
||||
foreach ($responsible as $account) {
|
||||
$unseen = new TaskSeen();
|
||||
$unseen->task = (int) $request->getData('id');
|
||||
$unseen->seenBy = $account->relation->id;
|
||||
$unseen->reminderBy = new NullAccount($request->header->account);
|
||||
$unseen->reminderAt = new \DateTime('now');
|
||||
|
||||
$remidner[] = $unseen;
|
||||
}
|
||||
|
||||
return $reminder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Api method to create a task
|
||||
*
|
||||
|
|
@ -303,7 +380,7 @@ final class ApiController extends Controller
|
|||
$internalResponse = new HttpResponse();
|
||||
$this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse);
|
||||
|
||||
if (!\is_array($data = $internalResponse->get($request->uri->__toString()))) {
|
||||
if (!\is_array($data = $internalResponse->getDataArray($request->uri->__toString()))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -780,11 +857,11 @@ final class ApiController extends Controller
|
|||
$attribute->task = (int) $request->getData('task');
|
||||
$attribute->type = new NullTaskAttributeType((int) $request->getData('type'));
|
||||
|
||||
if ($request->hasData('value')) {
|
||||
$attribute->value = new NullTaskAttributeValue((int) $request->getData('value'));
|
||||
if ($request->hasData('value_id')) {
|
||||
$attribute->value = new NullTaskAttributeValue((int) $request->getData('value_id'));
|
||||
} else {
|
||||
$newRequest = clone $request;
|
||||
$newRequest->setData('value', $request->getData('custom'), true);
|
||||
$newRequest->setData('value', $request->getData('value'), true);
|
||||
|
||||
$value = $this->createTaskAttributeValueFromRequest($request);
|
||||
|
||||
|
|
|
|||
|
|
@ -80,16 +80,24 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
|
||||
if ($request->getData('ptype') === 'p') {
|
||||
$view->data['tasks'] = $mapperQuery->with('createdBy')
|
||||
->where('id', $request->getDataInt('id') ?? 0, '<')
|
||||
->execute();
|
||||
->where('id', $request->getDataInt('id') ?? 0, '<')
|
||||
->execute();
|
||||
} elseif ($request->getData('ptype') === 'n') {
|
||||
$view->data['tasks'] = $mapperQuery->with('createdBy')
|
||||
->where('id', $request->getDataInt('id') ?? 0, '>')
|
||||
->execute();
|
||||
->where('id', $request->getDataInt('id') ?? 0, '>')
|
||||
->execute();
|
||||
} else {
|
||||
$view->data['tasks'] = $mapperQuery->with('createdBy')
|
||||
->where('id', 0, '>')
|
||||
->execute();
|
||||
->where('id', 0, '>')
|
||||
->execute();
|
||||
}
|
||||
|
||||
$view->data['task_media'] = [];
|
||||
foreach ($view->data['tasks'] as $task) {
|
||||
$view->data['task_media'][$task->id] = TaskMapper::has()
|
||||
->with('media')
|
||||
->where('id', $task->id)
|
||||
->execute();
|
||||
}
|
||||
|
||||
$openQuery = new Builder($this->app->dbPool->get(), true);
|
||||
|
|
@ -112,6 +120,13 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
|
||||
$view->data['open'] = $open;
|
||||
|
||||
foreach ($view->data['open'] as $task) {
|
||||
$view->data['task_media'][$task->id] = TaskMapper::has()
|
||||
->with('media')
|
||||
->where('id', $task->id)
|
||||
->execute();
|
||||
}
|
||||
|
||||
// given
|
||||
// @todo: this should also include forwarded tasks
|
||||
/** @var \Modules\Tasks\Models\Task[] $given */
|
||||
|
|
@ -127,6 +142,13 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
|
||||
$view->data['given'] = $given;
|
||||
|
||||
foreach ($view->data['given'] as $task) {
|
||||
$view->data['task_media'][$task->id] = TaskMapper::has()
|
||||
->with('media')
|
||||
->where('id', $task->id)
|
||||
->execute();
|
||||
}
|
||||
|
||||
/** @var \Modules\Tasks\Models\TaskSeen[] $unread */
|
||||
$unread = TaskSeenMapper::getAll()
|
||||
->where('task', \array_keys($open), 'in')
|
||||
|
|
@ -144,6 +166,13 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
|
||||
$view->data['unread'] = $unseen;
|
||||
|
||||
foreach ($view->data['unread'] as $task) {
|
||||
$view->data['task_media'][$task->id] = TaskMapper::has()
|
||||
->with('media')
|
||||
->where('id', $task->id)
|
||||
->execute();
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
|
|
@ -230,33 +259,6 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
->where('tags/title/language', $request->header->l11n->language)
|
||||
->execute();
|
||||
|
||||
// Set task as seen
|
||||
if ($task !== 0) {
|
||||
/** @var \Modules\Tasks\Models\TaskSeen[] $taskSeen */
|
||||
$taskSeen = TaskSeenMapper::getAll()
|
||||
->where('task', (int) $request->getData('id'))
|
||||
->where('seenBy', $request->header->account)
|
||||
->execute();
|
||||
|
||||
foreach ($taskSeen as $unseen) {
|
||||
if ($unseen->isRemindered && ($unseen->reminderAt?->getTimestamp() ?? 0) < $request->header->getRequestTime()) {
|
||||
$old = clone $unseen;
|
||||
|
||||
$unseen->isRemindered = false;
|
||||
|
||||
$this->updateModel($request->header->account, $old, $unseen, TaskSeenMapper::class, 'task_seen', $request->getOrigin());
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($taskSeen)) {
|
||||
$taskSeen = new TaskSeen();
|
||||
$taskSeen->seenBy = $request->header->account;
|
||||
$taskSeen->task = (int) $request->getData('id');
|
||||
|
||||
$this->createModel($request->header->account, $taskSeen, TaskSeenMapper::class, 'task_seen', $request->getOrigin());
|
||||
}
|
||||
}
|
||||
|
||||
$accountId = $request->header->account;
|
||||
|
||||
if (!($task->createdBy->id === $accountId
|
||||
|
|
@ -270,6 +272,46 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
return $view;
|
||||
}
|
||||
|
||||
$reminderStatus = [];
|
||||
|
||||
// Set task as seen
|
||||
if ($task->id !== 0) {
|
||||
/** @var \Modules\Tasks\Models\TaskSeen[] $taskSeen */
|
||||
$taskSeen = TaskSeenMapper::getAll()
|
||||
->with('reminderBy')
|
||||
->where('task', $task->id)
|
||||
->where('seenBy', $request->header->account)
|
||||
->execute();
|
||||
|
||||
foreach ($taskSeen as $unseen) {
|
||||
// Shows all reminders
|
||||
if ($unseen->reminderBy !== null
|
||||
&& ($unseen->reminderAt?->getTimestamp() ?? 0) < $request->header->getRequestTime()
|
||||
&& ($unseen->reminderAt?->getTimestamp() ?? 0) > ($unseen->seenAt?->getTimestamp() ?? 0) - 300
|
||||
) {
|
||||
$reminderStatus[] = $unseen;
|
||||
|
||||
if ($unseen->isRemindered) {
|
||||
$new = clone $unseen;
|
||||
$new->seenAt = new \DateTime('now');
|
||||
$new->isRemindered = false;
|
||||
|
||||
$this->updateModel($request->header->account, $unseen, $new, TaskSeenMapper::class, 'reminder_seen', $request->getOrigin());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($taskSeen)) {
|
||||
$taskSeen = new TaskSeen();
|
||||
$taskSeen->seenBy = $request->header->account;
|
||||
$taskSeen->task = (int) $request->getData('id');
|
||||
|
||||
$this->createModel($request->header->account, $taskSeen, TaskSeenMapper::class, 'task_seen', $request->getOrigin());
|
||||
}
|
||||
}
|
||||
|
||||
$view->data['reminder'] = $reminderStatus;
|
||||
|
||||
$view->setTemplate('/Modules/Tasks/Theme/Backend/task-single');
|
||||
$view->data['task'] = $task;
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001101001, $request, $response);
|
||||
|
|
|
|||
|
|
@ -164,6 +164,28 @@ final class TaskMapper extends DataMapperFactory
|
|||
return self::getAll()->execute($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get responsible users for task
|
||||
*
|
||||
* @param int $task Task
|
||||
*
|
||||
* @return AccountRelation[]
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function getResponsible(int $task) : array
|
||||
{
|
||||
$query = AccountRelationMapper::getQuery();
|
||||
$query->innerJoin(TaskElementMapper::TABLE)
|
||||
->on(AccountRelationMapper::TABLE . '_d1.task_account_task_element', '=', TaskElementMapper::TABLE . '.task_element_task')
|
||||
->innerJoin(self::TABLE)
|
||||
->on(TaskElementMapper::TABLE . '_d1.task_element_task', '=', self::TABLE . '.task_id')
|
||||
->where(self::TABLE . '.task_id', '=', $task);
|
||||
|
||||
return AccountRelationMapper::getAll()
|
||||
->execute($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get open tasks for user
|
||||
*
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'bcc',
|
||||
'By' => 'بواسطة',
|
||||
'CC' => 'نسخة',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'خلقت',
|
||||
'Creator' => 'المنشئ',
|
||||
'Day' => 'يوم',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'بحجم',
|
||||
'Statistics' => 'إحصائيات',
|
||||
'Status' => 'حالة',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'مهمة',
|
||||
'Tasks' => 'مهام',
|
||||
'Template' => 'نموذج',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc.',
|
||||
'By' => 'Podle',
|
||||
'CC' => 'Cc.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Vytvořený',
|
||||
'Creator' => 'Tvůrce',
|
||||
'Day' => 'Den',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Velikost',
|
||||
'Statistics' => 'Statistika',
|
||||
'Status' => 'Postavení',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Úkol',
|
||||
'Tasks' => 'Úkoly',
|
||||
'Template' => 'Šablona',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => 'Ved',
|
||||
'CC' => 'Cc.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Oprettet',
|
||||
'Creator' => 'Skaber.',
|
||||
'Day' => 'Dag',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Størrelse',
|
||||
'Statistics' => 'Statistikker',
|
||||
'Status' => 'Status.',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Opgave',
|
||||
'Tasks' => 'Opgaver.',
|
||||
'Template' => 'Template.',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc.',
|
||||
'By' => 'Durch',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Erstellt',
|
||||
'Creator' => 'Schöpfer',
|
||||
'Day' => 'Tag',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Größe',
|
||||
'Statistics' => 'Statistiken',
|
||||
'Status' => 'Status',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Aufgabe',
|
||||
'Tasks' => 'Aufgaben',
|
||||
'Template' => 'Schablone',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc',
|
||||
'By' => 'Με',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Δημιουργήθηκε',
|
||||
'Creator' => 'Δημιουργός',
|
||||
'Day' => 'Ημέρα',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Μέγεθος',
|
||||
'Statistics' => 'Στατιστική',
|
||||
'Status' => 'Κατάσταση',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Εργο',
|
||||
'Tasks' => 'Καθήκοντα',
|
||||
'Template' => 'Πρότυπο',
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ return ['Tasks' => [
|
|||
'To' => 'To',
|
||||
'Today' => 'Today',
|
||||
'Type' => 'Type',
|
||||
'ReminderedBy' => 'Remindered by',
|
||||
'Unread' => 'Unread',
|
||||
'UnreadChanges' => 'Unread Changes',
|
||||
'Upload' => 'Upload',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc',
|
||||
'By' => 'Por',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Creado',
|
||||
'Creator' => 'Creador',
|
||||
'Day' => 'Día',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Tamaño',
|
||||
'Statistics' => 'Estadísticas',
|
||||
'Status' => 'Estado',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Tarea',
|
||||
'Tasks' => 'Tareas',
|
||||
'Template' => 'Plantilla',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc',
|
||||
'By' => 'Mennessä',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Luotu',
|
||||
'Creator' => 'Luoja',
|
||||
'Day' => 'Päivä',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Koko',
|
||||
'Statistics' => 'Tilastot',
|
||||
'Status' => 'Tila',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Tehtävä',
|
||||
'Tasks' => 'Tehtävät',
|
||||
'Template' => 'Sapluuna',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC',
|
||||
'By' => 'Par',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Établi',
|
||||
'Creator' => 'Créateur',
|
||||
'Day' => 'Jour',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Taille',
|
||||
'Statistics' => 'Statistiques',
|
||||
'Status' => 'Statut',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Tâche',
|
||||
'Tasks' => 'Tâches',
|
||||
'Template' => 'Modèle',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc',
|
||||
'By' => 'Által',
|
||||
'CC' => 'Kb',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Létrehozott',
|
||||
'Creator' => 'Teremtő',
|
||||
'Day' => 'Nap',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Méret',
|
||||
'Statistics' => 'Statisztika',
|
||||
'Status' => 'Állapot',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Feladat',
|
||||
'Tasks' => 'Feladatok',
|
||||
'Template' => 'Sablon',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => 'Di',
|
||||
'CC' => 'Cc.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Creato',
|
||||
'Creator' => 'Creatore',
|
||||
'Day' => 'Giorno',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Misurare',
|
||||
'Statistics' => 'Statistiche',
|
||||
'Status' => 'Stato',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Compito',
|
||||
'Tasks' => 'Compiti',
|
||||
'Template' => 'Modello',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => '沿って',
|
||||
'CC' => 'CC',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => '作成した',
|
||||
'Creator' => 'クリエーター',
|
||||
'Day' => '日',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'サイズ',
|
||||
'Statistics' => '統計学',
|
||||
'Status' => '状態',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => '仕事',
|
||||
'Tasks' => 'タスク',
|
||||
'Template' => 'レンプレート',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => '바닥',
|
||||
'By' => '에 의해',
|
||||
'CC' => 'CC.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => '만들어진',
|
||||
'Creator' => '창조자',
|
||||
'Day' => '낮',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => '크기',
|
||||
'Statistics' => '통계',
|
||||
'Status' => '상태',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => '일',
|
||||
'Tasks' => '작업',
|
||||
'Template' => '주형',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => 'Av',
|
||||
'CC' => 'CC.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Opprettet',
|
||||
'Creator' => 'Skaperen.',
|
||||
'Day' => 'Dag',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Størrelse',
|
||||
'Statistics' => 'Statistikk',
|
||||
'Status' => 'Status',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Oppgave',
|
||||
'Tasks' => 'Oppgaver',
|
||||
'Template' => 'Mal',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc.',
|
||||
'By' => 'Za pomocą',
|
||||
'CC' => 'Cc.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Utworzony',
|
||||
'Creator' => 'Twórca',
|
||||
'Day' => 'Dzień',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Rozmiar',
|
||||
'Statistics' => 'Statystyka',
|
||||
'Status' => 'Status',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Zadanie',
|
||||
'Tasks' => 'Zadania',
|
||||
'Template' => 'Szablon',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => 'Por',
|
||||
'CC' => 'Cc.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Criado',
|
||||
'Creator' => 'O Criador',
|
||||
'Day' => 'Dia',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Tamanho',
|
||||
'Statistics' => 'Estatisticas',
|
||||
'Status' => 'Status',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Tarefa',
|
||||
'Tasks' => 'Tarefas',
|
||||
'Template' => 'Modelo',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => 'От',
|
||||
'CC' => 'CC',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Созданный',
|
||||
'Creator' => 'Создатель',
|
||||
'Day' => 'День',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Размер',
|
||||
'Statistics' => 'Статистика',
|
||||
'Status' => 'Статус',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Задача',
|
||||
'Tasks' => 'Задания',
|
||||
'Template' => 'Шаблон',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Bcc',
|
||||
'By' => 'Förbi',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Skapad',
|
||||
'Creator' => 'Skapare',
|
||||
'Day' => 'Dag',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Storlek',
|
||||
'Statistics' => 'Statistik',
|
||||
'Status' => 'Status',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Uppgift',
|
||||
'Tasks' => 'Uppdrag',
|
||||
'Template' => 'Mall',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'bcc',
|
||||
'By' => 'โดย',
|
||||
'CC' => 'cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'สร้าง',
|
||||
'Creator' => 'ผู้สร้าง',
|
||||
'Day' => 'วัน',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'ขนาด',
|
||||
'Statistics' => 'สถิติ',
|
||||
'Status' => 'สถานะ',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'งาน',
|
||||
'Tasks' => 'ภารกิจ',
|
||||
'Template' => 'แม่แบบ',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC',
|
||||
'By' => 'İle',
|
||||
'CC' => 'Cc',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Yaratılmış',
|
||||
'Creator' => 'Yaratıcı',
|
||||
'Day' => 'Gün',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Boyut',
|
||||
'Statistics' => 'İstatistik',
|
||||
'Status' => 'Durum',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Görev',
|
||||
'Tasks' => 'Görevler',
|
||||
'Template' => 'Şablon',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'Відбув',
|
||||
'By' => 'По',
|
||||
'CC' => 'Ст',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => 'Створений',
|
||||
'Creator' => 'Творець',
|
||||
'Day' => 'День',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => 'Розмір',
|
||||
'Statistics' => 'Статистика',
|
||||
'Status' => 'Статус',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => 'Завдання',
|
||||
'Tasks' => 'Завдань',
|
||||
'Template' => 'Шаблон',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return ['Tasks' => [
|
|||
'BCC' => 'BCC.',
|
||||
'By' => '经过',
|
||||
'CC' => 'CC.',
|
||||
'Completion' => '#VALUE!',
|
||||
'Completion' => '',
|
||||
'Created' => '创造了',
|
||||
'Creator' => '创造者',
|
||||
'Day' => '日',
|
||||
|
|
@ -65,7 +65,7 @@ return ['Tasks' => [
|
|||
'Size' => '尺寸',
|
||||
'Statistics' => '统计数据',
|
||||
'Status' => '地位',
|
||||
'Tag' => '#VALUE!',
|
||||
'Tag' => '',
|
||||
'Task' => '任务',
|
||||
'Tasks' => '任务',
|
||||
'Template' => '模板',
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<thead>
|
||||
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Tag'); ?>
|
||||
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
|
|
@ -74,6 +75,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<?= $this->getHtml('P' . $task->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<td><?= ($this->data['task_media'][$task->id] ?? false) === true ? '<i class="lni lni-paperclip"></i>' : ''; ?>
|
||||
<td data-label="<?= $this->getHtml('Title'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
|
|
@ -104,6 +106,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<thead>
|
||||
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Tag'); ?>
|
||||
<td><?= $this->getHtml('For'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
|
|
@ -133,6 +136,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<?= $this->getHtml('P' . $task->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<td><?= ($this->data['task_media'][$task->id] ?? false) === true ? '<i class="lni lni-paperclip"></i>' : ''; ?>
|
||||
<td data-label="<?= $this->getHtml('Title'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
|
|
@ -163,6 +167,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<thead>
|
||||
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Tag'); ?>
|
||||
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
|
|
@ -197,6 +202,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<?= $this->getHtml('P' . $task->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<td><?= ($this->data['task_media'][$task->id] ?? false) === true ? '<i class="lni lni-paperclip"></i>' : ''; ?>
|
||||
<td data-label="<?= $this->getHtml('Title'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
|
|
@ -234,6 +240,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<thead>
|
||||
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Tag'); ?>
|
||||
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
|
|
@ -267,6 +274,7 @@ echo $this->data['nav']->render(); ?>
|
|||
<?= $this->getHtml('P' . $task->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<td><?= ($this->data['task_media'][$task->id] ?? false) === true ? '<i class="lni lni-paperclip"></i>' : ''; ?>
|
||||
<td data-label="<?= $this->getHtml('Title'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ echo $this->data['nav']->render(); ?>
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<?php if (!empty($this->data['reminder'])) : ?>
|
||||
<section class="portlet highlight-4">
|
||||
<div class="portlet-body"><?= $this->getHtml('ReminderedBy'); ?> <?= \reset($this->data['reminder'])->reminderBy->name1; ?></div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section id="task" class="portlet"
|
||||
data-update-content="#task"
|
||||
data-update-element="#task .task-title, #task .task-content"
|
||||
|
|
@ -62,6 +68,9 @@ echo $this->data['nav']->render(); ?>
|
|||
<?= $this->printHtml($task->createdBy->name1); ?> - <?= $this->printHtml($task->createdAt->format('Y/m/d H:i')); ?>
|
||||
</span>
|
||||
<span class="end-xs plain-grid">
|
||||
<form style="display: inline-block;" id="taskReminder" action="<?= UriFactory::build('{/api}task/reminder?{?}&csrf={$CSRF}'); ?>" method="POST">
|
||||
<i class="lni lni-alarm btn submit"></i>
|
||||
</form>
|
||||
<span id="task-status-badge" class="nobreak tag task-status-<?= $task->getStatus(); ?>">
|
||||
<?= $this->getHtml('S' . $task->getStatus()); ?>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiTaskCreate($request, $response);
|
||||
|
||||
self::assertEquals('Controller Test Title', $response->get('')['response']->title);
|
||||
self::assertGreaterThan(0, $response->get('')['response']->id);
|
||||
self::assertEquals('Controller Test Title', $response->getDataArray('')['response']->title);
|
||||
self::assertGreaterThan(0, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -137,7 +137,7 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiTaskGet($request, $response);
|
||||
|
||||
self::assertEquals(1, $response->get('')['response']->id);
|
||||
self::assertEquals(1, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -157,7 +157,7 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$this->module->apiTaskSet($request, $response);
|
||||
$this->module->apiTaskGet($request, $response);
|
||||
|
||||
self::assertEquals('New Title', $response->get('')['response']->title);
|
||||
self::assertEquals('New Title', $response->getDataArray('')['response']->title);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -194,8 +194,8 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiTaskElementCreate($request, $response);
|
||||
|
||||
self::assertEquals('Controller Test', $response->get('')['response']->descriptionRaw);
|
||||
self::assertGreaterThan(0, $response->get('')['response']->id);
|
||||
self::assertEquals('Controller Test', $response->getDataArray('')['response']->descriptionRaw);
|
||||
self::assertGreaterThan(0, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -212,7 +212,7 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiTaskElementGet($request, $response);
|
||||
|
||||
self::assertEquals(1, $response->get('')['response']->id);
|
||||
self::assertEquals(1, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -231,7 +231,7 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$this->module->apiTaskElementSet($request, $response);
|
||||
$this->module->apiTaskElementGet($request, $response);
|
||||
|
||||
self::assertEquals('This is a changed description', $response->get('')['response']->descriptionRaw);
|
||||
self::assertEquals('This is a changed description', $response->getDataArray('')['response']->descriptionRaw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -249,7 +249,7 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiTaskCreate($request, $response);
|
||||
|
||||
self::assertNotEquals([], $response->get(''));
|
||||
self::assertNotEquals([], $response->getData(''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -269,6 +269,6 @@ final class ControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiTaskElementCreate($request, $response);
|
||||
|
||||
self::assertNotEquals([], $response->get(''));
|
||||
self::assertNotEquals([], $response->getData(''));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user