mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-16 12:18:40 +00:00
bug fixes / dbmapper fixes
This commit is contained in:
parent
6b42f1394f
commit
67ecfeffca
|
|
@ -18,7 +18,6 @@ use Modules\Kanban\Models\KanbanBoardMapper;
|
||||||
use Modules\Kanban\Models\KanbanCardMapper;
|
use Modules\Kanban\Models\KanbanCardMapper;
|
||||||
use Modules\Kanban\Models\PermissionState;
|
use Modules\Kanban\Models\PermissionState;
|
||||||
use phpOMS\Account\PermissionType;
|
use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Algorithm\Sort\SortOrder;
|
|
||||||
use phpOMS\Asset\AssetType;
|
use phpOMS\Asset\AssetType;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
use phpOMS\DataStorage\Database\Query\OrderType;
|
use phpOMS\DataStorage\Database\Query\OrderType;
|
||||||
|
|
@ -105,7 +104,7 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
$board = KanbanBoardMapper::get()
|
$board = KanbanBoardMapper::get()
|
||||||
->with('columns')
|
->with('columns')
|
||||||
->with('columns/cards')
|
->with('columns/cards')
|
||||||
->with('columns/cards/tags')
|
->with('columns/cards/tags')
|
||||||
|
|
|
||||||
|
|
@ -35,15 +35,15 @@ final class KanbanBoardMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'],
|
'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'],
|
'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'],
|
'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'],
|
||||||
'kanban_board_descraw' => ['name' => 'kanban_board_descraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
'kanban_board_descraw' => ['name' => 'kanban_board_descraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||||
'kanban_board_status' => ['name' => 'kanban_board_status', 'type' => 'int', 'internal' => 'status'],
|
'kanban_board_status' => ['name' => 'kanban_board_status', 'type' => 'int', 'internal' => 'status'],
|
||||||
'kanban_board_order' => ['name' => 'kanban_board_order', 'type' => 'int', 'internal' => 'order'],
|
'kanban_board_order' => ['name' => 'kanban_board_order', 'type' => 'int', 'internal' => 'order'],
|
||||||
'kanban_board_style' => ['name' => 'kanban_board_style', 'type' => 'string', 'internal' => 'style'],
|
'kanban_board_style' => ['name' => 'kanban_board_style', 'type' => 'string', 'internal' => 'style'],
|
||||||
'kanban_board_created_by' => ['name' => 'kanban_board_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
'kanban_board_created_by' => ['name' => 'kanban_board_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||||
'kanban_board_created_at' => ['name' => 'kanban_board_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
'kanban_board_created_at' => ['name' => 'kanban_board_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -54,10 +54,10 @@ final class KanbanBoardMapper extends DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public const HAS_MANY = [
|
public const HAS_MANY = [
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'mapper' => KanbanColumnMapper::class,
|
'mapper' => KanbanColumnMapper::class,
|
||||||
'table' => 'kanban_column',
|
'table' => 'kanban_column',
|
||||||
'self' => 'kanban_column_board',
|
'self' => 'kanban_column_board',
|
||||||
'external' => null,
|
'external' => null,
|
||||||
],
|
],
|
||||||
'tags' => [
|
'tags' => [
|
||||||
'mapper' => TagMapper::class,
|
'mapper' => TagMapper::class,
|
||||||
|
|
@ -75,8 +75,8 @@ final class KanbanBoardMapper extends DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public const BELONGS_TO = [
|
public const BELONGS_TO = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
'external' => 'kanban_board_created_by',
|
'external' => 'kanban_board_created_by',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@ final class KanbanCardCommentMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'kanban_card_comment_id' => ['name' => 'kanban_card_comment_id', 'type' => 'int', 'internal' => 'id'],
|
'kanban_card_comment_id' => ['name' => 'kanban_card_comment_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'kanban_card_comment_description' => ['name' => 'kanban_card_comment_description', 'type' => 'string', 'internal' => 'description'],
|
'kanban_card_comment_description' => ['name' => 'kanban_card_comment_description', 'type' => 'string', 'internal' => 'description'],
|
||||||
'kanban_card_comment_descriptionraw' => ['name' => 'kanban_card_comment_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
'kanban_card_comment_descriptionraw' => ['name' => 'kanban_card_comment_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||||
'kanban_card_comment_card' => ['name' => 'kanban_card_comment_card', 'type' => 'int', 'internal' => 'card'],
|
'kanban_card_comment_card' => ['name' => 'kanban_card_comment_card', 'type' => 'int', 'internal' => 'card'],
|
||||||
'kanban_card_comment_created_at' => ['name' => 'kanban_card_comment_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
'kanban_card_comment_created_at' => ['name' => 'kanban_card_comment_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||||
'kanban_card_comment_created_by' => ['name' => 'kanban_card_comment_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
'kanban_card_comment_created_by' => ['name' => 'kanban_card_comment_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -66,8 +66,8 @@ final class KanbanCardCommentMapper extends DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public const BELONGS_TO = [
|
public const BELONGS_TO = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
'external' => 'kanban_card_comment_created_by',
|
'external' => 'kanban_card_comment_created_by',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,19 +36,19 @@ final class KanbanCardMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
|
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
|
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
|
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
|
||||||
'kanban_card_descriptionraw' => ['name' => 'kanban_card_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
'kanban_card_descriptionraw' => ['name' => 'kanban_card_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||||
'kanban_card_style' => ['name' => 'kanban_card_style', 'type' => 'string', 'internal' => 'style'],
|
'kanban_card_style' => ['name' => 'kanban_card_style', 'type' => 'string', 'internal' => 'style'],
|
||||||
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
|
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
|
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
|
||||||
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
|
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
|
||||||
'kanban_card_color' => ['name' => 'kanban_card_color', 'type' => 'string', 'internal' => 'color'],
|
'kanban_card_color' => ['name' => 'kanban_card_color', 'type' => 'string', 'internal' => 'color'],
|
||||||
'kanban_card_ref' => ['name' => 'kanban_card_ref', 'type' => 'int', 'internal' => 'ref'],
|
'kanban_card_ref' => ['name' => 'kanban_card_ref', 'type' => 'int', 'internal' => 'ref'],
|
||||||
'kanban_card_column' => ['name' => 'kanban_card_column', 'type' => 'int', 'internal' => 'column'],
|
'kanban_card_column' => ['name' => 'kanban_card_column', 'type' => 'int', 'internal' => 'column'],
|
||||||
'kanban_card_created_at' => ['name' => 'kanban_card_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
'kanban_card_created_at' => ['name' => 'kanban_card_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||||
'kanban_card_created_by' => ['name' => 'kanban_card_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
'kanban_card_created_by' => ['name' => 'kanban_card_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -59,8 +59,8 @@ final class KanbanCardMapper extends DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public const BELONGS_TO = [
|
public const BELONGS_TO = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
'external' => 'kanban_card_created_by',
|
'external' => 'kanban_card_created_by',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -78,10 +78,10 @@ final class KanbanCardMapper extends DataMapperFactory
|
||||||
'self' => 'kanban_card_media_src',
|
'self' => 'kanban_card_media_src',
|
||||||
],
|
],
|
||||||
'comments' => [
|
'comments' => [
|
||||||
'mapper' => KanbanCardCommentMapper::class,
|
'mapper' => KanbanCardCommentMapper::class,
|
||||||
'table' => 'kanban_card_comment',
|
'table' => 'kanban_card_comment',
|
||||||
'self' => 'kanban_card_comment_card',
|
'self' => 'kanban_card_comment_card',
|
||||||
'external' => null,
|
'external' => null,
|
||||||
],
|
],
|
||||||
'tags' => [
|
'tags' => [
|
||||||
'mapper' => TagMapper::class,
|
'mapper' => TagMapper::class,
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@ final class KanbanColumnMapper extends DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public const HAS_MANY = [
|
public const HAS_MANY = [
|
||||||
'cards' => [
|
'cards' => [
|
||||||
'mapper' => KanbanCardMapper::class,
|
'mapper' => KanbanCardMapper::class,
|
||||||
'table' => 'kanban_card',
|
'table' => 'kanban_card',
|
||||||
'self' => 'kanban_card_column',
|
'self' => 'kanban_card_column',
|
||||||
'external' => null,
|
'external' => null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,14 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 8.0
|
||||||
|
*
|
||||||
|
* @package Template
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user