mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-10 17:28:41 +00:00
bug fixes
This commit is contained in:
parent
9136fbabd3
commit
32b4dab4cd
161
Admin/Routes/Web/Api.php
Normal file
161
Admin/Routes/Web/Api.php
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.2
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.2
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Modules\Kanban\Controller\ApiController;
|
||||||
|
use Modules\Kanban\Models\PermissionCategory;
|
||||||
|
use phpOMS\Account\PermissionType;
|
||||||
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
|
return [
|
||||||
|
'^.*/kanban(\?.*|$)' => [
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanBoardCreate',
|
||||||
|
'verb' => RouteVerb::PUT,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::CREATE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanBoardUpdate',
|
||||||
|
'verb' => RouteVerb::SET,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::MODIFY,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanBoardDelete',
|
||||||
|
'verb' => RouteVerb::DELETE,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::DELETE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'^.*/kanban/column(\?.*|$)' => [
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanColumnCreate',
|
||||||
|
'verb' => RouteVerb::PUT,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::CREATE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanColumnUpdate',
|
||||||
|
'verb' => RouteVerb::SET,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::MODIFY,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanColumnDelete',
|
||||||
|
'verb' => RouteVerb::DELETE,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::DELETE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'^.*/kanban/card(\?.*|$)' => [
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanCardCreate',
|
||||||
|
'verb' => RouteVerb::PUT,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::CREATE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanCardUpdate',
|
||||||
|
'verb' => RouteVerb::SET,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::MODIFY,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanCardDelete',
|
||||||
|
'verb' => RouteVerb::DELETE,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::DELETE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'^.*/kanban/comment(\?.*|$)' => [
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanCommentCreate',
|
||||||
|
'verb' => RouteVerb::PUT,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::CREATE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanCommentUpdate',
|
||||||
|
'verb' => RouteVerb::SET,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::MODIFY,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Kanban\Controller\ApiController:apiKanbanCommentDelete',
|
||||||
|
'verb' => RouteVerb::DELETE,
|
||||||
|
'csrf' => true,
|
||||||
|
'active' => true,
|
||||||
|
'permission' => [
|
||||||
|
'module' => ApiController::NAME,
|
||||||
|
'type' => PermissionType::DELETE,
|
||||||
|
'state' => PermissionCategory::BOARD,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
@ -23,7 +23,10 @@ echo $this->data['nav']->render();
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<form action="<?= \phpOMS\Uri\UriFactory::build('{/api}kanban?csrf={$CSRF}'); ?>" method="<?= $isNew ? 'PUT' : 'POST'; ?>">
|
<form
|
||||||
|
action="<?= \phpOMS\Uri\UriFactory::build('{/api}kanban?csrf={$CSRF}'); ?>"
|
||||||
|
method="<?= $isNew ? 'PUT' : 'POST'; ?>"
|
||||||
|
<?= $isNew ? 'data-redirect="' . UriFactory::build('{/base}/kanban/board') . '?id={/0/response/id}"' : ''; ?>>
|
||||||
<div class="portlet-head"><?= $this->getHtml('Board'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Board'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user