diff --git a/app/(admin)/admin/article/page.tsx b/app/(admin)/admin/article/page.tsx index 98c6ee8..ad22653 100644 --- a/app/(admin)/admin/article/page.tsx +++ b/app/(admin)/admin/article/page.tsx @@ -21,7 +21,7 @@ export default function BasicPage() { }; return ( -
+
@@ -30,7 +30,7 @@ export default function BasicPage() { - + */}
-
+
diff --git a/app/(admin)/admin/dashboard/page.tsx b/app/(admin)/admin/dashboard/page.tsx index b1cecd4..acba2e7 100644 --- a/app/(admin)/admin/dashboard/page.tsx +++ b/app/(admin)/admin/dashboard/page.tsx @@ -2,7 +2,7 @@ import DashboardContainer from "@/components/main/dashboard/dashboard-container" export default function AdminPage() { return ( -
+
diff --git a/app/(admin)/admin/master-category/page.tsx b/app/(admin)/admin/master-category/page.tsx new file mode 100644 index 0000000..ad10faf --- /dev/null +++ b/app/(admin)/admin/master-category/page.tsx @@ -0,0 +1,4 @@ +"use client"; +export default function MasterCategory() { + return
master category
; +} diff --git a/components/icons/sidebar-icon.tsx b/components/icons/sidebar-icon.tsx index 691ca2c..1adf935 100644 --- a/components/icons/sidebar-icon.tsx +++ b/components/icons/sidebar-icon.tsx @@ -2,166 +2,415 @@ import * as React from "react"; import { IconSvgProps } from "@/types/globals"; export const MenuBurgerIcon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - + + + ); export const DashboardIcon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - + + + ); export const HomeIcon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - - - - + + + + + + ); export const Submenu1Icon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - - - - - - - - - + + + + + + + + + + + + ); export const Submenu2Icon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - + + + ); export const InfoCircleIcon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - - - + + + + ); - export const MinusCircleIcon = ({ - size, - height = 24, - width = 24, - fill = "currentColor", - ...props + size, + height = 24, + width = 24, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - - - - - - + + + + + + ); export const TableIcon = ({ - size, - height = 24, - width = 22, - fill = "currentColor", - ...props + size, + height = 24, + width = 22, + fill = "currentColor", + ...props }: IconSvgProps) => ( - - - -); \ No newline at end of file + + + +); +export const ArticleIcon = ({ + size, + height = 20, + width = 20, + fill = "currentColor", + ...props +}: IconSvgProps) => ( + + + +); +export const MagazineIcon = ({ + size, + height = 20, + width = 20, + fill = "currentColor", + ...props +}: IconSvgProps) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export const StaticPageIcon = ({ + size, + height = 20, + width = 20, + fill = "currentColor", + ...props +}: IconSvgProps) => ( + + + +); +export const MasterUsersIcon = ({ + size, + height = 24, + width = 24, + fill = "currentColor", + ...props +}: IconSvgProps) => ( + + + +); +export const MasterRoleIcon = ({ + size, + height = 24, + width = 24, + fill = "currentColor", + ...props +}: IconSvgProps) => ( + + + + +); +export const MasterCategoryIcon = ({ + size, + height = 24, + width = 24, + fill = "currentColor", + ...props +}: IconSvgProps) => ( + + + + + + + + + + + +); diff --git a/components/landing/BannerHumas.tsx b/components/landing/BannerHumas.tsx index 32f22f2..7d7a663 100644 --- a/components/landing/BannerHumas.tsx +++ b/components/landing/BannerHumas.tsx @@ -8,10 +8,10 @@ export default function BannerHumas() { humasbanner
-

+

{t("jumbotron")}

{`"${t("phrase")}"`}

diff --git a/components/landing/ENewsPolri.tsx b/components/landing/ENewsPolri.tsx index 4a81a8a..00e0d9b 100644 --- a/components/landing/ENewsPolri.tsx +++ b/components/landing/ENewsPolri.tsx @@ -21,7 +21,6 @@ export default function ENewsPolri() { const req = { page: 1, search: "", limit: "10" }; const response = await getListArticle(req); - console.log("res", response?.data?.data); setArticle(response?.data?.data); } getArticle(); @@ -38,10 +37,6 @@ export default function ENewsPolri() { { + swiper.navigation.nextEl?.classList.add( + "bg-white/70", + "!text-black", + "rounded-full", + "!w-[40px]", + "!h-[40px]" + ); + swiper.navigation.prevEl?.classList.add( + "bg-white/70", + "!text-black", + "rounded-full", + "!w-[40px]", + "!h-[40px]" + ); + }} > {article?.map((newsItem: any) => ( @@ -68,13 +79,16 @@ export default function ENewsPolri() { {textEllipsis(newsItem.title, 40)}

-

- {convertDateFormat(newsItem.createdAt)} WIB -

-

- - {newsItem.viewCount === null ? 0 : newsItem.viewCount} -

+
+ {" "} +

+ {convertDateFormat(newsItem.createdAt)} WIB +

+

+ + {newsItem.viewCount === null ? 0 : newsItem.viewCount} +

+
diff --git a/components/landing/HeaderNews.tsx b/components/landing/HeaderNews.tsx index 75745b4..a64a499 100644 --- a/components/landing/HeaderNews.tsx +++ b/components/landing/HeaderNews.tsx @@ -1,13 +1,18 @@ "use client"; -import { Button, Card, CardFooter, ScrollShadow } from "@nextui-org/react"; +import { + Button, + Card, + CardFooter, + CircularProgress, + ScrollShadow, +} from "@nextui-org/react"; import Image from "next/image"; -import { EyeIcon } from "../icons"; -import { Swiper, SwiperSlide } from "swiper/react"; +import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from "../icons"; +import { Swiper, SwiperSlide, useSwiper } from "swiper/react"; import "swiper/css"; -import "swiper/css/pagination"; -import "swiper/css/effect-fade"; import "swiper/css/navigation"; -import { Autoplay, Pagination, Navigation } from "swiper/modules"; + +import { Autoplay, Pagination, Navigation, Controller } from "swiper/modules"; import Link from "next/link"; import GPRKominfo from "../ui/social-media/gpr-kominfo"; import { useEffect, useState } from "react"; @@ -15,6 +20,8 @@ import { getListArticle } from "@/service/article"; import { convertDateFormat, textEllipsis } from "@/utils/global"; import { useTranslations } from "next-intl"; import { data } from "autoprefixer"; +import { Controller as FormController } from "react-hook-form"; +import { Nabla } from "next/font/google"; export default function HeaderNews() { const [article, setArticle] = useState([]); @@ -30,46 +37,69 @@ export default function HeaderNews() { }, []); return ( -
+
- - {article?.map((newsItem: any) => ( - - - headernews - -
- -

- {textEllipsis(newsItem.title, 40)} + {article ? ( + { + swiper.navigation.nextEl?.classList.add( + "bg-white/70", + "!text-black", + "rounded-full", + "!w-[24px]", + "!h-[24px]" + ); + swiper.navigation.prevEl?.classList.add( + "bg-white/70", + "!text-black", + "rounded-full", + "!w-[24px]", + "!h-[24px]" + ); + }} + > + {article?.map((newsItem: any) => ( + + + headernews + + +

+ +

+ {textEllipsis(newsItem.title, 40)} +

+ +

+ {convertDateFormat(newsItem.createdAt)} WIB

- -

- {convertDateFormat(newsItem.createdAt)} WIB -

-

- - {newsItem.viewCount === null ? 0 : newsItem.viewCount} -

-
- - - - ))} - +

+ + {newsItem.viewCount === null ? 0 : newsItem.viewCount} +

+
+
+
+
+ ))} +
+ ) : ( + + )}

@@ -84,7 +114,7 @@ export default function HeaderNews() { headernews

{data.title}{" "} - -

- {convertDateFormat(data.createdAt)} WIB -

-

- - {data.viewCount === null ? 0 : data.viewCount} -

+
+

+ {convertDateFormat(data.createdAt)} WIB +

+

+ + {data.viewCount === null ? 0 : data.viewCount} +

+
))} @@ -116,7 +147,7 @@ export default function HeaderNews() {
- - {article?.map((newsItem: any) => ( - - - headernews - -
- -

- {newsItem.title} -

- -

- {convertDateFormat(newsItem.createdAt)} WIB -

-

- - {newsItem.viewCount === null ? 0 : newsItem.viewCount} -

-
-
-
-
- ))} -
+ {article ? ( + { + swiper.navigation.nextEl?.classList.add( + "bg-white/70", + "!text-black", + "rounded-full", + "!w-[48px]", + "!h-[48px]" + ); + swiper.navigation.prevEl?.classList.add( + "bg-white/70", + "!text-black", + "rounded-full", + "!w-[48px]", + "!h-[48px]" + ); + }} + > + {article?.map((newsItem: any) => ( + + + headernews + + +
+ +

+ {newsItem.title} +

+ +
+

+ {convertDateFormat(newsItem.createdAt)} WIB +

+

+ + {newsItem.viewCount === null ? 0 : newsItem.viewCount} +

+
+
+
+
+
+ ))} +
+ ) : ( + + )}
diff --git a/components/landing/NewsTicker.tsx b/components/landing/NewsTicker.tsx index d4a5133..4771286 100644 --- a/components/landing/NewsTicker.tsx +++ b/components/landing/NewsTicker.tsx @@ -57,7 +57,7 @@ export default function NewsTicker() { }`} >

@@ -65,7 +65,7 @@ export default function NewsTicker() {

diff --git a/components/landing/RegionalNews.tsx b/components/landing/RegionalNews.tsx index c9196ba..ef6e039 100644 --- a/components/landing/RegionalNews.tsx +++ b/components/landing/RegionalNews.tsx @@ -16,7 +16,6 @@ import Link from "next/link"; import { useTranslations } from "next-intl"; export default function RegionalNews() { - const [limitedData, setLimitedData] = useState([]); const { isOpen, onOpen, onOpenChange } = useDisclosure(); const [scrollBehavior, setScrollBehavior] = React.useState("inside"); @@ -54,6 +53,12 @@ export default function RegionalNews() { title: "Polda Jawa Timur", path: "news/polda-jatim", }, + { + id: 6, + img: "/assets/polda/polda-jawa-barat.svg", + title: "Polda Jawa Barat", + path: "/news/polda-jawa-barat", + }, ]; const listPoldaAll = [ @@ -305,7 +310,7 @@ export default function RegionalNews() { {/*

*/} -
+
{listPolda.map((item: any, index: any) => (

{list?.title}

-

- {convertDateFormat(list?.createdAt)} WIB -

-

- - {list?.viewCount === null ? 0 : list?.viewCount} -

+
+

+ {convertDateFormat(list?.createdAt)} WIB +

+

+ + {list?.viewCount === null ? 0 : list?.viewCount} +

+
))}