From 144c3ab983209a1b0bcb2478a592f9f15e90cea3 Mon Sep 17 00:00:00 2001 From: Frank Ezene Date: Thu, 25 Jul 2024 15:02:48 +0100 Subject: [PATCH 01/11] feat: create super admin product page --- .../dashboard/(admin)/admin/products/page.tsx | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/app/dashboard/(admin)/admin/products/page.tsx diff --git a/src/app/dashboard/(admin)/admin/products/page.tsx b/src/app/dashboard/(admin)/admin/products/page.tsx new file mode 100644 index 000000000..49391597a --- /dev/null +++ b/src/app/dashboard/(admin)/admin/products/page.tsx @@ -0,0 +1,55 @@ +"use client"; + +import { CirclePlus, Filter } from "lucide-react"; + +import CardComponent from "~/components/adminDashboard/CardComponent"; +import { cardData } from "~/components/adminDashboard/cardData"; +import { Button } from "~/components/common/common-button"; +import AddProductModal from "./_components/ProductModal/add-product-modal"; +import ProductTable from "./_components/ProductTable/product-table"; + +const page = () => { + return ( +
+
+ {[0, 1, 2].map((_, index) => ( + + ))} +
+ +
+
+

+ Products +

+

+ Manage your products and view their sales performance. +

+
+
+ + + + +
+
+
+ +
+
+ ); +}; + +export default page; From 07006a85984e659e2594d422ce405a35a0fd4181 Mon Sep 17 00:00:00 2001 From: Frank Ezene Date: Thu, 25 Jul 2024 15:04:00 +0100 Subject: [PATCH 02/11] feat: create super admin add-product-modal.tsx for issue #150 --- .../ProductModal/add-product-modal.tsx | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 src/app/dashboard/(admin)/admin/products/_components/ProductModal/add-product-modal.tsx diff --git a/src/app/dashboard/(admin)/admin/products/_components/ProductModal/add-product-modal.tsx b/src/app/dashboard/(admin)/admin/products/_components/ProductModal/add-product-modal.tsx new file mode 100644 index 000000000..ddf146c5b --- /dev/null +++ b/src/app/dashboard/(admin)/admin/products/_components/ProductModal/add-product-modal.tsx @@ -0,0 +1,114 @@ +import { Button } from "~/components/common/common-button"; +import { Input } from "~/components/common/input"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "~/components/ui/dialog"; +import { Label } from "~/components/ui/label"; +import { Textarea } from "~/components/ui/textarea"; + +interface AddProductModalProperties { + children: React.ReactNode; +} +const AddProductModal = ({ children }: AddProductModalProperties) => { + return ( + + {children} + + + + Add new product + + + Create a new product + + +
+
+ + +
+
+ +