diff --git a/package.json b/package.json index 4ffcb7f3..e8f914d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hipmi", - "version": "1.0.2", + "version": "1.0.3", "private": true, "prisma": { "seed": "npx tsx prisma/seed.ts" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 8597029c..591c38cd 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -80,23 +80,19 @@ model KodeOtp { } model Profile { - id String @id @default(cuid()) - name String - email String @unique - alamat String - jenisKelamin String - active Boolean @default(true) - createdAt DateTime @default(now()) - updatedAt DateTime @default(now()) @updatedAt - User User? @relation(fields: [userId], references: [id]) - userId String? @unique - ImageProfile Images? @relation(fields: [imagesId], references: [id]) - imagesId String? @unique - Portofolio Portofolio[] - ImagesBackground ImagesBackground? @relation(fields: [imagesBackgroundId], references: [id]) - imagesBackgroundId String? @unique - imageId String? - imageBackgroundId String? + id String @id @default(cuid()) + name String + email String @unique + alamat String + jenisKelamin String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + User User? @relation(fields: [userId], references: [id]) + userId String? @unique + Portofolio Portofolio[] + imageId String? + imageBackgroundId String? } model Images { @@ -106,7 +102,6 @@ model Images { active Boolean @default(true) createdAt DateTime @default(now()) updatedAt DateTime @default(now()) @updatedAt - Profile Profile? Investasi Investasi? BeritaInvestasi BeritaInvestasi[] Donasi Donasi? @@ -118,16 +113,6 @@ model Images { Investasi_Invoice Investasi_Invoice[] } -model ImagesBackground { - id String @id @default(cuid()) - url String - label String - active Boolean @default(true) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - Profile Profile? -} - model Portofolio { id String @id @default(cuid()) id_Portofolio String @unique @@ -232,8 +217,7 @@ model Investasi { masterProgresInvestasiId String? Investasi_Invoice Investasi_Invoice[] - // imageId String? - // prospektusId String? + imageId String? } model MasterPencarianInvestor { @@ -281,6 +265,9 @@ model ProspektusInvestasi { updatedAt DateTime @default(now()) @updatedAt investasi Investasi? @relation(fields: [investasiId], references: [id]) investasiId String? @unique + + fileId String? + title String? } model DokumenInvestasi { @@ -292,6 +279,8 @@ model DokumenInvestasi { updatedAt DateTime @default(now()) @updatedAt investasi Investasi? @relation(fields: [investasiId], references: [id]) investasiId String? + + fileId String? } model BeritaInvestasi { @@ -305,6 +294,8 @@ model BeritaInvestasi { imagesId String? investasi Investasi @relation(fields: [investasiId], references: [id]) investasiId String + + imageId String? } model MasterProgresInvestasi { diff --git a/public/profile/background/0a4c3f76-a978-499c-a375-bd4109ca553a.png b/public/profile/background/0a4c3f76-a978-499c-a375-bd4109ca553a.png deleted file mode 100644 index 85db6e44..00000000 Binary files a/public/profile/background/0a4c3f76-a978-499c-a375-bd4109ca553a.png and /dev/null differ diff --git a/public/profile/background/2a245e17-88db-42a8-bcba-3500753689ac.png b/public/profile/background/2a245e17-88db-42a8-bcba-3500753689ac.png deleted file mode 100644 index 85db6e44..00000000 Binary files a/public/profile/background/2a245e17-88db-42a8-bcba-3500753689ac.png and /dev/null differ diff --git a/public/profile/background/52c0ba1d-b2c0-464a-954f-c1c85703a901.png b/public/profile/background/52c0ba1d-b2c0-464a-954f-c1c85703a901.png deleted file mode 100644 index 85db6e44..00000000 Binary files a/public/profile/background/52c0ba1d-b2c0-464a-954f-c1c85703a901.png and /dev/null differ diff --git a/public/profile/background/79b0c6a1-6651-4d8d-82ed-142764a48d4c.png b/public/profile/background/79b0c6a1-6651-4d8d-82ed-142764a48d4c.png deleted file mode 100644 index 85db6e44..00000000 Binary files a/public/profile/background/79b0c6a1-6651-4d8d-82ed-142764a48d4c.png and /dev/null differ diff --git a/public/profile/background/8fc2d18b-fed0-47de-bcb6-ab51f1734170.jpeg b/public/profile/background/8fc2d18b-fed0-47de-bcb6-ab51f1734170.jpeg deleted file mode 100644 index b43c0679..00000000 Binary files a/public/profile/background/8fc2d18b-fed0-47de-bcb6-ab51f1734170.jpeg and /dev/null differ diff --git a/public/profile/background/e08f94bf-4e66-46cb-b04a-65c32cc7d2ae.png b/public/profile/background/e08f94bf-4e66-46cb-b04a-65c32cc7d2ae.png deleted file mode 100644 index 85db6e44..00000000 Binary files a/public/profile/background/e08f94bf-4e66-46cb-b04a-65c32cc7d2ae.png and /dev/null differ diff --git a/public/profile/background/f0551419-0ffe-4c6c-ae52-34d27fd6bfe5.png b/public/profile/background/f0551419-0ffe-4c6c-ae52-34d27fd6bfe5.png deleted file mode 100644 index 85db6e44..00000000 Binary files a/public/profile/background/f0551419-0ffe-4c6c-ae52-34d27fd6bfe5.png and /dev/null differ diff --git a/public/profile/background/fa163c38-4ba2-4c07-8d20-9e77e375ccbe.jpeg b/public/profile/background/fa163c38-4ba2-4c07-8d20-9e77e375ccbe.jpeg deleted file mode 100644 index b43c0679..00000000 Binary files a/public/profile/background/fa163c38-4ba2-4c07-8d20-9e77e375ccbe.jpeg and /dev/null differ diff --git a/public/profile/background/fe538c17-3907-4deb-a8e4-4572ea81eecf.jpeg b/public/profile/background/fe538c17-3907-4deb-a8e4-4572ea81eecf.jpeg deleted file mode 100644 index eb24410a..00000000 Binary files a/public/profile/background/fe538c17-3907-4deb-a8e4-4572ea81eecf.jpeg and /dev/null differ diff --git a/src/app/api/profile/background/[id]/route.ts b/src/app/api/profile/background/[id]/route.ts deleted file mode 100644 index a83ad31c..00000000 --- a/src/app/api/profile/background/[id]/route.ts +++ /dev/null @@ -1,32 +0,0 @@ -import prisma from "@/app/lib/prisma"; -import fs from "fs"; -import { NextRequest, NextResponse } from "next/server"; - -export async function GET( - req: NextRequest, - { params }: { params: { id: string } } -) { - const get = await prisma.imagesBackground.findUnique({ - where: { - id: params.id, - }, - select: { - url: true, - }, - }); - - if (!fs.existsSync(`./public/profile/background/${get?.url}`)) { - const notFile = fs.readFileSync("./public/aset/global/no_img.png"); - return new NextResponse(notFile, { - headers: { - "Content-Type": "image/png", - }, - }); - } - const file = fs.readFileSync(`./public/profile/background/${get?.url}`); - return new NextResponse(file, { - headers: { - "Content-Type": "image/png", - }, - }); -} diff --git a/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx b/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx index 5c37237b..ebac8439 100644 --- a/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx +++ b/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx @@ -1,10 +1,8 @@ import { Admin_KonfirmasiInvestasi } from "@/app_modules/admin/investasi"; -import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile"; import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; export default async function Page({ params }: { params: { id: string } }) { const dataInvestasi = await getOneInvestasiById(params.id); - const dataUser = await funGetUserProfile(dataInvestasi?.authorId as any); // console.log(dataUser) return ( diff --git a/src/app/dev/forum/komentar/[id]/layout.tsx b/src/app/dev/forum/komentar/[id]/layout.tsx deleted file mode 100644 index 3ce7ca84..00000000 --- a/src/app/dev/forum/komentar/[id]/layout.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { LayoutForum_Komentar } from "@/app_modules/forum"; -import React from "react"; - -export default async function Layout({children}: {children: React.ReactNode}) { - return<> - {children} - -} \ No newline at end of file diff --git a/src/app/dev/forum/komentar/[id]/loading.tsx b/src/app/dev/forum/komentar/[id]/loading.tsx deleted file mode 100644 index 380b3fcd..00000000 --- a/src/app/dev/forum/komentar/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/komentar/[id]/page.tsx b/src/app/dev/forum/komentar/[id]/page.tsx deleted file mode 100644 index 728b2ba5..00000000 --- a/src/app/dev/forum/komentar/[id]/page.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; -import { Forum_Komentar } from "@/app_modules/forum"; -import { forum_getOnePostingById } from "@/app_modules/forum/fun/get/get_one_posting_by_id"; - -export default async function Page({ params }: { params: { id: string } }) { - let postingId = params.id; - const dataPosting = await forum_getOnePostingById(postingId); - const userLoginId = await funGetUserIdByToken(); - - - return ( - <> - - - ); -} diff --git a/src/app/dev/profile/edit/[id]/layout.tsx b/src/app/dev/profile/edit/[id]/layout.tsx index 961fd49d..dfe00c95 100644 --- a/src/app/dev/profile/edit/[id]/layout.tsx +++ b/src/app/dev/profile/edit/[id]/layout.tsx @@ -1,4 +1,3 @@ -import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile"; import { EditProfileLayout } from "@/app_modules/katalog/profile"; export default async function Layout({ @@ -8,8 +7,6 @@ export default async function Layout({ children: any; params: { id: string }; }) { - let profileId = params.id; - return ( <> {children} diff --git a/src/app/dev/profile/edit/[id]/page.tsx b/src/app/dev/profile/edit/[id]/page.tsx index e2b32b28..53e6ca6d 100644 --- a/src/app/dev/profile/edit/[id]/page.tsx +++ b/src/app/dev/profile/edit/[id]/page.tsx @@ -1,10 +1,9 @@ -import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile"; + import EditProfile from "@/app_modules/katalog/profile/edit/view"; import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile"; export default async function Page({ params }: { params: { id: string } }) { let profileId = params.id - const data = await funGetUserProfile(params.id); const dataProfile = await Profile_getOneProfileAndUserById(profileId) return ( diff --git a/src/app_modules/_global/author_name_on_header.tsx b/src/app_modules/_global/author_name_on_header.tsx deleted file mode 100644 index c0411715..00000000 --- a/src/app_modules/_global/author_name_on_header.tsx +++ /dev/null @@ -1,114 +0,0 @@ -"use client"; - -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { - Stack, - Grid, - Avatar, - Divider, - Text, - Group, - Loader, - Overlay, - Center, -} from "@mantine/core"; -import { useRouter } from "next/navigation"; -import { ComponentGlobal_NotifikasiPeringatan } from "./notif_global/notifikasi_peringatan"; -import moment from "moment"; -import { useState } from "react"; - -export default function ComponentGlobal_AuthorNameAndAvatar({ - profileId, - imagesId, - authorName, - tglPublish, - isPembatas, -}: { - profileId?: string; - imagesId?: string; - authorName?: string; - tglPublish?: Date; - isPembatas?: boolean; -}) { - const router = useRouter(); - const skrng = new Date(); - const [visible, setVisible] = useState(false); - - return ( - <> - - - { - if (profileId) { - setVisible(true); - router.push(RouterProfile.katalogOLD + profileId); - } else { - ComponentGlobal_NotifikasiPeringatan("Id tidak ditemukan"); - } - }} - > - {visible ? ( - - -
- -
-
-
- ) : ( - - )} -
- - - - - - {authorName ? authorName : "Nama author"} - - - - {tglPublish ? ( - - {skrng.toLocaleDateString(["id-ID"], { - dateStyle: "medium", - })} - - ) : ( - "" - )} - - - - -
- {isPembatas ? : ""} -
- - ); -} diff --git a/src/app_modules/_global/component/comp_author_name_and_avatar.tsx b/src/app_modules/_global/component/comp_author_name_and_avatar.tsx deleted file mode 100644 index 908f7be6..00000000 --- a/src/app_modules/_global/component/comp_author_name_and_avatar.tsx +++ /dev/null @@ -1,100 +0,0 @@ -"use client"; - -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { - Avatar, - Center, - Divider, - Grid, - Group, - Loader, - Overlay, - Stack, - Text, -} from "@mantine/core"; -import { useRouter } from "next/navigation"; -import { MODEL_USER } from "@/app_modules/home/model/interface"; -import React, { useState } from "react"; -import { ComponentGlobal_NotifikasiPeringatan } from "../notif_global/notifikasi_peringatan"; - -export default function ComponentGlobal_AvatarAndAuthorName({ - dataUser, - isPembatas, - componentRight, -}: { - dataUser: MODEL_USER; - isPembatas?: boolean; - componentRight?: React.ReactNode; -}) { - const router = useRouter(); - const [visible, setVisible] = useState(false); - - return ( - <> - - - { - if (dataUser?.Profile?.id) { - setVisible(true); - router.push(RouterProfile.katalogOLD + dataUser?.Profile?.id); - } else { - ComponentGlobal_NotifikasiPeringatan("Id tidak ditemukan"); - } - }} - > - {visible ? ( - - -
- -
-
-
- ) : ( - - )} -
- - - - - - {dataUser?.username ? dataUser?.username : "Nama author"} - - - {componentRight ? componentRight : null} - - - -
- {isPembatas ? : ""} -
- - ); -} diff --git a/src/app_modules/_global/component/index.ts b/src/app_modules/_global/component/index.ts index 332bcb67..3cab61b4 100644 --- a/src/app_modules/_global/component/index.ts +++ b/src/app_modules/_global/component/index.ts @@ -1,6 +1,5 @@ import { ComponentGlobal_ButtonUploadFileImage } from "../button/comp_button_upload_photo"; import ComponentGlobal_BoxInformation from "./box_information"; -import ComponentGlobal_AvatarAndAuthorName from "./comp_author_name_and_avatar"; import { ComponentGlobal_AvatarAndUsername } from "./comp_avatar_and_username"; import { ComponentGlobal_BoxUploadImage } from "./comp_box_upload_image"; import { ComponentGlobal_CardStyles } from "./comp_card_box_and_background"; @@ -16,7 +15,6 @@ import ComponentGlobal_InputCountDown from "./input_countdown"; export { ComponentGlobal_TampilanRupiah }; export { ComponentGlobal_TampilanAngkaRatusan }; -export { ComponentGlobal_AvatarAndAuthorName }; export { ComponentGlobal_CardLoadingOverlay }; export { ComponentGlobal_BoxInformation }; export { ComponentGlobal_InputCountDown }; diff --git a/src/app_modules/_global/loading_page_v2.tsx b/src/app_modules/_global/loading_page_v2.tsx index a2d24ec2..301b6d9d 100644 --- a/src/app_modules/_global/loading_page_v2.tsx +++ b/src/app_modules/_global/loading_page_v2.tsx @@ -1,14 +1,12 @@ "use client"; import { - Box, Center, Group, LoadingOverlay, Skeleton, - Text, + Text } from "@mantine/core"; -import { MainColor } from "./color/color_pallet"; export default function ComponentGlobal_V2_LoadingPage() { const listhHuruf = [ diff --git a/src/app_modules/admin/event/child/riwayat.tsx b/src/app_modules/admin/event/child/riwayat.tsx index 3e0d54a3..b7ab3385 100644 --- a/src/app_modules/admin/event/child/riwayat.tsx +++ b/src/app_modules/admin/event/child/riwayat.tsx @@ -1,5 +1,6 @@ "use client"; +import { RouterAdminEvent } from "@/app/lib/router_admin/router_admin_event"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import { MODEL_EVENT, @@ -23,14 +24,12 @@ import { TextInput, Title, } from "@mantine/core"; -import { useDisclosure, useShallowEffect } from "@mantine/hooks"; +import { useDisclosure } from "@mantine/hooks"; import { IconCircleCheck, IconSearch } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; import { useState } from "react"; import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate"; import { adminEvent_funGetListAllRiwayat } from "../fun"; -import { adminEvent_getListPesertaById } from "../fun/get/get_list_peserta_by_id"; -import { useRouter } from "next/navigation"; -import { RouterAdminEvent } from "@/app/lib/router_admin/router_admin_event"; export default function AdminEvent_Riwayat({ listRiwayat, @@ -49,8 +48,6 @@ export default function AdminEvent_Riwayat({ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) { const router = useRouter(); - const [opened, { open, close }] = useDisclosure(false); - const [peserta, setPeserta] = useState(); const [eventId, setEventId] = useState(""); const [loading, setLoading] = useState(false); @@ -89,14 +86,6 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) { radius={"xl"} onClick={() => { router.push(RouterAdminEvent.detail_peserta + e.id); - // setEventId(e.id); - // setLoading(true); - // await new Promise((v) => setTimeout(v, 500)); - // await AdminEvent_getListPesertaById(e.id).then((res: any) => { - // setPeserta(res); - // setLoading(false); - // }); - // open(); }} > Lihat Peserta @@ -146,16 +135,6 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) { )); - // useShallowEffect(() => { - // getAllPeserta(eventId); - // }, [eventId]); - - // async function getAllPeserta(eventId: string) { - // await adminEvent_getListPesertaById(eventId).then((res: any) => - // setPeserta(res) - // ); - // } - return ( <> @@ -229,46 +208,6 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) { - - - - -
- Daftar Peserta -
- - {peserta?.map((e) => ( - - - - - - - - {e?.User?.Profile?.name} - - - - - - ))} - -
-
-
); } diff --git a/src/app_modules/admin/event/table_status/table_publish.tsx b/src/app_modules/admin/event/table_status/table_publish.tsx index 2c59bd6b..cf2f2a09 100644 --- a/src/app_modules/admin/event/table_status/table_publish.tsx +++ b/src/app_modules/admin/event/table_status/table_publish.tsx @@ -51,13 +51,10 @@ export default function AdminEvent_TablePublish({ function TableStatus({ listPublish }: { listPublish: any }) { const router = useRouter(); - const [opened, { open, close }] = useDisclosure(false); const [data, setData] = useState(listPublish.data); const [isNPage, setNPage] = useState(listPublish.nPage); const [isActivePage, setActivePage] = useState(1); const [isSearch, setSearch] = useState(""); - - const [peserta, setPeserta] = useState(); const [eventId, setEventId] = useState(""); const [loading, setLoading] = useState(false); @@ -132,14 +129,6 @@ function TableStatus({ listPublish }: { listPublish: any }) { radius={"xl"} onClick={async () => { router.push(RouterAdminEvent.detail_peserta + e.id); - // setEventId(e.id); - // setLoading(true); - // await new Promise((v) => setTimeout(v, 500)); - // await adminEvent_getListPesertaById(e.id).then((res: any) => { - // setPeserta(res); - // setLoading(false); - // }); - // open(); }} > Lihat Peserta @@ -221,46 +210,6 @@ function TableStatus({ listPublish }: { listPublish: any }) { - - - - -
- Daftar Peserta -
- - {_.isEmpty(peserta) ? ( -
- Tidak ada peserta -
- ) : ( - peserta?.map((e) => ( - - - - - - - - {e?.User?.Profile?.name} - - - - - - )) - )} -
-
-
-
); } diff --git a/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts b/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts index b1e126c8..d87c9e6b 100644 --- a/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts +++ b/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts @@ -42,7 +42,7 @@ export async function adminForum_getListKomentarById({ Profile: { select: { name: true, - imagesId: true, + imageId: true, }, }, }, diff --git a/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx b/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx index 6deb3a63..ab099e82 100644 --- a/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx +++ b/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx @@ -3,11 +3,9 @@ import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum"; import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/_admin_global/header_tamplate"; import { - MODEL_FORUM_REPORT_KOMENTAR, - MODEL_FORUM_REPORT_POSTING, + MODEL_FORUM_REPORT_KOMENTAR } from "@/app_modules/forum/model/interface"; import { - Badge, Box, Button, Center, @@ -20,18 +18,15 @@ import { Table, Text, TextInput, - Title, + Title } from "@mantine/core"; +import { useShallowEffect } from "@mantine/hooks"; import { IconFlag3, IconSearch } from "@tabler/icons-react"; import { isEmpty } from "lodash"; import { useRouter } from "next/navigation"; import { useState } from "react"; import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data"; -import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete"; -import adminForum_funGetAllReportPosting from "../fun/get/get_all_report_posting"; -import { Forum_Komentar } from "@/app_modules/forum"; import adminForum_funGetAllReportKomentar from "../fun/get/get_all_report_komentar"; -import { useShallowEffect } from "@mantine/hooks"; export default function AdminForum_TableReportKomentar({ listData, diff --git a/src/app_modules/admin/vote/component/detail_hasil.tsx b/src/app_modules/admin/vote/component/detail_hasil.tsx index c7493fbb..769fef1d 100644 --- a/src/app_modules/admin/vote/component/detail_hasil.tsx +++ b/src/app_modules/admin/vote/component/detail_hasil.tsx @@ -1,5 +1,6 @@ "use client"; +import { pathAssetImage, RouterImagePreview } from "@/app/lib"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import { MODEL_VOTE_KONTRIBUTOR, @@ -72,7 +73,8 @@ export default function ComponentAdminVote_DetailHasil({ span={2} onClick={() => router.push( - RouterProfile.katalogOLD + e?.Author?.Profile?.id + RouterProfile.katalogOLD + + e?.Author?.Profile?.id ) } > @@ -84,12 +86,7 @@ export default function ComponentAdminVote_DetailHasil({ }} radius={"xl"} bg={"gray.1"} - src={ - e - ? RouterProfile.api_foto_profile + - e?.Author?.Profile?.imagesId - : "/aset/global/avatar.png" - } + src={pathAssetImage.avatar} /> diff --git a/src/app_modules/event/component/card_view/card_riwayat.tsx b/src/app_modules/event/component/card_view/card_riwayat.tsx index 620d994e..ed29b4f1 100644 --- a/src/app_modules/event/component/card_view/card_riwayat.tsx +++ b/src/app_modules/event/component/card_view/card_riwayat.tsx @@ -1,7 +1,5 @@ import { RouterEvent } from "@/app/lib/router_hipmi/router_event"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; -import { AccentColor } from "@/app_modules/_global/color/color_pallet"; -import { Card, Group, Stack, Text, Title } from "@mantine/core"; +import { Group, Stack, Text, Title } from "@mantine/core"; import { ComponentGlobal_AvatarAndUsername, diff --git a/src/app_modules/event/component/detail/detail_main.tsx b/src/app_modules/event/component/detail/detail_main.tsx index ae379b0e..3e7acb65 100644 --- a/src/app_modules/event/component/detail/detail_main.tsx +++ b/src/app_modules/event/component/detail/detail_main.tsx @@ -1,14 +1,11 @@ "use client"; -import { Stack, Title, Grid, Text, Paper, Spoiler } from "@mantine/core"; -import moment from "moment"; -import { MODEL_EVENT } from "../../model/interface"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; -import { AccentColor } from "@/app_modules/_global/color/color_pallet"; import { ComponentGlobal_AvatarAndUsername, ComponentGlobal_CardStyles, } from "@/app_modules/_global/component"; +import { Grid, Stack, Text, Title } from "@mantine/core"; +import { MODEL_EVENT } from "../../model/interface"; export default function ComponentEvent_DetailMainData({ data, diff --git a/src/app_modules/event/main/riwayat/index.tsx b/src/app_modules/event/main/riwayat/index.tsx index c02ad05b..8dc531dc 100644 --- a/src/app_modules/event/main/riwayat/index.tsx +++ b/src/app_modules/event/main/riwayat/index.tsx @@ -1,19 +1,14 @@ "use client"; -import { RouterEvent } from "@/app/lib/router_hipmi/router_event"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; -import { Card, Stack, Grid, Title, Text, Center, Tabs } from "@mantine/core"; -import moment from "moment"; +import { Stack, Tabs } from "@mantine/core"; -import { MODEL_EVENT } from "../../model/interface"; -import _ from "lodash"; -import { useRouter } from "next/navigation"; -import { useState } from "react"; -import Event_SemuaRiwayat from "./semua"; -import Event_RiwayatSaya from "./saya"; -import { useAtom } from "jotai"; -import { gs_event_riwayat } from "../../global_state"; import { AccentColor, MainColor } from "@/app_modules/_global/color/color_pallet"; +import { useAtom } from "jotai"; +import { useRouter } from "next/navigation"; +import { gs_event_riwayat } from "../../global_state"; +import { MODEL_EVENT } from "../../model/interface"; +import Event_RiwayatSaya from "./saya"; +import Event_SemuaRiwayat from "./semua"; export default function Event_Riwayat({ dataSemuaRiwayat, diff --git a/src/app_modules/forum/component/header/posting_author_header_name.tsx b/src/app_modules/forum/component/header/posting_author_header_name.tsx deleted file mode 100644 index db32eec5..00000000 --- a/src/app_modules/forum/component/header/posting_author_header_name.tsx +++ /dev/null @@ -1,155 +0,0 @@ -"use client"; - -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { - Stack, - Grid, - Avatar, - Divider, - Text, - Group, - Badge, - Loader, -} from "@mantine/core"; -import { useRouter } from "next/navigation"; -import moment from "moment"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; -import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; -import { - IconCircleFilled, - IconDots, - IconEdit, - IconFlag3, - IconMessageCircle, - IconTrash, -} from "@tabler/icons-react"; -import { IconCircle } from "@tabler/icons-react"; -import { IoIosMore } from "react-icons/io"; -import { useDisclosure } from "@mantine/hooks"; -import { useState } from "react"; -import ComponentForum_PostingButtonMore from "../more_button/posting_button_more"; -import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; -import { data } from "autoprefixer"; - -export default function ComponentForum_PostingAuthorNameOnHeader({ - authorId, - postingId, - imagesId, - authorName, - tglPublish, - isPembatas, - isMoreButton, - statusId, - userLoginId, - setData, -}: { - authorId?: string; - postingId?: string; - imagesId?: string; - authorName?: string; - tglPublish?: Date; - isPembatas?: boolean; - isMoreButton?: boolean; - statusId?: string; - userLoginId: string; - setData?:any -}) { - const router = useRouter(); - const [loading, setLoading] = useState(false); - - return ( - <> - - - { - if (authorId) { - setLoading(true); - router.push(RouterForum.forumku + authorId); - } else { - ComponentGlobal_NotifikasiPeringatan("Id tidak ditemukan"); - } - }} - > - {loading ? ( - - ) : ( - - )} - - - - - - - - {authorName ? authorName : "Nama author "} - - - - - - - {(statusId as any) === 1 ? "Open" : "Close"} - - - - - - - - - - {tglPublish - ? tglPublish.toLocaleDateString(["id-ID"], { - day: "numeric", - month: "short", - }) - : new Date().toLocaleDateString(["id-ID"], { - day: "numeric", - month: "short", - })} - - - - - {isMoreButton ? ( - - - - ) : ( - "" - )} - - - - {isPembatas ? : ""} - - - ); -} diff --git a/src/app_modules/forum/component/main_card_view.tsx b/src/app_modules/forum/component/main_card_view.tsx deleted file mode 100644 index b264e1ed..00000000 --- a/src/app_modules/forum/component/main_card_view.tsx +++ /dev/null @@ -1,99 +0,0 @@ -"use client"; - -import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; -import { Stack, Card, Group, ActionIcon, Divider, Text } from "@mantine/core"; -import { IconMessageCircle, IconMessageCircleOff } from "@tabler/icons-react"; - -import ComponentForum_PostingAuthorNameOnHeader from "./header/posting_author_header_name"; -import { MODEL_FORUM_POSTING } from "../model/interface"; -import { useState } from "react"; -import { useShallowEffect } from "@mantine/hooks"; -import { useRouter } from "next/navigation"; -import { useAtom } from "jotai"; -import { gs_forum_total_komentar } from "../global_state"; -import { forum_countOneTotalKomentarById } from "../fun/count/count_one_total_komentar_by_id"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; -import { IconMessageCircleX } from "@tabler/icons-react"; - -export default function ComponentForum_MainCardView({ - data, - setData, - setLoadingKomen, - setLoadingDetail, - userLoginId, -}: { - data: MODEL_FORUM_POSTING[]; - setData: any, - setLoadingKomen: any; - setLoadingDetail: any; - userLoginId: any; -}) { - const router = useRouter(); - return ( - <> - - {data.map((e, i) => ( - - - {/*
{JSON.stringify(e.Author.id, null, 2)}
-
{JSON.stringify(userLoginId, null, 2)}
*/} - - -
- { - // console.log("halaman forum"); - setLoadingDetail(true); - router.push(RouterForum.main_detail + e.id); - }} - > - -
- - - - - - { - (e?.ForumMaster_StatusPosting.id as any) === 1 - ? (router.push(RouterForum.komentar + e?.id), - setLoadingKomen(true)) - : router.push(RouterForum.main_detail + e?.id); - }} - > - {(e?.ForumMaster_StatusPosting?.id as any) === 1 ? ( - - ) : ( - - )} - - - {/* */} - - {e?._count} - - - - - - ))} - - - ); -} diff --git a/src/app_modules/forum/forumku/postingan_pribadi.tsx b/src/app_modules/forum/forumku/postingan_pribadi.tsx index 00668228..ba465ba0 100644 --- a/src/app_modules/forum/forumku/postingan_pribadi.tsx +++ b/src/app_modules/forum/forumku/postingan_pribadi.tsx @@ -1,11 +1,8 @@ "use client" -import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; import { useRouter } from "next/navigation"; import { useState } from "react"; -import ComponentForum_MainCardView from "../component/main_card_view"; import { MODEL_FORUM_POSTING } from "../model/interface"; -import ComponentForum_ForumkuMainCardView from "../component/forumku_component/forumku_view"; export default function ComponentForum_PostinganPribadi({ dataPosting, diff --git a/src/app_modules/forum/index.ts b/src/app_modules/forum/index.ts index 99bd696a..68eab0a0 100644 --- a/src/app_modules/forum/index.ts +++ b/src/app_modules/forum/index.ts @@ -7,8 +7,6 @@ import LayoutForum_Create from "./create/layout"; import LayoutForum_Forumku from "./forumku/layout"; import Forum_MainDetail from "./detail/main_detail"; import LayoutForum_Detail from "./detail/layout"; -import Forum_Komentar from "./komentar"; -import LayoutForum_Komentar from "./komentar/layout"; import Forum_EditPosting from "./edit/posting"; import LayoutForum_EditPosting from "./edit/posting/layout"; import Forum_ReportPosting from "./report/posting"; @@ -32,8 +30,6 @@ export { LayoutForum_Forumku, Forum_MainDetail as Forum_Detail, LayoutForum_Detail, - Forum_Komentar, - LayoutForum_Komentar, Forum_EditPosting, LayoutForum_EditPosting, Forum_ReportPosting, diff --git a/src/app_modules/forum/komentar/index.tsx b/src/app_modules/forum/komentar/index.tsx deleted file mode 100644 index 1c2b35e2..00000000 --- a/src/app_modules/forum/komentar/index.tsx +++ /dev/null @@ -1,136 +0,0 @@ -"use client"; - -import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; -import { - Button, - Card, - Group, - Paper, - Stack, - Text -} from "@mantine/core"; -import ComponentForum_PostingAuthorNameOnHeader from "../component/header/posting_author_header_name"; - -import ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; -import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; -import dynamic from "next/dynamic"; -import { useRouter } from "next/navigation"; -import { useState } from "react"; -import "react-quill/dist/quill.bubble.css"; -import { forum_funCreateKomentar } from "../fun/create/fun_create_komentar"; -import { MODEL_FORUM_POSTING } from "../model/interface"; -const ReactQuill = dynamic( - () => { - return import("react-quill"); - }, - { ssr: false } -); - -export default function Forum_Komentar({ - dataPosting, - userLoginId, -}: { - dataPosting: MODEL_FORUM_POSTING; - userLoginId: any; -}) { - return ( - <> - - - - {/*
{JSON.stringify(dataPosting, null, 2)}
*/} - -
- - - - {dataPosting?.diskusi ? ( -
- ) : ( - "" - )} - - - - - {dataPosting?.ForumMaster_StatusPosting?.id === "1" ? : "" } - - - - ); -} - -function CreateKomentar({ postingId }: { postingId: string }) { - const router = useRouter(); - const [value, setValue] = useState(""); - const [loading, setLoading] = useState(false); - - async function onComment() { - if (value.length > 500) { - return null; - } - - await forum_funCreateKomentar(postingId, value).then((res) => { - if (res.status === 201) { - ComponentGlobal_NotifikasiBerhasil(res.message); - router.replace(RouterForum.main_detail + postingId, { scroll: false }); - setLoading(true); - router.refresh(); - } else { - ComponentGlobal_NotifikasiGagal(res.message); - } - }); - } - - return ( - <> - - - { - setValue(val); - }} - /> - - - - - - - - - - ); -} diff --git a/src/app_modules/forum/komentar/layout.tsx b/src/app_modules/forum/komentar/layout.tsx deleted file mode 100644 index 6a032cc7..00000000 --- a/src/app_modules/forum/komentar/layout.tsx +++ /dev/null @@ -1,47 +0,0 @@ -"use client"; - -import { - ActionIcon, - AppShell, - Button, - Group, - Header, - Title, -} from "@mantine/core"; -import { IconChevronLeft } from "@tabler/icons-react"; -import { useRouter } from "next/navigation"; -import React from "react"; -import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; -import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate"; - -export default function LayoutForum_Komentar({ - children, -}: { - children: React.ReactNode; -}) { - const router = useRouter(); - return ( - <> - - - { - router.back(); - }} - > - - - Komentar - - - } - // header={} - > - {children} - - - ); -} diff --git a/src/app_modules/forum/splash/index.tsx b/src/app_modules/forum/splash/index.tsx index 04fd76ac..205abb33 100644 --- a/src/app_modules/forum/splash/index.tsx +++ b/src/app_modules/forum/splash/index.tsx @@ -2,16 +2,6 @@ import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; import UIGlobal_SplashScreen from "@/app_modules/_global/ui/ui_splash"; -import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; -import { - Avatar, - Center, - Image, - Loader, - Paper, - Stack, - Text, -} from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import { IconMessages } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; diff --git a/src/app_modules/fun_global/get_user_profile.ts b/src/app_modules/fun_global/get_user_profile.ts index ae084e9f..f8b27ba7 100644 --- a/src/app_modules/fun_global/get_user_profile.ts +++ b/src/app_modules/fun_global/get_user_profile.ts @@ -3,7 +3,6 @@ import prisma from "@/app/lib/prisma"; import { revalidatePath } from "next/cache"; export async function funGetUserProfile( userId: string ) { - const user = await prisma.user.findUnique({ where: { id: userId, @@ -19,14 +18,8 @@ export async function funGetUserProfile( userId: string ) { email: true, jenisKelamin: true, name: true, - imagesId: true, - ImageProfile: { - select: { - url: true, - }, - }, - ImagesBackground: true, - imagesBackgroundId: true, + imageId: true, + imageBackgroundId: true, }, }, }, diff --git a/src/app_modules/investasi/_component/detail/saham_saya/comp_detail_data.tsx b/src/app_modules/investasi/_component/detail/saham_saya/comp_detail_data.tsx index dd330910..2d3a547d 100644 --- a/src/app_modules/investasi/_component/detail/saham_saya/comp_detail_data.tsx +++ b/src/app_modules/investasi/_component/detail/saham_saya/comp_detail_data.tsx @@ -1,15 +1,15 @@ import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi"; -import { ComponentGlobal_AvatarAndAuthorName, ComponentGlobal_AvatarAndUsername } from "@/app_modules/_global/component"; +import { ComponentGlobal_AvatarAndUsername } from "@/app_modules/_global/component"; import { MODEL_INVOICE_INVESTASI } from "@/app_modules/investasi/_lib/interface"; import { - Stack, AspectRatio, - Title, - Grid, Box, - SimpleGrid, + Grid, Image, + SimpleGrid, + Stack, Text, + Title, } from "@mantine/core"; import { Investasi_ComponentStylesCard } from "../../comp_card_border_and_background"; import { Investasi_ComponentBoxDaftarBerita } from "../comp_box_daftar_berita"; diff --git a/src/app_modules/investasi/detail/view.tsx b/src/app_modules/investasi/detail/view.tsx index 27570d95..c2692822 100644 --- a/src/app_modules/investasi/detail/view.tsx +++ b/src/app_modules/investasi/detail/view.tsx @@ -4,13 +4,10 @@ import { NEW_RouterInvestasi, RouterInvestasi_OLD, } from "@/app/lib/router_hipmi/router_investasi"; -import { Warna } from "@/app/lib/warna"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; import { AccentColor, MainColor, } from "@/app_modules/_global/color/color_pallet"; -import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile"; import { ActionIcon, AspectRatio, @@ -27,22 +24,16 @@ import { Text, Title, } from "@mantine/core"; +import { useLocalStorage } from "@mantine/hooks"; import { IconBookDownload, - IconCircleCheck, IconFileDescription, - IconSpeakerphone, - IconXboxX, + IconSpeakerphone } from "@tabler/icons-react"; -import { useAtom } from "jotai"; import moment from "moment"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { MODEL_INVESTASI } from "../_lib/interface"; -import { gs_TransferValue } from "../g_state"; -import { useLocalStorage } from "@mantine/hooks"; -import ComponentGlobal_AuthorNameAndAvatar from "@/app_modules/_global/author_name_on_header"; -import { ComponentGlobal_AvatarAndAuthorName } from "@/app_modules/_global/component"; export default function DetailInvestasi({ dataInvestasi, diff --git a/src/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id.ts b/src/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id.ts index 0b689579..14c8def1 100644 --- a/src/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id.ts +++ b/src/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id.ts @@ -23,7 +23,7 @@ export default async function getListTransaksiBerhasilInvestasi( Profile: { select: { userId: true, - imagesId: true + imageId: true }, }, }, diff --git a/src/app_modules/investasi/fun/get_one_transaksi_by_id.ts b/src/app_modules/investasi/fun/get_one_transaksi_by_id.ts index 3ec4caee..d8672613 100644 --- a/src/app_modules/investasi/fun/get_one_transaksi_by_id.ts +++ b/src/app_modules/investasi/fun/get_one_transaksi_by_id.ts @@ -19,7 +19,7 @@ export default async function getOneTransaksiBerhasilByIdInvestasi( Profile: { select: { id: true, - imagesId: true, + imageId: true, }, }, }, diff --git a/src/app_modules/investasi/saham_saya/saham_saya.tsx b/src/app_modules/investasi/saham_saya/saham_saya.tsx index 619a93f6..be5bf147 100644 --- a/src/app_modules/investasi/saham_saya/saham_saya.tsx +++ b/src/app_modules/investasi/saham_saya/saham_saya.tsx @@ -1,40 +1,24 @@ "use client"; import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; +import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data"; import { - Title, - Card, - CardSection, - Group, - Flex, - Avatar, AspectRatio, Box, - Slider, + Card, + Center, Grid, - Stack, - Divider, - Badge, Image, - Text, - Button, Paper, Progress, - Center, - SimpleGrid, + Stack, + Text } from "@mantine/core"; -import { IconCircleCheck } from "@tabler/icons-react"; -import moment from "moment"; -import { useRouter } from "next/navigation"; -import dataDummy from "../dummy/data_dummy.json"; -import { MODEL_Transaksi_Investasi } from "../_lib/interface"; -import { useState } from "react"; -import { Warna } from "@/app/lib/warna"; import _ from "lodash"; -import ComponentInvestasi_IsEmptyData from "../component/is_empty_data"; -import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data"; -import { AccentColor } from "@/app_modules/_global/color/color_pallet"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { MODEL_Transaksi_Investasi } from "../_lib/interface"; export default function InvestasiSahamTerbeli({ listTransaksi, diff --git a/src/app_modules/katalog/profile/fun/upload_foto.ts b/src/app_modules/katalog/profile/fun/upload_foto.ts deleted file mode 100644 index 2ece22cf..00000000 --- a/src/app_modules/katalog/profile/fun/upload_foto.ts +++ /dev/null @@ -1,47 +0,0 @@ -"use server"; - -import prisma from "@/app/lib/prisma"; -import fs from "fs"; -import _ from "lodash"; -import { v4 } from "uuid"; - -/** - * - * @param formData - * @returns upload gambar ke /public/img - */ -export async function funUploadFoto(formData: FormData, id: string) { - const file: any = formData.get("file"); - const fName = file.name; - const fExt = _.lowerCase(file.name.split(".").pop()); - const fRandomName = v4(fName) + "." + fExt; - - const upload = await prisma.images.create({ - data: { - url: fRandomName, - }, - select: { - id: true, - url: true, - }, - }); - - if (upload) { - await prisma.profile.update({ - where: { - id: id, - }, - data: { - imagesId: upload.id, - }, - }); - } - - const upFolder = Buffer.from(await file.arrayBuffer()); - fs.writeFileSync(`./public/img/${upload.url}`, upFolder); - - return { - success: true, - data: upload, - }; -} diff --git a/src/app_modules/katalog/profile/model/interface.ts b/src/app_modules/katalog/profile/model/interface.ts index e4d8a0e9..bc056acd 100644 --- a/src/app_modules/katalog/profile/model/interface.ts +++ b/src/app_modules/katalog/profile/model/interface.ts @@ -1,5 +1,4 @@ import { MODEL_USER } from "@/app_modules/home/model/interface"; -import { MODEL_IMAGES } from "@/app_modules/model_global/interface"; export interface MODEL_PROFILE { userId: string; @@ -12,10 +11,6 @@ export interface MODEL_PROFILE { active: string; createdAt: Date; updatedAt: Date; - ImageProfile: MODEL_IMAGES; - imagesId: string; - ImagesBackground: MODEL_IMAGES; - imagesBackgroundId: string; imageId?: string; imageBackgroundId?: string; } diff --git a/src/app_modules/vote/component/card_view_publish.tsx b/src/app_modules/vote/component/card_view_publish.tsx index 3f033f39..90c1f433 100644 --- a/src/app_modules/vote/component/card_view_publish.tsx +++ b/src/app_modules/vote/component/card_view_publish.tsx @@ -1,33 +1,26 @@ "use client"; -import { RouterVote } from "@/app/lib/router_hipmi/router_vote"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; -import { - Card, - Stack, - Grid, - Avatar, - Divider, - Badge, - Group, - Text, - Title, - Box, - Center, - Progress, -} from "@mantine/core"; -import moment from "moment"; -import { useRouter } from "next/navigation"; -import { MODEL_VOTING } from "../model/interface"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { AccentColor } from "@/app_modules/_global/color/color_pallet"; -import { toNumber } from "lodash"; -import { useState } from "react"; import { ComponentGlobal_AvatarAndUsername, ComponentGlobal_CardLoadingOverlay, ComponentGlobal_CardStyles, } from "@/app_modules/_global/component"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; +import { + Avatar, + Badge, + Box, + Center, + Grid, + Group, + Stack, + Text, + Title +} from "@mantine/core"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { MODEL_VOTING } from "../model/interface"; export default function ComponentVote_CardViewPublish({ data, diff --git a/src/app_modules/vote/detail/main/index.tsx b/src/app_modules/vote/detail/main/index.tsx index ee413d6e..4cd59c88 100644 --- a/src/app_modules/vote/detail/main/index.tsx +++ b/src/app_modules/vote/detail/main/index.tsx @@ -1,10 +1,10 @@ "use client"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; import { AccentColor, MainColor, } from "@/app_modules/_global/color/color_pallet"; +import { ComponentGlobal_AvatarAndUsername, ComponentGlobal_CardStyles } from "@/app_modules/_global/component"; import ComponentGlobal_BoxInformation from "@/app_modules/_global/component/box_information"; import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; @@ -14,13 +14,12 @@ import { Badge, Box, Button, - Card, Center, Group, Radio, Stack, Text, - Title, + Title } from "@mantine/core"; import _ from "lodash"; import moment from "moment"; @@ -29,8 +28,6 @@ import ComponentVote_HasilVoting from "../../component/detail/detail_hasil_votin import { Vote_funCreateHasil } from "../../fun/create/create_hasil"; import { voting_funGetOneVotingbyId } from "../../fun/get/fun_get_one_by_id"; import { MODEL_VOTING } from "../../model/interface"; -import { ComponentDonasi_CardStatus } from "@/app_modules/donasi/component/card_view/card_status"; -import { ComponentGlobal_AvatarAndUsername, ComponentGlobal_CardStyles } from "@/app_modules/_global/component"; export default function Vote_MainDetail({ dataVote,