diff --git a/public/images/arrow-right-up.png b/public/images/arrow-right-up.png new file mode 100644 index 000000000..2997e5360 Binary files /dev/null and b/public/images/arrow-right-up.png differ diff --git a/public/images/money.png b/public/images/money.png new file mode 100644 index 000000000..3eb778b0a Binary files /dev/null and b/public/images/money.png differ diff --git a/public/images/person.png b/public/images/person.png new file mode 100644 index 000000000..201ad1736 Binary files /dev/null and b/public/images/person.png differ diff --git a/public/images/upload-image.png b/public/images/upload-image.png new file mode 100644 index 000000000..8ba65fdc4 Binary files /dev/null and b/public/images/upload-image.png differ diff --git a/src/app/dashboard/(admin)/admin/email/_components/table/index.tsx b/src/app/dashboard/(admin)/admin/email/_components/table/index.tsx new file mode 100644 index 000000000..9282ba134 --- /dev/null +++ b/src/app/dashboard/(admin)/admin/email/_components/table/index.tsx @@ -0,0 +1,41 @@ +import { EllipsisVertical } from "lucide-react"; + +const index = async () => { + return ( +
+
+
+ +

Name

+
+

Type

+

Created Date

+

Status

+

Action

+
+ +
+
+ +

The Lemonade blender

+
+

Product

+

01-01-24

+

+ + Offline + +

+

+ +

+
+
+ ); +}; + +export default index; diff --git a/src/app/dashboard/(admin)/admin/email/_components/top-menu/index.tsx b/src/app/dashboard/(admin)/admin/email/_components/top-menu/index.tsx new file mode 100644 index 000000000..b213dc00f --- /dev/null +++ b/src/app/dashboard/(admin)/admin/email/_components/top-menu/index.tsx @@ -0,0 +1,126 @@ +"use client"; + +import { + Check, + // ChevronLeft, + // ChevronRight, + CirclePlus, + Filter, +} from "lucide-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +// import { Button } from "~/components/ui/button"; +import { Button } from "~/components/common/common-button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "~/components/ui/dropdown-menu"; +import { Input } from "~/components/ui/input"; + +// import { +// Pagination, +// PaginationContent, +// PaginationEllipsis, +// PaginationItem, +// PaginationLink, +// } from "~/components/ui/pagination"; + +interface FilterDataProperties { + title: string; + selected: boolean; +} + +const filterData: FilterDataProperties[] = [ + { + title: "Active", + selected: false, + }, + + { + title: "Inactive", + selected: false, + }, +]; + +const Menu = () => { + const [selectedFilter, setSelectedFilter] = useState< + FilterDataProperties | undefined + >(); + + const router = useRouter(); + + return ( +
+
+
+
+
+ +
+ + + + + + {filterData.map((data, index) => { + const { selected, title } = data; + + selectedFilter?.title === title + ? (data.selected = true) + : (data.selected = false); + + return ( + setSelectedFilter(filterData[index])} + key={index} + > +
+
{title}
+ + +
+
+ ); + })} +
+
+
+ +
+
+
+
+
+ ); +}; + +export default Menu; diff --git a/src/app/dashboard/(admin)/admin/email/new-template/page.tsx b/src/app/dashboard/(admin)/admin/email/new-template/page.tsx new file mode 100644 index 000000000..7ced4eb0c --- /dev/null +++ b/src/app/dashboard/(admin)/admin/email/new-template/page.tsx @@ -0,0 +1,103 @@ +"use client"; + +import uploadImage from "@/../../public/images/upload-image.png"; +import { + AlignCenter, + AlignLeft, + Bold, + Code, + Heading1, + Heading2, + Heading3, + ItalicIcon, + Link, + ListOrdered, + Pen, + StrikethroughIcon, +} from "lucide-react"; +import Image from "next/image"; +import { useRef, useState } from "react"; + +import { Button } from "~/components/common/common-button"; + +const NewTemplate = () => { + const fileUploaderReference = useRef(null); + const [picture, setPicture] = useState(""); + + const savePicture = () => { + if ( + fileUploaderReference.current !== null && + fileUploaderReference.current.files !== null + ) { + const uploadedFile = fileUploaderReference.current?.files[0]; + const cachedURL = URL?.createObjectURL(uploadedFile); + setPicture(cachedURL); + } + }; + + const handleImageUpload = () => { + if (fileUploaderReference.current !== null) { + fileUploaderReference.current.click(); + } + }; + + return ( +
+
+

Template name

+
+ +
+ + +
+
+
+ + + | + + + | + + + + + + | +
+ + ccccc +
+
+ + +
+ +
+
+ ); +}; + +export default NewTemplate; diff --git a/src/app/dashboard/(admin)/admin/email/page.tsx b/src/app/dashboard/(admin)/admin/email/page.tsx index ff6dcea39..914238df0 100644 --- a/src/app/dashboard/(admin)/admin/email/page.tsx +++ b/src/app/dashboard/(admin)/admin/email/page.tsx @@ -1,21 +1,118 @@ -import NewTemplate from "./_components/new-template/NewTemplate"; -import Toptab from "./_components/Toptab"; +"use client"; -const tabs = [ +import arrow from "@/../../public/images/arrow-right-up.png"; +import money from "@/../../public/images/money.png"; +import person from "@/../../public/images/person.png"; +import { ChevronLeft, ChevronRightIcon } from "lucide-react"; +import Image from "next/image"; + +import Table from "~/app/dashboard/(admin)/admin/email/_components/table"; +// import {Table} from "~/app/dashboard/(admin)/admin/email/_components/main-table"; +import Topmenu from "~/app/dashboard/(admin)/admin/email/_components/top-menu"; +import { Button } from "~/components/ui/button"; +import { + Pagination, + PaginationContent, + PaginationEllipsis, + PaginationItem, + PaginationLink, +} from "~/components/ui/pagination"; + +const cards = [ + { + name: "Total Templates", + value: "$45,000.00", + comment: "+20% from last month", + image: money, + }, { - name: "New Template", - value: "new", - content: , + name: "Recent Additions", + value: "4,000", + comment: "+10% from last month", + image: person, }, { - name: "Manage Template", - value: "manage", - content:
, + name: "Pending actions", + value: "$450,000.00", + comment: "+150% from last month", + image: arrow, }, ]; const page = () => { - return
{}
; + return ( +
+
+

+ Email Template Overview +

+

Showing records from the last .....

+
+
+ {cards.map((card, index) => { + return ( +
+
+

{card.name}

+

{card.value}

+ {card.comment} +
+ {card.name} +
+ ); + })} +
+ +
+ +
+
+ + + +
+

Showing 1 to 4 of 50 items

+
+ + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + + + + +
+
+ + ); + // < div > {< Toptab tabs = { tabs } />}; }; export default page;