From bb0bcabb2eaf98434f17c54f5980a6d12b12b50d Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 1 Aug 2023 12:58:32 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20board=20procedure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/manage/boards/index.tsx | 50 ++++++++++++++++++++++++------- src/server/api/root.ts | 2 ++ src/server/api/routers/board.ts | 25 ++++++++++++++++ 3 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 src/server/api/routers/board.ts diff --git a/src/pages/manage/boards/index.tsx b/src/pages/manage/boards/index.tsx index bdf7c054c..7d6c5831c 100644 --- a/src/pages/manage/boards/index.tsx +++ b/src/pages/manage/boards/index.tsx @@ -8,12 +8,19 @@ import { LoadingOverlay, Menu, SimpleGrid, + Stack, Text, Title, } from '@mantine/core'; import { useListState } from '@mantine/hooks'; import { modals } from '@mantine/modals'; -import { IconDotsVertical, IconFolderFilled, IconPlus, IconTrash } from '@tabler/icons-react'; +import { + IconApps, + IconDotsVertical, + IconFolderFilled, + IconPlus, + IconTrash, +} from '@tabler/icons-react'; import Link from 'next/link'; import { ManageLayout } from '~/components/layout/Templates/ManageLayout'; import { CommonHeader } from '~/components/layout/common-header'; @@ -21,7 +28,7 @@ import { sleep } from '~/tools/client/time'; import { api } from '~/utils/api'; const BoardsPage = () => { - const { data } = api.config.all.useQuery(); + const { data } = api.boards.all.useQuery(); const [deletingDashboards, { append, filter }] = useListState([]); @@ -60,10 +67,10 @@ const BoardsPage = () => { > {data.map((board, index) => ( - + - {board} + {board.name} @@ -72,10 +79,31 @@ const BoardsPage = () => { - - With Fjord Tours you can explore more of the magical fjord landscapes with tours and - activities on and around the fjords of Norway - + + + + + Apps + + {board.countApps} + + + + + + Widgets + + {board.countWidgets} + + + + + + Categories + + {board.countCategories} + +