From 0423b3803f8c28388f28f154bb4a5d1ffc078bcb Mon Sep 17 00:00:00 2001 From: LandaMm Date: Thu, 29 May 2025 20:13:25 +0200 Subject: [PATCH] feat: api services tab for admin --- web/src/components/Home/Tabs/ApiServices.tsx | 104 +++++++++++++++++++ web/src/pages/Index/index.tsx | 2 + 2 files changed, 106 insertions(+) create mode 100644 web/src/components/Home/Tabs/ApiServices.tsx diff --git a/web/src/components/Home/Tabs/ApiServices.tsx b/web/src/components/Home/Tabs/ApiServices.tsx new file mode 100644 index 0000000..2df600e --- /dev/null +++ b/web/src/components/Home/Tabs/ApiServices.tsx @@ -0,0 +1,104 @@ +import type { FC } from "react"; +import { Link } from "react-router"; + +const services = [ + { + id: "1", + name: "User Service", + clientId: "user-svc-001", + isActive: true, + createdAt: "2024-09-15T10:20:30Z", + updatedAt: "2025-01-10T12:00:00Z", + }, + { + id: "2", + name: "Billing Service", + clientId: "billing-svc-009", + isActive: false, + createdAt: "2024-10-01T08:45:10Z", + updatedAt: "2025-03-22T14:30:00Z", + }, + { + id: "3", + name: "Analytics Service", + clientId: "analytics-svc-777", + isActive: true, + createdAt: "2024-11-25T16:00:00Z", + updatedAt: "2025-02-05T10:15:45Z", + }, + { + id: "4", + name: "Email Service", + clientId: "email-svc-333", + isActive: false, + createdAt: "2023-07-10T13:00:00Z", + updatedAt: "2024-12-31T09:25:00Z", + }, +]; + +const ApiServices: FC = () => { + return ( +
+ + + + + + + + + + + + {services.map((service) => ( + + + + + + + + ))} + +
+ Name + + Client ID + + Is Active + + Created At + + Updated At +
+ + {service.name} + + + {service.clientId} + + + {service.isActive ? "Yes" : "No"} + + + {new Date(service.createdAt).toLocaleString()} + + {new Date(service.updatedAt).toLocaleString()} +
+
+ ); +}; + +export default ApiServices; diff --git a/web/src/pages/Index/index.tsx b/web/src/pages/Index/index.tsx index ba1d7f3..c90d9e7 100644 --- a/web/src/pages/Index/index.tsx +++ b/web/src/pages/Index/index.tsx @@ -8,6 +8,7 @@ import Sidebar from "@/components/Home/Sidebar"; import TopBar from "@/components/Home/TopBar"; import Home from "@/components/Home/Tabs/Home"; import PersonalInfo from "@/components/Home/Tabs/PersonalInfo"; +import ApiServices from "@/components/Home/Tabs/ApiServices"; const IndexPage: FC = () => { const [tab, setTab] = useState("home"); @@ -38,6 +39,7 @@ const IndexPage: FC = () => {
{tab === "personal-info" && } + {tab === "api-services" && }