From 12c34c33a2dc7cbc4d1159d1ad0cf7a6b52b6d61 Mon Sep 17 00:00:00 2001 From: "Arslan, Erdem" Date: Fri, 24 Nov 2023 00:08:20 +0100 Subject: [PATCH] [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" + } +]