From 21e71c4ec2b1598180cfb7ae881cbd71e4d07a49 Mon Sep 17 00:00:00 2001 From: Onur Arslan Date: Thu, 23 Nov 2023 21:36:13 +0100 Subject: [PATCH 01/17] [Layout] Modify the Entities to be in a collapsible submenu - implemented collapsible submenu for Entities --- pkgs/ui/src/components/sidebar/index.tsx | 308 ++++++++++++++--------- 1 file changed, 186 insertions(+), 122 deletions(-) diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index 50eaf33..fd1cf76 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -1,16 +1,17 @@ import { - Divider, - IconButton, - List, - ListItem, - ListItemButton, - ListItemIcon, - ListItemText, + Divider, + IconButton, + List, + ListItem, + ListItemButton, + ListItemIcon, + ListItemText, } from "@mui/material"; import Image from "next/image"; -import React, { ReactNode } from "react"; +import React, {ReactNode} from "react"; -import { tw } from "@/utils/tailwind"; +import {tw} from "@/utils/tailwind"; +import Collapse from '@mui/material/Collapse'; import Link from "next/link"; import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; import HomeIcon from "@mui/icons-material/Home"; @@ -18,134 +19,197 @@ import HubIcon from "@mui/icons-material/Hub"; import PersonIcon from "@mui/icons-material/Person"; import RouterIcon from "@mui/icons-material/Router"; import StorageIcon from "@mui/icons-material/Storage"; +import ExpandLess from '@mui/icons-material/ExpandLess'; +import ExpandMore from '@mui/icons-material/ExpandMore'; type MenuEntry = { - icon: ReactNode; - label: string; - to: string; - disabled: boolean; + icon: ReactNode; + label: string; + to: string; + disabled: boolean; } & { - subMenuEntries?: MenuEntry[]; + subMenuEntries?: MenuEntry[]; }; +const menuEntityEntries: MenuEntry[] = [ + { + icon: , + label: "C1", + to: "/client-1", + disabled: false, + }, + { + icon: , + label: "C2", + to: "/client-2", + disabled: false, + } +]; + const menuEntries: MenuEntry[] = [ - { - icon: , - label: "Home", - to: "/", - disabled: false, - }, - { - icon: , - label: "Entities", - to: "/entities", - disabled: true, - }, - { - icon: , - label: "C1", - to: "/client-1", - disabled: false, - }, - { - icon: , - label: "C2", - to: "/client-2", - disabled: false, - }, - { - icon: , - label: "AP", - to: "/access-point", - disabled: false, - }, - { - icon: , - label: "DLG", - to: "/distributed-ledger-gateway", - disabled: false, - }, + { + icon: , + label: "Home", + to: "/", + disabled: false, + }, + { + icon: , + label: "Entities", + to: "/entities", + disabled: false, + }, + { + icon: , + label: "AP", + to: "/access-point", + disabled: false, + }, + { + icon: , + label: "DLG", + to: "/distributed-ledger-gateway", + disabled: false, + }, ]; const hideSidebar = tw`-translate-x-14 lg:-translate-x-64`; const showSidebar = tw`lg:translate-x-0`; interface SidebarProps { - show: boolean; - onClose: () => void; + show: boolean; + onClose: () => void; } + export function Sidebar(props: SidebarProps) { - const { show, onClose } = props; + const {show, onClose} = props; + const [activeMenuItem, setActiveMenuItem] = React.useState("/"); + const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true); - const [activeMenuItem, setActiveMenuItem] = React.useState("/"); + const handleCollapseClick = () => { + setCollapseMenuOpen(!collapseMenuOpen); + }; - const handleMenuItemClick = (path: string) => { - setActiveMenuItem(path); - }; + const handleMenuItemClick = (path: string) => { + setActiveMenuItem(path); + }; - return ( - - ); + return ( + + ); } From 7f6eab34087727cbd715fb064e5d9610ad79442d Mon Sep 17 00:00:00 2001 From: Onur Arslan Date: Thu, 23 Nov 2023 21:42:21 +0100 Subject: [PATCH 02/17] [Layout] Modify the Entities to be in a collapsible submenu - fixed the activeTab if refresh site --- pkgs/ui/src/components/sidebar/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index fd1cf76..cf29792 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -83,7 +83,7 @@ interface SidebarProps { export function Sidebar(props: SidebarProps) { const {show, onClose} = props; - const [activeMenuItem, setActiveMenuItem] = React.useState("/"); + const [activeMenuItem, setActiveMenuItem] = React.useState(window.location.pathname); const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true); const handleCollapseClick = () => { From 64d88244b8e1f567ad344a59ed3718d215e192d9 Mon Sep 17 00:00:00 2001 From: Onur Arslan Date: Thu, 23 Nov 2023 22:10:26 +0100 Subject: [PATCH 03/17] [Layout] Modify the Entities to be in a collapsible submenu - small fix for window pathname --- pkgs/ui/src/components/sidebar/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index cf29792..18970b1 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -83,7 +83,7 @@ interface SidebarProps { export function Sidebar(props: SidebarProps) { const {show, onClose} = props; - const [activeMenuItem, setActiveMenuItem] = React.useState(window.location.pathname); + const [activeMenuItem, setActiveMenuItem] = React.useState(typeof window !== "undefined" ? window.location.pathname : ""); const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true); const handleCollapseClick = () => { From b96a150c78a22f4c5843ad038c02d7fcdb46c025 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Thu, 23 Nov 2023 22:33:27 +0100 Subject: [PATCH 04/17] [Layout] Update current Logo - add tub image --- pkgs/ui/public/tub-logo.png | Bin 0 -> 17272 bytes pkgs/ui/src/components/sidebar/index.tsx | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 pkgs/ui/public/tub-logo.png diff --git a/pkgs/ui/public/tub-logo.png b/pkgs/ui/public/tub-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..3c9bb7cff52a950d8bda21db0a60dff959f61214 GIT binary patch literal 17272 zcmeAS@N?(olHy`uVBq!ia0y~yV2WU1VBEpM#=yWZ^VH143=9lxN#5=*4F5rJ!QSPQ z85k58JY5_^D(1YsTe(LrJ@U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001 diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index 18970b1..af2e924 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -104,8 +104,8 @@ export function Sidebar(props: SidebarProps) {
TUB Logo Date: Thu, 23 Nov 2023 22:47:37 +0100 Subject: [PATCH 05/17] [Layout] Change Favicon to TUB --- pkgs/ui/public/tub-favicon.ico | Bin 0 -> 1406 bytes pkgs/ui/public/tub-favicon.png | Bin 0 -> 1002 bytes pkgs/ui/src/app/layout.tsx | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 pkgs/ui/public/tub-favicon.ico create mode 100644 pkgs/ui/public/tub-favicon.png diff --git a/pkgs/ui/public/tub-favicon.ico b/pkgs/ui/public/tub-favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..fa7d7a5b38c5cbe52bf23ce5b9100072f52ec565 GIT binary patch literal 1406 zcmZQzU}Ruq5D);-91Iz(3=Con3=A3!3=9Gc3=9ek5OD?&U<46R3}S;Y0|SFR-%*mV z0^d;vX`Ukt+)M`;B)Ja5^~&)cWl$44&fsowo5MT_C zi%(!=WME(nk6>YqWQ>YdFpY_gWMp6r2n-4i2{lX%(@C_p2xnmQ@=i?ju{TNdH8n}} z^JidWbV*EfbxTZix3JFf@MK_QluJysvo}dJc5uvga%Ny;v`9>}w6adLwy?>{v}Ism z)Hg^pG%`*!F*VD`G-qI7R8!Z`)Y48&)X_~#*OQi!m6MlOP*h4xR8~nzRTWQ!0}08b zWGO*7H&IAfL{yBOgOdvkIJtRv`S=Bxm|0lCfQ1d@8;rmLWu^b^3=9Vu85j;QK=1QUNSs54@ z6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dcykO3*KpO@IMy~*$5LX5U zhNFD)L?DGDJkkf4xDRtlLKXAM9T!tOZ{dDYRu?M5BYRrS49do4<}m@qQ_9BJ74XWP zkkrH~b%a~ygtRt_6tCPd5f!KiSmR}n&||_d5o}gN6_YD@?eue-4|G#=3ah!pHA+aRLFPMRWSy)nnuk7Njn+L79B_t$1 z&#Aw2@%>5f)bPUh z|4Qf8r$6}_#kwi$`dux~Wp{4)h@NB=;gD}V5YNubec8Wi4+8@OW0JSKOYUwqhP4a~ z4D2PIzOL+#8HKobEK`HcL2-Z9)5S4F;&O6=1G~=|oizyu4jnteA(Zg^!4oECzdX4( zyE;a;gDw^VLSllV$pY>i9v*6{-i98hPn0uV1)w$Service Aware Networks - + @@ -88,8 +88,8 @@ export default function RootLayout({
TUB Logo Date: Thu, 23 Nov 2023 22:59:13 +0100 Subject: [PATCH 06/17] [Layout] Change Favicon to TUB - remove current favicon --- pkgs/ui/public/tub-favicon.ico | Bin 1406 -> 0 bytes pkgs/ui/src/app/layout.tsx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 pkgs/ui/public/tub-favicon.ico diff --git a/pkgs/ui/public/tub-favicon.ico b/pkgs/ui/public/tub-favicon.ico deleted file mode 100644 index fa7d7a5b38c5cbe52bf23ce5b9100072f52ec565..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmZQzU}Ruq5D);-91Iz(3=Con3=A3!3=9Gc3=9ek5OD?&U<46R3}S;Y0|SFR-%*mV z0^d;vX`Ukt+)M`;B)Ja5^~&)cWl$44&fsowo5MT_C zi%(!=WME(nk6>YqWQ>YdFpY_gWMp6r2n-4i2{lX%(@C_p2xnmQ@=i?ju{TNdH8n}} z^JidWbV*EfbxTZix3JFf@MK_QluJysvo}dJc5uvga%Ny;v`9>}w6adLwy?>{v}Ism z)Hg^pG%`*!F*VD`G-qI7R8!Z`)Y48&)X_~#*OQi!m6MlOP*h4xR8~nzRTWQ!0}08b zWGO*7H&IAfL{yBOgOdvkIJtRv`S=Bxm|0lCfQ1d@8;rmLWu^b^3=9Vu85j;QK=1Service Aware Networks - + From 2b500fa42ae3de31be994276b97b390427405929 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Thu, 23 Nov 2023 23:18:19 +0100 Subject: [PATCH 07/17] [Layout] Change Favicon to TUB - update favicon --- pkgs/ui/public/tub-favicon.ico | Bin 0 -> 1150 bytes pkgs/ui/src/app/layout.tsx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 pkgs/ui/public/tub-favicon.ico diff --git a/pkgs/ui/public/tub-favicon.ico b/pkgs/ui/public/tub-favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..44973f83791cb04a153a83d6a616effa2e634ec7 GIT binary patch literal 1150 zcmZQzU}Ruq5D);-3Je)63=Con3=A3!3=9Gc3=9ek5OD?&U;z>I$MSqf8Rhwovdi-w z<(20<%8kthP&Fd*d`Bha`Ho7+^Bv^?sgvhBDlgA>v{jz(XpcPK(JFbqqX*>qj>f~} zL25u)p6@89Jm1k}@_a|{$nzb&AisMvL={V@JrdA_4sAiXdw&v$elR4qt< zy*%I1bR_;0sGZ*x_`&Y^DbIH_3Z@rC%kv%WL{dK$&HndtyhjT)B~QFh488V0)Z_9$ z72#v0Abl_lH6LU*2(OaoJL)0NcNFAT5FbPr%kdt467F^Re_ry<|0*KKdSQA&v^?L@ zIC;LK|DbLFg`2HB-_iF_KFHryGTcY5d)r+A>(`b(u@s~ahUNK=n#uDW-6+p@bh|v? z(FyW=NA>0Tjy{I!2f3j|j`!#ZANz~{lf$q7*OWZ5SDx>vfjr;QYI(k+9Z>)G%JUrs zVNiTek>@-54oUwcMS){Gg556vFG#)h-&pz7WqH1%SCHgEcHqN{WO1hy&*k}!ekMWx968>j^=e|r@3>o>zo9F8@}fN7(K30yqaga0Jm1lqI50@=pgiAE zD+Ruz+|oQpB)FLlNJw%W2BmXmdA_5Service Aware Networks - + From 99821a1f81da7926d5e9b0c7f503358df97a0228 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Thu, 23 Nov 2023 23:18:55 +0100 Subject: [PATCH 08/17] [Layout] Update current Logo - adjust size of tub logo --- pkgs/ui/src/components/sidebar/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index af2e924..b70f66f 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -106,8 +106,8 @@ export function Sidebar(props: SidebarProps) { TU Berlin Logo
From 417ca354fcf9449cc3c31ea6fe0c6fdd6a8001fc Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Thu, 23 Nov 2023 23:28:46 +0100 Subject: [PATCH 09/17] [Layout] Update current Logo - adjust size of tub logo --- pkgs/ui/src/components/sidebar/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index b70f66f..77ae189 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -106,8 +106,8 @@ export function Sidebar(props: SidebarProps) { TU Berlin Logo
From 12c34c33a2dc7cbc4d1159d1ad0cf7a6b52b6d61 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 00:08:20 +0100 Subject: [PATCH 10/17] [Entities] C1 Consumer View Table - create and add data to the consumer table --- pkgs/ui/src/app/client-1/page.tsx | 10 ++++- pkgs/ui/src/mock/client_1/index.ts | 64 ++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/pkgs/ui/src/app/client-1/page.tsx b/pkgs/ui/src/app/client-1/page.tsx index e290a0b..8aa6167 100644 --- a/pkgs/ui/src/app/client-1/page.tsx +++ b/pkgs/ui/src/app/client-1/page.tsx @@ -1,7 +1,8 @@ "use client"; import SummaryDetails from "@/components/summary_card"; -import { Client1SummaryDetails } from "@/mock/client_1"; +import { Client1SummaryDetails, Client1DummyData, Client1TableConfig } from "@/mock/client_1"; +import CustomTable from "@/components/table"; export default function Client1() { return ( @@ -14,6 +15,13 @@ export default function Client1() { details: Client1SummaryDetails, }} /> +
+

Consumer View

+ +
); } diff --git a/pkgs/ui/src/mock/client_1/index.ts b/pkgs/ui/src/mock/client_1/index.ts index 030cc7f..87ce8fe 100644 --- a/pkgs/ui/src/mock/client_1/index.ts +++ b/pkgs/ui/src/mock/client_1/index.ts @@ -14,3 +14,67 @@ export const Client1SummaryDetails = [ value: "Carlo's Home Network", }, ]; + +export const Client1DummyData = [ + { + "service_name": "Carlo's Printing", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:1223", + "network": "Carlo's Home Network", + }, + { + "service_name": "Steve's Printing", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:1234", + "network": "Steve's Home Network", + }, + { + "service_name": "Test A", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:4567", + "network": "Test Network A", + }, + { + "service_name": "Test B", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:0062", + "network": "Test Network B", + }, + +] + + +export const Client1TableConfig = [ + { + key: "service_name", + label: "Service name" + }, + { + key: "service_type", + label: "Service Type" + }, + { + key: "end_point", + label: "End Point" + }, + { + key: "producer", + label: "Producer" + }, + { + key: "producer_did", + label: "Producer DID" + }, + { + key: "network", + label: "Network" + } +] From 58f252204b1eda2e049f0d8e0b61e0aaca0df031 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 00:11:10 +0100 Subject: [PATCH 11/17] [Entities] C1 Consumer View Table - refactoring --- pkgs/ui/src/app/client-1/page.tsx | 6 +++--- pkgs/ui/src/mock/client_1/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/ui/src/app/client-1/page.tsx b/pkgs/ui/src/app/client-1/page.tsx index 8aa6167..cb39bfc 100644 --- a/pkgs/ui/src/app/client-1/page.tsx +++ b/pkgs/ui/src/app/client-1/page.tsx @@ -1,7 +1,7 @@ "use client"; import SummaryDetails from "@/components/summary_card"; -import { Client1SummaryDetails, Client1DummyData, Client1TableConfig } from "@/mock/client_1"; +import { Client1SummaryDetails, Client1ConsumerData, Client1ConsumerTableConfig } from "@/mock/client_1"; import CustomTable from "@/components/table"; export default function Client1() { @@ -18,8 +18,8 @@ export default function Client1() {

Consumer View

diff --git a/pkgs/ui/src/mock/client_1/index.ts b/pkgs/ui/src/mock/client_1/index.ts index 87ce8fe..d374e38 100644 --- a/pkgs/ui/src/mock/client_1/index.ts +++ b/pkgs/ui/src/mock/client_1/index.ts @@ -15,7 +15,7 @@ export const Client1SummaryDetails = [ }, ]; -export const Client1DummyData = [ +export const Client1ConsumerData = [ { "service_name": "Carlo's Printing", "service_type": "3D Printing", @@ -52,7 +52,7 @@ export const Client1DummyData = [ ] -export const Client1TableConfig = [ +export const Client1ConsumerTableConfig = [ { key: "service_name", label: "Service name" From e93c6bb7eed35da354704c33c37516afb7f90756 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 00:19:11 +0100 Subject: [PATCH 12/17] [Entities] C1 Producer View Table - create and add data to the producer table --- pkgs/ui/src/app/client-1/page.tsx | 15 ++++++- pkgs/ui/src/mock/client_1/index.ts | 64 +++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 3 deletions(-) diff --git a/pkgs/ui/src/app/client-1/page.tsx b/pkgs/ui/src/app/client-1/page.tsx index cb39bfc..4d74186 100644 --- a/pkgs/ui/src/app/client-1/page.tsx +++ b/pkgs/ui/src/app/client-1/page.tsx @@ -1,7 +1,13 @@ "use client"; import SummaryDetails from "@/components/summary_card"; -import { Client1SummaryDetails, Client1ConsumerData, Client1ConsumerTableConfig } from "@/mock/client_1"; +import { + Client1SummaryDetails, + Client1ConsumerData, + Client1ConsumerTableConfig, + Client1ProducerTableConfig, + Client1ProducerData +} from "@/mock/client_1"; import CustomTable from "@/components/table"; export default function Client1() { @@ -22,6 +28,13 @@ export default function Client1() { configuration={Client1ConsumerTableConfig} /> +
+

Producer View

+ +
); } diff --git a/pkgs/ui/src/mock/client_1/index.ts b/pkgs/ui/src/mock/client_1/index.ts index d374e38..fbbe0d5 100644 --- a/pkgs/ui/src/mock/client_1/index.ts +++ b/pkgs/ui/src/mock/client_1/index.ts @@ -48,10 +48,8 @@ export const Client1ConsumerData = [ "producer_did": "did:sov:test:0062", "network": "Test Network B", }, - ] - export const Client1ConsumerTableConfig = [ { key: "service_name", @@ -78,3 +76,65 @@ export const Client1ConsumerTableConfig = [ label: "Network" } ] + +export const Client1ProducerData = [ + { + "service_name": "Carlo's Printing", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "DRAFT, REGISTERED", + "action": "Register, Deregister, Delete", + }, + { + "service_name": "Steve's Printing", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "REGISTERED", + "action": "Create", + }, + { + "service_name": "Test Printing A", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "DRAFT", + "action": "Register, Deregister", + }, + { + "service_name": "Test Printing B", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "DRAFT, REGISTERED", + "action": "Delete, Create", + }, +] + +export const Client1ProducerTableConfig = [ + { + key: "service_name", + label: "Service name" + }, + { + key: "service_type", + label: "Service Type" + }, + { + key: "end_point", + label: "End Point" + }, + { + key: "usage", + label: "Usage" + }, + { + key: "status", + label: "Status" + }, + { + key: "action", + label: "Action" + } +] \ No newline at end of file From 2b590e9531e2949fe07556f987f3318233736505 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 00:29:14 +0100 Subject: [PATCH 13/17] [Entities] C2 Consumer View Table - create and add data to the producer table --- pkgs/ui/src/app/client-2/page.tsx | 14 ++++++- pkgs/ui/src/mock/client_2/index.ts | 62 ++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/pkgs/ui/src/app/client-2/page.tsx b/pkgs/ui/src/app/client-2/page.tsx index a9a4168..39e68d5 100644 --- a/pkgs/ui/src/app/client-2/page.tsx +++ b/pkgs/ui/src/app/client-2/page.tsx @@ -1,7 +1,12 @@ "use client"; import SummaryDetails from "@/components/summary_card"; -import { Client2SummaryDetails } from "@/mock/client_2"; +import { + Client2ConsumerData, + Client2ConsumerTableConfig, + Client2SummaryDetails +} from "@/mock/client_2"; +import CustomTable from "@/components/table"; export default function Client1() { return ( @@ -14,6 +19,13 @@ export default function Client1() { details: Client2SummaryDetails, }} /> +
+

Consumer View

+ +
); } diff --git a/pkgs/ui/src/mock/client_2/index.ts b/pkgs/ui/src/mock/client_2/index.ts index 19e6936..0f7fb8e 100644 --- a/pkgs/ui/src/mock/client_2/index.ts +++ b/pkgs/ui/src/mock/client_2/index.ts @@ -14,3 +14,65 @@ export const Client2SummaryDetails = [ value: "Carlo's Home Network", }, ]; + +export const Client2ConsumerData = [ + { + "service_name": "Carlo's Printing", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:1223", + "network": "Carlo's Home Network", + }, + { + "service_name": "Steve's Printing", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:1234", + "network": "Steve's Home Network", + }, + { + "service_name": "Test A", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:4567", + "network": "Test Network A", + }, + { + "service_name": "Test B", + "service_type": "3D Printing", + "end_point": "Consume", + "producer": "C2", + "producer_did": "did:sov:test:0062", + "network": "Test Network B", + }, +] + +export const Client2ConsumerTableConfig = [ + { + key: "service_name", + label: "Service name" + }, + { + key: "service_type", + label: "Service Type" + }, + { + key: "end_point", + label: "End Point" + }, + { + key: "producer", + label: "Producer" + }, + { + key: "producer_did", + label: "Producer DID" + }, + { + key: "network", + label: "Network" + } +] \ No newline at end of file From 0cea4644c39618309f6c190921e4be21a00d6d4b Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 00:30:09 +0100 Subject: [PATCH 14/17] [Entities] C2 Producer View Table - create and add data to the producer table --- pkgs/ui/src/app/client-2/page.tsx | 9 +++++ pkgs/ui/src/mock/client_2/index.ts | 64 +++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/pkgs/ui/src/app/client-2/page.tsx b/pkgs/ui/src/app/client-2/page.tsx index 39e68d5..accb479 100644 --- a/pkgs/ui/src/app/client-2/page.tsx +++ b/pkgs/ui/src/app/client-2/page.tsx @@ -4,6 +4,8 @@ import SummaryDetails from "@/components/summary_card"; import { Client2ConsumerData, Client2ConsumerTableConfig, + Client2ProducerData, + Client2ProducerTableConfig, Client2SummaryDetails } from "@/mock/client_2"; import CustomTable from "@/components/table"; @@ -26,6 +28,13 @@ export default function Client1() { configuration={Client2ConsumerTableConfig} /> +
+

Producer View

+ +
); } diff --git a/pkgs/ui/src/mock/client_2/index.ts b/pkgs/ui/src/mock/client_2/index.ts index 0f7fb8e..8898587 100644 --- a/pkgs/ui/src/mock/client_2/index.ts +++ b/pkgs/ui/src/mock/client_2/index.ts @@ -75,4 +75,66 @@ export const Client2ConsumerTableConfig = [ key: "network", label: "Network" } -] \ No newline at end of file +] + +export const Client2ProducerData = [ + { + "service_name": "Carlo's Printing", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "DRAFT, REGISTERED", + "action": "Register, Deregister, Delete", + }, + { + "service_name": "Steve's Printing", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "REGISTERED", + "action": "Create", + }, + { + "service_name": "Test Printing A", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "DRAFT", + "action": "Register, Deregister", + }, + { + "service_name": "Test Printing B", + "service_type": "3D Printing", + "end_point": "URL", + "usage": "C1(3), C3(4)", + "status": "DRAFT, REGISTERED", + "action": "Delete, Create", + }, +] + +export const Client2ProducerTableConfig = [ + { + key: "service_name", + label: "Service name" + }, + { + key: "service_type", + label: "Service Type" + }, + { + key: "end_point", + label: "End Point" + }, + { + key: "usage", + label: "Usage" + }, + { + key: "status", + label: "Status" + }, + { + key: "action", + label: "Action" + } +] From 30751442448c83edd72cb4a795f1804a8fc66fab Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 01:05:54 +0100 Subject: [PATCH 15/17] fix linting --- pkgs/ui/src/app/client-1/page.tsx | 38 +-- pkgs/ui/src/app/client-2/page.tsx | 38 +-- pkgs/ui/src/components/sidebar/index.tsx | 369 ++++++++++++----------- pkgs/ui/src/mock/client_1/index.ts | 132 ++++---- pkgs/ui/src/mock/client_2/index.ts | 132 ++++---- 5 files changed, 359 insertions(+), 350 deletions(-) diff --git a/pkgs/ui/src/app/client-1/page.tsx b/pkgs/ui/src/app/client-1/page.tsx index 4d74186..5abb913 100644 --- a/pkgs/ui/src/app/client-1/page.tsx +++ b/pkgs/ui/src/app/client-1/page.tsx @@ -2,11 +2,11 @@ import SummaryDetails from "@/components/summary_card"; import { - Client1SummaryDetails, - Client1ConsumerData, - Client1ConsumerTableConfig, - Client1ProducerTableConfig, - Client1ProducerData + Client1SummaryDetails, + Client1ConsumerData, + Client1ConsumerTableConfig, + Client1ProducerTableConfig, + Client1ProducerData, } from "@/mock/client_1"; import CustomTable from "@/components/table"; @@ -21,20 +21,20 @@ export default function Client1() { details: Client1SummaryDetails, }} /> -
-

Consumer View

- -
-
-

Producer View

- -
+
+

Consumer View

+ +
+
+

Producer View

+ +
); } diff --git a/pkgs/ui/src/app/client-2/page.tsx b/pkgs/ui/src/app/client-2/page.tsx index accb479..80be865 100644 --- a/pkgs/ui/src/app/client-2/page.tsx +++ b/pkgs/ui/src/app/client-2/page.tsx @@ -2,11 +2,11 @@ import SummaryDetails from "@/components/summary_card"; import { - Client2ConsumerData, - Client2ConsumerTableConfig, - Client2ProducerData, - Client2ProducerTableConfig, - Client2SummaryDetails + Client2ConsumerData, + Client2ConsumerTableConfig, + Client2ProducerData, + Client2ProducerTableConfig, + Client2SummaryDetails, } from "@/mock/client_2"; import CustomTable from "@/components/table"; @@ -21,20 +21,20 @@ export default function Client1() { details: Client2SummaryDetails, }} /> -
-

