- >
- );
-}
diff --git a/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/clients/page.tsx b/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/clients/page.tsx
deleted file mode 100644
index 685c94c6..00000000
--- a/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/clients/page.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import PageLayout from '@/app/(app)/[organizationId]/[projectId]/page-layout';
-
-import { getClientsByOrganizationId } from '@openpanel/db';
-
-import ListClients from './list-clients';
-
-interface PageProps {
- params: {
- organizationId: string;
- };
-}
-
-export default async function Page({ params: { organizationId } }: PageProps) {
- const clients = await getClientsByOrganizationId(organizationId);
-
- return (
-
-
-
- );
-}
diff --git a/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/projects/list-projects.tsx b/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/projects/list-projects.tsx
index d04efdfe..cc25c480 100644
--- a/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/projects/list-projects.tsx
+++ b/apps/dashboard/src/app/(app)/[organizationId]/[projectId]/settings/projects/list-projects.tsx
@@ -1,19 +1,29 @@
'use client';
import { StickyBelowHeader } from '@/app/(app)/[organizationId]/[projectId]/layout-sticky-below-header';
-import { DataTable } from '@/components/data-table';
-import { columns } from '@/components/projects/table';
+import { ClientActions } from '@/components/clients/client-actions';
+import { ProjectActions } from '@/components/projects/project-actions';
+// import { columns } from '@/components/projects/table';
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from '@/components/ui/accordion';
+import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
import { Button } from '@/components/ui/button';
+import { Tooltiper } from '@/components/ui/tooltip';
import { useAppParams } from '@/hooks/useAppParams';
import { pushModal } from '@/modals';
-import { PlusIcon } from 'lucide-react';
+import { InfoIcon, PlusIcon, PlusSquareIcon } from 'lucide-react';
-import type { getProjectsByOrganizationSlug } from '@openpanel/db';
+import type { IServiceClientWithProject, IServiceProject } from '@openpanel/db';
interface ListProjectsProps {
- projects: Awaited>;
+ projects: IServiceProject[];
+ clients: IServiceClientWithProject[];
}
-export default function ListProjects({ projects }: ListProjectsProps) {
+export default function ListProjects({ projects, clients }: ListProjectsProps) {
const organizationId = useAppParams().organizationId;
return (
<>
@@ -34,7 +44,83 @@ export default function ListProjects({ projects }: ListProjectsProps) {
-
+
+
+
+ What is a project
+
+ A project can be a website, mobile app or any other application
+ that you want to track event for. Each project can have one or
+ more clients. The client is used to send events to the project.
+
+
+
+ {projects.map((project) => {
+ const pClients = clients.filter(
+ (client) => client.project_id === project.id
+ );
+ return (
+
+
+