Добавлены страницы для списка дашбордов и отображения отдельного дашборда
This commit is contained in:
parent
14e0108f02
commit
0e28eba615
5 changed files with 91 additions and 38 deletions
24
frontend/src/.eslintrc.js
Normal file
24
frontend/src/.eslintrc.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['@typescript-eslint/eslint-plugin'],
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
jest: true,
|
||||
},
|
||||
ignorePatterns: ['.eslintrc.js'],
|
||||
rules: {
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
};
|
||||
8
frontend/src/dashboard/dashboard-page.tsx
Normal file
8
frontend/src/dashboard/dashboard-page.tsx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import React from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
export const DashboardPage = (): JSX.Element => {
|
||||
const params = useParams();
|
||||
const id = params.id as string;
|
||||
return <p>Dashboard</p>;
|
||||
};
|
||||
6
frontend/src/dashboard/dashboards-page.tsx
Normal file
6
frontend/src/dashboard/dashboards-page.tsx
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import React from 'react';
|
||||
|
||||
export const DashboardsPage = (): JSX.Element => {
|
||||
// TODO: code for DashboardsPage
|
||||
return <p>Dashboards</p>;
|
||||
};
|
||||
|
|
@ -15,8 +15,13 @@ export const KanbanBoardsPage = (): JSX.Element => {
|
|||
});
|
||||
// DEBUG: end
|
||||
|
||||
const store = Stores.PageStore.create({loaded: false, type: type, name: name, data: null});
|
||||
const store = Stores.PageStore.create({
|
||||
loaded: false,
|
||||
type: type,
|
||||
name: name,
|
||||
data: null,
|
||||
});
|
||||
Stores.PageStoreLoadData(store);
|
||||
|
||||
return <KBS.KanbanBoards store={store}/>;
|
||||
}
|
||||
return <KBS.KanbanBoards store={store} />;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,25 +1,35 @@
|
|||
import React from "react";
|
||||
import { createBrowserRouter } from "react-router-dom";
|
||||
import StartPage from "./start-page/start-page";
|
||||
import UnknownPage from "./unknown-page";
|
||||
import { KanbanBoardsPage } from "./kanban-board/kanban-boards-page";
|
||||
import { IssuesListBoardPage } from "./issues-list-board/issues-list-boards-page";
|
||||
import React from 'react';
|
||||
import { createBrowserRouter } from 'react-router-dom';
|
||||
import StartPage from './start-page/start-page';
|
||||
import UnknownPage from './unknown-page';
|
||||
import { KanbanBoardsPage } from './kanban-board/kanban-boards-page';
|
||||
import { IssuesListBoardPage } from './issues-list-board/issues-list-boards-page';
|
||||
import { DashboardsPage } from './dashboard/dashboards-page';
|
||||
import { DashboardPage } from './dashboard/dashboard-page';
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
{
|
||||
path: "/",
|
||||
element: (<StartPage/>),
|
||||
path: '/',
|
||||
element: <StartPage />,
|
||||
},
|
||||
{
|
||||
path: "/kanban-board/:type/:name",
|
||||
element: (<KanbanBoardsPage/>)
|
||||
path: '/kanban-board/:type/:name',
|
||||
element: <KanbanBoardsPage />,
|
||||
},
|
||||
{
|
||||
path: "/issues-list-board/:type/:name",
|
||||
element: (<IssuesListBoardPage/>)
|
||||
path: '/issues-list-board/:type/:name',
|
||||
element: <IssuesListBoardPage />,
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
element: (<UnknownPage/>)
|
||||
}
|
||||
path: '/dashboards',
|
||||
element: <DashboardsPage />,
|
||||
},
|
||||
{
|
||||
path: '/dashboard/:id',
|
||||
element: <DashboardPage />,
|
||||
},
|
||||
{
|
||||
path: '*',
|
||||
element: <UnknownPage />,
|
||||
},
|
||||
]);
|
||||
Loading…
Reference in a new issue