Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat: shadcn nodes

dextmorgn5adc3b2ec2bb
diff --git a/flowsint-web/package.json b/flowsint-web/package.json
index d6b155e5..0e7ab6c4 100644
--- a/flowsint-web/package.json
+++ b/flowsint-web/package.json
@@ -12,6 +12,9 @@
"@ai-sdk/mistral": "^1.1.8",
"@ai-sdk/openai": "^1.1.9",
"@dagrejs/dagre": "^1.1.4",
+ "@dnd-kit/core": "^6.3.1",
+ "@dnd-kit/modifiers": "^9.0.0",
+ "@dnd-kit/sortable": "^10.0.0",
"@hookform/resolvers": "^4.0.0",
"@internationalized/date": "^3.7.0",
"@mistralai/mistralai": "^1.5.0",
@@ -51,6 +54,7 @@
"@tailwindcss/cli": "^4.0.3",
"@tailwindcss/postcss": "^4.0.3",
"@tanstack/react-query": "^5.66.8",
+ "@tanstack/react-table": "^8.21.2",
"@tiptap/pm": "^2.11.5",
"@tiptap/react": "^2.11.5",
"@tiptap/starter-kit": "^2.11.5",
diff --git a/flowsint-web/src/app/api/projects/[project_id]/investigations/[investigation_id]/data/route.ts b/flowsint-web/src/app/api/projects/[project_id]/investigations/[investigation_id]/data/route.ts
index a4f0c7b1..3c59630e 100644
--- a/flowsint-web/src/app/api/projects/[project_id]/investigations/[investigation_id]/data/route.ts
+++ b/flowsint-web/src/app/api/projects/[project_id]/investigations/[investigation_id]/data/route.ts
@@ -14,8 +14,15 @@ export async function GET(_: Request, { params }: { params: Promise<{ investigat
return NextResponse.json({ error: "Unauthorized" }, { status: 401 })
} const { data: individuals, error: indError } = await supabase
.from("individuals")
- .select("*, ip_addresses(*), phone_numbers(*), social_accounts(*), emails(*), physical_addresses(*)")
+ .select("*, ip_addresses(*), phone_numbers(*), social_accounts(*), emails(*), physical_addresses(*), group_id")
.eq("investigation_id", investigation_id)
+ const { data: groups, error: groupsError } = await supabase
+ .from("groups")
+ .select("*")
+ .eq("investigation_id", investigation_id)
+ if (groupsError) {
+ return NextResponse.json({ error: groupsError.message }, { status: 500 })
+ }
if (indError) {
return NextResponse.json({ error: indError.message }, { status: 500 })
}
@@ -35,6 +42,16 @@ export async function GET(_: Request, { params }: { params: Promise<{ investigat
}
const nodes: NodeData[] = []
const edges: EdgeData[] = []
+ groups?.forEach(({ label, id }) => {
+ nodes.push({
+ id: id.toString(),
+ position: { x: 200, y: 200 },
+ data: { label: label.toString() },
+ type: "group",
+ width: 380,
+ height: 200,
+ })
+ })
// Construire les nœuds et les arêtes
individuals.forEach((ind: any) => {
const individualId = ind.id.toString()
@@ -43,6 +60,8 @@ export async function GET(_: Request, { params }: { params: Promise<{ investigat
type: "individual",
data: { ...ind, label: ind.full_name },
position: { x: 0, y: 100 },
+ parentId: ind.group_id?.toString(),
+ extent: "parent",
})
// Ajouter les emails
ind.emails?.forEach((email: any) => {
diff --git a/flowsint-web/src/app/dashboard/entities/data-table.tsx b/flowsint-web/src/app/dashboard/entities/data-table.tsx
new file mode 100644
index 00000000..631006cf
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/entities/data-table.tsx
@@ -0,0 +1,823 @@
+"use client"
+
+import * as React from "react"
+import {
+ DndContext,
+ KeyboardSensor,
+ MouseSensor,
+ TouchSensor,
+ closestCenter,
+ useSensor,
+ useSensors,
+ type DragEndEvent,
+ type UniqueIdentifier,
+} from "@dnd-kit/core"
+import { restrictToVerticalAxis } from "@dnd-kit/modifiers"
+import {
+ SortableContext,
+ arrayMove,
+ useSortable,
+ verticalListSortingStrategy,
+} from "@dnd-kit/sortable"
+import { CSS } from "@dnd-kit/utilities"
+import {
+ ColumnDef,
+ ColumnFiltersState,
+ Row,
+ SortingState,
+ VisibilityState,
+ flexRender,
+ getCoreRowModel,
+ getFacetedRowModel,
+ getFacetedUniqueValues,
+ getFilteredRowModel,
+ getPaginationRowModel,
+ getSortedRowModel,
+ useReactTable,
+} from "@tanstack/react-table"
+import {
+ CheckCircle2Icon,
+ CheckCircleIcon,
+ ChevronDownIcon,
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ ChevronsLeftIcon,
+ ChevronsRightIcon,
+ ColumnsIcon,
+ GripVerticalIcon,
+ LoaderIcon,
+ MoreVerticalIcon,
+ PlusIcon,
+ TrendingUpIcon,
+} from "lucide-react"
+import { Area, AreaChart, CartesianGrid, XAxis } from "recharts"
+import { toast } from "sonner"
+import { z } from "zod"
+
+import { useIsMobile } from "@/hooks/use-mobile"
+import { Badge } from "@/components/ui/badge"
+import { Button } from "@/components/ui/button"
+import {
+ ChartConfig,
+ ChartContainer,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/chart"
+import { Checkbox } from "@/components/ui/checkbox"
+import {
+ DropdownMenu,
+ DropdownMenuCheckboxItem,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu"
+import { Input } from "@/components/ui/input"
+import { Label } from "@/components/ui/label"
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select"
+import { Separator } from "@/components/ui/separator"
+import {
+ Sheet,
+ SheetClose,
+ SheetContent,
+ SheetDescription,
+ SheetFooter,
+ SheetHeader,
+ SheetTitle,
+ SheetTrigger,
+} from "@/components/ui/sheet"
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table"
+import {
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
+} from "@/components/ui/tabs"
+
+export const schema = z.object({
+ id: z.number(),
+ header: z.string(),
+ type: z.string(),
+ status: z.string(),
+ target: z.string(),
+ limit: z.string(),
+ reviewer: z.string(),
+})
+
+// Create a separate component for the drag handle
+function DragHandle({ id }: { id: number }) {
+ const { attributes, listeners } = useSortable({
+ id,
+ })
+
+ return (
+ <Button
+ {...attributes}
+ {...listeners}
+ variant="ghost"
+ size="icon"
+ className="size-7 text-muted-foreground hover:bg-transparent"
+ >
+ <GripVerticalIcon className="size-3 text-muted-foreground" />
+ <span className="sr-only">Drag to reorder</span>
+ </Button>
+ )
+}
+
+const columns: ColumnDef<z.infer<typeof schema>>[] = [
+ {
+ id: "drag",
+ header: () => null,
+ cell: ({ row }: any) => <DragHandle id={row.original.id} />,
+ },
+ {
+ id: "select",
+ header: ({ table }: any) => (
+ <div className="flex items-center justify-center">
+ <Checkbox
+ checked={
+ table.getIsAllPageRowsSelected() ||
+ (table.getIsSomePageRowsSelected() && "indeterminate")
+ }
+ onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
+ aria-label="Select all"
+ />
+ </div>
+ ),
+ cell: ({ row }: any) => (
+ <div className="flex items-center justify-center">
+ <Checkbox
+ checked={row.getIsSelected()}
+ onCheckedChange={(value) => row.toggleSelected(!!value)}
+ aria-label="Select row"
+ />
+ </div>
+ ),
+ enableSorting: false,
+ enableHiding: false,
+ },
+ {
+ accessorKey: "header",
+ header: "Header",
+ cell: ({ row }: any) => {
+ return <TableCellViewer item={row.original} />
+ },
+ enableHiding: false,
+ },
+ {
+ accessorKey: "type",
+ header: "Section Type",
+ cell: ({ row }: any) => (
+ <div className="w-32">
+ <Badge variant="outline" className="px-1.5 text-muted-foreground">
+ {row.original.type}
+ </Badge>
+ </div>
+ ),
+ },
+ {
+ accessorKey: "status",
+ header: "Status",
+ cell: ({ row }: any) => (
+ <Badge
+ variant="outline"
+ className="flex gap-1 px-1.5 text-muted-foreground [&_svg]:size-3"
+ >
+ {row.original.status === "Done" ? (
+ <CheckCircle2Icon className="text-green-500 dark:text-green-400" />
+ ) : (
+ <LoaderIcon className="animate-spin"/>
+ )}
+ {row.original.status}
+ </Badge>
+ ),
+ },
+ {
+ accessorKey: "target",
+ header: () => <div className="w-full text-right">Target</div>,
+ cell: ({ row }: any) => (
+ <form
+ onSubmit={(e) => {
+ e.preventDefault()
+ toast.promise(new Promise((resolve) => setTimeout(resolve, 1000)), {
+ loading: `Saving ${row.original.header}`,
+ success: "Done",
+ error: "Error",
+ })
+ }}
+ >
+ <Label htmlFor={`${row.original.id}-target`} className="sr-only">
+ Target
+ </Label>
+ <Input
+ className="h-8 w-16 border-transparent bg-transparent text-right shadow-none hover:bg-input/30 focus-visible:border focus-visible:bg-background"
+ defaultValue={row.original.target}
+ id={`${row.original.id}-target`}
+ />
+ </form>
+ ),
+ },
+ {
+ accessorKey: "limit",
+ header: () => <div className="w-full text-right">Limit</div>,
+ cell: ({ row }: any) => (
+ <form
+ onSubmit={(e) => {
+ e.preventDefault()
+ toast.promise(new Promise((resolve) => setTimeout(resolve, 1000)), {
+ loading: `Saving ${row.original.header}`,
+ success: "Done",
+ error: "Error",
+ })
+ }}
+ >
+ <Label htmlFor={`${row.original.id}-limit`} className="sr-only">
+ Limit
+ </Label>
+ <Input
+ className="h-8 w-16 border-transparent bg-transparent text-right shadow-none hover:bg-input/30 focus-visible:border focus-visible:bg-background"
+ defaultValue={row.original.limit}
+ id={`${row.original.id}-limit`}
+ />
+ </form>
+ ),
+ },
+ {
+ accessorKey: "reviewer",
+ header: "Reviewer",
+ cell: ({ row }: any) => {
+ const isAssigned = row.original.reviewer !== "Assign reviewer"
+
+ if (isAssigned) {
+ return row.original.reviewer
+ }
+
+ return (
+ <>
+ <Label htmlFor={`${row.original.id}-reviewer`} className="sr-only">
+ Reviewer
+ </Label>
+ <Select>
+ <SelectTrigger
+ className="h-8 w-40"
+ id={`${row.original.id}-reviewer`}
+ >
+ <SelectValue placeholder="Assign reviewer" />
+ </SelectTrigger>
+ <SelectContent align="end">
+ <SelectItem value="Eddie Lake">Eddie Lake</SelectItem>
+ <SelectItem value="Jamik Tashpulatov">
+ Jamik Tashpulatov
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ </>
+ )
+ },
+ },
+ {
+ id: "actions",
+ cell: () => (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ variant="ghost"
+ className="flex size-8 text-muted-foreground data-[state=open]:bg-muted"
+ size="icon"
+ >
+ <MoreVerticalIcon />
+ <span className="sr-only">Open menu</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-32">
+ <DropdownMenuItem>Edit</DropdownMenuItem>
+ <DropdownMenuItem>Make a copy</DropdownMenuItem>
+ <DropdownMenuItem>Favorite</DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem>Delete</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ ),
+ },
+]
+
+function DraggableRow({ row }: { row: Row<z.infer<typeof schema>> }) {
+ const { transform, transition, setNodeRef, isDragging } = useSortable({
+ id: row.original.id,
+ })
+
+ return (
+ <TableRow
+ data-state={row.getIsSelected() && "selected"}
+ data-dragging={isDragging}
+ ref={setNodeRef}
+ className="relative z-0 data-[dragging=true]:z-10 data-[dragging=true]:opacity-80"
+ style={{
+ transform: CSS.Transform.toString(transform),
+ transition: transition,
+ }}
+ >
+ {row.getVisibleCells().map((cell: any) => (
+ <TableCell key={cell.id}>
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
+ </TableCell>
+ ))}
+ </TableRow>
+ )
+}
+
+export function DataTable({
+ data: initialData,
+}: {
+ data: z.infer<typeof schema>[]
+}) {
+ const [data, setData] = React.useState(() => initialData)
+ const [rowSelection, setRowSelection] = React.useState({})
+ const [columnVisibility, setColumnVisibility] =
+ React.useState<VisibilityState>({})
+ const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
+ []
+ )
+ const [sorting, setSorting] = React.useState<SortingState>([])
+ const [pagination, setPagination] = React.useState({
+ pageIndex: 0,
+ pageSize: 10,
+ })
+ const sortableId = React.useId()
+ const sensors = useSensors(
+ useSensor(MouseSensor, {}),
+ useSensor(TouchSensor, {}),
+ useSensor(KeyboardSensor, {})
+ )
+
+ const dataIds = React.useMemo<UniqueIdentifier[]>(
+ () => data?.map(({ id }) => id) || [],
+ [data]
+ )
+
+ const table = useReactTable({
+ data,
+ columns,
+ state: {
+ sorting,
+ columnVisibility,
+ rowSelection,
+ columnFilters,
+ pagination,
+ },
+ getRowId: (row: any) => row.id.toString(),
+ enableRowSelection: true,
+ onRowSelectionChange: setRowSelection,
+ onSortingChange: setSorting,
+ onColumnFiltersChange: setColumnFilters,
+ onColumnVisibilityChange: setColumnVisibility,
+ onPaginationChange: setPagination,
+ getCoreRowModel: getCoreRowModel(),
+ getFilteredRowModel: getFilteredRowModel(),
+ getPaginationRowModel: getPaginationRowModel(),
+ getSortedRowModel: getSortedRowModel(),
+ getFacetedRowModel: getFacetedRowModel(),
+ getFacetedUniqueValues: getFacetedUniqueValues(),
+ })
+
+ function handleDragEnd(event: DragEndEvent) {
+ const { active, over } = event
+ if (active && over && active.id !== over.id) {
+ setData((data) => {
+ const oldIndex = dataIds.indexOf(active.id)
+ const newIndex = dataIds.indexOf(over.id)
+ return arrayMove(data, oldIndex, newIndex)
+ })
+ }
+ }
+
+ return (
+ <Tabs
+ defaultValue="outline"
+ className="flex w-full flex-col justify-start gap-6"
+ >
+ <div className="flex items-center justify-between px-4 lg:px-6">
+ <Label htmlFor="view-selector" className="sr-only">
+ View
+ </Label>
+ <Select defaultValue="outline">
+ <SelectTrigger
+ className="@4xl/main:hidden flex w-fit"
+ id="view-selector"
+ >
+ <SelectValue placeholder="Select a view" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="outline">Outline</SelectItem>
+ <SelectItem value="past-performance">Past Performance</SelectItem>
+ <SelectItem value="key-personnel">Key Personnel</SelectItem>
+ <SelectItem value="focus-documents">Focus Documents</SelectItem>
+ </SelectContent>
+ </Select>
+ <TabsList className="@4xl/main:flex hidden">
+ <TabsTrigger value="outline">Outline</TabsTrigger>
+ <TabsTrigger value="past-performance" className="gap-1">
+ Past Performance{" "}
+ <Badge
+ variant="secondary"
+ className="flex h-5 w-5 items-center justify-center rounded-full bg-muted-foreground/30"
+ >
+ 3
+ </Badge>
+ </TabsTrigger>
+ <TabsTrigger value="key-personnel" className="gap-1">
+ Key Personnel{" "}
+ <Badge
+ variant="secondary"
+ className="flex h-5 w-5 items-center justify-center rounded-full bg-muted-foreground/30"
+ >
+ 2
+ </Badge>
+ </TabsTrigger>
+ <TabsTrigger value="focus-documents">Focus Documents</TabsTrigger>
+ </TabsList>
+ <div className="flex items-center gap-2">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm">
+ <ColumnsIcon />
+ <span className="hidden lg:inline">Customize Columns</span>
+ <span className="lg:hidden">Columns</span>
+ <ChevronDownIcon />
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-56">
+ {table
+ .getAllColumns()
+ .filter(
+ (column: any) =>
+ typeof column.accessorFn !== "undefined" &&
+ column.getCanHide()
+ )
+ .map((column: any) => {
+ return (
+ <DropdownMenuCheckboxItem
+ key={column.id}
+ className="capitalize"
+ checked={column.getIsVisible()}
+ onCheckedChange={(value) =>
+ column.toggleVisibility(!!value)
+ }
+ >
+ {column.id}
+ </DropdownMenuCheckboxItem>
+ )
+ })}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ <Button variant="outline" size="sm">
+ <PlusIcon />
+ <span className="hidden lg:inline">Add Section</span>
+ </Button>
+ </div>
+ </div>
+ <TabsContent
+ value="outline"
+ className="relative flex flex-col gap-4 overflow-auto px-4 lg:px-6"
+ >
+ <div className="overflow-hidden rounded-lg border">
+ <DndContext
+ collisionDetection={closestCenter}
+ modifiers={[restrictToVerticalAxis]}
+ onDragEnd={handleDragEnd}
+ sensors={sensors}
+ id={sortableId}
+ >
+ <Table>
+ <TableHeader className="sticky top-0 z-10 bg-muted">
+ {table.getHeaderGroups().map((headerGroup: { id: React.Key | null | undefined; headers: any[] }) => (
+ <TableRow key={headerGroup.id}>
+ {headerGroup.headers.map((header) => {
+ return (
+ <TableHead key={header.id} colSpan={header.colSpan}>
+ {header.isPlaceholder
+ ? null
+ : flexRender(
+ header.column.columnDef.header,
+ header.getContext()
+ )}
+ </TableHead>
+ )
+ })}
+ </TableRow>
+ ))}
+ </TableHeader>
+ <TableBody className="**:data-[slot=table-cell]:first:w-8">
+ {table.getRowModel().rows?.length ? (
+ <SortableContext
+ items={dataIds}
+ strategy={verticalListSortingStrategy}
+ >
+ {table.getRowModel().rows.map((row: any) => (
+ <DraggableRow key={row.id} row={row} />
+ ))}
+ </SortableContext>
+ ) : (
+ <TableRow>
+ <TableCell
+ colSpan={columns.length}
+ className="h-24 text-center"
+ >
+ No results.
+ </TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ </Table>
+ </DndContext>
+ </div>
+ <div className="flex items-center justify-between px-4">
+ <div className="hidden flex-1 text-sm text-muted-foreground lg:flex">
+ {table.getFilteredSelectedRowModel().rows.length} of{" "}
+ {table.getFilteredRowModel().rows.length} row(s) selected.
+ </div>
+ <div className="flex w-full items-center gap-8 lg:w-fit">
+ <div className="hidden items-center gap-2 lg:flex">
+ <Label htmlFor="rows-per-page" className="text-sm font-medium">
+ Rows per page
+ </Label>
+ <Select
+ value={`${table.getState().pagination.pageSize}`}
+ onValueChange={(value) => {
+ table.setPageSize(Number(value))
+ }}
+ >
+ <SelectTrigger className="w-20" id="rows-per-page">
+ <SelectValue
+ placeholder={table.getState().pagination.pageSize}
+ />
+ </SelectTrigger>
+ <SelectContent side="top">
+ {[10, 20, 30, 40, 50].map((pageSize) => (
+ <SelectItem key={pageSize} value={`${pageSize}`}>
+ {pageSize}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="flex w-fit items-center justify-center text-sm font-medium">
+ Page {table.getState().pagination.pageIndex + 1} of{" "}
+ {table.getPageCount()}
+ </div>
+ <div className="ml-auto flex items-center gap-2 lg:ml-0">
+ <Button
+ variant="outline"
+ className="hidden h-8 w-8 p-0 lg:flex"
+ onClick={() => table.setPageIndex(0)}
+ disabled={!table.getCanPreviousPage()}
+ >
+ <span className="sr-only">Go to first page</span>
+ <ChevronsLeftIcon />
+ </Button>
+ <Button
+ variant="outline"
+ className="size-8"
+ size="icon"
+ onClick={() => table.previousPage()}
+ disabled={!table.getCanPreviousPage()}
+ >
+ <span className="sr-only">Go to previous page</span>
+ <ChevronLeftIcon />
+ </Button>
+ <Button
+ variant="outline"
+ className="size-8"
+ size="icon"
+ onClick={() => table.nextPage()}
+ disabled={!table.getCanNextPage()}
+ >
+ <span className="sr-only">Go to next page</span>
+ <ChevronRightIcon />
+ </Button>
+ <Button
+ variant="outline"
+ className="hidden size-8 lg:flex"
+ size="icon"
+ onClick={() => table.setPageIndex(table.getPageCount() - 1)}
+ disabled={!table.getCanNextPage()}
+ >
+ <span className="sr-only">Go to last page</span>
+ <ChevronsRightIcon />
+ </Button>
+ </div>
+ </div>
+ </div>
+ </TabsContent>
+ <TabsContent
+ value="past-performance"
+ className="flex flex-col px-4 lg:px-6"
+ >
+ <div className="aspect-video w-full flex-1 rounded-lg border border-dashed"></div>
+ </TabsContent>
+ <TabsContent value="key-personnel" className="flex flex-col px-4 lg:px-6">
+ <div className="aspect-video w-full flex-1 rounded-lg border border-dashed"></div>
+ </TabsContent>
+ <TabsContent
+ value="focus-documents"
+ className="flex flex-col px-4 lg:px-6"
+ >
+ <div className="aspect-video w-full flex-1 rounded-lg border border-dashed"></div>
+ </TabsContent>
+ </Tabs>
+ )
+}
+
+const chartData = [
+ { month: "January", desktop: 186, mobile: 80 },
+ { month: "February", desktop: 305, mobile: 200 },
+ { month: "March", desktop: 237, mobile: 120 },
+ { month: "April", desktop: 73, mobile: 190 },
+ { month: "May", desktop: 209, mobile: 130 },
+ { month: "June", desktop: 214, mobile: 140 },
+]
+
+const chartConfig = {
+ desktop: {
+ label: "Desktop",
+ color: "var(--primary)",
+ },
+ mobile: {
+ label: "Mobile",
+ color: "var(--primary)",
+ },
+} satisfies ChartConfig
+
+function TableCellViewer({ item }: { item: z.infer<typeof schema> }) {
+ const isMobile = useIsMobile()
+
+ return (
+ <Sheet>
+ <SheetTrigger asChild>
+ <Button variant="link" className="w-fit px-0 text-left text-foreground">
+ {item.header}
+ </Button>
+ </SheetTrigger>
+ <SheetContent side="right" className="flex flex-col">
+ <SheetHeader className="gap-1">
+ <SheetTitle>{item.header}</SheetTitle>
+ <SheetDescription>
+ Showing total visitors for the last 6 months
+ </SheetDescription>
+ </SheetHeader>
+ <div className="flex flex-1 flex-col gap-4 overflow-y-auto py-4 text-sm">
+ {!isMobile && (
+ <>
+ <ChartContainer config={chartConfig}>
+ <AreaChart
+ accessibilityLayer
+ data={chartData}
+ margin={{
+ left: 0,
+ right: 10,
+ }}
+ >
+ <CartesianGrid vertical={false} />
+ <XAxis
+ dataKey="month"
+ tickLine={false}
+ axisLine={false}
+ tickMargin={8}
+ tickFormatter={(value) => value.slice(0, 3)}
+ hide
+ />
+ <ChartTooltip
+ cursor={false}
+ content={<ChartTooltipContent indicator="dot" />}
+ />
+ <Area
+ dataKey="mobile"
+ type="natural"
+ fill="var(--color-mobile)"
+ fillOpacity={0.6}
+ stroke="var(--color-mobile)"
+ stackId="a"
+ />
+ <Area
+ dataKey="desktop"
+ type="natural"
+ fill="var(--color-desktop)"
+ fillOpacity={0.4}
+ stroke="var(--color-desktop)"
+ stackId="a"
+ />
+ </AreaChart>
+ </ChartContainer>
+ <Separator />
+ <div className="grid gap-2">
+ <div className="flex gap-2 font-medium leading-none">
+ Trending up by 5.2% this month{" "}
+ <TrendingUpIcon className="size-4" />
+ </div>
+ <div className="text-muted-foreground">
+ Showing total visitors for the last 6 months. This is just
+ some random text to test the layout. It spans multiple lines
+ and should wrap around.
+ </div>
+ </div>
+ <Separator />
+ </>
+ )}
+ <form className="flex flex-col gap-4">
+ <div className="flex flex-col gap-3">
+ <Label htmlFor="header">Header</Label>
+ <Input id="header" defaultValue={item.header} />
+ </div>
+ <div className="grid grid-cols-2 gap-4">
+ <div className="flex flex-col gap-3">
+ <Label htmlFor="type">Type</Label>
+ <Select defaultValue={item.type}>
+ <SelectTrigger id="type" className="w-full">
+ <SelectValue placeholder="Select a type" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="Table of Contents">
+ Table of Contents
+ </SelectItem>
+ <SelectItem value="Executive Summary">
+ Executive Summary
+ </SelectItem>
+ <SelectItem value="Technical Approach">
+ Technical Approach
+ </SelectItem>
+ <SelectItem value="Design">Design</SelectItem>
+ <SelectItem value="Capabilities">Capabilities</SelectItem>
+ <SelectItem value="Focus Documents">
+ Focus Documents
+ </SelectItem>
+ <SelectItem value="Narrative">Narrative</SelectItem>
+ <SelectItem value="Cover Page">Cover Page</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="flex flex-col gap-3">
+ <Label htmlFor="status">Status</Label>
+ <Select defaultValue={item.status}>
+ <SelectTrigger id="status" className="w-full">
+ <SelectValue placeholder="Select a status" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="Done">Done</SelectItem>
+ <SelectItem value="In Progress">In Progress</SelectItem>
+ <SelectItem value="Not Started">Not Started</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ <div className="grid grid-cols-2 gap-4">
+ <div className="flex flex-col gap-3">
+ <Label htmlFor="target">Target</Label>
+ <Input id="target" defaultValue={item.target} />
+ </div>
+ <div className="flex flex-col gap-3">
+ <Label htmlFor="limit">Limit</Label>
+ <Input id="limit" defaultValue={item.limit} />
+ </div>
+ </div>
+ <div className="flex flex-col gap-3">
+ <Label htmlFor="reviewer">Reviewer</Label>
+ <Select defaultValue={item.reviewer}>
+ <SelectTrigger id="reviewer" className="w-full">
+ <SelectValue placeholder="Select a reviewer" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="Eddie Lake">Eddie Lake</SelectItem>
+ <SelectItem value="Jamik Tashpulatov">
+ Jamik Tashpulatov
+ </SelectItem>
+ <SelectItem value="Emily Whalen">Emily Whalen</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ </form>
+ </div>
+ <SheetFooter className="mt-auto flex gap-2 sm:flex-col sm:space-x-0">
+ <Button className="w-full">Submit</Button>
+ <SheetClose asChild>
+ <Button variant="outline" className="w-full">
+ Done
+ </Button>
+ </SheetClose>
+ </SheetFooter>
+ </SheetContent>
+ </Sheet>
+ )
+}
diff --git a/flowsint-web/src/app/dashboard/entities/data.json b/flowsint-web/src/app/dashboard/entities/data.json
new file mode 100644
index 00000000..13ff0365
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/entities/data.json
@@ -0,0 +1,614 @@
+[
+ {
+ "id": 1,
+ "header": "Cover page",
+ "type": "Cover page",
+ "status": "In Process",
+ "target": "18",
+ "limit": "5",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 2,
+ "header": "Table of contents",
+ "type": "Table of contents",
+ "status": "Done",
+ "target": "29",
+ "limit": "24",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 3,
+ "header": "Executive summary",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "10",
+ "limit": "13",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 4,
+ "header": "Technical approach",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "27",
+ "limit": "23",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 5,
+ "header": "Design",
+ "type": "Narrative",
+ "status": "In Process",
+ "target": "2",
+ "limit": "16",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 6,
+ "header": "Capabilities",
+ "type": "Narrative",
+ "status": "In Process",
+ "target": "20",
+ "limit": "8",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 7,
+ "header": "Integration with existing systems",
+ "type": "Narrative",
+ "status": "In Process",
+ "target": "19",
+ "limit": "21",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 8,
+ "header": "Innovation and Advantages",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "25",
+ "limit": "26",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 9,
+ "header": "Overview of EMR's Innovative Solutions",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "7",
+ "limit": "23",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 10,
+ "header": "Advanced Algorithms and Machine Learning",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "30",
+ "limit": "28",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 11,
+ "header": "Adaptive Communication Protocols",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "9",
+ "limit": "31",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 12,
+ "header": "Advantages Over Current Technologies",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "12",
+ "limit": "0",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 13,
+ "header": "Past Performance",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "22",
+ "limit": "33",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 14,
+ "header": "Customer Feedback and Satisfaction Levels",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "15",
+ "limit": "34",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 15,
+ "header": "Implementation Challenges and Solutions",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "3",
+ "limit": "35",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 16,
+ "header": "Security Measures and Data Protection Policies",
+ "type": "Narrative",
+ "status": "In Process",
+ "target": "6",
+ "limit": "36",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 17,
+ "header": "Scalability and Future Proofing",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "4",
+ "limit": "37",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 18,
+ "header": "Cost-Benefit Analysis",
+ "type": "Plain language",
+ "status": "Done",
+ "target": "14",
+ "limit": "38",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 19,
+ "header": "User Training and Onboarding Experience",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "17",
+ "limit": "39",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 20,
+ "header": "Future Development Roadmap",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "11",
+ "limit": "40",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 21,
+ "header": "System Architecture Overview",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "24",
+ "limit": "18",
+ "reviewer": "Maya Johnson"
+ },
+ {
+ "id": 22,
+ "header": "Risk Management Plan",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "15",
+ "limit": "22",
+ "reviewer": "Carlos Rodriguez"
+ },
+ {
+ "id": 23,
+ "header": "Compliance Documentation",
+ "type": "Legal",
+ "status": "In Process",
+ "target": "31",
+ "limit": "27",
+ "reviewer": "Sarah Chen"
+ },
+ {
+ "id": 24,
+ "header": "API Documentation",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "8",
+ "limit": "12",
+ "reviewer": "Raj Patel"
+ },
+ {
+ "id": 25,
+ "header": "User Interface Mockups",
+ "type": "Visual",
+ "status": "In Process",
+ "target": "19",
+ "limit": "25",
+ "reviewer": "Leila Ahmadi"
+ },
+ {
+ "id": 26,
+ "header": "Database Schema",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "22",
+ "limit": "20",
+ "reviewer": "Thomas Wilson"
+ },
+ {
+ "id": 27,
+ "header": "Testing Methodology",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "17",
+ "limit": "14",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 28,
+ "header": "Deployment Strategy",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "26",
+ "limit": "30",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 29,
+ "header": "Budget Breakdown",
+ "type": "Financial",
+ "status": "In Process",
+ "target": "13",
+ "limit": "16",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 30,
+ "header": "Market Analysis",
+ "type": "Research",
+ "status": "Done",
+ "target": "29",
+ "limit": "32",
+ "reviewer": "Sophia Martinez"
+ },
+ {
+ "id": 31,
+ "header": "Competitor Comparison",
+ "type": "Research",
+ "status": "In Process",
+ "target": "21",
+ "limit": "19",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 32,
+ "header": "Maintenance Plan",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "16",
+ "limit": "23",
+ "reviewer": "Alex Thompson"
+ },
+ {
+ "id": 33,
+ "header": "User Personas",
+ "type": "Research",
+ "status": "In Process",
+ "target": "27",
+ "limit": "24",
+ "reviewer": "Nina Patel"
+ },
+ {
+ "id": 34,
+ "header": "Accessibility Compliance",
+ "type": "Legal",
+ "status": "Done",
+ "target": "18",
+ "limit": "21",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 35,
+ "header": "Performance Metrics",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "23",
+ "limit": "26",
+ "reviewer": "David Kim"
+ },
+ {
+ "id": 36,
+ "header": "Disaster Recovery Plan",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "14",
+ "limit": "17",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 37,
+ "header": "Third-party Integrations",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "25",
+ "limit": "28",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 38,
+ "header": "User Feedback Summary",
+ "type": "Research",
+ "status": "Done",
+ "target": "20",
+ "limit": "15",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 39,
+ "header": "Localization Strategy",
+ "type": "Narrative",
+ "status": "In Process",
+ "target": "12",
+ "limit": "19",
+ "reviewer": "Maria Garcia"
+ },
+ {
+ "id": 40,
+ "header": "Mobile Compatibility",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "28",
+ "limit": "31",
+ "reviewer": "James Wilson"
+ },
+ {
+ "id": 41,
+ "header": "Data Migration Plan",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "19",
+ "limit": "22",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 42,
+ "header": "Quality Assurance Protocols",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "30",
+ "limit": "33",
+ "reviewer": "Priya Singh"
+ },
+ {
+ "id": 43,
+ "header": "Stakeholder Analysis",
+ "type": "Research",
+ "status": "In Process",
+ "target": "11",
+ "limit": "14",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 44,
+ "header": "Environmental Impact Assessment",
+ "type": "Research",
+ "status": "Done",
+ "target": "24",
+ "limit": "27",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 45,
+ "header": "Intellectual Property Rights",
+ "type": "Legal",
+ "status": "In Process",
+ "target": "17",
+ "limit": "20",
+ "reviewer": "Sarah Johnson"
+ },
+ {
+ "id": 46,
+ "header": "Customer Support Framework",
+ "type": "Narrative",
+ "status": "Done",
+ "target": "22",
+ "limit": "25",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 47,
+ "header": "Version Control Strategy",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "15",
+ "limit": "18",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 48,
+ "header": "Continuous Integration Pipeline",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "26",
+ "limit": "29",
+ "reviewer": "Michael Chen"
+ },
+ {
+ "id": 49,
+ "header": "Regulatory Compliance",
+ "type": "Legal",
+ "status": "In Process",
+ "target": "13",
+ "limit": "16",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 50,
+ "header": "User Authentication System",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "28",
+ "limit": "31",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 51,
+ "header": "Data Analytics Framework",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "21",
+ "limit": "24",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 52,
+ "header": "Cloud Infrastructure",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "16",
+ "limit": "19",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 53,
+ "header": "Network Security Measures",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "29",
+ "limit": "32",
+ "reviewer": "Lisa Wong"
+ },
+ {
+ "id": 54,
+ "header": "Project Timeline",
+ "type": "Planning",
+ "status": "Done",
+ "target": "14",
+ "limit": "17",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 55,
+ "header": "Resource Allocation",
+ "type": "Planning",
+ "status": "In Process",
+ "target": "27",
+ "limit": "30",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 56,
+ "header": "Team Structure and Roles",
+ "type": "Planning",
+ "status": "Done",
+ "target": "20",
+ "limit": "23",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 57,
+ "header": "Communication Protocols",
+ "type": "Planning",
+ "status": "In Process",
+ "target": "15",
+ "limit": "18",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 58,
+ "header": "Success Metrics",
+ "type": "Planning",
+ "status": "Done",
+ "target": "30",
+ "limit": "33",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 59,
+ "header": "Internationalization Support",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "23",
+ "limit": "26",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 60,
+ "header": "Backup and Recovery Procedures",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "18",
+ "limit": "21",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 61,
+ "header": "Monitoring and Alerting System",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "25",
+ "limit": "28",
+ "reviewer": "Daniel Park"
+ },
+ {
+ "id": 62,
+ "header": "Code Review Guidelines",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "12",
+ "limit": "15",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 63,
+ "header": "Documentation Standards",
+ "type": "Technical content",
+ "status": "In Process",
+ "target": "27",
+ "limit": "30",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 64,
+ "header": "Release Management Process",
+ "type": "Planning",
+ "status": "Done",
+ "target": "22",
+ "limit": "25",
+ "reviewer": "Assign reviewer"
+ },
+ {
+ "id": 65,
+ "header": "Feature Prioritization Matrix",
+ "type": "Planning",
+ "status": "In Process",
+ "target": "19",
+ "limit": "22",
+ "reviewer": "Emma Davis"
+ },
+ {
+ "id": 66,
+ "header": "Technical Debt Assessment",
+ "type": "Technical content",
+ "status": "Done",
+ "target": "24",
+ "limit": "27",
+ "reviewer": "Eddie Lake"
+ },
+ {
+ "id": 67,
+ "header": "Capacity Planning",
+ "type": "Planning",
+ "status": "In Process",
+ "target": "21",
+ "limit": "24",
+ "reviewer": "Jamik Tashpulatov"
+ },
+ {
+ "id": 68,
+ "header": "Service Level Agreements",
+ "type": "Legal",
+ "status": "Done",
+ "target": "26",
+ "limit": "29",
+ "reviewer": "Assign reviewer"
+ }
+]
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/entities/page.tsx b/flowsint-web/src/app/dashboard/entities/page.tsx
new file mode 100644
index 00000000..6d20e758
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/entities/page.tsx
@@ -0,0 +1,12 @@
+import React from 'react'
+import data from "./data.json"
+import { DataTable } from './data-table'
+const page = () => {
+ return (
+ <div className="w-full space-y-8 container mx-auto py-12 px-8">
+ <DataTable data={data} />
+ </div>
+ )
+}
+
+export default page
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/layout.tsx b/flowsint-web/src/app/dashboard/layout.tsx
index 7bca6243..a556bc48 100644
--- a/flowsint-web/src/app/dashboard/layout.tsx
+++ b/flowsint-web/src/app/dashboard/layout.tsx
@@ -3,18 +3,18 @@ import { createClient } from "@/lib/supabase/server";
import {
SidebarInset,
SidebarProvider,
- SidebarTrigger,
} from "@/components/ui/sidebar"
import { redirect } from "next/navigation";
-import { Button } from "@/components/ui/button";
const DashboardLayout = async ({
children,
}: {
children: React.ReactNode;
+
}) => {
const supabase = await createClient()
const { data, error: userError } = await supabase.auth.getUser()
+
if (userError || !data?.user) {
redirect('/login')
}
diff --git a/flowsint-web/src/app/dashboard/page.tsx b/flowsint-web/src/app/dashboard/page.tsx
index 07fdcbb4..dc3dcae3 100644
--- a/flowsint-web/src/app/dashboard/page.tsx
+++ b/flowsint-web/src/app/dashboard/page.tsx
@@ -4,27 +4,28 @@ import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
-import { ChevronLeft, MoreHorizontal, PlusIcon, Search, SlidersHorizontal } from "lucide-react"
+import { FolderLockIcon, MoreHorizontal, PlusIcon, RotateCwIcon, Search, SlidersHorizontal } from "lucide-react"
import { useQuery } from "@tanstack/react-query"
import { notFound } from "next/navigation"
import Loader from "@/components/loader"
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"
import { format, formatDistanceToNow } from "date-fns"
-import { Folder } from "lucide-react"
import Link from "next/link"
import { Project } from "@/types/project"
import RecentSketches from "@/components/dashboard/recent-sketches"
import NewProject from "@/components/dashboard/new-project"
import { AvatarList } from "@/components/avatar-list"
+import { cn } from "@/lib/utils"
+import DashboardLayout from "@/components/dashboard/layout"
const DashboardPage = () => {
const [searchQuery, setSearchQuery] = useState("")
- const { data, isLoading } = useQuery({
+ const { data, isLoading, refetch, isRefetching } = useQuery({
queryKey: ["dashboard", "projects"],
queryFn: async () => {
const res = await fetch(`/api/projects`)
- if (!res.ok) {
+ if (!res.ok || res.status === 404) {
notFound()
}
return res.json()
@@ -37,117 +38,122 @@ const DashboardPage = () => {
)
return (
- <div className="w-full space-y-8 container mx-auto py-12 px-8">
- <div>
- <h1 className="text-3xl font-bold">Welcome back, Eliott</h1>
- </div>
- <div>
- <RecentSketches />
- </div>
- <div className="flex items-center justify-between mb-6">
- <div className="relative w-full max-w-md">
- <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
- <Input
- type="search"
- placeholder="Search projects..."
- className="pl-8 w-full"
- value={searchQuery}
- onChange={(e) => setSearchQuery(e.target.value)}
- />
+ <DashboardLayout items={[{ name: "Dashboard" }, { name: "Projects" }]}>
+ <div className="w-full space-y-8 container mx-auto py-12 px-8">
+ <div>
+ <h1 className="text-3xl font-bold">Welcome back, Eliott</h1>
</div>
- <div className="flex items-center gap-2">
- <NewProject>
- <Button size="sm" className="gap-2">
- <PlusIcon className="h-4 w-4" /> Add
- </Button>
- </NewProject>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="outline" size="sm" className="gap-2">
- <SlidersHorizontal className="h-4 w-4 opacity-60" />
- <span className="hidden sm:inline">Sort by</span>
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuItem>Name</DropdownMenuItem>
- <DropdownMenuItem>Date created</DropdownMenuItem>
- <DropdownMenuItem>Date modified</DropdownMenuItem>
- <DropdownMenuItem>Size</DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
+ <div>
+ <RecentSketches />
</div>
- </div>
- {isLoading ? (
- <div className="flex justify-center items-center py-12">
- <Loader />
+ <div className="flex items-center justify-between mb-6">
+ <div className="relative w-full max-w-md">
+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
+ <Input
+ type="search"
+ placeholder="Search projects..."
+ className="pl-8 w-full"
+ value={searchQuery}
+ onChange={(e) => setSearchQuery(e.target.value)}
+ />
+ </div>
+ <div className="flex items-center gap-2">
+ <NewProject>
+ <Button size="sm" className="gap-2">
+ <PlusIcon className="h-4 w-4" /> Add
+ </Button>
+ </NewProject>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm" className="gap-2">
+ <SlidersHorizontal className="h-4 w-4 opacity-60" />
+ <span className="hidden sm:inline">Sort by</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem>Name</DropdownMenuItem>
+ <DropdownMenuItem>Date created</DropdownMenuItem>
+ <DropdownMenuItem>Date modified</DropdownMenuItem>
+ <DropdownMenuItem>Size</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ <Button onClick={() => refetch()} disabled={isLoading || isRefetching} variant={"outline"} size="sm" className="gap-2">
+ <RotateCwIcon className={cn("h-4 w-4", isLoading || isRefetching && "animate-spin")} /> Refresh
+ </Button>
+ </div>
</div>
- ) : (
- <div className="border rounded-md">
- <Table>
- <TableHeader>
- <TableRow>
- <TableHead>Name</TableHead>
- <TableHead>Owner</TableHead>
- <TableHead className="hidden md:table-cell">Size</TableHead>
- <TableHead className="hidden sm:table-cell">Last modified</TableHead>
- <TableHead className="hidden sm:table-cell">Members</TableHead>
- <TableHead className="hidden sm:table-cell">Creation</TableHead>
- <TableHead className="w-[50px]"></TableHead>
- </TableRow>
- </TableHeader>
- <TableBody>
- {filteredProjects.length === 0 ? (
+ {isLoading ? (
+ <div className="flex justify-center items-center py-12">
+ <Loader />
+ </div>
+ ) : (
+ <div className="border rounded-md">
+ <Table>
+ <TableHeader>
<TableRow>
- <TableCell colSpan={5} className="text-center py-8 text-muted-foreground">
- No projects found
- </TableCell>
+ <TableHead>Name</TableHead>
+ <TableHead>Owner</TableHead>
+ <TableHead className="hidden md:table-cell">Size</TableHead>
+ <TableHead className="hidden sm:table-cell">Last modified</TableHead>
+ <TableHead className="hidden sm:table-cell">Members</TableHead>
+ <TableHead className="hidden sm:table-cell">Creation</TableHead>
+ <TableHead className="w-[50px]"></TableHead>
</TableRow>
- ) : (
- filteredProjects.map((project: Project) => (
- <TableRow key={project.id}>
- <TableCell>
- <Link href={`dashboard/projects/${project.id}`} className="flex items-center gap-2 hover:underline">
- <Folder className="h-5 w-5 text-primary" />
- <span>{project.name}</span>
- </Link>
- </TableCell>
- <TableCell className="text-muted-foreground">{`${project?.owner?.first_name} ${project?.owner?.last_name}` || "You"}</TableCell>
- <TableCell className="hidden md:table-cell text-muted-foreground">
- {(project.investigations?.length || 0) > 0 ? `${project.investigations.length} items` : "Empty"}
- </TableCell>
- <TableCell className="hidden sm:table-cell text-muted-foreground">
- {formatDistanceToNow(new Date(project.last_updated_at), { addSuffix: true })}
- </TableCell>
- <TableCell className="hidden sm:table-cell text-muted-foreground">
- <AvatarList users={[{ id: "1", name: "Jean" }, { id: "2", name: "Eliott" }, { id: "4", name: "Marc" }, { id: "2", name: "Frank" }]} size="sm" />
- </TableCell>
- <TableCell className="hidden sm:table-cell text-muted-foreground">
- {format(new Date(project.created_at), "dd.MM.yyyy")}
- </TableCell>
- <TableCell>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="ghost" size="icon" className="h-8 w-8">
- <MoreHorizontal className="h-4 w-4" />
- <span className="sr-only">Actions</span>
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuItem>Open</DropdownMenuItem>
- <DropdownMenuItem>Rename</DropdownMenuItem>
- <DropdownMenuItem>Share</DropdownMenuItem>
- <DropdownMenuItem className="text-destructive">Delete</DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
+ </TableHeader>
+ <TableBody>
+ {filteredProjects.length === 0 ? (
+ <TableRow>
+ <TableCell colSpan={7} className="text-center py-8 text-muted-foreground">
+ No projects found
</TableCell>
</TableRow>
- ))
- )}
- </TableBody>
- </Table>
- </div>
- )}
- </div>
+ ) : (
+ filteredProjects.map((project: Project) => (
+ <TableRow key={project.id}>
+ <TableCell>
+ <Link href={`dashboard/projects/${project.id}`} className="flex items-center gap-2 hover:underline">
+ <FolderLockIcon className="h-5 w-5 text-primary" />
+ <span>{project.name}</span>
+ </Link>
+ </TableCell>
+ <TableCell className="text-muted-foreground">{`${project?.owner?.first_name} ${project?.owner?.last_name}` || "You"}</TableCell>
+ <TableCell className="hidden md:table-cell text-muted-foreground">
+ {(project.investigations?.length || 0) > 0 ? `${project.investigations.length} items` : "Empty"}
+ </TableCell>
+ <TableCell className="hidden sm:table-cell text-muted-foreground">
+ {formatDistanceToNow(new Date(project.last_updated_at), { addSuffix: true })}
+ </TableCell>
+ <TableCell className="hidden sm:table-cell text-muted-foreground">
+ <AvatarList users={[{ id: "1", name: "Jean" }, { id: "2", name: "Eliott" }, { id: "4", name: "Marc" }, { id: "2", name: "Frank" }]} size="sm" />
+ </TableCell>
+ <TableCell className="hidden sm:table-cell text-muted-foreground">
+ {format(new Date(project.created_at), "dd.MM.yyyy")}
+ </TableCell>
+ <TableCell>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <MoreHorizontal className="h-4 w-4" />
+ <span className="sr-only">Actions</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem>Open</DropdownMenuItem>
+ <DropdownMenuItem>Rename</DropdownMenuItem>
+ <DropdownMenuItem>Share</DropdownMenuItem>
+ <DropdownMenuItem className="text-destructive">Delete</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </TableCell>
+ </TableRow>
+ ))
+ )}
+ </TableBody>
+ </Table>
+ </div>
+ )}
+ </div>
+ </DashboardLayout>
)
}
diff --git a/flowsint-web/src/app/dashboard/projects/[project_id]/individuals/[individual_id]/page.tsx b/flowsint-web/src/app/dashboard/projects/[project_id]/individuals/[individual_id]/page.tsx
new file mode 100644
index 00000000..11e7688e
--- /dev/null
+++ b/flowsint-web/src/app/dashboard/projects/[project_id]/individuals/[individual_id]/page.tsx
@@ -0,0 +1,489 @@
+import Image from "next/image"
+import Link from "next/link"
+import {
+ ArrowRight,
+ Calendar,
+ ExternalLink,
+ CreditCard,
+ User,
+ Mail,
+ Phone,
+ Facebook,
+ Instagram,
+ Twitter,
+ Youtube,
+ Building2,
+} from "lucide-react"
+
+import { Card, CardContent, CardHeader } from "@/components/ui/card"
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
+import DashboardLayout from "@/components/dashboard/layout"
+
+// This is a mock type for the individual object
+// Replace with your actual type definition
+type Individual = {
+ id: string
+ full_name: string
+ investigation: {
+ title: string
+ id: string,
+ project: {
+ name: string,
+ id: string
+ }
+ }
+ avatar: string
+ email: string
+ phoneNumber: string
+ stats: {
+ accounts: number
+ names: number
+ emails: number
+ phoneNumbers: number
+ }
+ profile: {
+ birthday: string
+ familyStatus: string
+ isJobSeeker: boolean
+ education: string
+ jobTitle: string
+ company: string
+ }
+ jobHistory: Array<{
+ title: string
+ company: string
+ logo: string
+ startDate: string
+ endDate: string
+ }>
+ scores: {
+ overall: number
+ phone: number
+ email: number
+ ipAddress: number | null
+ }
+ socialMedia: {
+ facebook?: {
+ firstSeen: string
+ followersCount: number
+ fullName: string
+ username: string
+ location: string
+ profileImage?: string
+ }
+ instagram?: {
+ firstSeen: string
+ followersCount: number
+ followingCount: number
+ username: string
+ isVerified: boolean
+ probability: string
+ profileImage?: string
+ }
+ x?: {
+ firstSeen: string
+ }
+ youtube?: Record<string, any>
+ }
+}
+
+// This would typically come from a database or API
+async function getIndividual(id: string): Promise<Individual> {
+ // Mock data based on the screenshot
+ return {
+ id,
+ full_name: "Lawrence Jackson",
+ avatar: "/placeholder.svg?height=100&width=100",
+ email: "[email protected]",
+ phoneNumber: "+41 952 874 321",
+ investigation: {
+ title: "Investigation 1",
+ id: "1",
+ project: {
+ name: "Project 1",
+ id: "1"
+ },
+ },
+ stats: {
+ accounts: 24,
+ names: 16,
+ emails: 5,
+ phoneNumbers: 2,
+ },
+ profile: {
+ birthday: "16/02/1985",
+ familyStatus: "Married",
+ isJobSeeker: false,
+ education: "Bachelor's Degree",
+ jobTitle: "Manager",
+ company: "Liberty LDA",
+ },
+ jobHistory: [
+ {
+ title: "Data Analyst",
+ company: "Vertex Dynamics",
+ logo: "/placeholder.svg?height=40&width=40",
+ startDate: "Nov 2023",
+ endDate: "Mar 2024",
+ },
+ {
+ title: "Senior Software Engineer",
+ company: "Innovatech Solutions",
+ logo: "/placeholder.svg?height=40&width=40",
+ startDate: "Jul 2022",
+ endDate: "Nov 2023",
+ },
+ {
+ title: "Software Engineer",
+ company: "Quantum Systems",
+ logo: "/placeholder.svg?height=40&width=40",
+ startDate: "Feb 2021",
+ endDate: "Dec 2022",
+ },
+ ],
+ scores: {
+ overall: 60,
+ phone: 60,
+ email: 10,
+ ipAddress: null,
+ },
+ socialMedia: {
+ facebook: {
+ firstSeen: "02/07/2016, 16:42",
+ followersCount: 12,
+ fullName: "Lawrence Jackson",
+ username: "ameliaj",
+ location: "Texas, United States",
+ profileImage: "/placeholder.svg?height=100&width=100",
+ },
+ instagram: {
+ firstSeen: "02/07/2016, 16:42",
+ followersCount: 650,
+ followingCount: 847,
+ username: "Jackson23",
+ isVerified: false,
+ probability: "100%",
+ profileImage: "/placeholder.svg?height=100&width=100",
+ },
+ x: {
+ firstSeen: "02/07/2016, 16:42",
+ },
+ youtube: {},
+ },
+ }
+}
+
+export default async function IndividualPage({ params }: { params: Promise<{ individual_id: string }> }) {
+ const { individual_id } = await params
+ const individual = await getIndividual(individual_id)
+
+ return (
+ <DashboardLayout items={[{ name: "Projects", href: "/dashboard" }, { name: individual?.investigation?.project?.name, href: `/dashboard/projects/${individual?.investigation?.project?.id}` }, { name: individual?.investigation?.title, href: `/dashboard/projects/${individual?.investigation?.project?.id}/investigations//${individual?.investigation?.id}` }, { name: individual?.full_name }]}>
+ <div className="min-h-screen p-6">
+ <div className="max-w-7xl mx-auto my-12 space-y-6">
+ {/* Header with profile info */}
+ <div className="flex flex-col md:flex-row gap-6 items-start md:items-center">
+ <Avatar className="w-24 h-24 rounded-full border-2">
+ <AvatarImage src={individual.avatar} alt={individual.full_name} />
+ <AvatarFallback className="">
+ {individual.full_name
+ .split(" ")
+ .map((n) => n[0])
+ .join("")}
+ </AvatarFallback>
+ </Avatar>
+ <div className="space-y-4">
+ <h1 className="text-3xl md:text-4xl font-bold">{individual.full_name}</h1>
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
+ <div className="flex items-center gap-2">
+ <span className="opacity-60">Email</span>
+ <span>{individual.email}</span>
+ </div>
+ <div className="flex items-center gap-2">
+ <span className="opacity-60">Phone Number</span>
+ <span>{individual.phoneNumber}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ {/* Stats cards */}
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardContent className="p-4 flex justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="p-2 rounded-md ">
+ <CreditCard className="h-5 w-5" />
+ </div>
+ <span className="opacity-60">Accounts</span>
+ </div>
+ <div className="flex items-center gap-1">
+ <span className="text-2xl font-bold">{individual.stats.accounts}</span>
+ <ArrowRight className="h-4 w-4 text-gray-500" />
+ </div>
+ </CardContent>
+ </Card>
+
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardContent className="p-4 flex justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="p-2 rounded-md ">
+ <User className="h-5 w-5" />
+ </div>
+ <span className="opacity-60">Names</span>
+ </div>
+ <div className="flex items-center gap-1">
+ <span className="text-2xl font-bold">{individual.stats.names}</span>
+ <ArrowRight className="h-4 w-4 text-gray-500" />
+ </div>
+ </CardContent>
+ </Card>
+
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardContent className="p-4 flex justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="p-2 rounded-md ">
+ <Mail className="h-5 w-5" />
+ </div>
+ <span className="opacity-60">Emails</span>
+ </div>
+ <div className="flex items-center gap-1">
+ <span className="text-2xl font-bold">{individual.stats.emails}</span>
+ <ArrowRight className="h-4 w-4 text-gray-500" />
+ </div>
+ </CardContent>
+ </Card>
+
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardContent className="p-4 flex justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="p-2 rounded-md ">
+ <Phone className="h-5 w-5" />
+ </div>
+ <span className="opacity-60">Phone Numbers</span>
+ </div>
+ <div className="flex items-center gap-1">
+ <span className="text-2xl font-bold">{individual.stats.phoneNumbers}</span>
+ <ArrowRight className="h-4 w-4 text-gray-500" />
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Main content grid */}
+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
+ {/* Profile section */}
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardHeader className="border-b pb-4">
+ <h2 className="text-xl font-bold">Profile</h2>
+ </CardHeader>
+ <CardContent className="p-4 space-y-4">
+ <div className="grid grid-cols-2 gap-y-4">
+ <span className="opacity-60">Birthday</span>
+ <span className="text-right">{individual.profile.birthday}</span>
+
+ <span className="opacity-60">Family status</span>
+ <span className="text-right">{individual.profile.familyStatus}</span>
+
+ <span className="opacity-60">Is job seeker</span>
+ <span className="text-right">{individual.profile.isJobSeeker ? "Yes" : "No"}</span>
+
+ <span className="opacity-60">Education</span>
+ <span className="text-right">{individual.profile.education}</span>
+
+ <span className="opacity-60">Job title</span>
+ <span className="text-right">{individual.profile.jobTitle}</span>
+
+ <span className="opacity-60">Company</span>
+ <span className="text-right">{individual.profile.company}</span>
+ </div>
+ </CardContent>
+ </Card>
+
+ {/* Job History section */}
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardHeader className="border-b pb-4">
+ <h2 className="text-xl font-bold">Job History</h2>
+ </CardHeader>
+ <CardContent className="p-4 space-y-6">
+ {individual.jobHistory.map((job, index) => (
+ <div key={index} className="flex gap-4">
+ <div className="flex-shrink-0">
+ <div className="w-10 h-10 rounded-md overflow-hidden bg-sidebar shadow-none flex items-center justify-center">
+ {/* <Image
+ src={job.logo || "/placeholder.svg"}
+ alt={job.company}
+ width={40}
+ height={40}
+ className="object-cover"
+ /> */}
+ <Building2 className="h-5 w-5" />
+ </div>
+ </div>
+ <div className="flex-1">
+ <h3 className="font-medium">{job.title}</h3>
+ <p className="opacity-60">{job.company}</p>
+ </div>
+ <div className="text-right opacity-60 text-sm">
+ {job.startDate} - {job.endDate}
+ </div>
+ </div>
+ ))}
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Social Media section */}
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
+ {/* Facebook */}
+ {individual.socialMedia.facebook && (
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardHeader className="border-b pb-4 flex flex-row justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-8 h-8 bg-blue-600 rounded flex items-center justify-center">
+ <Facebook className="h-5 w-5 text-white" />
+ </div>
+ <h2 className="text-xl font-bold">Facebook</h2>
+ </div>
+ <div className="flex items-center gap-1 text-sm opacity-60">
+ <Calendar className="h-4 w-4" />
+ <span>First seen {individual.socialMedia.facebook.firstSeen}</span>
+ </div>
+ </CardHeader>
+ <CardContent className="p-4">
+ <div className="flex justify-between">
+ <div className="space-y-4">
+ <div className="grid grid-cols-2 gap-y-4 gap-x-8">
+ <span className="opacity-60">Followers count</span>
+ <span>{individual.socialMedia.facebook.followersCount}</span>
+
+ <span className="opacity-60">Full name</span>
+ <span>{individual.socialMedia.facebook.fullName}</span>
+
+ <span className="opacity-60">Username</span>
+ <span>{individual.socialMedia.facebook.username}</span>
+
+ <span className="opacity-60">Location</span>
+ <span>{individual.socialMedia.facebook.location}</span>
+ </div>
+ </div>
+
+ {individual.socialMedia.facebook.profileImage && (
+ <div className="flex-shrink-0">
+ <Image
+ src={individual.socialMedia.facebook.profileImage || "/placeholder.svg"}
+ alt={individual.socialMedia.facebook.fullName}
+ width={100}
+ height={100}
+ className="rounded-md"
+ />
+ </div>
+ )}
+ </div>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* Instagram */}
+ {individual.socialMedia.instagram && (
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardHeader className="border-b pb-4 flex flex-row justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-8 h-8 bg-gradient-to-tr from-purple-600 via-pink-500 to-orange-400 rounded flex items-center justify-center">
+ <Instagram className="h-5 w-5 text-white" />
+ </div>
+ <h2 className="text-xl font-bold">Instagram</h2>
+ </div>
+ <Link href="#" className="text-green-500 flex items-center gap-1 text-sm">
+ <span>See profile</span>
+ <ExternalLink className="h-4 w-4" />
+ </Link>
+ </CardHeader>
+ <CardContent className="p-4">
+ <div className="flex justify-between">
+ <div className="space-y-4">
+ <div className="grid grid-cols-2 gap-y-4 gap-x-8">
+ <span className="opacity-60">Followers count</span>
+ <span>{individual.socialMedia.instagram.followersCount}</span>
+
+ <span className="opacity-60">Following count</span>
+ <span>{individual.socialMedia.instagram.followingCount}</span>
+
+ <span className="opacity-60">Username</span>
+ <span>{individual.socialMedia.instagram.username}</span>
+
+ <span className="opacity-60">Is Verified</span>
+ <span>{individual.socialMedia.instagram.isVerified ? "Yes" : "No"}</span>
+
+ <span className="opacity-60">Probability</span>
+ <span>{individual.socialMedia.instagram.probability}</span>
+ </div>
+ </div>
+
+ {individual.socialMedia.instagram.profileImage && (
+ <div className="flex-shrink-0">
+ <Image
+ src={individual.socialMedia.instagram.profileImage || "/placeholder.svg"}
+ alt={individual.socialMedia.instagram.username}
+ width={100}
+ height={100}
+ className="rounded-md"
+ />
+ </div>
+ )}
+ </div>
+
+ <div className="mt-4 flex justify-end">
+ <button className=" hover:bg-gray-700 text-sm px-4 py-2 rounded-md">Show more</button>
+ </div>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* X (Twitter) */}
+ {individual.socialMedia.x && (
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardHeader className="border-b pb-4 flex flex-row justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-8 h-8 bg-black rounded flex items-center justify-center">
+ <Twitter className="h-5 w-5 text-white" />
+ </div>
+ <h2 className="text-xl font-bold">X</h2>
+ </div>
+ <Link href="#" className="text-green-500 flex items-center gap-1 text-sm">
+ <span>See profile</span>
+ <ExternalLink className="h-4 w-4" />
+ </Link>
+ </CardHeader>
+ <CardContent className="p-4">
+ <div className="flex items-center gap-1 text-sm opacity-60">
+ <Calendar className="h-4 w-4" />
+ <span>First seen {individual.socialMedia.x.firstSeen}</span>
+ </div>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* YouTube */}
+ {individual.socialMedia.youtube && Object.keys(individual.socialMedia.youtube).length > 0 && (
+ <Card className="bg-sidebar shadow-none border-border backdrop-blur">
+ <CardHeader className="border-b pb-4 flex flex-row justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-8 h-8 bg-red-600 rounded flex items-center justify-center">
+ <Youtube className="h-5 w-5 text-white" />
+ </div>
+ <h2 className="text-xl font-bold">YouTube</h2>
+ </div>
+ <Link href="#" className="text-green-500 flex items-center gap-1 text-sm">
+ <span>See profile</span>
+ <ExternalLink className="h-4 w-4" />
+ </Link>
+ </CardHeader>
+ </Card>
+ )}
+ </div>
+ </div>
+ </div>
+ </DashboardLayout>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-web/src/app/dashboard/projects/[project_id]/layout.tsx b/flowsint-web/src/app/dashboard/projects/[project_id]/layout.tsx
index a563aa0f..bb241e47 100644
--- a/flowsint-web/src/app/dashboard/projects/[project_id]/layout.tsx
+++ b/flowsint-web/src/app/dashboard/projects/[project_id]/layout.tsx
@@ -1,10 +1,20 @@
import FileUploadDialog from "@/components/projects/file-upload";
+import { createClient } from "@/lib/supabase/server";
+import { notFound } from "next/navigation";
const DashboardLayout = async ({
children,
+ params
}: {
children: React.ReactNode;
+ params: Promise<{ project_id: string }>
}) => {
+ const supabase = await createClient()
+ const { project_id } = await (params)
+ const { data: project, error } = await supabase.from("projects").select("id").eq("id", project_id).single()
+ if (!project || error) {
+ return notFound()
+ }
return (
<>
{children}
diff --git a/flowsint-web/src/app/dashboard/projects/[project_id]/page.tsx b/flowsint-web/src/app/dashboard/projects/[project_id]/page.tsx
index c656010a..41dccc53 100644
--- a/flowsint-web/src/app/dashboard/projects/[project_id]/page.tsx
+++ b/flowsint-web/src/app/dashboard/projects/[project_id]/page.tsx
@@ -4,7 +4,7 @@ import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
-import { MoreHorizontal, PlusIcon, Search, SlidersHorizontal, Waypoints } from "lucide-react"
+import { MoreHorizontal, PlusIcon, RotateCwIcon, Search, SlidersHorizontal, Waypoints } from "lucide-react"
import { useQuery } from "@tanstack/react-query"
import { notFound, useParams } from "next/navigation"
import Loader from "@/components/loader"
@@ -22,12 +22,14 @@ import {
import { Investigation } from "@/types/investigation"
import NewCase from "@/components/dashboard/new-sketch"
import { DocumentList } from "@/components/projects/documents-list"
+import { cn } from "@/lib/utils"
+import DashboardLayout from "@/components/dashboard/layout"
const DashboardPage = () => {
const { project_id } = useParams()
const [searchQuery, setSearchQuery] = useState("")
- const { data: project, isLoading } = useQuery({
+ const { data: project, isLoading: isLoadingSketches, isRefetching: isRefetchingSketches, refetch: refetchSketches } = useQuery({
queryKey: ["dashboard", "projects", project_id],
queryFn: async () => {
const res = await fetch(`/api/projects/${project_id}`)
@@ -38,125 +40,140 @@ const DashboardPage = () => {
},
refetchOnWindowFocus: true,
})
+ const {
+ data: documents, isLoading: isLoadingDocs, isRefetching: isRefetchingDocs, refetch: refetchDocs
+ } = useQuery({
+ queryKey: ["project", project_id, "documents"],
+ queryFn: async () => {
+ const res = await fetch(`/api/projects/${project_id}/documents`)
+ if (!res.ok) {
+ throw new Error("Failed to fetch documents")
+ }
+ return res.json() as Promise<Document[]>
+ },
+ refetchOnWindowFocus: true,
+ enabled: !!project_id,
+ })
+
+ const handleRefetch = () => {
+ refetchSketches()
+ refetchDocs()
+ }
+
+ const isLoading = isLoadingDocs || isLoadingSketches
+ const isRefetching = isRefetchingDocs || isRefetchingSketches
return (
- <div className="w-full space-y-8 container mx-auto py-12 px-8">
- <Breadcrumb>
- <BreadcrumbList>
- <BreadcrumbItem>
- <BreadcrumbLink asChild>
- <Link href="/dashboard">Projects</Link></BreadcrumbLink>
- </BreadcrumbItem>
- <BreadcrumbSeparator />
- <BreadcrumbItem>
- <BreadcrumbPage>{project?.name}</BreadcrumbPage>
- </BreadcrumbItem>
- </BreadcrumbList>
- </Breadcrumb>
- <div className="flex items-center justify-between mb-6">
- <div className="relative w-full max-w-md">
- <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
- <Input
- type="search"
- placeholder="Search items..."
- className="pl-8 w-full"
- value={searchQuery}
- onChange={(e) => setSearchQuery(e.target.value)}
- />
- </div>
- <div className="flex items-center gap-2">
- <NewCase>
- <Button size="sm" className="gap-2">
- <PlusIcon className="h-4 w-4" /> Add
- </Button>
- </NewCase>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="outline" size="sm" className="gap-2">
- <SlidersHorizontal className="h-4 w-4" />
- <span className="hidden sm:inline">Sort by</span>
+ <DashboardLayout items={[{ name: "Projects", href: "/dashboard" }, { name: project?.name }]}>
+ <div className="w-full space-y-8 container mx-auto py-12 px-8">
+ <div className="flex items-center justify-between mb-6">
+ <div className="relative w-full max-w-md">
+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
+ <Input
+ type="search"
+ placeholder="Search items..."
+ className="pl-8 w-full"
+ value={searchQuery}
+ onChange={(e) => setSearchQuery(e.target.value)}
+ />
+ </div>
+ <div className="flex items-center gap-2">
+ <NewCase>
+ <Button size="sm" className="gap-2">
+ <PlusIcon className="h-4 w-4" /> Add
</Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuItem>Name</DropdownMenuItem>
- <DropdownMenuItem>Type</DropdownMenuItem>
- <DropdownMenuItem>Date created</DropdownMenuItem>
- <DropdownMenuItem>Date modified</DropdownMenuItem>
- <DropdownMenuItem>Size</DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- </div>
- </div>
- {isLoading ? (
- <div className="flex justify-center items-center py-12">
- <Loader />
+ </NewCase>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm" className="gap-2">
+ <SlidersHorizontal className="h-4 w-4" />
+ <span className="hidden sm:inline">Sort by</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem>Name</DropdownMenuItem>
+ <DropdownMenuItem>Type</DropdownMenuItem>
+ <DropdownMenuItem>Date created</DropdownMenuItem>
+ <DropdownMenuItem>Date modified</DropdownMenuItem>
+ <DropdownMenuItem>Size</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ <Button onClick={handleRefetch} disabled={isLoading || isRefetching} variant={"outline"} size="sm" className="gap-2">
+ <RotateCwIcon className={cn("h-4 w-4", isLoading || isRefetching && "animate-spin")} /> Refresh
+ </Button>
+ </div>
</div>
- ) : (
- <div className="border rounded-md">
- <Table>
- <TableHeader>
- <TableRow>
- <TableHead>Name</TableHead>
- <TableHead>Type</TableHead>
- <TableHead>Owner</TableHead>
- <TableHead className="hidden md:table-cell">Size</TableHead>
- <TableHead className="hidden sm:table-cell">Last modified</TableHead>
- <TableHead className="hidden sm:table-cell">Creation</TableHead>
- <TableHead className="w-[50px]"></TableHead>
- </TableRow>
- </TableHeader>
- <TableBody>
- {project.investigations.length === 0 ? (
+ {isLoadingSketches ? (
+ <div className="flex justify-center items-center py-12">
+ <Loader />
+ </div>
+ ) : (
+ <div className="border rounded-md">
+ <Table>
+ <TableHeader>
<TableRow>
- <TableCell colSpan={6} className="text-center w-full py-2 text-muted-foreground">
- No sketch yet.
- </TableCell>
+ <TableHead>Name</TableHead>
+ <TableHead>Type</TableHead>
+ <TableHead>Owner</TableHead>
+ <TableHead className="hidden md:table-cell">Size</TableHead>
+ <TableHead className="hidden sm:table-cell">Last modified</TableHead>
+ <TableHead className="hidden sm:table-cell">Creation</TableHead>
+ <TableHead className="w-[50px]"></TableHead>
</TableRow>
- ) : (
- project?.investigations?.map((investigation: Investigation) => (
- <TableRow key={investigation.id}>
- <TableCell>
- <Link href={`/dashboard/projects/${investigation.project_id}/investigations/${investigation.id}`} className="flex items-center gap-2 hover:underline">
- <Waypoints className="h-5 w-5 text-primary" />
- <span>{investigation.title}</span>
- </Link>
- </TableCell>
- <TableCell className="text-muted-foreground">{"Sketch"}</TableCell>
- <TableCell className="text-muted-foreground">{`${investigation?.owner?.first_name} ${project?.owner?.last_name}` || "You"}</TableCell>
- <TableCell className="hidden md:table-cell text-muted-foreground">
- {(investigation?.individuals?.length || 0) > 0 ? `${investigation?.individuals?.length} items` : "Empty"}
- </TableCell>
- <TableCell className="hidden sm:table-cell text-muted-foreground">
- {formatDistanceToNow(new Date(investigation.last_updated_at), { addSuffix: true })}
- </TableCell>
- <TableCell className="hidden sm:table-cell text-muted-foreground">
- {format(new Date(project.created_at), "dd/MM/yyyy")}
- </TableCell>
- <TableCell>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="ghost" size="icon" className="h-8 w-8">
- <MoreHorizontal className="h-4 w-4" />
- <span className="sr-only">Actions</span>
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuItem>Open</DropdownMenuItem>
- <DropdownMenuItem>Rename</DropdownMenuItem>
- <DropdownMenuItem>Share</DropdownMenuItem>
- <DropdownMenuItem className="text-destructive">Delete</DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
+ </TableHeader>
+ <TableBody>
+ {project.investigations.length === 0 ? (
+ <TableRow>
+ <TableCell colSpan={6} className="text-center w-full py-2 text-muted-foreground">
+ No sketch yet.
</TableCell>
</TableRow>
- ))
- )}
- <DocumentList />
- </TableBody>
- </Table>
- </div>
- )}
- </div>
+ ) : (
+ project?.investigations?.map((investigation: Investigation) => (
+ <TableRow key={investigation.id}>
+ <TableCell>
+ <Link href={`/dashboard/projects/${investigation.project_id}/investigations/${investigation.id}`} className="flex items-center gap-2 hover:underline">
+ <Waypoints className="h-5 w-5 text-primary" />
+ <span>{investigation.title}</span>
+ </Link>
+ </TableCell>
+ <TableCell className="text-muted-foreground">{"Sketch"}</TableCell>
+ <TableCell className="text-muted-foreground">{`${investigation?.owner?.first_name} ${project?.owner?.last_name}` || "You"}</TableCell>
+ <TableCell className="hidden md:table-cell text-muted-foreground">
+ {(investigation?.individuals?.length || 0) > 0 ? `${investigation?.individuals?.length} items` : "Empty"}
+ </TableCell>
+ <TableCell className="hidden sm:table-cell text-muted-foreground">
+ {formatDistanceToNow(new Date(investigation.last_updated_at), { addSuffix: true })}
+ </TableCell>
+ <TableCell className="hidden sm:table-cell text-muted-foreground">
+ {format(new Date(project.created_at), "dd/MM/yyyy")}
+ </TableCell>
+ <TableCell>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8">
+ <MoreHorizontal className="h-4 w-4" />
+ <span className="sr-only">Actions</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem>Open</DropdownMenuItem>
+ <DropdownMenuItem>Rename</DropdownMenuItem>
+ <DropdownMenuItem>Share</DropdownMenuItem>
+ <DropdownMenuItem className="text-destructive">Delete</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </TableCell>
+ </TableRow>
+ ))
+ )}
+ <DocumentList refetch={refetchDocs} isLoading={isLoadingDocs} documents={documents} />
+ </TableBody>
+ </Table>
+ </div>
+ )}
+ </div>
+ </DashboardLayout>
)
}
diff --git a/flowsint-web/src/components/app-sidebar.tsx b/flowsint-web/src/components/app-sidebar.tsx
index 236a0f34..c5213539 100644
--- a/flowsint-web/src/components/app-sidebar.tsx
+++ b/flowsint-web/src/components/app-sidebar.tsx
@@ -44,22 +44,22 @@ export function AppSidebar({ user, ...props }: AppSidebarProps) {
},
{
title: "Networks",
- href: "/networks",
+ href: "/dashboard/networks",
icon: Network,
},
{
title: "Entities",
- href: "/entities",
+ href: "/dashboard/entities",
icon: Users,
},
{
title: "OSINT sources",
- href: "/sources",
+ href: "/dashboard/sources",
icon: Globe,
},
{
title: "Map",
- href: "/map",
+ href: "/dashboard/map",
icon: MapPin,
},
]
diff --git a/flowsint-web/src/components/dashboard/layout.tsx b/flowsint-web/src/components/dashboard/layout.tsx
new file mode 100644
index 00000000..08976653
--- /dev/null
+++ b/flowsint-web/src/components/dashboard/layout.tsx
@@ -0,0 +1,53 @@
+import React, { Fragment } from 'react'
+import {
+ Breadcrumb,
+ BreadcrumbEllipsis,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+} from "@/components/ui/breadcrumb"
+import { Button } from '../ui/button'
+import { BellIcon, CircleHelpIcon } from 'lucide-react'
+import Link from 'next/link'
+
+interface BreadCrumbItem {
+ name: string
+ href?: string | null
+}
+const DashboardLayout = ({ children, items = [] }: { children: React.ReactNode, items: BreadCrumbItem[] }) => {
+ return (
+ <>
+ <div className='w-full px-4 bg-sidebar sticky top-0 rounded-none shadow-none z-50 h-12 justify-between border-b flex flex-row items-center'>
+ <Breadcrumb>
+ <BreadcrumbList>
+ {items.map((item: BreadCrumbItem, index: number) => (
+ <Fragment key={index}>
+ <BreadcrumbItem>
+ {item.href ?
+ <BreadcrumbLink asChild ><Link href={item.href}>{item.name}</Link></BreadcrumbLink>
+ : <BreadcrumbPage>{item.name}</BreadcrumbPage>
+ }
+ </BreadcrumbItem>
+ {index < items.length - 1 && (
+ <Fragment>
+ <BreadcrumbSeparator />
+ </Fragment>
+ )}
+ </Fragment>
+ ))}
+ </BreadcrumbList>
+ </Breadcrumb>
+ <div className='flex gap-1 items-center'>
+ <Button size={"sm"} variant={"outline"}>Feedback</Button>
+ <Button variant={"ghost"} size={"icon"}><BellIcon className='h-4 w-4 opacity-60' /></Button>
+ <Button variant={"ghost"} size={"icon"}><CircleHelpIcon className='h-4 w-4 opacity-60' /></Button>
+ </div>
+ </div>
+ {children}
+ </>
+ )
+}
+
+export default DashboardLayout
\ No newline at end of file
diff --git a/flowsint-web/src/components/dashboard/new-sketch.tsx b/flowsint-web/src/components/dashboard/new-sketch.tsx
index 857ad62a..2586155f 100644
--- a/flowsint-web/src/components/dashboard/new-sketch.tsx
+++ b/flowsint-web/src/components/dashboard/new-sketch.tsx
@@ -45,7 +45,7 @@ export default function NewCase({ children }: { children: React.ReactNode }) {
const result = await createNewCase(formData, project_id as string)
if (result.success) {
toast.success("New sketch created.")
- router.push(`/investigations/${result.id}`)
+ router.push(`/dashboard/projects/${project_id}/investigations/${result.id}`)
setOpen(false)
} else {
toast.error("Could not create new sketch.")
diff --git a/flowsint-web/src/components/dashboard/recent-sketches.tsx b/flowsint-web/src/components/dashboard/recent-sketches.tsx
index a7ebcf7d..23c332c7 100644
--- a/flowsint-web/src/components/dashboard/recent-sketches.tsx
+++ b/flowsint-web/src/components/dashboard/recent-sketches.tsx
@@ -51,21 +51,14 @@ const RecentSketches = () => {
)
}
- // SVG placeholder icons to use randomly
- const placeholderIcons = [
- <Waypoints key="folder" strokeWidth={.60} className="h-18 w-18 opacity-40 group-hover:opacity-100 group-hover:text-primary" />,
- ]
-
return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
{investigations?.map((investigation: Investigation) => {
- const randomIcon = placeholderIcons[Math.floor(Math.random() * placeholderIcons.length)]
-
return (
<Link href={`/dashboard/projects/${investigation.project_id}/investigations/${investigation.id}`} key={investigation.id} className="group">
<Card className="bg-transparent shadow-none h-full transition-all duration-200 border-none">
- <div className={`flex items-center justify-center bg-foreground/5 h-40 border group-hover:border-primary/80 group-hover:border-2 rounded-md`}>
- <div className="transform transition-transform group-hover:scale-105">{randomIcon}</div>
+ <div className={`flex items-center justify-center overflow-hidden bg-foreground/5 h-40 border group-hover:border-primary/80 group-hover:border-2 rounded-md`}>
+ <FlowchartDiagram />
</div>
<CardContent className="p-4 relative">
<h3 className="font-medium line-clamp-1 group-hover:text-primary transition-colors">
@@ -83,3 +76,194 @@ const RecentSketches = () => {
export default RecentSketches
+interface FlowchartDiagramProps {
+ width?: number | string
+ height?: number | string
+ backgroundColor?: string
+ lineColor?: string
+ solidBoxColor?: string
+ solidBoxBorderColor?: string
+ dottedBoxColor?: string
+ dottedBoxBorderColor?: string
+ plusIconColor?: string
+ circleColor?: string
+ dotColor?: string
+}
+
+function FlowchartDiagram({
+ backgroundColor = "var(--sidebar)",
+ lineColor = "var(--border)",
+ solidBoxColor = "var(--background)",
+ solidBoxBorderColor = "var(--border)",
+ dottedBoxColor = "var(--background)",
+ dottedBoxBorderColor = "var(--primary)",
+ plusIconColor = "var(--primary)",
+ circleColor = "var(--border)",
+ dotColor = "#cccccc",
+}: FlowchartDiagramProps) {
+ const patternId = "dotPattern"
+ return (
+ <div className={`w-full h-full`} style={{ position: "relative" }}>
+ <svg
+ width="100%"
+ height="100%"
+ viewBox="0 0 800 500"
+ xmlns="http://www.w3.org/2000/svg"
+ style={{
+ backgroundColor,
+ // display: "block", // Important pour éviter l'espace blanc en dessous
+ position: "absolute",
+ top: 0,
+ left: 0,
+ right: 0,
+ bottom: 0,
+ }}
+ preserveAspectRatio="xMidYMid meet"
+ >
+ {/* <defs>
+ <pattern id={patternId} width="20" height="20" patternUnits="userSpaceOnUse">
+ <circle cx="2" cy="2" r="1" fill={dotColor} />
+ </pattern>
+ </defs>
+ <rect width="100%" height="100%" fill={`url(#${patternId})`} /> */}
+ {/* Top dotted box */}
+ <rect
+ x="400"
+ y="70"
+ width="180"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={dottedBoxColor}
+ stroke={dottedBoxBorderColor}
+ strokeWidth="2"
+ strokeDasharray="5,5"
+ transform="translate(-90, 0)"
+ />
+
+ {/* Middle solid boxes */}
+ <g>
+ <rect
+ x="100"
+ y="260"
+ width="170"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={solidBoxColor}
+ stroke={solidBoxBorderColor}
+ strokeWidth="2"
+ />
+
+ <rect
+ x="315"
+ y="260"
+ width="170"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={solidBoxColor}
+ stroke={solidBoxBorderColor}
+ strokeWidth="2"
+ />
+
+ <rect
+ x="530"
+ y="260"
+ width="170"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={solidBoxColor}
+ stroke={solidBoxBorderColor}
+ strokeWidth="2"
+ />
+ </g>
+
+ {/* Bottom dotted boxes */}
+ <rect
+ x="100"
+ y="390"
+ width="170"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={dottedBoxColor}
+ stroke={dottedBoxBorderColor}
+ strokeWidth="2"
+ strokeDasharray="5,5"
+ />
+
+ <rect
+ x="315"
+ y="390"
+ width="170"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={dottedBoxColor}
+ stroke={dottedBoxBorderColor}
+ strokeWidth="2"
+ strokeDasharray="5,5"
+ />
+
+ <rect
+ x="530"
+ y="390"
+ width="170"
+ height="60"
+ rx="10"
+ ry="10"
+ fill={dottedBoxColor}
+ stroke={dottedBoxBorderColor}
+ strokeWidth="2"
+ strokeDasharray="5,5"
+ />
+
+ {/* Connecting lines */}
+ <line x1="400" y1="130" x2="400" y2="225" stroke={lineColor} strokeWidth="2" />
+ <line x1="185" y1="225" x2="615" y2="225" stroke={lineColor} strokeWidth="2" />
+ <line x1="185" y1="225" x2="185" y2="260" stroke={lineColor} strokeWidth="2" />
+ <line x1="400" y1="225" x2="400" y2="260" stroke={lineColor} strokeWidth="2" />
+ <line x1="615" y1="225" x2="615" y2="260" stroke={lineColor} strokeWidth="2" />
+
+ <line x1="185" y1="320" x2="185" y2="390" stroke={lineColor} strokeWidth="2" />
+ <line x1="400" y1="320" x2="400" y2="390" stroke={lineColor} strokeWidth="2" />
+ <line x1="615" y1="320" x2="615" y2="390" stroke={lineColor} strokeWidth="2" />
+
+ {/* Plus icons */}
+ <circle cx="400" cy="225" r="12" fill="var(--foreground)" stroke={lineColor} strokeWidth="2" />
+ <line x1="394" y1="225" x2="406" y2="225" stroke={lineColor} strokeWidth="2" />
+ <line x1="400" y1="219" x2="400" y2="231" stroke={lineColor} strokeWidth="2" />
+
+ <circle cx="185" cy="225" r="12" fill="var(--foreground)" stroke={lineColor} strokeWidth="2" />
+ <line x1="179" y1="225" x2="191" y2="225" stroke={lineColor} strokeWidth="2" />
+ <line x1="185" y1="219" x2="185" y2="231" stroke={lineColor} strokeWidth="2" />
+
+ <circle cx="615" cy="225" r="12" fill="var(--foreground)" stroke={lineColor} strokeWidth="2" />
+ <line x1="609" y1="225" x2="621" y2="225" stroke={lineColor} strokeWidth="2" />
+ <line x1="615" y1="219" x2="615" y2="231" stroke={lineColor} strokeWidth="2" />
+
+ {/* Bottom plus icons */}
+ <circle cx="185" cy="420" r="15" fill={plusIconColor} />
+ <line x1="177" y1="420" x2="193" y2="420" stroke={circleColor} strokeWidth="2" />
+ <line x1="185" y1="412" x2="185" y2="428" stroke={circleColor} strokeWidth="2" />
+
+ <circle cx="400" cy="420" r="15" fill={plusIconColor} />
+ <line x1="392" y1="420" x2="408" y2="420" stroke={circleColor} strokeWidth="2" />
+ <line x1="400" y1="412" x2="400" y2="428" stroke={circleColor} strokeWidth="2" />
+
+ <circle cx="615" cy="420" r="15" fill={plusIconColor} />
+ <line x1="607" y1="420" x2="623" y2="420" stroke={circleColor} strokeWidth="2" />
+ <line x1="615" y1="412" x2="615" y2="428" stroke={circleColor} strokeWidth="2" />
+
+ {/* Connecting circles */}
+ <circle cx="400" cy="190" r="6" fill="var(--foreground)" stroke={circleColor} strokeWidth="2" />
+ <circle cx="185" cy="320" r="6" fill="var(--foreground)" stroke={circleColor} strokeWidth="2" />
+ <circle cx="400" cy="320" r="6" fill="var(--foreground)" stroke={circleColor} strokeWidth="2" />
+ <circle cx="615" cy="320" r="6" fill="var(--foreground)" stroke={circleColor} strokeWidth="2" />
+ </svg>
+ </div>
+ )
+}
+
diff --git a/flowsint-web/src/components/investigations/layout.tsx b/flowsint-web/src/components/investigations/layout.tsx
index b3df61cc..c5018e38 100644
--- a/flowsint-web/src/components/investigations/layout.tsx
+++ b/flowsint-web/src/components/investigations/layout.tsx
@@ -54,12 +54,9 @@ const InvestigationLayout = ({
<PanelResizeHandle /> */}
{/* <Panel id="right" order={2} defaultSize={90} minSize={50} className='grow flex flex-col'> */}
<div>
- <div className='w-full rounded-none shadow-none h-12 justify-between border-b flex flex-row items-center'>
+ <div className='w-full bg-sidebar rounded-none shadow-none h-12 justify-between border-b flex flex-row items-center'>
<div className='grow flex items-center justify-between p-2'>
<div className='flex gap-1 items-center p-2'>
- {/* <Button onClick={() => setPanelOpen(!panelOpen)} size="icon" variant="outline">
- <PanelRightIcon className='h-4 w-4' />
- </Button> */}
<ProjectSelector /><span className='opacity-60'>/</span><CaseSelector />
</div>
<MoreMenu />
diff --git a/flowsint-web/src/components/investigations/project-selector.tsx b/flowsint-web/src/components/investigations/project-selector.tsx
index 61eccb5f..5566c28d 100644
--- a/flowsint-web/src/components/investigations/project-selector.tsx
+++ b/flowsint-web/src/components/investigations/project-selector.tsx
@@ -1,4 +1,4 @@
-import { useInvestigations } from "@/lib/hooks/investigation/investigation";
+"use client"
import { useInvestigationStore } from '@/store/investigation-store';
import { useParams, useRouter } from "next/navigation";
import {
@@ -14,7 +14,7 @@ import { Project } from "@/types/project";
export default function ProjectSelector() {
const router = useRouter()
- const { project_id, investigation_id } = useParams()
+ const { project_id } = useParams()
const { data, isLoading } = useQuery({
queryKey: ["dashboard", "projects"],
queryFn: async () => {
@@ -26,7 +26,6 @@ export default function ProjectSelector() {
const useInvestigationData = useInvestigationStore(
(state) => state.useInvestigationData
);
- const { investigation } = useInvestigationData(project_id as string, investigation_id as string);
const projects = data?.projects || []
const handleSelectionChange = (value: string) => {
@@ -34,10 +33,11 @@ export default function ProjectSelector() {
};
return (
<div className="flex items-center">
- {isLoading || investigation.isLoading ? <Skeleton className="h-8 w-40 bg-foreground/10" /> :
- <Select onValueChange={handleSelectionChange} defaultValue={investigation?.data?.project?.id}>
+ {isLoading ? <Skeleton className="h-8 w-40 bg-foreground/10" /> :
+ // @ts-ignore
+ <Select onValueChange={handleSelectionChange} defaultValue={project_id}>
<SelectTrigger className="min-w-none w-full hover:bg-sidebar-accent shadow-none border-none text-ellipsis truncate gap-1">
- <SelectValue defaultValue={investigation?.data?.title || ""} placeholder="Select an investigation" />
+ <SelectValue placeholder="Select an investigation" />
</SelectTrigger>
<SelectContent>
{projects?.map((project: Project) => (
diff --git a/flowsint-web/src/components/investigations/sketch/graph.tsx b/flowsint-web/src/components/investigations/sketch/graph.tsx
index 5e5e0190..8879ecc6 100644
--- a/flowsint-web/src/components/investigations/sketch/graph.tsx
+++ b/flowsint-web/src/components/investigations/sketch/graph.tsx
@@ -50,8 +50,9 @@ import { shallow } from "zustand/shallow"
import FloatingEdge from "./simple-floating-edge"
import { TooltipProvider } from "@/components/ui/tooltip"
import NodeContextMenu from "./nodes/node-context-menu"
-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"
import ProfilePanel from "./profile-panel"
+import GroupNode from "./nodes/group"
const edgeTypes = {
custom: FloatingEdge,
}
@@ -63,6 +64,7 @@ const nodeTypes = {
email: EmailNode,
social: SocialNode,
address: AddressNode,
+ group: GroupNode,
}
// Split selectors to minimize re-renders
@@ -232,31 +234,31 @@ const LayoutFlow = ({ refetch, theme }: LayoutFlowProps) => {
return () => clearTimeout(timer)
}, [refetch, onLayout, fitView])
- // Node highlighting effect
- useEffect(() => {
- resetNodeStyles()
- if (!currentNode) return
+ // // Node highlighting effect
+ // useEffect(() => {
+ // resetNodeStyles()
+ // if (!currentNode) return
- const internalNode = getNode(currentNode.id)
- if (!internalNode) return
+ // const internalNode = getNode(currentNode.id)
+ // if (!internalNode) return
- useFlowStore.getState().updateNode(internalNode.id, {
- ...internalNode,
- zIndex: 5000,
- data: { ...internalNode.data, forceToolbarVisible: true },
- style: { ...internalNode.style, opacity: 1 },
- })
+ // useFlowStore.getState().updateNode(internalNode.id, {
+ // ...internalNode,
+ // zIndex: 5000,
+ // data: { ...internalNode.data, forceToolbarVisible: true },
+ // style: { ...internalNode.style, opacity: 1 },
+ // })
- const nodeWidth = internalNode.measured?.width ?? 0
- const nodeHeight = internalNode.measured?.height ?? 0
+ // const nodeWidth = internalNode.measured?.width ?? 0
+ // const nodeHeight = internalNode.measured?.height ?? 0
- setCenter(internalNode.position.x + nodeWidth / 2, internalNode.position.y + nodeHeight / 2 + 20, {
- duration: 1000,
- zoom: 1.5,
- })
+ // setCenter(internalNode.position.x + nodeWidth / 2, internalNode.position.y + nodeHeight / 2 + 20, {
+ // duration: 1000,
+ // zoom: 1.5,
+ // })
- useFlowStore.getState().highlightPath(internalNode)
- }, [currentNode, getNode, setCenter, resetNodeStyles])
+ // useFlowStore.getState().highlightPath(internalNode)
+ // }, [currentNode, getNode, setCenter, resetNodeStyles])
// Memoize connection handler to prevent recreation
const handleConnect = useCallback((params: any) => onConnect(params, investigation_id), [onConnect, investigation_id])
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/email.tsx b/flowsint-web/src/components/investigations/sketch/nodes/email.tsx
index 5d81a04f..9ffec561 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/email.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/email.tsx
@@ -1,41 +1,34 @@
import React, { memo } from 'react';
-import { Handle, Position } from '@xyflow/react';
import { CopyButton } from '@/components/copy';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
-import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { Badge } from '@/components/ui/badge';
import { AtSignIcon } from 'lucide-react';
+import { BaseNode } from '@/components/ui/base-node';
+import { Handle, Position } from '@xyflow/react';
-export default memo(({ data }: any) => {
+export default memo(({ data, selected }: any) => {
return (
- <>
+ <BaseNode className='p-.5 rounded-full' selected={selected}>
+ <div className="flex items-center gap-2 p-1">
+ <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
+ <AtSignIcon className="h-4 w-4" />
+ </Badge>
+ <div className="flex items-center gap-1">
+ <span className="text-sm">{data.label}</span>
+ <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
+ </div>
+ </div>
<Handle
type="target"
+ style={{ visibility: "hidden" }}
position={Position.Top}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
-
- <Card
- className={cn(
- "border hover:border-primary rounded-full p-0 shadow-none backdrop-blur bg-background/40",
- )}
- >
- <div className="flex items-center gap-2 p-1">
- <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
- <AtSignIcon className="h-4 w-4" />
- </Badge>
- <div className="flex items-center gap-1">
- <span className="text-sm">{data.label}</span>
- <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
- </div>
- </div>
- </Card>
<Handle
type="source"
+ style={{ visibility: "hidden" }}
position={Position.Bottom}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- </>
+ </BaseNode>
);
});
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/group.tsx b/flowsint-web/src/components/investigations/sketch/nodes/group.tsx
new file mode 100644
index 00000000..99e1753f
--- /dev/null
+++ b/flowsint-web/src/components/investigations/sketch/nodes/group.tsx
@@ -0,0 +1,10 @@
+import { memo } from "react";
+
+import { NodeProps } from "@xyflow/react";
+import { GroupNode } from "@/components/ui/group-node";
+
+const Group = memo(({ selected, data }: NodeProps) => {
+ return <GroupNode selected={selected} label={data.label as string} />;
+});
+
+export default Group;
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/ip_address.tsx b/flowsint-web/src/components/investigations/sketch/nodes/ip_address.tsx
index bb5763ca..5e2d428e 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/ip_address.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/ip_address.tsx
@@ -1,41 +1,34 @@
import React, { memo } from 'react';
-import { Handle, Position } from '@xyflow/react';
import { CopyButton } from '@/components/copy';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
-import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { Badge } from '@/components/ui/badge';
-import { AtSignIcon, LocateIcon } from 'lucide-react';
+import { LocateIcon } from 'lucide-react';
+import { BaseNode } from '@/components/ui/base-node';
+import { Handle, Position } from '@xyflow/react';
-export default memo(({ data }: any) => {
+export default memo(({ data, selected }: any) => {
return (
- <>
+ <BaseNode className='p-.5 rounded-full' selected={selected}>
+ <div className="flex items-center gap-2 p-1">
+ <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
+ <LocateIcon className="h-4 w-4" />
+ </Badge>
+ <div className="flex items-center gap-1">
+ <span className="text-sm">{data.label}</span>
+ <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
+ </div>
+ </div>
<Handle
type="target"
+ style={{ visibility: "hidden" }}
position={Position.Top}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
-
- <Card
- className={cn(
- "border hover:border-primary rounded-full p-0 shadow-none backdrop-blur bg-background/40",
- )}
- >
- <div className="flex items-center gap-2 p-1">
- <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
- <LocateIcon className="h-4 w-4" />
- </Badge>
- <div className="flex items-center gap-1">
- <span className="text-sm">{data.label}</span>
- <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
- </div>
- </div>
- </Card>
<Handle
type="source"
+ style={{ visibility: "hidden" }}
position={Position.Bottom}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- </>
+ </BaseNode>
);
});
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/node-context-menu.tsx b/flowsint-web/src/components/investigations/sketch/nodes/node-context-menu.tsx
index f78aa248..1705da4a 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/node-context-menu.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/node-context-menu.tsx
@@ -38,6 +38,7 @@ import { Button } from "@/components/ui/button"
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"
import { AlertCircle } from "lucide-react"
import { NodeNotesEditor } from "./node-notes-editor"
+import { checkEmail } from "@/lib/actions/search"
// Node types definition
const nodesTypes = {
@@ -97,6 +98,28 @@ const NodeContextMenu = memo(
const [currentNodeType, setCurrentNodeType] = useState<any | null>(null)
const { confirm } = useConfirm()
const [_, setIndividualId] = useQueryState("individual_id")
+
+ const handleCheckEmail = useCallback(() => {
+ // @ts-ignore
+ if (!currentNode && currentNode?.data && !currentNode?.data?.email) return
+ // @ts-ignore
+ toast.promise(checkEmail(currentNode?.data?.email, investigation_id), {
+ loading: "Loading...",
+ success: () => {
+ return `Scan on ${currentNode?.data?.email} has been launched.`
+ },
+ error: (error: any) => {
+ return (
+ <div className="overflow-hidden">
+ <p className="font-bold">An error occured.</p>
+ <pre className="overflow-auto">
+ <code>{JSON.stringify(error, null, 2)}</code>
+ </pre>
+ </div>
+ )
+ },
+ })
+ }, [currentNode, investigation_id])
const handleDuplicateNode = async () => {
if (!currentNode) return
await supabase
@@ -241,6 +264,10 @@ const NodeContextMenu = memo(
className="absolute z-50 min-w-40 max-w-48 bg-popover text-popover-foreground rounded-md border shadow-md py-1 overflow-hidden"
style={{ top: y, left: x }}
>
+ {Boolean(currentNode?.data?.email) &&
+ (<DropdownMenuItem onClick={handleCheckEmail}>
+ Search {currentNodeType}
+ </DropdownMenuItem>)}
<DropdownMenuItem onClick={handleNoteClick}>
New note
<SquarePenIcon className="!h-4 !w-4" />
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/person.tsx b/flowsint-web/src/components/investigations/sketch/nodes/person.tsx
index 0eaedec0..9ff1c897 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/person.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/person.tsx
@@ -1,39 +1,34 @@
import React, { memo } from 'react';
import { Handle, Position } from '@xyflow/react';
import { CopyButton } from '@/components/copy';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
+import { BaseNode } from "@/components/ui/base-node";
-export default memo(({ data }: any) => {
+export default memo(({ data, selected }: any) => {
return (
- <>
+ <BaseNode selected={selected}>
+ <div className="flex gap-2 items-center rounded-full">
+ <Avatar className="h-9 w-9">
+ <AvatarImage src={data?.image_url} alt={data.full_name} />
+ <AvatarFallback>{data.full_name[0]}</AvatarFallback>
+ </Avatar>
+ <div className="flex items-center gap-1">
+ <span className="text-sm text-nowrap">{data.full_name}</span>
+ <CopyButton className="rounded-full" content={data.full_name} />
+ </div>
+ </div>
<Handle
type="target"
+ style={{ visibility: "hidden" }}
position={Position.Top}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- <Card
- className={cn(
- "p-1 border border-border hover:border-primary duration-100 rounded-lg shadow-none backdrop-blur bg-background/40",
- )}
- >
- <div className="flex gap-2 items-center rounded-full">
- <Avatar className="h-9 w-9">
- <AvatarImage src={data?.image_url} alt={data.full_name} />
- <AvatarFallback>{data.full_name[0]}</AvatarFallback>
- </Avatar>
- <div className="flex items-center gap-1">
- <span className="text-sm text-nowrap">{data.full_name}</span>
- <CopyButton className="rounded-full" content={data.full_name} />
- </div>
- </div>
- </Card>
<Handle
type="source"
+ style={{ visibility: "hidden" }}
position={Position.Bottom}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- </>
+ </BaseNode>
);
});
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/phone.tsx b/flowsint-web/src/components/investigations/sketch/nodes/phone.tsx
index 1a3c912c..57af9c59 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/phone.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/phone.tsx
@@ -1,41 +1,34 @@
import React, { memo } from 'react';
-import { Handle, Position } from '@xyflow/react';
import { CopyButton } from '@/components/copy';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
-import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { Badge } from '@/components/ui/badge';
-import { AtSignIcon, PhoneIcon } from 'lucide-react';
+import { PhoneIcon } from 'lucide-react';
+import { BaseNode } from '@/components/ui/base-node';
+import { Handle, Position } from '@xyflow/react';
-export default memo(({ data }: any) => {
+export default memo(({ data, selected }: any) => {
return (
- <>
+ <BaseNode className='p-.5 rounded-full' selected={selected}>
+ <div className="flex items-center gap-2 p-1">
+ <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
+ <PhoneIcon className="h-4 w-4" />
+ </Badge>
+ <div className="flex items-center gap-1">
+ <span className="text-sm">{data.label}</span>
+ <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
+ </div>
+ </div>
<Handle
type="target"
+ style={{ visibility: "hidden" }}
position={Position.Top}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
-
- <Card
- className={cn(
- "border hover:border-primary rounded-full p-0 shadow-none backdrop-blur bg-background/40",
- )}
- >
- <div className="flex items-center gap-2 p-1">
- <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
- <PhoneIcon className="h-4 w-4" />
- </Badge>
- <div className="flex items-center gap-1">
- <span className="text-sm">{data.label}</span>
- <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
- </div>
- </div>
- </Card>
<Handle
type="source"
+ style={{ visibility: "hidden" }}
position={Position.Bottom}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- </>
+ </BaseNode>
);
});
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/physical_address.tsx b/flowsint-web/src/components/investigations/sketch/nodes/physical_address.tsx
index 34864dc2..54b6b271 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/physical_address.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/physical_address.tsx
@@ -1,41 +1,34 @@
import React, { memo } from 'react';
-import { Handle, Position } from '@xyflow/react';
import { CopyButton } from '@/components/copy';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
-import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { Badge } from '@/components/ui/badge';
-import { AtSignIcon, LocateIcon } from 'lucide-react';
+import { LocateIcon } from 'lucide-react';
+import { BaseNode } from '@/components/ui/base-node';
+import { Handle, Position } from '@xyflow/react';
-export default memo(({ data }: any) => {
+export default memo(({ data, selected }: any) => {
return (
- <>
+ <BaseNode className='p-.5 rounded-full' selected={selected}>
+ <div className="flex items-center gap-2 p-1">
+ <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
+ <LocateIcon className="h-4 w-4" />
+ </Badge>
+ <div className="flex items-center gap-1">
+ <span className="text-sm">{data.label}</span>
+ <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
+ </div>
+ </div>
<Handle
type="target"
+ style={{ visibility: "hidden" }}
position={Position.Top}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
-
- <Card
- className={cn(
- "border hover:border-primary rounded-full p-0 shadow-none backdrop-blur bg-background/40",
- )}
- >
- <div className="flex items-center gap-2 p-1">
- <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
- <LocateIcon className="h-4 w-4" />
- </Badge>
- <div className="flex items-center gap-1">
- <span className="text-sm">{data.label}</span>
- <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.label} />
- </div>
- </div>
- </Card>
<Handle
type="source"
+ style={{ visibility: "hidden" }}
position={Position.Bottom}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- </>
+ </BaseNode>
);
});
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/nodes/social.tsx b/flowsint-web/src/components/investigations/sketch/nodes/social.tsx
index 0f173c39..2ac80d3f 100644
--- a/flowsint-web/src/components/investigations/sketch/nodes/social.tsx
+++ b/flowsint-web/src/components/investigations/sketch/nodes/social.tsx
@@ -1,45 +1,39 @@
import React, { memo, useMemo } from 'react';
import { Handle, Position } from '@xyflow/react';
import { CopyButton } from '@/components/copy';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
import { Badge } from '@/components/ui/badge';
-import { AtSignIcon } from 'lucide-react';
import { usePlatformIcons } from '@/lib/hooks/use-platform-icons';
+import { BaseNode } from '@/components/ui/base-node';
-export default memo(({ data }: any) => {
+export default memo(({ data, selected }: any) => {
const platformsIcons = usePlatformIcons()
const platformIcon = useMemo(() => {
// @ts-ignore
return platformsIcons?.[data?.platform]?.icon
}, [platformsIcons, data?.platform])
return (
- <>
+ <BaseNode className='p-.5 rounded-full' selected={selected}>
+ <div className="flex items-center gap-2 p-1">
+ <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
+ {platformIcon}
+ </Badge>
+ <div className="flex items-center gap-1">
+ <span className="text-sm">{data.username || data.profile_url}</span>
+ <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.username || data.profile_url} />
+ </div>
+ </div>
<Handle
type="target"
+ style={{ visibility: "hidden" }}
position={Position.Top}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- <Card
- className={cn(
- "border hover:border-primary rounded-full p-0 shadow-none backdrop-blur bg-background/40",
- )}
- >
- <div className="flex items-center gap-2 p-1">
- <Badge variant="secondary" className="h-6 w-6 p-0 rounded-full">
- {platformIcon}
- </Badge>
- <div className="flex items-center gap-1">
- <span className="text-sm">{data.username || data.profile_url}</span>
- <CopyButton className="rounded-full h-7 w-7 text-xs" content={data.username || data.profile_url} />
- </div>
- </div>
- </Card>
<Handle
type="source"
+ style={{ visibility: "hidden" }}
position={Position.Bottom}
- className={cn("w-16 bg-teal-500 opacity-0")}
+ isConnectable={false}
/>
- </>
+ </BaseNode>
);
});
\ No newline at end of file
diff --git a/flowsint-web/src/components/investigations/sketch/profile-panel.tsx b/flowsint-web/src/components/investigations/sketch/profile-panel.tsx
index 52f608ee..c688afd6 100644
--- a/flowsint-web/src/components/investigations/sketch/profile-panel.tsx
+++ b/flowsint-web/src/components/investigations/sketch/profile-panel.tsx
@@ -7,9 +7,12 @@ import { User, MapPin, Globe, Info, AtSign, Phone, Calendar, Link2, Mail, Shield
import { Separator } from "@/components/ui/separator"
import { useFlowStore } from "@/store/flow-store"
import { Button } from "@/components/ui/button"
+import Link from "next/link"
+import { useParams } from "next/navigation"
+import SearchEmail from "./search-email"
export default function ProfilePanel({ data, type }: { data: any, type: "individual" | "email" }) {
-
+ const { project_id, investigation_id } = useParams()
const { setCurrentNode } = useFlowStore()
const closePanel = () => {
@@ -32,6 +35,7 @@ export default function ProfilePanel({ data, type }: { data: any, type: "individ
<h2 className="text-xl w-full font-bold break-all">{data.email}</h2>
<p className="text-sm text-muted-foreground">Email Address</p>
</div>
+ <SearchEmail investigation_id={investigation_id as string} email={data.email} />
</div>
<Separator />
<div className="space-y-4">
@@ -88,8 +92,8 @@ export default function ProfilePanel({ data, type }: { data: any, type: "individ
<div className="p-6 md:p-8">
<div className="grid grid-cols-1 gap-2">
{/* Left column with avatar */}
- <div className="flex flex-col items-center md:items-start gap-6">
- <div className="relative">
+ <div className="flex flex-col items-center gap-6">
+ <div className="relative flex flex-col items-center gap-4">
<Avatar className="w-40 h-40 border-4 border-primary/20">
<AvatarImage src={data.image_url} alt={data.full_name} />
<AvatarFallback className="text-2xl">
@@ -99,8 +103,10 @@ export default function ProfilePanel({ data, type }: { data: any, type: "individ
.join("")}
</AvatarFallback>
</Avatar>
+ <Link href={`/dashboard/projects/${project_id}/individuals/${data.id}`}>
+ <Button variant={"outline"}>View</Button>
+ </Link>
</div>
-
<div className="space-y-1 text-center md:text-left">
<div className="flex items-center gap-2 text-primary">
<User className="h-4 w-4" />
diff --git a/flowsint-web/src/components/investigations/sketch/search-email.tsx b/flowsint-web/src/components/investigations/sketch/search-email.tsx
new file mode 100644
index 00000000..72444966
--- /dev/null
+++ b/flowsint-web/src/components/investigations/sketch/search-email.tsx
@@ -0,0 +1,37 @@
+import { Button } from '@/components/ui/button'
+import React, { useCallback } from 'react'
+import { toast } from 'sonner'
+import { checkEmail } from '@/lib/actions/search'
+const SearchEmail = ({ investigation_id, email }: { investigation_id: string, email: string }) => {
+
+ const [disabled, setDisabled] = React.useState(false)
+ const handleCheckEmail = useCallback(() => {
+ // @ts-ignore
+ setDisabled(true)
+ if (!investigation_id && !email) return
+ // @ts-ignore
+ toast.promise(checkEmail(email, investigation_id), {
+ loading: "Loading...",
+ success: () => {
+ setDisabled(false)
+ return `Scan on ${email} has been launched.`
+ },
+ error: (error: any) => {
+ setDisabled(false)
+ return (
+ <div className="overflow-hidden">
+ <p className="font-bold">An error occured.</p>
+ <pre className="overflow-auto">
+ <code>{JSON.stringify(error, null, 2)}</code>
+ </pre>
+ </div>
+ )
+ },
+ })
+ }, [email, investigation_id])
+ return (
+ <Button disabled={disabled} onClick={handleCheckEmail}>Search socials</Button>
+ )
+}
+
+export default SearchEmail
\ No newline at end of file
diff --git a/flowsint-web/src/components/projects/documents-list.tsx b/flowsint-web/src/components/projects/documents-list.tsx
index 9c56dc2e..56079e66 100644
--- a/flowsint-web/src/components/projects/documents-list.tsx
+++ b/flowsint-web/src/components/projects/documents-list.tsx
@@ -14,19 +14,6 @@ import { Skeleton } from "../ui/skeleton"
import { useConfirm } from "../use-confirm-dialog"
import { toast } from "sonner"
-interface Document {
- id: string
- name: string
- type: string
- size: number
- created_at: string
- last_updated_at: string
- url: string
- owner: {
- first_name: string
- last_name: string
- }
-}
const icons: Record<string, JSX.Element> = {
"png": <ImageIcon className="h-5 w-5 text-foreground/30" />,
@@ -35,30 +22,14 @@ const icons: Record<string, JSX.Element> = {
"other": <FileIcon className="h-5 w-5 text-primary" />,
}
-export function DocumentList() {
+export function DocumentList({ documents, isLoading, refetch }: { documents: any[] | undefined, isLoading: boolean, refetch: () => void }) {
const { project_id } = useParams<{ project_id: string }>()
const [searchQuery, setSearchQuery] = useState("")
const [previewUrl, setPreviewUrl] = useState<string | null>(null)
const [previewType, setPreviewType] = useState<string | null>(null)
+ const [previewName, setPreviewName] = useState<string | null>(null)
const { confirm } = useConfirm()
- const {
- data: documents,
- isLoading,
- refetch,
- } = useQuery({
- queryKey: ["project", project_id, "documents"],
- queryFn: async () => {
- const res = await fetch(`/api/projects/${project_id}/documents`)
- if (!res.ok) {
- throw new Error("Failed to fetch documents")
- }
- return res.json() as Promise<Document[]>
- },
- refetchOnWindowFocus: true,
- enabled: !!project_id,
- })
-
const filteredDocuments = documents?.filter((doc) => doc.name.toLowerCase().includes(searchQuery.toLowerCase())) || []
const isPreviewable = (mimeType: string) => {
@@ -70,9 +41,10 @@ export function DocumentList() {
)
}
- const previewFile = (url: string, type: string) => {
+ const previewFile = (url: string, type: string, name: string) => {
setPreviewUrl(url)
setPreviewType(type)
+ setPreviewName(name)
}
const downloadFile = async (url: string, fileName: string) => {
@@ -134,11 +106,11 @@ export function DocumentList() {
<TableRow key={doc.id}>
<TableCell>
<button
- onClick={() => isPreviewable(doc.type) && previewFile(doc.url, doc.type)}
- className="flex cursor-pointer truncate text-ellipsis items-center gap-2 hover:underline"
+ onClick={() => isPreviewable(doc.type) && previewFile(doc.url, doc.type, doc.name)}
+ className="flex cursor-pointer max-w-[400px] items-center gap-2 hover:underline"
>
- {icons[doc.type.split("/")[1]] || <FileIcon className="h-5 w-5 text-primary" />}
- <span>{doc.name}</span>
+ <div>{icons[doc.type.split("/")[1]] || <FileIcon className="h-5 w-5 text-primary" />}</div>
+ <span className="truncate text-ellipsis">{doc.name}</span>
</button>
</TableCell>
<TableCell className="text-muted-foreground">
@@ -164,7 +136,7 @@ export function DocumentList() {
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
{isPreviewable(doc.type) && (
- <DropdownMenuItem onClick={() => previewFile(doc.url, doc.type)}>Preview</DropdownMenuItem>
+ <DropdownMenuItem onClick={() => previewFile(doc.url, doc.type, doc.name)}>Preview</DropdownMenuItem>
)}
<DropdownMenuItem onClick={() => downloadFile(doc.url, doc.name)}>Download</DropdownMenuItem>
<DropdownMenuItem className="text-destructive" onClick={() => deleteFile(doc.name)}>
@@ -173,15 +145,16 @@ export function DocumentList() {
</DropdownMenuContent>
</DropdownMenu>
</TableCell>
- </TableRow>
- ))}
+ </TableRow >
+ ))
+ }
<Dialog open={!!previewUrl} onOpenChange={(open) => !open && setPreviewUrl(null)}>
- <DialogContent className="max-w-4xl w-[90vw]">
+ <DialogContent className="!max-w-none w-[95vw] !h-[95vh]">
<DialogHeader>
- <DialogTitle>File Preview</DialogTitle>
+ <DialogTitle>{previewName}</DialogTitle>
<DialogDescription>Preview of your document</DialogDescription>
</DialogHeader>
- <div className="mt-4 max-h-[70vh] overflow-auto">
+ <div className="mt-4 h-full flex flex-col overflow-auto">
{previewUrl && previewType?.startsWith("image/") && (
<img
src={previewUrl || "/placeholder.svg"}
@@ -190,13 +163,13 @@ export function DocumentList() {
/>
)}
{previewUrl && previewType === "application/pdf" && (
- <iframe src={`${previewUrl}#view=FitH`} className="w-full h-[60vh] rounded-md border" />
+ <iframe src={`${previewUrl}#view=FitH`} className="w-full h-full grow rounded-md border" />
)}
{previewUrl && previewType?.startsWith("text/") && (
- <iframe src={previewUrl} className="w-full h-[60vh] rounded-md border" />
+ <iframe src={previewUrl} className="w-full h-full grow rounded-md border" />
)}
{previewUrl && previewType?.startsWith("video/") && (
- <video src={previewUrl} controls className="max-w-full h-auto mx-auto rounded-md" />
+ <video src={previewUrl} controls className="h-full h-auto mx-auto rounded-md" />
)}
</div>
</DialogContent>
diff --git a/flowsint-web/src/components/projects/file-upload.tsx b/flowsint-web/src/components/projects/file-upload.tsx
index 3eef1f5d..ed9e02aa 100644
--- a/flowsint-web/src/components/projects/file-upload.tsx
+++ b/flowsint-web/src/components/projects/file-upload.tsx
@@ -20,7 +20,7 @@ import {
import { Progress } from "@/components/ui/progress"
import { useProjectStore } from "@/store/project-store"
import { toast } from "sonner"
-import { useParams } from "next/navigation"
+import { useParams, useRouter } from "next/navigation"
type FileStatus = "idle" | "uploading" | "success" | "error"
@@ -34,6 +34,7 @@ interface FileWithStatus {
export default function FileUploadDialog() {
const { project_id } = useParams()
const { openUploadModal: open, setOpenUploadModal: setOpen } = useProjectStore()
+ const router = useRouter()
const [files, setFiles] = useState<FileWithStatus[]>([])
const [isDragging, setIsDragging] = useState(false)
const fileInputRef = useRef<HTMLInputElement>(null)
@@ -97,6 +98,8 @@ export default function FileUploadDialog() {
if (error) throw toast.error("Error uploading file: " + error.message)
// Update status to success
setFiles((prev) => prev.map((file, idx) => (idx === i ? { ...file, status: "success", progress: 100 } : file)))
+ toast.success("File uploaded successfully")
+ router.refresh()
} catch (error) {
toast.error("Error uploading file: " + JSON.stringify(error))
setFiles((prev) =>
@@ -154,12 +157,12 @@ export default function FileUploadDialog() {
<input type="file" ref={fileInputRef} className="hidden" onChange={handleFileChange} multiple />
</div>
) : (
- <div className="space-y-4">
+ <div className="space-y-4 w-full">
{files.map((fileItem, index) => (
- <div key={index} className="flex items-start gap-3 bg-muted/50 p-3 rounded-md">
+ <div key={index} className="flex items-start gap-3 bg-muted/50 p-3 rounded-md w-full">
<FileText className="h-5 w-5 flex-shrink-0 text-muted-foreground" />
- <div className="flex-1 min-w-0">
- <p className="text-sm font-medium truncate">{fileItem.file.name}</p>
+ <div className="flex-1 min-w-0 w-full truncate">
+ <p className="text-sm font-medium w-full truncate">{fileItem.file.name}</p>
<p className="text-xs text-muted-foreground">{(fileItem.file.size / 1024).toFixed(1)} KB</p>
{fileItem.status === "uploading" && <Progress value={fileItem.progress} className="h-1 mt-2" />}
diff --git a/flowsint-web/src/components/team-switcher.tsx b/flowsint-web/src/components/team-switcher.tsx
index c71490e9..0238d48d 100644
--- a/flowsint-web/src/components/team-switcher.tsx
+++ b/flowsint-web/src/components/team-switcher.tsx
@@ -24,8 +24,8 @@ import Link from "next/link"
export function TeamSwitcher() {
return (
- <Link className="w-full rounded-full overflow-hidden" href="/dashboard">
- <Logo />
+ <Link className="w-full overflow-hidden flex items-center gap-2" href="/dashboard">
+ <Logo /> <span className="text-md font-bold">FLOWSINT</span>
</Link>
)
}
diff --git a/flowsint-web/src/components/ui/base-node.tsx b/flowsint-web/src/components/ui/base-node.tsx
new file mode 100644
index 00000000..5436b945
--- /dev/null
+++ b/flowsint-web/src/components/ui/base-node.tsx
@@ -0,0 +1,21 @@
+import { forwardRef, HTMLAttributes } from "react";
+import { cn } from "@/lib/utils";
+
+export const BaseNode = forwardRef<
+ HTMLDivElement,
+ HTMLAttributes<HTMLDivElement> & { selected?: boolean }
+>(({ className, selected, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ "relative rounded-md border bg-background p-2 flex items-center justify-between text-card-foreground",
+ className,
+ selected ? "border-muted-foreground shadow-lg" : "",
+ "hover:ring-1",
+ )}
+ tabIndex={0}
+ {...props}
+ />
+));
+
+BaseNode.displayName = "BaseNode";
\ No newline at end of file
diff --git a/flowsint-web/src/components/ui/group-node.tsx b/flowsint-web/src/components/ui/group-node.tsx
new file mode 100644
index 00000000..bc35b433
--- /dev/null
+++ b/flowsint-web/src/components/ui/group-node.tsx
@@ -0,0 +1,76 @@
+import React, { forwardRef, HTMLAttributes, ReactNode } from "react";
+import { NodeProps, Panel, PanelPosition } from "@xyflow/react";
+import { BaseNode } from "./base-node";
+import { cn } from "@/lib/utils";
+
+/* GROUP NODE Label ------------------------------------------------------- */
+
+export type GroupNodeLabelProps = HTMLAttributes<HTMLDivElement>;
+
+export const GroupNodeLabel = forwardRef<HTMLDivElement, GroupNodeLabelProps>(
+ ({ children, className, ...props }, ref) => {
+ return (
+ <div ref={ref} className="h-full w-full" {...props}>
+ <div
+ className={cn(
+ "w-fit bg-gray-200 bg-secondary p-2 text-xs text-card-foreground",
+ className,
+ )}
+ >
+ {children}
+ </div>
+ </div>
+ );
+ },
+);
+
+GroupNodeLabel.displayName = "GroupNodeLabel";
+
+export type GroupNodeProps = Partial<NodeProps> & {
+ label?: ReactNode;
+ position?: PanelPosition;
+};
+
+/* GROUP NODE -------------------------------------------------------------- */
+
+export const GroupNode = forwardRef<HTMLDivElement, GroupNodeProps>(
+ ({ selected, label, position, ...props }, ref) => {
+ const getLabelClassName = (position?: PanelPosition) => {
+ switch (position) {
+ case "top-left":
+ return "rounded-br-sm";
+ case "top-center":
+ return "rounded-b-sm";
+ case "top-right":
+ return "rounded-bl-sm";
+ case "bottom-left":
+ return "rounded-tr-sm";
+ case "bottom-right":
+ return "rounded-tl-sm";
+ case "bottom-center":
+ return "rounded-t-sm";
+ default:
+ return "rounded-br-sm";
+ }
+ };
+
+ return (
+ <BaseNode
+ ref={ref}
+ selected={selected}
+ className="h-full overflow-hidden rounded-sm bg-opacity-50"
+ {...props}
+ >
+ <Panel className={cn("!m-0 !p-0")} position={position}>
+ {label && (
+ <GroupNodeLabel className={getLabelClassName(position)}>
+ {label}
+ </GroupNodeLabel>
+ )}
+ </Panel>
+ </BaseNode>
+ );
+ },
+);
+
+GroupNode.displayName = "GroupNode";
\ No newline at end of file
diff --git a/flowsint-web/src/lib/utils.ts b/flowsint-web/src/lib/utils.ts
index 85ff0044..c4eb8a77 100644
--- a/flowsint-web/src/lib/utils.ts
+++ b/flowsint-web/src/lib/utils.ts
@@ -204,8 +204,6 @@ export const getLayoutedElements = (
}
}
-export default getLayoutedElements
-
export const sanitize = (name: string) => {
return name
diff --git a/flowsint-web/src/store/flow-store.ts b/flowsint-web/src/store/flow-store.ts
index f79d2288..15c900f6 100644
--- a/flowsint-web/src/store/flow-store.ts
+++ b/flowsint-web/src/store/flow-store.ts
@@ -7,7 +7,7 @@ import {
type OnNodesChange,
type OnEdgesChange,
} from '@xyflow/react';
-import getLayoutedElements from '@/lib/utils';
+import { getLayoutedElements } from '@/lib/utils';
export type AppNode = Node;
diff --git a/flowsint-web/src/store/investigation-store.ts b/flowsint-web/src/store/investigation-store.ts
index aad5756f..1cfee9a8 100644
--- a/flowsint-web/src/store/investigation-store.ts
+++ b/flowsint-web/src/store/investigation-store.ts
@@ -1,6 +1,6 @@
"use client"
-import { create } from "zustand"
+import createWithEqualityFn from "zustand"
import { persist, createJSONStorage } from "zustand/middleware"
import { useQuery, type QueryObserverResult } from "@tanstack/react-query"
import type { Investigation, Individual, Email, Phone, Social, IP, Relation, Address } from "@/types/investigation"
@@ -64,7 +64,7 @@ interface InvestigationState {
const isServer = typeof window === "undefined"
-export const useInvestigationStore = create(
+export const useInvestigationStore = createWithEqualityFn(
persist<InvestigationState>(
(set, get) => ({
// UI State
diff --git a/flowsint-web/src/types/index.ts b/flowsint-web/src/types/index.ts
index 2c3c3221..bf1e0f63 100644
--- a/flowsint-web/src/types/index.ts
+++ b/flowsint-web/src/types/index.ts
@@ -9,6 +9,10 @@ export type NodeData = {
position: any,
type: string,
data: any,
+ parentId?: string,
+ extent?: string
+ width?: number,
+ height?: number
};
export type EdgeData = {
diff --git a/flowsint-web/styles/globals.css b/flowsint-web/styles/globals.css
index c0ddefbc..7981c517 100644
--- a/flowsint-web/styles/globals.css
+++ b/flowsint-web/styles/globals.css
@@ -15,7 +15,7 @@
--card-foreground: hsl(0 0% 3.9%);
--popover: hsl(0 0% 100%);
--popover-foreground: hsl(0 0% 3.9%);
- --primary: hsl(221.2 83.2% 53.3%);
+ --primary: hsl(160.1 84.1% 39.4%);
--primary-foreground: hsl(0 0% 98%);
--secondary: hsl(0 0% 96.1%);
--secondary-foreground: hsl(0 0% 9%);
@@ -28,7 +28,7 @@
--border: hsla(0, 0%, 90%, 0.807);
--input: hsl(0 0% 89.8%);
--ring: hsl(0 0% 3.9%);
- --chart-1: hsl(221.2 83.2% 53.3%);
+ --chart-1: hsl(160.1 84.1% 39.4%);
--chart-2: hsl(173 58% 39%);
--chart-3: hsl(197 37% 24%);
--chart-4: hsl(43 74% 66%);
@@ -43,7 +43,7 @@
--sidebar-accent: hsl(240 4.8% 95.9%);
--sidebar-accent-foreground: hsl(240 5.9% 10%);
--sidebar-border: hsl(220 13% 91%);
- --sidebar-ring: hsl(221.2 83.2% 53.3%);
+ --sidebar-ring: hsl(160.1 84.1% 39.4%);
}
.dark {
@@ -53,7 +53,7 @@
--card-foreground: hsl(0 0% 98%);
--popover: hsl(240 0% 9.9%);
--popover-foreground: hsl(0 0% 98%);
- --primary: hsl(221.2 83.2% 53.3%);
+ --primary: hsl(160.1 84.1% 39.4%);
--primary-foreground: hsl(0, 0%, 100%);
--secondary: hsl(0 0% 14.9%);
--secondary-foreground: hsl(0 0% 98%);
@@ -66,14 +66,14 @@
--border: hsla(0, 0%, 23%, 0.67);
--input: hsl(0 0% 14.9%);
--ring: hsl(0 0% 83.1%);
- --chart-1: hsl(221.2 83.2% 53.3%);
+ --chart-1: hsl(160.1 84.1% 39.4%);
--chart-2: hsl(160 60% 45%);
--chart-3: hsl(30 80% 55%);
- --chart-4: hsl(221.2 83.2% 53.3%);
+ --chart-4: hsl(160.1 84.1% 39.4%);
--chart-5: hsl(340 75% 55%);
- --sidebar: hsl(240 0% 9.9%);
+ --sidebar: hsl(0, 0%, 11%);
--sidebar-foreground: hsl(240 4.8% 95.9%);
- --sidebar-primary: hsl(221.2 83.2% 53.3%);
+ --sidebar-primary: hsl(160.1 84.1% 39.4%);
--sidebar-primary-foreground: hsl(0 0% 100%);
--sidebar-accent: hsl(240 3.7% 15.9%);
--sidebar-accent-foreground: hsl(240 4.8% 95.9%);
@@ -192,4 +192,9 @@
body {
@apply bg-background text-foreground;
}
+}
+
+.react-flow__node-group {
+ padding: 0px!important;
+ border-radius: 6px!important;
}
\ No newline at end of file
diff --git a/flowsint-web/tsconfig.json b/flowsint-web/tsconfig.json
index 03e5242b..64f91c3f 100644
--- a/flowsint-web/tsconfig.json
+++ b/flowsint-web/tsconfig.json
@@ -23,6 +23,6 @@
"@/*": ["./src/*"]
}
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "../../ReconOps/src/lib/utils.ts", "src/components/investigations/collide.js", "src/lib/utils/flow.js"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "../../ReconOps/src/lib/utils.ts", "src/components/investigations/collide.js", "src/lib/utils/flow.js", "src/app/dashboard/entities/page.tss"],
"exclude": ["node_modules"]
}
diff --git a/flowsint-web/yarn.lock b/flowsint-web/yarn.lock
index fc4447b9..6216ef8d 100644
--- a/flowsint-web/yarn.lock
+++ b/flowsint-web/yarn.lock
@@ -86,6 +86,45 @@
resolved "https://registry.yarnpkg.com/@dagrejs/graphlib/-/graphlib-2.2.4.tgz#d77bfa9ff49e2307c0c6e6b8b26b5dd3c05816c4"
integrity sha512-mepCf/e9+SKYy1d02/UkvSy6+6MoyXhVxP8lLDfA7BPE1X1d4dR0sZznmbM8/XVJ1GPM+Svnx7Xj6ZweByWUkw==
+"@dnd-kit/accessibility@^3.1.1":
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/@dnd-kit/accessibility/-/accessibility-3.1.1.tgz#3b4202bd6bb370a0730f6734867785919beac6af"
+ integrity sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==
+ dependencies:
+ tslib "^2.0.0"
+
+"@dnd-kit/core@^6.3.1":
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/@dnd-kit/core/-/core-6.3.1.tgz#4c36406a62c7baac499726f899935f93f0e6d003"
+ integrity sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==
+ dependencies:
+ "@dnd-kit/accessibility" "^3.1.1"
+ "@dnd-kit/utilities" "^3.2.2"
+ tslib "^2.0.0"
+
+"@dnd-kit/modifiers@^9.0.0":
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/@dnd-kit/modifiers/-/modifiers-9.0.0.tgz#96a0280c77b10c716ef79d9792ce7ad04370771d"
+ integrity sha512-ybiLc66qRGuZoC20wdSSG6pDXFikui/dCNGthxv4Ndy8ylErY0N3KVxY2bgo7AWwIbxDmXDg3ylAFmnrjcbVvw==
+ dependencies:
+ "@dnd-kit/utilities" "^3.2.2"
+ tslib "^2.0.0"
+
+"@dnd-kit/sortable@^10.0.0":
+ version "10.0.0"
+ resolved "https://registry.yarnpkg.com/@dnd-kit/sortable/-/sortable-10.0.0.tgz#1f9382b90d835cd5c65d92824fa9dafb78c4c3e8"
+ integrity sha512-+xqhmIIzvAYMGfBYYnbKuNicfSsk4RksY2XdmJhT+HAC01nix6fHCztU68jooFiMUB01Ky3F0FyOvhG/BZrWkg==
+ dependencies:
+ "@dnd-kit/utilities" "^3.2.2"
+ tslib "^2.0.0"
+
+"@dnd-kit/utilities@^3.2.2":
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/@dnd-kit/utilities/-/utilities-3.2.2.tgz#5a32b6af356dc5f74d61b37d6f7129a4040ced7b"
+ integrity sha512-+MKAJEOfaBe5SmV6t34p80MMKhjvUz0vRrvVJbPT0WElzaOJ/1xs+D+KDv+tD/NE5ujfrChEcshd4fLn0wpiqg==
+ dependencies:
+ tslib "^2.0.0"
+
"@emnapi/runtime@^1.2.0":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.3.1.tgz#0fcaa575afc31f455fd33534c19381cfce6c6f60"
@@ -1595,6 +1634,18 @@
dependencies:
"@tanstack/query-core" "5.66.4"
+"@tanstack/react-table@^8.21.2":
+ version "8.21.2"
+ resolved "https://registry.yarnpkg.com/@tanstack/react-table/-/react-table-8.21.2.tgz#6a7fce828b64547e33f4606ada8114db496007cc"
+ integrity sha512-11tNlEDTdIhMJba2RBH+ecJ9l1zgS2kjmexDPAraulc8jeNA4xocSNeyzextT0XJyASil4XsCYlJmf5jEWAtYg==
+ dependencies:
+ "@tanstack/table-core" "8.21.2"
+
+"@tanstack/[email protected]":
+ version "8.21.2"
+ resolved "https://registry.yarnpkg.com/@tanstack/table-core/-/table-core-8.21.2.tgz#dd57595a1773652bb6fb437e90a5f5386a49fd7e"
+ integrity sha512-uvXk/U4cBiFMxt+p9/G7yUWI/UbHYbyghLCjlpWZ3mLeIZiUBSKcUnw9UnKkdRz7Z/N4UBuFLWQdJCjUe7HjvA==
+
"@tiptap/core@^2.11.5":
version "2.11.5"
resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.11.5.tgz#2bf1b08c4ca2467778d0a109634c45ab475522f4"