mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-16 12:18:40 +00:00
Merge branch 'develop' of https://github.com/Karaka-Management/oms-Kanban into develop
This commit is contained in:
commit
d64d967950
|
|
@ -62,7 +62,7 @@ final class ApiController extends Controller
|
||||||
public function apiKanbanCardCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiKanbanCardCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateKanbanCardCreate($request))) {
|
if (!empty($val = $this->validateKanbanCardCreate($request))) {
|
||||||
$response->set('kanban_card_create', new FormValidation($val));
|
$response->data['kanban_card_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -118,7 +118,7 @@ final class ApiController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($uploadedFiles = $request->getFiles())) {
|
if (!empty($uploadedFiles = $request->files)) {
|
||||||
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
|
|
@ -187,7 +187,7 @@ final class ApiController extends Controller
|
||||||
public function apiKanbanCardCommentCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiKanbanCardCommentCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateKanbanCardCommentCreate($request))) {
|
if (!empty($val = $this->validateKanbanCardCommentCreate($request))) {
|
||||||
$response->set('kanban_comment_create', new FormValidation($val));
|
$response->data['kanban_comment_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -215,7 +215,7 @@ final class ApiController extends Controller
|
||||||
$comment->card = (int) $request->getData('card');
|
$comment->card = (int) $request->getData('card');
|
||||||
$comment->createdBy = new NullAccount($request->header->account);
|
$comment->createdBy = new NullAccount($request->header->account);
|
||||||
|
|
||||||
if (!empty($uploadedFiles = $request->getFiles())) {
|
if (!empty($uploadedFiles = $request->files)) {
|
||||||
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
|
|
@ -270,7 +270,7 @@ final class ApiController extends Controller
|
||||||
public function apiKanbanBoardCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiKanbanBoardCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateKanbanBoardCreate($request))) {
|
if (!empty($val = $this->validateKanbanBoardCreate($request))) {
|
||||||
$response->set('kanban_board_create', new FormValidation($val));
|
$response->data['kanban_board_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -412,7 +412,7 @@ final class ApiController extends Controller
|
||||||
public function apiKanbanColumnCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function apiKanbanColumnCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateKanbanColumnCreate($request))) {
|
if (!empty($val = $this->validateKanbanColumnCreate($request))) {
|
||||||
$response->set('kanban_column_create', new FormValidation($val));
|
$response->data['kanban_column_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ final class BackendController extends Controller
|
||||||
public function setupStyles(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
public function setupStyles(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
/** @var \phpOMS\Model\Html\Head $head */
|
/** @var \phpOMS\Model\Html\Head $head */
|
||||||
$head = $response->get('Content')->getData('head');
|
$head = $response->get('Content')->head;
|
||||||
$head->addAsset(AssetType::CSS, '/Modules/Kanban/Theme/Backend/css/styles.css?v=1.0.0');
|
$head->addAsset(AssetType::CSS, '/Modules/Kanban/Theme/Backend/css/styles.css?v=1.0.0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,17 +73,17 @@ final class BackendController extends Controller
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-dashboard');
|
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-dashboard');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response);
|
||||||
|
|
||||||
$list = KanbanBoardMapper::getAll()
|
$list = KanbanBoardMapper::getAll()
|
||||||
->with('tags')
|
->with('tags')
|
||||||
->with('tags/title')
|
->with('tags/title')
|
||||||
->where('tags/title/language', $request->getLanguage())
|
->where('tags/title/language', $request->header->l11n->language)
|
||||||
->sort('createdAt', OrderType::DESC)
|
->sort('createdAt', OrderType::DESC)
|
||||||
->limit(20)
|
->limit(20)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$view->setData('boards', $list);
|
$view->data['boards'] = $list;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +112,7 @@ final class BackendController extends Controller
|
||||||
->with('columns/cards/tags')
|
->with('columns/cards/tags')
|
||||||
->with('columns/cards/tags/title')
|
->with('columns/cards/tags/title')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', (int) $request->getData('id'))
|
||||||
->where('columns/cards/tags/title/language', $request->getLanguage())
|
->where('columns/cards/tags/title/language', $request->header->l11n->language)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$accountId = $request->header->account;
|
$accountId = $request->header->account;
|
||||||
|
|
@ -127,9 +127,9 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-board');
|
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-board');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response);
|
||||||
|
|
||||||
$view->setData('board', $board);
|
$view->data['board'] = $board;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -150,17 +150,17 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-archive');
|
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-archive');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response);
|
||||||
|
|
||||||
$list = KanbanBoardMapper::getAll()
|
$list = KanbanBoardMapper::getAll()
|
||||||
->with('tags')
|
->with('tags')
|
||||||
->with('tags/title')
|
->with('tags/title')
|
||||||
->where('tags/title/language', $request->getLanguage())
|
->where('tags/title/language', $request->header->l11n->language)
|
||||||
->sort('createdAt', OrderType::DESC)
|
->sort('createdAt', OrderType::DESC)
|
||||||
->limit(25)
|
->limit(25)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$view->setData('boards', $list);
|
$view->data['boards'] = $list;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -192,7 +192,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-board-create');
|
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-board-create');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -223,7 +223,7 @@ final class BackendController extends Controller
|
||||||
->with('comments/media')
|
->with('comments/media')
|
||||||
->with('comments/createdBy')
|
->with('comments/createdBy')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', (int) $request->getData('id'))
|
||||||
->where('tags/title/language', $response->getLanguage())
|
->where('tags/title/language', $response->header->l11n->language)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$accountId = $request->header->account;
|
$accountId = $request->header->account;
|
||||||
|
|
@ -238,8 +238,8 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-card');
|
$view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-card');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response);
|
||||||
$view->setData('card', $card);
|
$view->data['card'] = $card;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@ use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \phpOMS\Views\View $this */
|
/** @var \phpOMS\Views\View $this */
|
||||||
/** @var \Modules\News\Models\NewsArticle[] $boards */
|
/** @var \Modules\News\Models\NewsArticle[] $boards */
|
||||||
$boards = $this->getData('boards') ?? [];
|
$boards = $this->data['boards'] ?? [];
|
||||||
|
|
||||||
$previous = empty($boards) ? 'kanban/archive' : 'kanban/archive?{?}&id=' . \reset($boards)->id . '&ptype=p';
|
$previous = empty($boards) ? 'kanban/archive' : 'kanban/archive?{?}&id=' . \reset($boards)->id . '&ptype=p';
|
||||||
$next = empty($boards) ? 'kanban/archive' : 'kanban/archive?{?}&id=' . \end($boards)->id . '&ptype=n';
|
$next = empty($boards) ? 'kanban/archive' : 'kanban/archive?{?}&id=' . \end($boards)->id . '&ptype=n';
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
echo $this->getData('nav')->render();
|
echo $this->data['nav']->render();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
/** @var \Modules\Kanban\Models\KanbanBoard $board */
|
/** @var \Modules\Kanban\Models\KanbanBoard $board */
|
||||||
$board = $this->getData('board');
|
$board = $this->data['board'];
|
||||||
|
|
||||||
/** @var \Modules\Kanban\Models\KanbanColumn[] $columns */
|
/** @var \Modules\Kanban\Models\KanbanColumn[] $columns */
|
||||||
$columns = $board->getColumns();
|
$columns = $board->getColumns();
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \Modules\Kanban\Models\KanbanCard $card */
|
/** @var \Modules\Kanban\Models\KanbanCard $card */
|
||||||
$card = $this->getData('card');
|
$card = $this->data['card'];
|
||||||
|
|
||||||
$comments = $card->getComments();
|
$comments = $card->getComments();
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,12 @@ declare(strict_types=1);
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \Modules\Kanban\Models\KanbanBoard[] $boards */
|
/** @var \Modules\Kanban\Models\KanbanBoard[] $boards */
|
||||||
$boards = $this->getData('boards');
|
$boards = $this->data['boards'];
|
||||||
|
|
||||||
$previous = empty($boards) ? 'kanban/dashboard' : 'kanban/dashboard?{?}&id=' . \reset($boards)->id . '&ptype=p';
|
$previous = empty($boards) ? 'kanban/dashboard' : 'kanban/dashboard?{?}&id=' . \reset($boards)->id . '&ptype=p';
|
||||||
$next = empty($boards) ? 'kanban/dashboard' : 'kanban/dashboard?{?}&id=' . \end($boards)->id . '&ptype=n';
|
$next = empty($boards) ? 'kanban/dashboard' : 'kanban/dashboard?{?}&id=' . \end($boards)->id . '&ptype=n';
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<?php if (empty($boards)) : ?>
|
<?php if (empty($boards)) : ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user