doc fixes

This commit is contained in:
Dennis Eichhorn 2022-04-21 23:52:00 +02:00
parent 91dde4baad
commit ef8cfec271
7 changed files with 22 additions and 19 deletions

View File

@ -16,7 +16,7 @@ Generally, the development philosophy is result orientated. This means that anyo
Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty. Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty.
Open tasks can be found in the project overview: [PROJECT.md](../Project/PROJECT.md) Open tasks can be found in the project overview: [PROJECT.md](https://github.com/Karaka-Management/Organization-Guide/blob/master/Project/PROJECT.md)
Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task. Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task.

View File

@ -81,7 +81,7 @@ final class ApiController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function apiTaskCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function apiTaskCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
if (!empty($val = $this->validateTaskCreate($request))) { if (!empty($val = $this->validateTaskCreate($request))) {
$response->set($request->uri->__toString(), new FormValidation($val)); $response->set($request->uri->__toString(), new FormValidation($val));
@ -283,7 +283,7 @@ final class ApiController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function apiTaskGet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function apiTaskGet(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var Task $task */ /** @var Task $task */
$task = TaskMapper::get()->where('id', (int) $request->getData('id'))->execute(); $task = TaskMapper::get()->where('id', (int) $request->getData('id'))->execute();
@ -303,10 +303,10 @@ final class ApiController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function apiTaskSet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function apiTaskSet(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var Task $old */ /** @var Task $old */
$old = clone TaskMapper::get()->where('id', (int) $request->getData('id'))->execute(); $old = TaskMapper::get()->where('id', (int) $request->getData('id'))->execute();
/** @var Task $new */ /** @var Task $new */
$new = $this->updateTaskFromRequest($request); $new = $this->updateTaskFromRequest($request);
@ -375,7 +375,7 @@ final class ApiController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function apiTaskElementCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function apiTaskElementCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
if (!empty($val = $this->validateTaskElementCreate($request))) { if (!empty($val = $this->validateTaskElementCreate($request))) {
$response->set('task_element_create', new FormValidation($val)); $response->set('task_element_create', new FormValidation($val));
@ -550,7 +550,7 @@ final class ApiController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function apiTaskElementGet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function apiTaskElementGet(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var TaskElement $task */ /** @var TaskElement $task */
$task = TaskElementMapper::get()->where('id', (int) $request->getData('id'))->execute(); $task = TaskElementMapper::get()->where('id', (int) $request->getData('id'))->execute();
@ -570,10 +570,10 @@ final class ApiController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function apiTaskElementSet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function apiTaskElementSet(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var TaskElement $old */ /** @var TaskElement $old */
$old = clone TaskElementMapper::get()->where('id', (int) $request->getData('id'))->execute(); $old = TaskElementMapper::get()->where('id', (int) $request->getData('id'))->execute();
/** @var TaskElement $new */ /** @var TaskElement $new */
$new = $this->updateTaskElementFromRequest($request); $new = $this->updateTaskElementFromRequest($request);

View File

@ -16,6 +16,7 @@ namespace Modules\Tasks\Controller;
use Modules\Dashboard\Models\DashboardElementInterface; use Modules\Dashboard\Models\DashboardElementInterface;
use Modules\Media\Models\MediaMapper; use Modules\Media\Models\MediaMapper;
use Modules\Profile\Models\SettingsEnum;
use Modules\Tasks\Models\AccountRelationMapper; use Modules\Tasks\Models\AccountRelationMapper;
use Modules\Tasks\Models\PermissionCategory; use Modules\Tasks\Models\PermissionCategory;
use Modules\Tasks\Models\TaskElementMapper; use Modules\Tasks\Models\TaskElementMapper;
@ -56,7 +57,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewTaskDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface public function viewTaskDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
@ -102,6 +103,7 @@ final class BackendController extends Controller implements DashboardElementInte
->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 */
$open = TaskMapper::getAll() $open = TaskMapper::getAll()
->with('createdBy') ->with('createdBy')
->with('taskElements') ->with('taskElements')
@ -122,12 +124,13 @@ final class BackendController extends Controller implements DashboardElementInte
* {@inheritdoc} * {@inheritdoc}
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Tasks/Theme/Backend/dashboard-task'); $view->setTemplate('/Modules/Tasks/Theme/Backend/dashboard-task');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001101001, $request, $response)); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001101001, $request, $response));
/** @var \Modules\Tasks\Models\Task[] $tasks */
$tasks = TaskMapper::getAnyRelatedToUser($request->header->account) $tasks = TaskMapper::getAnyRelatedToUser($request->header->account)
->with('tags') ->with('tags')
->with('tags/title') ->with('tags/title')
@ -154,11 +157,11 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewTaskView(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface public function viewTaskView(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{ {
$view = new TaskView($this->app->l11nManager, $request, $response); $view = new TaskView($this->app->l11nManager, $request, $response);
$profileImage = $this->app->appSettings->get(names: 'default_profile_image', module: 'Profile'); $profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile');
$image = MediaMapper::get()->where('id', (int) $profileImage->content)->execute(); $image = MediaMapper::get()->where('id', (int) $profileImage->content)->execute();
$view->defaultProfileImage = $image; $view->defaultProfileImage = $image;
@ -227,7 +230,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewTaskCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface public function viewTaskCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
@ -255,7 +258,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewTaskAnalysis(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface public function viewTaskAnalysis(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Tasks/Theme/Backend/task-analysis'); $view->setTemplate('/Modules/Tasks/Theme/Backend/task-analysis');

View File

@ -41,7 +41,7 @@ final class SearchController extends Controller
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function searchTag(RequestAbstract $request, ResponseAbstract $response, $data = null) : void public function searchTag(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
// join tags with tag l11n // join tags with tag l11n
// join tags with tasks // join tags with tasks

View File

@ -76,7 +76,7 @@ final class TaskElementMapper extends DataMapperFactory
/** /**
* Belongs to. * Belongs to.
* *
* @var array<string, array{mapper:string, external:string}> * @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
* @since 1.0.0 * @since 1.0.0
*/ */
public const BELONGS_TO = [ public const BELONGS_TO = [

View File

@ -89,7 +89,7 @@ final class TaskMapper extends DataMapperFactory
/** /**
* Belongs to. * Belongs to.
* *
* @var array<string, array{mapper:string, external:string}> * @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
* @since 1.0.0 * @since 1.0.0
*/ */
public const BELONGS_TO = [ public const BELONGS_TO = [

View File

@ -49,7 +49,7 @@ final class TaskSeenMapper extends DataMapperFactory
/** /**
* Belongs to. * Belongs to.
* *
* @var array<string, array{mapper:string, external:string}> * @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
* @since 1.0.0 * @since 1.0.0
*/ */
public const BELONGS_TO = [ public const BELONGS_TO = [