Consumer View

- -
-
-

Producer View

- -
+
+

Consumer View

+ +
+
+

Producer View

+ +
); } diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx index 77ae189..3b46170 100644 --- a/pkgs/ui/src/components/sidebar/index.tsx +++ b/pkgs/ui/src/components/sidebar/index.tsx @@ -1,17 +1,17 @@ import { - Divider, - IconButton, - List, - ListItem, - ListItemButton, - ListItemIcon, - ListItemText, + Divider, + IconButton, + List, + ListItem, + ListItemButton, + ListItemIcon, + ListItemText, } from "@mui/material"; import Image from "next/image"; -import React, {ReactNode} from "react"; +import React, { ReactNode } from "react"; -import {tw} from "@/utils/tailwind"; -import Collapse from '@mui/material/Collapse'; +import { tw } from "@/utils/tailwind"; +import Collapse from "@mui/material/Collapse"; import Link from "next/link"; import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; import HomeIcon from "@mui/icons-material/Home"; @@ -19,197 +19,206 @@ import HubIcon from "@mui/icons-material/Hub"; import PersonIcon from "@mui/icons-material/Person"; import RouterIcon from "@mui/icons-material/Router"; import StorageIcon from "@mui/icons-material/Storage"; -import ExpandLess from '@mui/icons-material/ExpandLess'; -import ExpandMore from '@mui/icons-material/ExpandMore'; +import ExpandLess from "@mui/icons-material/ExpandLess"; +import ExpandMore from "@mui/icons-material/ExpandMore"; type MenuEntry = { - icon: ReactNode; - label: string; - to: string; - disabled: boolean; + icon: ReactNode; + label: string; + to: string; + disabled: boolean; } & { - subMenuEntries?: MenuEntry[]; + subMenuEntries?: MenuEntry[]; }; const menuEntityEntries: MenuEntry[] = [ - { - icon: , - label: "C1", - to: "/client-1", - disabled: false, - }, - { - icon: , - label: "C2", - to: "/client-2", - disabled: false, - } + { + icon: , + label: "C1", + to: "/client-1", + disabled: false, + }, + { + icon: , + label: "C2", + to: "/client-2", + disabled: false, + }, ]; const menuEntries: MenuEntry[] = [ - { - icon: , - label: "Home", - to: "/", - disabled: false, - }, - { - icon: , - label: "Entities", - to: "/entities", - disabled: false, - }, - { - icon: , - label: "AP", - to: "/access-point", - disabled: false, - }, - { - icon: , - label: "DLG", - to: "/distributed-ledger-gateway", - disabled: false, - }, + { + icon: , + label: "Home", + to: "/", + disabled: false, + }, + { + icon: , + label: "Entities", + to: "/entities", + disabled: false, + }, + { + icon: , + label: "AP", + to: "/access-point", + disabled: false, + }, + { + icon: , + label: "DLG", + to: "/distributed-ledger-gateway", + disabled: false, + }, ]; const hideSidebar = tw`-translate-x-14 lg:-translate-x-64`; const showSidebar = tw`lg:translate-x-0`; interface SidebarProps { - show: boolean; - onClose: () => void; + show: boolean; + onClose: () => void; } export function Sidebar(props: SidebarProps) { - const {show, onClose} = props; - const [activeMenuItem, setActiveMenuItem] = React.useState(typeof window !== "undefined" ? window.location.pathname : ""); - const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true); + const { show, onClose } = props; + const [activeMenuItem, setActiveMenuItem] = React.useState( + typeof window !== "undefined" ? window.location.pathname : "", + ); + const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true); - const handleCollapseClick = () => { - setCollapseMenuOpen(!collapseMenuOpen); - }; + const handleCollapseClick = () => { + setCollapseMenuOpen(!collapseMenuOpen); + }; - const handleMenuItemClick = (path: string) => { - setActiveMenuItem(path); - }; + const handleMenuItemClick = (path: string) => { + setActiveMenuItem(path); + }; - return ( - - ); + {menuEntry.icon} + + + + ))} + + + + )} + + ); + })} + + + + ); } diff --git a/pkgs/ui/src/mock/client_1/index.ts b/pkgs/ui/src/mock/client_1/index.ts index fbbe0d5..658b51e 100644 --- a/pkgs/ui/src/mock/client_1/index.ts +++ b/pkgs/ui/src/mock/client_1/index.ts @@ -17,124 +17,124 @@ export const Client1SummaryDetails = [ export const Client1ConsumerData = [ { - "service_name": "Carlo's Printing", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:1223", - "network": "Carlo's Home Network", + service_name: "Carlo's Printing", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:1223", + network: "Carlo's Home Network", }, { - "service_name": "Steve's Printing", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:1234", - "network": "Steve's Home Network", + service_name: "Steve's Printing", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:1234", + network: "Steve's Home Network", }, { - "service_name": "Test A", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:4567", - "network": "Test Network A", + service_name: "Test A", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:4567", + network: "Test Network A", }, { - "service_name": "Test B", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:0062", - "network": "Test Network B", + service_name: "Test B", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:0062", + network: "Test Network B", }, -] +]; export const Client1ConsumerTableConfig = [ { key: "service_name", - label: "Service name" + label: "Service name", }, { key: "service_type", - label: "Service Type" + label: "Service Type", }, { key: "end_point", - label: "End Point" + label: "End Point", }, { key: "producer", - label: "Producer" + label: "Producer", }, { key: "producer_did", - label: "Producer DID" + label: "Producer DID", }, { key: "network", - label: "Network" - } -] + label: "Network", + }, +]; export const Client1ProducerData = [ { - "service_name": "Carlo's Printing", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "DRAFT, REGISTERED", - "action": "Register, Deregister, Delete", + service_name: "Carlo's Printing", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "DRAFT, REGISTERED", + action: "Register, Deregister, Delete", }, { - "service_name": "Steve's Printing", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "REGISTERED", - "action": "Create", + service_name: "Steve's Printing", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "REGISTERED", + action: "Create", }, { - "service_name": "Test Printing A", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "DRAFT", - "action": "Register, Deregister", + service_name: "Test Printing A", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "DRAFT", + action: "Register, Deregister", }, { - "service_name": "Test Printing B", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "DRAFT, REGISTERED", - "action": "Delete, Create", + service_name: "Test Printing B", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "DRAFT, REGISTERED", + action: "Delete, Create", }, -] +]; export const Client1ProducerTableConfig = [ { key: "service_name", - label: "Service name" + label: "Service name", }, { key: "service_type", - label: "Service Type" + label: "Service Type", }, { key: "end_point", - label: "End Point" + label: "End Point", }, { key: "usage", - label: "Usage" + label: "Usage", }, { key: "status", - label: "Status" + label: "Status", }, { key: "action", - label: "Action" - } -] \ No newline at end of file + label: "Action", + }, +]; diff --git a/pkgs/ui/src/mock/client_2/index.ts b/pkgs/ui/src/mock/client_2/index.ts index 8898587..b0105fd 100644 --- a/pkgs/ui/src/mock/client_2/index.ts +++ b/pkgs/ui/src/mock/client_2/index.ts @@ -17,124 +17,124 @@ export const Client2SummaryDetails = [ export const Client2ConsumerData = [ { - "service_name": "Carlo's Printing", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:1223", - "network": "Carlo's Home Network", + service_name: "Carlo's Printing", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:1223", + network: "Carlo's Home Network", }, { - "service_name": "Steve's Printing", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:1234", - "network": "Steve's Home Network", + service_name: "Steve's Printing", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:1234", + network: "Steve's Home Network", }, { - "service_name": "Test A", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:4567", - "network": "Test Network A", + service_name: "Test A", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:4567", + network: "Test Network A", }, { - "service_name": "Test B", - "service_type": "3D Printing", - "end_point": "Consume", - "producer": "C2", - "producer_did": "did:sov:test:0062", - "network": "Test Network B", + service_name: "Test B", + service_type: "3D Printing", + end_point: "Consume", + producer: "C2", + producer_did: "did:sov:test:0062", + network: "Test Network B", }, -] +]; export const Client2ConsumerTableConfig = [ { key: "service_name", - label: "Service name" + label: "Service name", }, { key: "service_type", - label: "Service Type" + label: "Service Type", }, { key: "end_point", - label: "End Point" + label: "End Point", }, { key: "producer", - label: "Producer" + label: "Producer", }, { key: "producer_did", - label: "Producer DID" + label: "Producer DID", }, { key: "network", - label: "Network" - } -] + label: "Network", + }, +]; export const Client2ProducerData = [ { - "service_name": "Carlo's Printing", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "DRAFT, REGISTERED", - "action": "Register, Deregister, Delete", + service_name: "Carlo's Printing", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "DRAFT, REGISTERED", + action: "Register, Deregister, Delete", }, { - "service_name": "Steve's Printing", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "REGISTERED", - "action": "Create", + service_name: "Steve's Printing", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "REGISTERED", + action: "Create", }, { - "service_name": "Test Printing A", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "DRAFT", - "action": "Register, Deregister", + service_name: "Test Printing A", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "DRAFT", + action: "Register, Deregister", }, { - "service_name": "Test Printing B", - "service_type": "3D Printing", - "end_point": "URL", - "usage": "C1(3), C3(4)", - "status": "DRAFT, REGISTERED", - "action": "Delete, Create", + service_name: "Test Printing B", + service_type: "3D Printing", + end_point: "URL", + usage: "C1(3), C3(4)", + status: "DRAFT, REGISTERED", + action: "Delete, Create", }, -] +]; export const Client2ProducerTableConfig = [ { key: "service_name", - label: "Service name" + label: "Service name", }, { key: "service_type", - label: "Service Type" + label: "Service Type", }, { key: "end_point", - label: "End Point" + label: "End Point", }, { key: "usage", - label: "Usage" + label: "Usage", }, { key: "status", - label: "Status" + label: "Status", }, { key: "action", - label: "Action" - } -] + label: "Action", + }, +]; From 2e82186e6d05c9814f1a971ae62646fc89705500 Mon Sep 17 00:00:00 2001 From: Onur Arslan Date: Fri, 24 Nov 2023 19:06:38 +0100 Subject: [PATCH 16/17] [Homepage] Table View - implemented home view table and added checkbox component --- pkgs/ui/src/app/home/page.tsx | 3 +- pkgs/ui/src/components/table/index.tsx | 98 ++++++++++++++------------ pkgs/ui/src/mock/home/index.ts | 47 ++++++++++++ 3 files changed, 100 insertions(+), 48 deletions(-) create mode 100644 pkgs/ui/src/mock/home/index.ts diff --git a/pkgs/ui/src/app/home/page.tsx b/pkgs/ui/src/app/home/page.tsx index bfcddf8..f60c2ff 100644 --- a/pkgs/ui/src/app/home/page.tsx +++ b/pkgs/ui/src/app/home/page.tsx @@ -3,6 +3,7 @@ import { NoDataOverlay } from "@/components/noDataOverlay"; import SummaryDetails from "@/components/summary_card"; import CustomTable from "@/components/table"; +import {HomeDummyData, HomeTableConfig} from "@/mock/home"; export default function Home() { return ( @@ -15,7 +16,7 @@ export default function Home() {

Home View Table

- +
diff --git a/pkgs/ui/src/components/table/index.tsx b/pkgs/ui/src/components/table/index.tsx index cbfec7e..28ac3d8 100644 --- a/pkgs/ui/src/components/table/index.tsx +++ b/pkgs/ui/src/components/table/index.tsx @@ -6,60 +6,64 @@ import TableHead from "@mui/material/TableHead"; import TableRow from "@mui/material/TableRow"; import Paper from "@mui/material/Paper"; -import { NoDataOverlay } from "@/components/noDataOverlay"; -import { StyledTableCell, StyledTableRow } from "./style"; -import { ICustomTable, CustomTableConfiguration } from "@/types"; +import {NoDataOverlay} from "@/components/noDataOverlay"; +import {StyledTableCell, StyledTableRow} from "./style"; +import {ICustomTable, CustomTableConfiguration} from "@/types"; +import {Checkbox} from "@mui/material"; -const CustomTable = ({ configuration, data }: ICustomTable) => { - // display empty icon in case there is no data - if (!data || data.length === 0) - return ; +const CustomTable = ({configuration, data}: ICustomTable) => { + // display empty icon in case there is no data + if (!data || data.length === 0) + return ; - const renderTableCell = ( - value: any, - cellKey: string, - render?: (param: any) => void | undefined, - ) => { - let renderedValue = value; + const renderTableCell = ( + value: any, + cellKey: string, + render?: (param: any) => void | undefined, + ) => { + let renderedValue = value; - // cover use case if the data is an array - if (Array.isArray(value)) renderedValue = value.join(", "); + // cover use case if the data is an array + if (Array.isArray(value)) renderedValue = value.join(", "); - // cover use case if we want to render a component - if (render) renderedValue = render(value); + // cover use case if the data is an boolean + if (typeof value === "boolean") renderedValue = ; + + // cover use case if we want to render a component + if (render) renderedValue = render(value); + + return ( + + {renderedValue} + + ); + }; return ( - - {renderedValue} - + + + + + {configuration.map((header: CustomTableConfiguration) => ( + {header.label} + ))} + + + + {data.map((data: any, rowIndex: number) => ( + + {configuration.map((column: CustomTableConfiguration) => { + const cellValue: any = data[column.key]; + const cellKey = column.key; + const renderComponent = column?.render; + return renderTableCell(cellValue, cellKey, renderComponent); + })} + + ))} + +
+
); - }; - - return ( - - - - - {configuration.map((header: CustomTableConfiguration) => ( - {header.label} - ))} - - - - {data.map((data: any, rowIndex: number) => ( - - {configuration.map((column: CustomTableConfiguration) => { - const cellValue: any = data[column.key]; - const cellKey = column.key; - const renderComponent = column?.render; - return renderTableCell(cellValue, cellKey, renderComponent); - })} - - ))} - -
-
- ); }; export default CustomTable; diff --git a/pkgs/ui/src/mock/home/index.ts b/pkgs/ui/src/mock/home/index.ts new file mode 100644 index 0000000..b92be36 --- /dev/null +++ b/pkgs/ui/src/mock/home/index.ts @@ -0,0 +1,47 @@ +// HOME - Table Data + +export const HomeDummyData = [ + { + entity_name: "C1", + entity_DID: "did:sov:test:1234", + network: "Carlo's Home Network", + ip_address: "127.0.0.1", + roles: "service repository, service consumer, DLG", + visible: true + }, + { + entity_name: "C2", + entity_DID: "did:sov:test:4567", + network: "Steve's Home Network", + ip_address: "127.0.0.1", + roles: "service repository, service consumer, DLG", + visible: false + } +]; + +export const HomeTableConfig = [ + { + key: "entity_name", + label: "Entity name", + }, + { + key: "entity_DID", + label: "Entity DID", + }, + { + key: "network", + label: "Network", + }, + { + key: "ip_address", + label: "IP address", + }, + { + key: "roles", + label: "Roles", + }, + { + key: "visible", + label: "Visible", + }, +]; \ No newline at end of file From e14b540687093e93b23146ca6579c88082c44eac Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Sat, 25 Nov 2023 01:43:31 +0100 Subject: [PATCH 17/17] fix linting --- pkgs/ui/src/app/home/page.tsx | 2 +- pkgs/ui/src/components/table/index.tsx | 101 +++++++++++++------------ pkgs/ui/src/mock/home/index.ts | 82 ++++++++++---------- 3 files changed, 93 insertions(+), 92 deletions(-) diff --git a/pkgs/ui/src/app/home/page.tsx b/pkgs/ui/src/app/home/page.tsx index f60c2ff..37e51de 100644 --- a/pkgs/ui/src/app/home/page.tsx +++ b/pkgs/ui/src/app/home/page.tsx @@ -3,7 +3,7 @@ import { NoDataOverlay } from "@/components/noDataOverlay"; import SummaryDetails from "@/components/summary_card"; import CustomTable from "@/components/table"; -import {HomeDummyData, HomeTableConfig} from "@/mock/home"; +import { HomeDummyData, HomeTableConfig } from "@/mock/home"; export default function Home() { return ( diff --git a/pkgs/ui/src/components/table/index.tsx b/pkgs/ui/src/components/table/index.tsx index 28ac3d8..36714df 100644 --- a/pkgs/ui/src/components/table/index.tsx +++ b/pkgs/ui/src/components/table/index.tsx @@ -6,64 +6,65 @@ import TableHead from "@mui/material/TableHead"; import TableRow from "@mui/material/TableRow"; import Paper from "@mui/material/Paper"; -import {NoDataOverlay} from "@/components/noDataOverlay"; -import {StyledTableCell, StyledTableRow} from "./style"; -import {ICustomTable, CustomTableConfiguration} from "@/types"; -import {Checkbox} from "@mui/material"; +import { NoDataOverlay } from "@/components/noDataOverlay"; +import { StyledTableCell, StyledTableRow } from "./style"; +import { ICustomTable, CustomTableConfiguration } from "@/types"; +import { Checkbox } from "@mui/material"; -const CustomTable = ({configuration, data}: ICustomTable) => { - // display empty icon in case there is no data - if (!data || data.length === 0) - return ; +const CustomTable = ({ configuration, data }: ICustomTable) => { + // display empty icon in case there is no data + if (!data || data.length === 0) + return ; - const renderTableCell = ( - value: any, - cellKey: string, - render?: (param: any) => void | undefined, - ) => { - let renderedValue = value; + const renderTableCell = ( + value: any, + cellKey: string, + render?: (param: any) => void | undefined, + ) => { + let renderedValue = value; - // cover use case if the data is an array - if (Array.isArray(value)) renderedValue = value.join(", "); + // cover use case if the data is an array + if (Array.isArray(value)) renderedValue = value.join(", "); - // cover use case if the data is an boolean - if (typeof value === "boolean") renderedValue = ; + // cover use case if the data is an boolean + if (typeof value === "boolean") + renderedValue = ; - // cover use case if we want to render a component - if (render) renderedValue = render(value); - - return ( - - {renderedValue} - - ); - }; + // cover use case if we want to render a component + if (render) renderedValue = render(value); return ( - - - - - {configuration.map((header: CustomTableConfiguration) => ( - {header.label} - ))} - - - - {data.map((data: any, rowIndex: number) => ( - - {configuration.map((column: CustomTableConfiguration) => { - const cellValue: any = data[column.key]; - const cellKey = column.key; - const renderComponent = column?.render; - return renderTableCell(cellValue, cellKey, renderComponent); - })} - - ))} - -
-
+ + {renderedValue} + ); + }; + + return ( + + + + + {configuration.map((header: CustomTableConfiguration) => ( + {header.label} + ))} + + + + {data.map((data: any, rowIndex: number) => ( + + {configuration.map((column: CustomTableConfiguration) => { + const cellValue: any = data[column.key]; + const cellKey = column.key; + const renderComponent = column?.render; + return renderTableCell(cellValue, cellKey, renderComponent); + })} + + ))} + +
+
+ ); }; export default CustomTable; diff --git a/pkgs/ui/src/mock/home/index.ts b/pkgs/ui/src/mock/home/index.ts index b92be36..ccff693 100644 --- a/pkgs/ui/src/mock/home/index.ts +++ b/pkgs/ui/src/mock/home/index.ts @@ -1,47 +1,47 @@ // HOME - Table Data export const HomeDummyData = [ - { - entity_name: "C1", - entity_DID: "did:sov:test:1234", - network: "Carlo's Home Network", - ip_address: "127.0.0.1", - roles: "service repository, service consumer, DLG", - visible: true - }, - { - entity_name: "C2", - entity_DID: "did:sov:test:4567", - network: "Steve's Home Network", - ip_address: "127.0.0.1", - roles: "service repository, service consumer, DLG", - visible: false - } + { + entity_name: "C1", + entity_DID: "did:sov:test:1234", + network: "Carlo's Home Network", + ip_address: "127.0.0.1", + roles: "service repository, service consumer, DLG", + visible: true, + }, + { + entity_name: "C2", + entity_DID: "did:sov:test:4567", + network: "Steve's Home Network", + ip_address: "127.0.0.1", + roles: "service repository, service consumer, DLG", + visible: false, + }, ]; export const HomeTableConfig = [ - { - key: "entity_name", - label: "Entity name", - }, - { - key: "entity_DID", - label: "Entity DID", - }, - { - key: "network", - label: "Network", - }, - { - key: "ip_address", - label: "IP address", - }, - { - key: "roles", - label: "Roles", - }, - { - key: "visible", - label: "Visible", - }, -]; \ No newline at end of file + { + key: "entity_name", + label: "Entity name", + }, + { + key: "entity_DID", + label: "Entity DID", + }, + { + key: "network", + label: "Network", + }, + { + key: "ip_address", + label: "IP address", + }, + { + key: "roles", + label: "Roles", + }, + { + key: "visible", + label: "Visible", + }, +];