From 545f2018ebfaa42b8e3dafc69803eb77201367ff Mon Sep 17 00:00:00 2001 From: kmangalpally Date: Sat, 28 Jun 2025 22:56:50 +0530 Subject: [PATCH 1/2] Adding changes --- .gitignore | 4 + frontend/src/App.tsx | 4 +- frontend/src/components/app-sidebar.tsx | 180 +++++++++--------- frontend/src/modules/search/Search.tsx | 20 +- .../src/modules/search/table/data-table.tsx | 28 +-- .../modules/search/table/sub-data-table.tsx | 2 +- frontend/src/modules/upload/Upload.tsx | 119 ++++++++++++ 7 files changed, 236 insertions(+), 121 deletions(-) create mode 100644 frontend/src/modules/upload/Upload.tsx diff --git a/.gitignore b/.gitignore index fd3a82d..e728250 100644 --- a/.gitignore +++ b/.gitignore @@ -193,3 +193,7 @@ cython_debug/ .cursorignore .cursorindexingignore .DS_Store + +node_modules +dist +.vscode \ No newline at end of file diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 2763661..f1bbef7 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -9,17 +9,19 @@ import About from './modules/about/About'; import Layout from "./components/Layout"; import Dashboard from './modules/dashboard/Dashboard'; import Search from './modules/search/Search'; +import { Upload } from './modules/upload/Upload'; function App() { return ( -
+
} /> } /> } /> } /> + } />
diff --git a/frontend/src/components/app-sidebar.tsx b/frontend/src/components/app-sidebar.tsx index d6c1a8c..ee7436f 100644 --- a/frontend/src/components/app-sidebar.tsx +++ b/frontend/src/components/app-sidebar.tsx @@ -27,30 +27,30 @@ import { // This is sample data. const data = { user: { - name: "shadcn", - email: "m@example.com", + name: "Andra Police", + email: "designed by Cyberark", avatar: "/avatars/shadcn.jpg", }, teams: [ { - name: "Acme Inc", + name: "News Analyzer", logo: GalleryVerticalEnd, plan: "Enterprise", }, { - name: "Acme Corp.", + name: "News AI", logo: AudioWaveform, plan: "Startup", }, - { - name: "Evil Corp.", - logo: Command, - plan: "Free", - }, + // { + // name: "Evil Corp.", + // logo: Command, + // plan: "Free", + // }, ], navMain: [ { - title: "Playground", + title: "Available Links", url: "#", icon: SquareTerminal, isActive: true, @@ -71,90 +71,94 @@ const data = { title: "About", url: "/about", }, - ], - }, - { - title: "Models", - url: "#", - icon: Bot, - items: [ - { - title: "Genesis", - url: "#", - }, - { - title: "Explorer", - url: "#", - }, - { - title: "Quantum", - url: "#", - }, - ], - }, - { - title: "Documentation", - url: "#", - icon: BookOpen, - items: [ - { - title: "Introduction", - url: "#", - }, - { - title: "Get Started", - url: "#", - }, - { - title: "Tutorials", - url: "#", - }, { - title: "Changelog", - url: "#", - }, - ], - }, - { - title: "Settings", - url: "#", - icon: Settings2, - items: [ - { - title: "General", - url: "#", - }, - { - title: "Team", - url: "#", - }, - { - title: "Billing", - url: "#", - }, - { - title: "Limits", - url: "#", + title: "Uploads", + url: "/upload", }, ], }, + // { + // title: "Models", + // url: "#", + // icon: Bot, + // items: [ + // { + // title: "Genesis", + // url: "#", + // }, + // { + // title: "Explorer", + // url: "#", + // }, + // { + // title: "Quantum", + // url: "#", + // }, + // ], + // }, + // { + // title: "Documentation", + // url: "#", + // icon: BookOpen, + // items: [ + // { + // title: "Introduction", + // url: "#", + // }, + // { + // title: "Get Started", + // url: "#", + // }, + // { + // title: "Tutorials", + // url: "#", + // }, + // { + // title: "Changelog", + // url: "#", + // }, + // ], + // }, + // { + // title: "Settings", + // url: "#", + // icon: Settings2, + // items: [ + // { + // title: "General", + // url: "#", + // }, + // { + // title: "Team", + // url: "#", + // }, + // { + // title: "Billing", + // url: "#", + // }, + // { + // title: "Limits", + // url: "#", + // }, + // ], + // }, ], projects: [ - { - name: "Design Engineering", - url: "#", - icon: Frame, - }, - { - name: "Sales & Marketing", - url: "#", - icon: PieChart, - }, - { - name: "Travel", - url: "#", - icon: Map, - }, + // { + // name: "Design Engineering", + // url: "#", + // icon: Frame, + // }, + // { + // name: "Sales & Marketing", + // url: "#", + // icon: PieChart, + // }, + // { + // name: "Travel", + // url: "#", + // icon: Map, + // }, ], } diff --git a/frontend/src/modules/search/Search.tsx b/frontend/src/modules/search/Search.tsx index 3300f4b..0fc3ba6 100644 --- a/frontend/src/modules/search/Search.tsx +++ b/frontend/src/modules/search/Search.tsx @@ -9,7 +9,6 @@ import { Pagination, PaginationContent, PaginationItem, PaginationPrevious, Pagi import { Skeleton } from "@/components/ui/skeleton"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { useReactToPrint } from "react-to-print"; -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; function renderSkeletonTable() { return ( @@ -46,13 +45,13 @@ export default function Search() { const [page, setPage] = useState(1); const [pageSize, setPageSize] = useState(10); const [total, setTotal] = useState(0); - const [rowSelection, setRowSelection] = useState>({}); + const [, setRowSelection] = useState>({}); let componentRef = useRef(null); const handlePrint = useReactToPrint({ contentRef: componentRef, - documentTitle: `${'test'}-Print`, + documentTitle: `${new Date()}-Search Results`, onPrintError: () => alert("there is an error when printing"), }); @@ -73,16 +72,17 @@ export default function Search() { return (
-
-