diff --git a/src/app/dev/colab/detail/group/[id]/page.tsx b/src/app/dev/colab/detail/group/[id]/page.tsx index f20a232e..2fecdb0c 100644 --- a/src/app/dev/colab/detail/group/[id]/page.tsx +++ b/src/app/dev/colab/detail/group/[id]/page.tsx @@ -1,7 +1,5 @@ import adminColab_getOneRoomChatById from "@/app_modules/admin/colab/fun/get/get_one_room_chat_by_id"; import { Colab_GroupChatView } from "@/app_modules/colab"; -import ColabViewChat from "@/app_modules/colab/detail/chat"; -import colab_V2getListMessageByRoomId from "@/app_modules/colab/fun/chat/get_message_by_room_id"; import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; diff --git a/src/app/dev/colab/detail/grup/[id]/layout.tsx b/src/app/dev/colab/detail/grup/[id]/layout.tsx deleted file mode 100644 index 50e8de8a..00000000 --- a/src/app/dev/colab/detail/grup/[id]/layout.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import prisma from "@/app/lib/prisma"; -import { LayoutColab_DetailGrupDiskusi } from "@/app_modules/colab"; -import colab_getListAnggotaByRoomId from "@/app_modules/colab/fun/get/room_chat/get_list_anggota_by_room_id"; -import React from "react"; - -export default async function Layout({ - children, - params, -}: { - children: React.ReactNode; - params: { id: string }; -}) { - let roomId = params.id; - const dataRoom = await colab_getListAnggotaByRoomId(roomId); - - - return ( - <> - - {children} - - - ); -} diff --git a/src/app/dev/colab/detail/grup/[id]/page.tsx b/src/app/dev/colab/detail/grup/[id]/page.tsx deleted file mode 100644 index d03cec6e..00000000 --- a/src/app/dev/colab/detail/grup/[id]/page.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Colab_DetailGrupDiskusi } from "@/app_modules/colab"; -import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; -import _ from "lodash"; - -export default async function Page({ params }: { params: { id: string } }) { - let roomId = params.id; - const userLoginId = await user_getOneUserId(); - let listMsg = await colab_getMessageByRoomId({ page: 1, roomId: roomId }); - - return ( - <> - - - ); -} diff --git a/src/app/dev/colab/detail/main_detail/[id]/loading.tsx b/src/app/dev/colab/detail/main_detail/[id]/loading.tsx deleted file mode 100644 index 380b3fcd..00000000 --- a/src/app/dev/colab/detail/main_detail/[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/colab/detail/proyek/saya/[id]/layout.tsx b/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx index 0b6c1c5a..d7c38cc1 100644 --- a/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx +++ b/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx @@ -1,6 +1,4 @@ import { LayoutColab_DetailProyekSaya } from "@/app_modules/colab"; -import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; import React from "react"; export default async function Layout({ @@ -11,11 +9,11 @@ export default async function Layout({ params: { id: string }; }) { let colabId = params.id; - const dataColab = await colab_getOneCollaborationById(colabId) + return ( <> - + {children} diff --git a/src/app/dev/colab/main/beranda/page.tsx b/src/app/dev/colab/main/beranda/page.tsx index 1a94a1a1..29973ad3 100644 --- a/src/app/dev/colab/main/beranda/page.tsx +++ b/src/app/dev/colab/main/beranda/page.tsx @@ -3,7 +3,7 @@ import colab_getListAllProyek from "@/app_modules/colab/fun/get/get_list_all_pro import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page() { - const listData = await colab_getListAllProyek(); + const listData = await colab_getListAllProyek({page: 1}); const userLoginId = await user_getOneUserId(); return ( diff --git a/src/app/dev/colab/main/grup/loading.tsx b/src/app/dev/colab/main/grup/loading.tsx deleted file mode 100644 index 380b3fcd..00000000 --- a/src/app/dev/colab/main/grup/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/colab/main/grup/page.tsx b/src/app/dev/colab/main/grup/page.tsx index 8dd133e0..2d9237a9 100644 --- a/src/app/dev/colab/main/grup/page.tsx +++ b/src/app/dev/colab/main/grup/page.tsx @@ -2,7 +2,7 @@ import colab_getListRoomChatByAuthorId from "@/app_modules/colab/fun/get/room_ch import Colab_GrupDiskus from "@/app_modules/colab/main/grup"; export default async function Page() { - const listRoom = await colab_getListRoomChatByAuthorId(); + const listRoom = await colab_getListRoomChatByAuthorId({page: 1}); return ( <> diff --git a/src/app/dev/colab/main/proyek/loading.tsx b/src/app/dev/colab/main/proyek/loading.tsx deleted file mode 100644 index 380b3fcd..00000000 --- a/src/app/dev/colab/main/proyek/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/colab/main/proyek/page.tsx b/src/app/dev/colab/main/proyek/page.tsx index 81e644f7..abb00e7e 100644 --- a/src/app/dev/colab/main/proyek/page.tsx +++ b/src/app/dev/colab/main/proyek/page.tsx @@ -1,10 +1,10 @@ import { Colab_Proyek } from "@/app_modules/colab"; -import colab_getListPartisipasiProyekByAuthorId from "@/app_modules/colab/fun/get/get_list_partisipasi_proyek_by_author_id"; -import colab_getListAllProyekSayaByAuthorId from "@/app_modules/colab/fun/get/get_list_proyek_saya_by_author_id"; +import colab_getListPartisipasiProyekByAuthorId from "@/app_modules/colab/fun/get/pasrtisipan/get_list_partisipasi_proyek_by_author_id"; +import colab_getListAllProyekSayaByAuthorId from "@/app_modules/colab/fun/get/pasrtisipan/get_list_proyek_saya_by_author_id"; export default async function Page() { - const listPartisipasiProyek = (await colab_getListPartisipasiProyekByAuthorId()).data; - const listProyekSaya = (await colab_getListAllProyekSayaByAuthorId()).data; + const listPartisipasiProyek = await colab_getListPartisipasiProyekByAuthorId({page: 1}) + const listProyekSaya = await colab_getListAllProyekSayaByAuthorId({page: 1}) return ( <> diff --git a/src/app_modules/colab/component/card_view/card_beranda.tsx b/src/app_modules/colab/component/card_view/card_beranda.tsx new file mode 100644 index 00000000..1c1ecbf3 --- /dev/null +++ b/src/app_modules/colab/component/card_view/card_beranda.tsx @@ -0,0 +1,53 @@ +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; +import { Card, Stack } from "@mantine/core"; +import { MODEL_COLLABORATION } from "../../model/interface"; +import ComponentColab_CardSectionData from "./card_section_data"; +import ComponentColab_CardSectionHeaderAuthorName from "./card_section_header_author_name"; +import ComponentColab_JumlahPartisipan from "./card_section_jumlah_partisipan"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export function ComponentColab_CardBeranda({ + data, + userLoginId, +}: { + data: MODEL_COLLABORATION; + userLoginId: string; +}) { + const router = useRouter(); + const [loadingCreate, setLoadingCreate] = useState(false); + + return ( + <> + + + + + + + + + ); +} diff --git a/src/app_modules/colab/component/card_view/card_proyek_saya.tsx b/src/app_modules/colab/component/card_view/card_proyek_saya.tsx new file mode 100644 index 00000000..e99d4415 --- /dev/null +++ b/src/app_modules/colab/component/card_view/card_proyek_saya.tsx @@ -0,0 +1,34 @@ +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import { Card, Stack } from "@mantine/core"; +import ComponentColab_CardSectionData from "./card_section_data"; +import ComponentColab_JumlahPartisipan from "./card_section_jumlah_partisipan"; +import { MODEL_COLLABORATION } from "../../model/interface"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; + +export function ComponentColab_CardProyekSaya({data, path}: {data: MODEL_COLLABORATION, path: string}) { + return ( + <> + + + + + + + + ); +} \ No newline at end of file diff --git a/src/app_modules/colab/component/card_view/card_section_data.tsx b/src/app_modules/colab/component/card_view/card_section_data.tsx index f810940a..971efb30 100644 --- a/src/app_modules/colab/component/card_view/card_section_data.tsx +++ b/src/app_modules/colab/component/card_view/card_section_data.tsx @@ -1,11 +1,8 @@ "use client"; -import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; -import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; -import { Card, Center, Title, Stack, Grid, Text } from "@mantine/core"; +import { Card, Center, Grid, Stack, Text, Title } from "@mantine/core"; import { useRouter } from "next/navigation"; -import { useState } from "react"; import { MODEL_COLLABORATION } from "../../model/interface"; export default function ComponentColab_CardSectionData({ diff --git a/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx b/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx index c730d935..b627686b 100644 --- a/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx +++ b/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx @@ -19,6 +19,7 @@ import { IconDots, IconEdit } from "@tabler/icons-react"; import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; import { useDisclosure } from "@mantine/hooks"; import { useState } from "react"; +import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer"; export default function ComponentColab_CardSectionHeaderAuthorName({ profileId, @@ -93,10 +94,20 @@ function ButtonAction({ colabId: string; }) { const router = useRouter(); - const [opened, setOpened] = useState(false); + const [openDrawe, setOpenDrawer] = useState(false); + + const listPage = [ + { + id: "1", + name: "Edit Proyek", + icon: , + path: RouterColab.edit + colabId, + }, + ]; + return ( <> - - + */} + + setOpenDrawer(true)}> + {isAuthor ? : ""} + + + setOpenDrawer(false)} + component={listPage} + /> ); } diff --git a/src/app_modules/colab/component/card_view/card_semua_partisipan.tsx b/src/app_modules/colab/component/card_view/card_semua_partisipan.tsx new file mode 100644 index 00000000..2354a2af --- /dev/null +++ b/src/app_modules/colab/component/card_view/card_semua_partisipan.tsx @@ -0,0 +1,49 @@ +import { Card, Stack } from "@mantine/core"; +import { + MODEL_COLLABORATION, + MODEL_COLLABORATION_PARTISIPASI, +} from "../../model/interface"; +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import ComponentColab_CardSectionData from "./card_section_data"; +import ComponentColab_CardSectionHeaderAuthorName from "./card_section_header_author_name"; +import ComponentColab_JumlahPartisipan from "./card_section_jumlah_partisipan"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; + +export function ComponentColab_CardSemuaPartisipan({ + data, + path, +}: { + data: MODEL_COLLABORATION_PARTISIPASI; + path: string; +}) { + return ( + <> + + + + + + + + + ); +} diff --git a/src/app_modules/colab/component/card_view/crad_grup.tsx b/src/app_modules/colab/component/card_view/crad_grup.tsx new file mode 100644 index 00000000..5b405b30 --- /dev/null +++ b/src/app_modules/colab/component/card_view/crad_grup.tsx @@ -0,0 +1,62 @@ +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; +import ComponentGlobal_Loader from "@/app_modules/_global/component/loader"; +import { Paper, Grid, Stack, Center, Loader, Text } from "@mantine/core"; +import { IconChevronRight } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export function ComponentColab_CardGrup({ data }: { data: any }) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + const [idRoom, setIdRoom] = useState(""); + + return ( + <> + { + router.push( + RouterColab.group_chat + data?.ProjectCollaboration_RoomChat.id, + { scroll: false } + ); + setIdRoom(data?.ProjectCollaboration_RoomChat.id); + setLoading(true); + }} + > + + + + + {data?.ProjectCollaboration_RoomChat?.name} + + + { + data?.ProjectCollaboration_RoomChat + ?.ProjectCollaboration_AnggotaRoomChat.length + }{" "} + Anggota + + + + +
+ {data?.ProjectCollaboration_RoomChat?.id === idRoom ? ( + + ) : ( + + )} +
+
+
+
+ + ); +} diff --git a/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx b/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx index 92de902e..e9577049 100644 --- a/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx +++ b/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx @@ -1,27 +1,26 @@ "use client"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { - Stack, - Grid, - Avatar, - Divider, - Text, - Group, - ActionIcon, - Drawer, - ScrollArea, - Title, - Paper, - Button, -} from "@mantine/core"; -import { useRouter } from "next/navigation"; -import moment from "moment"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { MODEL_USER } from "@/app_modules/home/model/interface"; -import { IconEyeCheck, IconZoomCheck } from "@tabler/icons-react"; +import { + ActionIcon, + Avatar, + Button, + Divider, + Drawer, + Grid, + Group, + Paper, + ScrollArea, + Stack, + Text, + Title, +} from "@mantine/core"; import { useDisclosure } from "@mantine/hooks"; -import { IconFileCheck } from "@tabler/icons-react"; +import { IconCaretRight, IconX } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; export default function ComponentColab_AuthorNameOnListPartisipan({ author, @@ -41,19 +40,52 @@ export default function ComponentColab_AuthorNameOnListPartisipan({ opened={opened} onClose={close} position="bottom" - size={"40vh"} + size={"auto"} withCloseButton={false} + styles={{ + content: { + padding: 0, + position: "absolute", + margin: "auto", + backgroundColor: "transparent", + left: 0, + right: 0, + width: 500, + }, + body: { + backgroundColor: AccentColor.darkblue, + borderTop: `2px solid ${AccentColor.blue}`, + borderRight: `1px solid ${AccentColor.blue}`, + borderLeft: `1px solid ${AccentColor.blue}`, + borderRadius: "20px 20px 0px 0px", + color: "white", + paddingBottom: "5%", + }, + }} > - Deskripsi Diri - + + Deskripsi Diri + + + + + {deskripsi} - + */} @@ -96,7 +128,7 @@ export default function ComponentColab_AuthorNameOnListPartisipan({ radius={"xl"} variant="transparent" > - + ) : ( "" diff --git a/src/app_modules/colab/component/detail/list_partisipasi_user.tsx b/src/app_modules/colab/component/detail/list_partisipasi_user.tsx index 316a4dcf..6f9f4153 100644 --- a/src/app_modules/colab/component/detail/list_partisipasi_user.tsx +++ b/src/app_modules/colab/component/detail/list_partisipasi_user.tsx @@ -1,31 +1,34 @@ "use client"; import { - Paper, - Center, - Title, - ScrollArea, + AccentColor, + MainColor, +} from "@/app_modules/_global/color/color_pallet"; +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 { + ActionIcon, Box, + Button, + Center, + Drawer, + Group, + Paper, + ScrollArea, Stack, Text, - Divider, - Button, - Drawer, Textarea, - Group, + Title } from "@mantine/core"; -import ComponentColab_AuthorNameOnHeader from "../header_author_name"; -import { - MODEL_COLLABORATION_MASTER, - MODEL_COLLABORATION_PARTISIPASI, -} from "../../model/interface"; -import _ from "lodash"; +import { useDisclosure } from "@mantine/hooks"; +import { IconX } from "@tabler/icons-react"; import { useState } from "react"; import colab_funCreatePartisipan from "../../fun/create/fun_create_partisipan_by_user_id"; import colab_getListPartisipanByColabId from "../../fun/get/get_list_partisipan_by_id"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; -import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; -import { useDisclosure } from "@mantine/hooks"; +import { + MODEL_COLLABORATION_PARTISIPASI +} from "../../model/interface"; import ComponentColab_AuthorNameOnListPartisipan from "./header_author_list_partisipan"; export default function ComponentColab_DetailListPartisipasiUser({ @@ -71,11 +74,37 @@ export default function ComponentColab_DetailListPartisipasiUser({ opened={opened} onClose={close} position="bottom" - size={"30vh"} + size={"auto"} withCloseButton={false} + styles={{ + content: { + padding: 0, + position: "absolute", + margin: "auto", + backgroundColor: "transparent", + left: 0, + right: 0, + width: 500, + }, + body: { + backgroundColor: AccentColor.darkblue, + borderTop: `2px solid ${AccentColor.blue}`, + borderRight: `1px solid ${AccentColor.blue}`, + borderLeft: `1px solid ${AccentColor.blue}`, + borderRadius: "20px 20px 0px 0px", + color: "white", + paddingBottom: "5%", + }, + }} > - + + + + + +