generated from Luis/nextjs-python-web-template
[Entities] AP Attachment View Table
- fixed the router problem for different views - implemented the attachment-table in the access point view
This commit is contained in:
10
pkgs/ui/src/app/access-point/page.tsx
Normal file
10
pkgs/ui/src/app/access-point/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import {APDummyData, APTableConfig} from "@/mock/ap/data";
|
||||
import {RecentActivity} from "@/components/dashboard/activity";
|
||||
|
||||
export default function AccessPoint() {
|
||||
return (
|
||||
<RecentActivity title={"Attachments"} data={APDummyData} configuration={APTableConfig}/>
|
||||
)
|
||||
}
|
||||
@@ -1,11 +1,25 @@
|
||||
import {DashboardCard} from "@/components/card";
|
||||
import {NoDataOverlay} from "@/components/noDataOverlay";
|
||||
import {ReactNode} from "react";
|
||||
import CustomTable from "@/components/table";
|
||||
import {ICustomTable} from "@/types";
|
||||
|
||||
export const RecentActivity = () => {
|
||||
interface DashboardCardProps {
|
||||
title: ReactNode;
|
||||
data: ReactNode;
|
||||
configuration: ICustomTable;
|
||||
}
|
||||
|
||||
export const RecentActivity = (props: DashboardCardProps) => {
|
||||
const {title, data, configuration} = props;
|
||||
return (
|
||||
<DashboardCard title="Recent Activity">
|
||||
<div className="flex w-full justify-center align-middle">
|
||||
<NoDataOverlay label="No Activity yet" />
|
||||
<DashboardCard title={title}>
|
||||
{/*<div className="flex w-full justify-center align-middle">*/}
|
||||
{/* <NoDataOverlay label="No Activity yet"/>*/}
|
||||
{/*</div>*/}
|
||||
|
||||
<div>
|
||||
<CustomTable data={data} configuration={configuration}/>
|
||||
</div>
|
||||
</DashboardCard>
|
||||
);
|
||||
|
||||
28
pkgs/ui/src/mock/ap/data.tsx
Normal file
28
pkgs/ui/src/mock/ap/data.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
export const APDummyData = [
|
||||
{
|
||||
"entity_name": "C1",
|
||||
"entity_DID": "did:sov:test:1234",
|
||||
"network": "Carlo’s Home Network",
|
||||
"ip_address": "127.0.0.1",
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
export const APTableConfig = [
|
||||
{
|
||||
key: "entity_name",
|
||||
label: "Entity name"
|
||||
},
|
||||
{
|
||||
key: "entity_DID",
|
||||
label: "Entity DID"
|
||||
},
|
||||
{
|
||||
key: "network",
|
||||
label: "Network"
|
||||
},
|
||||
{
|
||||
key: "ip_address",
|
||||
label: "IP address"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user