# Project Collaboration

## feat
- Tampilan beranda & detailnya
- Tampilan status & detailnya
- Tampilan partisipasi & detailnya
- Tampilan grup diskusi & detailnya
### No issue
This commit is contained in:
2024-04-03 10:26:40 +08:00
parent d767307291
commit 4ab4a71961
87 changed files with 2656 additions and 34 deletions

View File

@@ -0,0 +1,13 @@
"use server";
import prisma from "@/app/lib/prisma";
export async function adminForum_countLaporanKomentar() {
const count = await prisma.forum_ReportKomentar.count({
where: {
isActive: true,
},
});
return count;
}

View File

@@ -0,0 +1,13 @@
"use server";
import prisma from "@/app/lib/prisma";
export async function adminForum_countLaporanPosting() {
const count = await prisma.forum_ReportPosting.count({
where: {
isActive: true,
},
});
return count;
}

View File

@@ -0,0 +1,13 @@
"use server";
import prisma from "@/app/lib/prisma";
export async function adminForum_countPublish() {
const count = await prisma.forum_Posting.count({
where: {
isActive: true,
},
});
return count;
}

View File

@@ -4,36 +4,56 @@ import { Group, Paper, SimpleGrid, Stack, Text, Title } from "@mantine/core";
import ComponentAdminGlobal_HeaderTamplate from "../../component/header_tamplate";
import ComponentAdminGlobal_LoadingPage from "../../component/loading_admin_page";
export default function AdminForum_Main() {
export default function AdminForum_Main({
countPublish,
countLaporanPosting,
countLaporanKomentar,
}: {
countPublish: number;
countLaporanPosting: number;
countLaporanKomentar: number;
}) {
return (
<>
<Stack>
<ComponentAdminGlobal_HeaderTamplate name="Forum" />
<ForumMain />
<ForumMain
countPublish={countPublish}
countLaporanPosting={countLaporanPosting}
countLaporanKomentar={countLaporanKomentar}
/>
</Stack>
{/* <ComponentGlobalAdmin_LoadingPage /> */}
</>
);
}
function ForumMain() {
function ForumMain({
countPublish,
countLaporanPosting,
countLaporanKomentar,
}: {
countPublish: number;
countLaporanPosting: number;
countLaporanKomentar: number;
}) {
const listBox = [
{
id: 1,
name: "Publish",
jumlah: 0,
jumlah: countPublish,
color: "green",
},
{
id: 2,
name: "Laporan Posting",
jumlah: 0,
jumlah: countLaporanPosting,
color: "orange",
},
{
id: 3,
name: "Laporan Komentar",
jumlah: 0,
jumlah: countLaporanKomentar,
color: "red",
},
];

View File

@@ -159,16 +159,16 @@ export const listAdminPage = [
name: "Table Posting",
path: RouterAdminForum.publish,
},
{
id: 73,
name: "Laporan Posting",
path: RouterAdminForum.report_posting,
},
{
id: 74,
name: "Laporan Komentar",
path: RouterAdminForum.report_komentar,
},
// {
// id: 73,
// name: "Laporan Posting",
// path: RouterAdminForum.report_posting,
// },
// {
// id: 74,
// name: "Laporan Komentar",
// path: RouterAdminForum.report_komentar,
// },
],
},
];

View File

@@ -0,0 +1,82 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
import { Card, Center, Title, Stack, Grid, Text } from "@mantine/core";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function ComponentColab_CardSectionData({
colabId,
path,
}: {
colabId?: any;
path?: any;
}) {
const router = useRouter();
return (
<>
<Card.Section
px={"md"}
onClick={() => {
if (path) {
router.push(path + colabId);
} else {
ComponentGlobal_NotifikasiPeringatan("Path tidak ditemukan");
}
}}
>
<Center px={"md"} mb={"lg"}>
<Title order={5} lineClamp={1}>
Judul Proyek{" "}
</Title>
</Center>
<Stack spacing={"xs"}>
<Grid>
<Grid.Col span={2}>
<Text fw={"bold"} fz={"xs"}>
Industri
</Text>
</Grid.Col>
<Grid.Col span={1}>
<Text fz={"xs"}>:</Text>
</Grid.Col>
<Grid.Col span={"auto"}>
<Text fz={"xs"}>Industri</Text>
</Grid.Col>
</Grid>
<Grid>
<Grid.Col span={2}>
<Text fw={"bold"} fz={"xs"}>
Lokasi
</Text>
</Grid.Col>
<Grid.Col span={1}>
<Text fz={"xs"}>:</Text>
</Grid.Col>
<Grid.Col span={"auto"}>
<Text fz={"xs"} lineClamp={1}>
Lokasi dari proyek{" "}
</Text>
</Grid.Col>
</Grid>
<Stack spacing={5}>
<Text fw={"bold"} fz={"xs"}>
Tujuan proyek
</Text>
<Text lineClamp={3} fz={"xs"}>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam
repudiandae nostrum temporibus velit possimus, voluptate inventore
recusandae hic ipsa praesentium deserunt, fuga asperiores
doloremque amet incidunt explicabo ea eius earum.
</Text>
</Stack>
</Stack>
</Card.Section>
</>
);
}

View File

@@ -0,0 +1,76 @@
"use client";
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/author_name_on_header";
import { Avatar, Card, Divider, Grid, Stack, Text } from "@mantine/core";
import ComponentColab_AuthorNameOnHeader from "../header_author_name";
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
import { useRouter } from "next/navigation";
export default function ComponentColab_CardSectionHeaderAuthorName({
profileId,
imagesId,
authorName,
tglPublish,
isPembatas,
jumlah_partisipan,
}: {
profileId?: string;
imagesId?: string;
authorName?: string;
tglPublish?: Date;
isPembatas?: boolean;
jumlah_partisipan?: number;
}) {
const router = useRouter();
return (
<>
<Card.Section px={"md"} pb={"md"}>
<Stack spacing={"xs"}>
<Grid>
<Grid.Col
span={"content"}
onClick={() => {
if (profileId) {
router.push(RouterProfile.katalog + profileId);
} else {
ComponentGlobal_NotifikasiPeringatan("Id tidak ditemukan");
}
}}
>
<Avatar
size={30}
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
bg={"gray.1"}
src={
imagesId
? RouterProfile.api_foto_profile + imagesId
: "/aset/global/avatar.png"
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Stack justify="center" h={"100%"}>
<Text lineClamp={1} fz={"sm"} fw={"bold"}>
{authorName ? authorName : "Nama author"}
</Text>
</Stack>
</Grid.Col>
<Grid.Col span={"content"}>
<Stack justify="center" h={"100%"}>
<Text c={"gray"} fz={"xs"}>
{jumlah_partisipan
? jumlah_partisipan + " " + "partisipan"
: 0 + " " + "partisipan"}
</Text>
</Stack>
</Grid.Col>
</Grid>
{isPembatas ? <Divider /> : ""}
</Stack>
</Card.Section>
</>
);
}

View File

@@ -0,0 +1,28 @@
"use client";
import { Stack, Divider, Center, Text, Grid } from "@mantine/core";
import { IconUsersGroup } from "@tabler/icons-react";
export default function ComponentColab_JumlahPartisipan() {
return (
<>
<Stack>
<Divider />
<Center>
<Grid >
<Grid.Col span={"content"}>
<Text c={"gray"} fz={"xs"} fw={"bold"}>
12
</Text>
</Grid.Col>
<Grid.Col span={"auto"}>
<Text c={"gray"} fz={"xs"} fw={"bold"}>
Partisipan
</Text>
</Grid.Col>
</Grid>
</Center>
</Stack>
</>
);
}

View File

@@ -0,0 +1,23 @@
"use client";
import { Center, Button } from "@mantine/core";
import { useState } from "react";
export default function ComponentColab_ButtonPartisipasi() {
const [apply, setApply] = useState(false);
return (
<>
<Center>
<Button
radius={"xl"}
color={apply ? "green" : "blue"}
onClick={() => {
setApply(true);
}}
>
{apply ? "Telah Berpartisipasi" : "Partisipasi"}
</Button>
</Center>
</>
);
}

View File

@@ -0,0 +1,72 @@
"use client"
import { Stack, Box, Center, Title, Grid, Text } from "@mantine/core";
import ComponentColab_AuthorNameOnHeader from "../header_author_name";
export default function ComponentColab_DetailData() {
return (
<>
<Stack>
<Box>
<Center px={"md"} mb={"lg"} >
<Title order={4}>Judul Proyek </Title>
</Center>
<Stack spacing={"sm"}>
<Grid>
<Grid.Col span={2}>
<Text fw={"bold"} fz={"sm"}>
Industri
</Text>
</Grid.Col>
<Grid.Col span={1}>
<Text fz={"sm"}>:</Text>
</Grid.Col>
<Grid.Col span={"auto"}>
<Text fz={"sm"}>Industri</Text>
</Grid.Col>
</Grid>
<Grid>
<Grid.Col span={2}>
<Text fw={"bold"} fz={"sm"}>
Lokasi
</Text>
</Grid.Col>
<Grid.Col span={1}>
<Text fz={"sm"}>:</Text>
</Grid.Col>
<Grid.Col span={"auto"}>
<Text fz={"sm"} lineClamp={1}>
Lokasi dari proyek{" "}
</Text>
</Grid.Col>
</Grid>
<Stack spacing={5}>
<Text fw={"bold"} fz={"sm"}>
Tujuan proyek
</Text>
<Text fz={"sm"}>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam
repudiandae nostrum temporibus velit possimus, voluptate
inventore recusandae hic ipsa praesentium deserunt, fuga
asperiores doloremque amet incidunt explicabo ea eius earum.
</Text>
</Stack>
<Stack spacing={5}>
<Text fw={"bold"} fz={"sm"}>
Keutungan
</Text>
<Text fz={"sm"}>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam
repudiandae nostrum temporibus velit possimus, voluptate
inventore recusandae hic ipsa praesentium deserunt, fuga
asperiores doloremque amet incidunt explicabo ea eius earum.
</Text>
</Stack>
</Stack>
</Box>
</Stack>
</>
);
}

View File

@@ -0,0 +1,29 @@
"use client"
import { Paper, Center, Title, ScrollArea, Box, Stack } from "@mantine/core";
import ComponentColab_AuthorNameOnHeader from "../header_author_name";
export default function ComponentColab_DetailListPartisipasiUser() {
return (
<>
<Paper withBorder p={"md"}>
<Center mb={"xl"}>
<Title order={4}>Partispasi User (12)</Title>
</Center>{" "}
<ScrollArea h={400}>
<Box h={400}>
<Stack>
{Array(10)
.fill(0)
.map((e, i) => (
<Box key={i}>
<ComponentColab_AuthorNameOnHeader isPembatas={true} />
</Box>
))}
</Stack>
</Box>
</ScrollArea>
</Paper>
</>
);
}

View File

@@ -0,0 +1,72 @@
"use client";
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
import { Stack, Grid, Avatar, Divider, Text, Group } from "@mantine/core";
import { useRouter } from "next/navigation";
import moment from "moment";
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
export default function ComponentColab_AuthorNameOnHeader({
profileId,
imagesId,
authorName,
tglPublish,
isPembatas,
}: {
profileId?: string;
imagesId?: string;
authorName?: string;
tglPublish?: Date;
isPembatas?: boolean;
}) {
const router = useRouter();
return (
<>
<Stack spacing={"xs"}>
<Grid>
<Grid.Col
span={"content"}
onClick={() => {
if (profileId) {
router.push(RouterProfile.katalog + profileId);
} else {
ComponentGlobal_NotifikasiPeringatan("Id tidak ditemukan");
}
}}
>
<Avatar
size={30}
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
bg={"gray.1"}
src={
imagesId
? RouterProfile.api_foto_profile + imagesId
: "/aset/global/avatar.png"
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Stack justify="center" h={"100%"}>
<Text lineClamp={1} fz={"sm"} fw={"bold"}>
{authorName ? authorName : "Nama author"}
</Text>
</Stack>
</Grid.Col>
<Grid.Col span={"content"}>
<Stack justify="center" h={"100%"}>
{tglPublish ? (
<Text c={"gray"} fz={"xs"}>
{new Intl.DateTimeFormat("id-ID").format(tglPublish)}
</Text>
) : (
""
)}
</Stack>
</Grid.Col>
</Grid>
{isPembatas ? <Divider /> : ""}
</Stack>
</>
);
}

View File

@@ -0,0 +1,82 @@
"use client";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
import {
Header,
Group,
ActionIcon,
Text,
Title,
Center,
Loader,
} from "@mantine/core";
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function ComponentColab_HeaderTamplate({
hideBack,
changeIconBack,
route,
route2,
title,
icon,
bg,
}: {
hideBack?: boolean;
changeIconBack?: any;
route?: any;
route2?: any;
title: string;
icon?: any;
bg?: any;
}) {
const router = useRouter();
const [loading, setLoading] = useState(false);
if (loading) return <ComponentGlobal_V2_LoadingPage />;
return (
<>
<Header
height={50}
sx={{ borderStyle: "none" }}
bg={bg === null ? "" : bg}
>
<Group h={50} position="apart" px={"md"}>
{hideBack ? (
<ActionIcon variant="transparent" disabled></ActionIcon>
) : (
<ActionIcon
variant="transparent"
onClick={() => {
setLoading(true);
if (route === null || route === undefined) {
return router.back();
} else {
return router.push(route);
}
}}
>
{changeIconBack ? changeIconBack : <IconChevronLeft />}
</ActionIcon>
)}
<Title order={5}>{title}</Title>
{(() => {
if (route2 === null || route2 === undefined) {
return <ActionIcon disabled variant="transparent"></ActionIcon>;
} else {
return (
<ActionIcon
variant="transparent"
onClick={() => router.push(route2)}
>
{icon}
</ActionIcon>
);
}
})()}
</Group>
</Header>
</>
);
}

View File

@@ -0,0 +1,22 @@
import { Center, Grid, Group, Paper, Text, Title } from "@mantine/core";
export default function ComponentColab_NotedBox({
informasi,
}: {
informasi: string;
}) {
return (
<>
<Paper bg={"blue.3"} p={10}>
<Group>
<Text fz={10} fs={"italic"}>
<Text span inherit c={"red"}>
*{" "}
</Text>
{informasi}
</Text>
</Group>
</Paper>
</>
);
}

View File

@@ -0,0 +1,75 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { Button, Select, Stack, TextInput, Textarea } from "@mantine/core";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function Colab_Create() {
return (
<>
<Stack px={"sm"}>
<TextInput
label="Judul"
withAsterisk
placeholder="Masukan judul proyek"
/>
<TextInput
label="Lokasi"
withAsterisk
placeholder="Masukan lokasi proyek"
/>
<Select
placeholder="Pilih kategori industri"
label="Pilih Industri"
withAsterisk
data={[
{ value: "1", label: "Teknologi" },
{ value: "2", label: "Tambang Batu Bara" },
]}
/>
<Textarea
label="Tujuan Proyek"
placeholder="Masukan tujuan proyek"
withAsterisk
minRows={5}
/>
<Textarea
label="Keuntungan "
placeholder="Masukan keuntungan dalam proyek"
withAsterisk
minRows={5}
/>
<ButtonAction />
</Stack>
</>
);
}
function ButtonAction() {
const router = useRouter();
const [loading, setLoading] = useState(false);
async function onSave() {
setLoading(true);
router.back();
}
return (
<>
<Button
loaderPosition="center"
loading={loading ? true : false}
mt={"xl"}
radius={"xl"}
onClick={() => onSave()}
>
Simpan
</Button>
</>
);
}

View File

@@ -0,0 +1,21 @@
"use client";
import { AppShell } from "@mantine/core";
import React from "react";
import ComponentColab_HeaderTamplate from "../component/header_tamplate";
export default function LayoutColab_Create({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={<ComponentColab_HeaderTamplate title="Tambah Proyek" />}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,65 @@
"use client";
import {
ActionIcon,
Affix,
Box,
Button,
Grid,
ScrollArea,
Stack,
TextInput,
Textarea,
Transition,
rem,
} from "@mantine/core";
import { useShallowEffect, useWindowScroll } from "@mantine/hooks";
import { useAtom } from "jotai";
import { useState } from "react";
import { gs_colab_pesan } from "../../global_state";
import { IconArrowUp, IconSend } from "@tabler/icons-react";
export default function Colab_DetailGrupDiskusi() {
const [pesan, setPesan] = useState("");
const [obrolan, setObrolan] = useState<string[]>([]);
const [scroll, scrollTo] = useWindowScroll();
async function onSend() {
// setObrolan(pesan);
setPesan("")
}
return (
<>
<ScrollArea>{obrolan}</ScrollArea>
<Affix position={{ bottom: rem(10) }} w={"100%"}>
<Stack justify="center" h={"100%"} px={"sm"}>
<Grid align="center">
<Grid.Col span={"auto"}>
<Textarea
minRows={1}
radius={"md"}
placeholder="Pesan..."
value={pesan}
onChange={(val) => setPesan(val.currentTarget.value)}
/>
</Grid.Col>
<Grid.Col span={"content"}>
<ActionIcon
variant="outline"
radius={"xl"}
size={"lg"}
onClick={() => {
onSend();
}}
>
<IconSend size={20} />
</ActionIcon>
</Grid.Col>
</Grid>
</Stack>
</Affix>
</>
);
}

View File

@@ -0,0 +1,65 @@
"use client";
import {
ActionIcon,
AppShell,
Center,
Footer,
Grid,
Group,
Stack,
TextInput,
Textarea,
} from "@mantine/core";
import React, { useState } from "react";
import ComponentColab_HeaderTamplate from "../../component/header_tamplate";
import { IconPlane, IconSend } from "@tabler/icons-react";
import { useAtom } from "jotai";
import { gs_colab_pesan } from "../../global_state";
export default function LayoutColab_DetailGrupDiskusi({
children,
}: {
children: React.ReactNode;
}) {
const [pesan, setPesan] = useState("");
async function onSend() {
console.log(pesan);
}
return (
<>
<AppShell
header={<ComponentColab_HeaderTamplate title="Nama Grup Diskusi" />}
// footer={
// <Footer height={60}>
// <Stack justify="center" h={"100%"} px={"sm"}>
// <Grid align="center">
// <Grid.Col span={"auto"}>
// <Textarea
// minRows={1}
// radius={"md"}
// placeholder="Pesan..."
// onChange={(val) => setPesan(val.currentTarget.value)}
// />
// </Grid.Col>
// <Grid.Col span={"content"}>
// <ActionIcon
// variant="outline"
// radius={"xl"}
// size={"lg"}
// onClick={() => onSend()}
// >
// <IconSend size={20} />
// </ActionIcon>
// </Grid.Col>
// </Grid>
// </Stack>
// </Footer>
// }
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,32 @@
"use client";
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/author_name_on_header";
import {
Box,
Button,
Center,
Grid,
Paper,
ScrollArea,
Stack,
Text,
Title,
} from "@mantine/core";
import ComponentColab_AuthorNameOnHeader from "../../component/header_author_name";
import { useState } from "react";
import ComponentColab_ButtonPartisipasi from "../../component/detail/button_partisipasi";
import ComponentColab_DetailListPartisipasiUser from "../../component/detail/list_partisipasi_user";
import ComponentColab_DetailData from "../../component/detail/detail_data";
export default function Colab_MainDetail() {
return (
<>
<Stack px={5} spacing={"lg"}>
<ComponentColab_AuthorNameOnHeader tglPublish={new Date}/>
<ComponentColab_DetailData />
<ComponentColab_ButtonPartisipasi />
<ComponentColab_DetailListPartisipasiUser />
</Stack>
</>
);
}

View File

@@ -0,0 +1,21 @@
"use client";
import { AppShell } from "@mantine/core";
import React from "react";
import ComponentColab_HeaderTamplate from "../../component/header_tamplate";
export default function LayoutColab_MainDetail({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={<ComponentColab_HeaderTamplate title="Detail" />}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,18 @@
"use client";
import ComponentColab_DetailData from "@/app_modules/colab/component/detail/detail_data";
import ComponentColab_DetailListPartisipasiUser from "@/app_modules/colab/component/detail/list_partisipasi_user";
import ComponentColab_AuthorNameOnHeader from "@/app_modules/colab/component/header_author_name";
import { Stack, Text } from "@mantine/core";
export default function Colab_DetailPartisipasiProyek() {
return (
<>
<Stack px={5} spacing={"xl"}>
<ComponentColab_AuthorNameOnHeader />
<ComponentColab_DetailData />
<ComponentColab_DetailListPartisipasiUser />
</Stack>
</>
);
}

View File

@@ -0,0 +1,16 @@
"use client";
import ComponentColab_HeaderTamplate from "@/app_modules/colab/component/header_tamplate";
import { AppShell } from "@mantine/core";
export default function LayoutColab_DetailPartisipasiProyek({
children,
}: {
children: any;
}) {
return (
<>
<AppShell header={<ComponentColab_HeaderTamplate title="Detail Partisipan"/>}>{children}</AppShell>
</>
);
}

View File

@@ -0,0 +1,165 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import ComponentColab_DetailData from "@/app_modules/colab/component/detail/detail_data";
import ComponentColab_DetailListPartisipasiUser from "@/app_modules/colab/component/detail/list_partisipasi_user";
import ComponentColab_AuthorNameOnHeader from "@/app_modules/colab/component/header_author_name";
import { gs_colab_hot_menu } from "@/app_modules/colab/global_state";
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
import {
Button,
Checkbox,
Drawer,
Grid,
Group,
Paper,
ScrollArea,
Stack,
Text,
TextInput,
Title,
} from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import { useAtom } from "jotai";
import _ from "lodash";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function Colab_DetailStatusPublish() {
return (
<>
<Stack px={5} spacing={"xl"}>
<ComponentColab_DetailData />
<CheckBoxPartisipan />
</Stack>
</>
);
}
function CheckBoxPartisipan() {
const router = useRouter();
const [value, setValue] = useState<string[]>([]);
const [opened, { open, close }] = useDisclosure(false);
const [hotMenu, setHotMenu] = useAtom(gs_colab_hot_menu);
const listCheck = [
{
id: 1,
value: "satu",
label: "Satu",
},
{
id: 2,
value: "dua",
label: "Dua",
},
{
id: 3,
value: "tiga",
label: "Tiga",
},
{
id: 4,
value: "empat",
label: "Empat",
},
{
id: 5,
value: "lima",
label: "Lima",
},
{
id: 6,
value: "enam",
label: "Enam",
},
{
id: 7,
value: "tujuh",
label: "Tujuh",
},
{
id: 8,
value: "delapan",
label: "Delapan",
},
{
id: 9,
value: "sembilan",
label: "Sembilan",
},
{
id: 10,
value: "sepuluh",
label: "Sepuluh",
},
];
async function onSave() {
close();
ComponentGlobal_NotifikasiBerhasil("Berhasil Membuat Grup");
setHotMenu(4);
router.push(RouterColab.grup_diskusi);
}
return (
<>
<Stack>
<Paper withBorder shadow="lg" p={"sm"}>
<Text c={"red"} fz={10}>
*
<Text px={"xs"} span inherit c={"gray"}>
Pilih user yang akan menjadi tim proyek anda
</Text>
</Text>
<ScrollArea h={400}>
<Checkbox.Group value={value} onChange={setValue}>
<Stack mt="xs">
{listCheck.map((e, i) => (
<Grid key={e.id} align="center">
<Grid.Col span={"content"}>
<Checkbox value={e.value} />
</Grid.Col>
<Grid.Col span={"auto"}>
<ComponentColab_AuthorNameOnHeader isPembatas={true} />
</Grid.Col>
</Grid>
))}
</Stack>
</Checkbox.Group>
</ScrollArea>
</Paper>
<Button
radius={"xl"}
disabled={_.isEmpty(value) ? true : false}
onClick={() => {
open();
}}
>
Buat Ruang Diskusi{" "}
</Button>
</Stack>
<Drawer
opened={opened}
onClose={close}
position="bottom"
size={150}
withCloseButton={false}
>
<Stack>
<Title order={6}>Nama Grup Diskusi</Title>
<TextInput placeholder="Masukan nama grup diskusi .." radius={"xl"} />
<Group grow>
<Button radius={"xl"} onClick={close}>
Batal
</Button>
<Button radius={"xl"} color="green" onClick={() => onSave()}>
Simpan
</Button>
</Group>
</Stack>
</Drawer>
</>
);
}

View File

@@ -0,0 +1,26 @@
"use client";
import ComponentColab_HeaderTamplate from "@/app_modules/colab/component/header_tamplate";
import { AppShell } from "@mantine/core";
import { IconEdit } from "@tabler/icons-react";
import React from "react";
export default function LayoutColab_DetailStatusPublish({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={
<ComponentColab_HeaderTamplate
title="Proyek Saya"
/>
}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,85 @@
"use client";
import ComponentColab_NotedBox from "@/app_modules/colab/component/noted_box";
import ComponentColab_DetailData from "@/app_modules/colab/component/detail/detail_data";
import { Button, Group, Modal, Stack, Title } from "@mantine/core";
import { IconCheck, IconTrash, IconX } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { gs_colab_status } from "@/app_modules/colab/global_state";
import { useAtom } from "jotai";
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
import { useDisclosure } from "@mantine/hooks";
export default function Colab_DetailStatusReject() {
return (
<>
<Stack px={"xs"} spacing={"xl"}>
<ComponentColab_NotedBox informasi="Alasan penolakan" />
<ComponentColab_DetailData />
<ButtonAction />
</Stack>
</>
);
}
function ButtonAction() {
const router = useRouter();
const [tabsStatus, setTabsStatus] = useAtom(gs_colab_status);
const [opened, { open, close }] = useDisclosure(false);
async function onAjukan() {
setTabsStatus("Review");
ComponentGlobal_NotifikasiBerhasil("Ajukan Review Berhasil");
router.back();
}
async function onDelete() {
router.back();
ComponentGlobal_NotifikasiBerhasil("Berhasil Dihapus");
}
return (
<>
<Group grow>
<Button
radius={"xl"}
leftIcon={<IconCheck size={15} />}
onClick={() => onAjukan()}
>
Ajukan Review
</Button>
<Button
radius={"xl"}
leftIcon={<IconTrash size={15} />}
color="red"
onClick={() => open()}
>
Hapus
</Button>
</Group>
<Modal opened={opened} onClose={close} centered withCloseButton={false}>
<Stack>
<Title order={6}>Yakin menghapus proyek ini ?</Title>
<Group position="center">
<Button
radius={"xl"}
leftIcon={<IconX size={15} />}
onClick={close}
>
Batal
</Button>
<Button
radius={"xl"}
leftIcon={<IconTrash size={15} />}
color="red"
onClick={() => onDelete()}
>
Hapus
</Button>
</Group>
</Stack>
</Modal>
</>
);
}

View File

@@ -0,0 +1,29 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import ComponentColab_HeaderTamplate from "@/app_modules/colab/component/header_tamplate";
import { AppShell } from "@mantine/core";
import { IconEdit } from "@tabler/icons-react";
import React from "react";
export default function LayoutColab_DetailStatusReject({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={
<ComponentColab_HeaderTamplate
title="Detail Reject"
icon={<IconEdit />}
route2={RouterColab.edit + 1}
/>
}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,39 @@
"use client";
import ComponentColab_DetailData from "@/app_modules/colab/component/detail/detail_data";
import ComponentColab_AuthorNameOnHeader from "@/app_modules/colab/component/header_author_name";
import { gs_colab_status } from "@/app_modules/colab/global_state";
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
import { Button, Stack } from "@mantine/core";
import { useAtom } from "jotai";
import { useRouter } from "next/navigation";
export default function Colab_DetailStatusReview() {
return (
<>
<Stack px={"xs"} spacing={"xl"}>
<ComponentColab_DetailData />
<ButtonAction />
</Stack>
</>
);
}
function ButtonAction() {
const router = useRouter();
const [tabsStatus, setTabsStatus] = useAtom(gs_colab_status);
async function onClick() {
setTabsStatus("Reject");
router.back();
ComponentGlobal_NotifikasiBerhasil("Berhasil Dibatalkan");
}
return (
<>
<Button radius={"xl"} onClick={() => onClick()}>
Batalkan Review
</Button>
</>
);
}

View File

@@ -0,0 +1,21 @@
"use client";
import ComponentColab_HeaderTamplate from "@/app_modules/colab/component/header_tamplate";
import { AppShell } from "@mantine/core";
import React from "react";
export default function LayoutColab_DetailStatusReview({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={<ComponentColab_HeaderTamplate title="Detail Review" />}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,74 @@
"use client"
import { Stack, TextInput, Select, Textarea, Button } from "@mantine/core";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function Colab_Edit() {
return (
<>
<Stack px={"sm"}>
<TextInput
label="Judul"
withAsterisk
placeholder="Masukan judul proyek"
/>
<TextInput
label="Lokasi"
withAsterisk
placeholder="Masukan lokasi proyek"
/>
<Select
placeholder="Pilih kategori industri"
label="Pilih Industri"
withAsterisk
data={[
{ value: "1", label: "Teknologi" },
{ value: "2", label: "Tambang Batu Bara" },
]}
/>
<Textarea
label="Tujuan Proyek"
placeholder="Masukan tujuan proyek"
withAsterisk
minRows={5}
/>
<Textarea
label="Keuntungan "
placeholder="Masukan keuntungan dalam proyek"
withAsterisk
minRows={5}
/>
<ButtonAction />
</Stack>
</>
);
}
function ButtonAction() {
const router = useRouter();
const [loading, setLoading] = useState(false);
async function onUpdate() {
setLoading(true);
router.back();
}
return (
<>
<Button
loaderPosition="center"
loading={loading ? true : false}
mt={"xl"}
radius={"xl"}
onClick={() => onUpdate()}
>
Update
</Button>
</>
);
}

View File

@@ -0,0 +1,19 @@
"use client";
import { AppShell } from "@mantine/core";
import React from "react";
import ComponentColab_HeaderTamplate from "../component/header_tamplate";
export default function LayoutColab_Edit({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell header={<ComponentColab_HeaderTamplate title="Edit Proyek" />}>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,18 @@
import { atomWithStorage } from "jotai/utils";
export const gs_colab_hot_menu = atomWithStorage<number>(
"gs_colab_hot_menu",
1
);
export const gs_colab_status = atomWithStorage<string | any>(
"gs_colab_status",
"Publish"
);
export const gs_colab_proyek = atomWithStorage<string | any>(
"gs_colab_proyek",
"Partisipasi"
);
export const gs_colab_pesan = atomWithStorage<string | any>(
"gs_colab_pesan",
""
);

View File

@@ -0,0 +1,47 @@
import Colab_Beranda from "./main/beranda";
import LayoutColab_Main from "./main/layout";
import Colab_Splash from "./splash";
import Colab_Create from "./create";
import LayoutColab_Create from "./create/layout";
import Colab_Status from "./main/status";
import Colab_MainDetail from "./detail/main_detail";
import LayoutColab_MainDetail from "./detail/main_detail/layout";
import Colab_DetailStatusReview from "./detail/status/review";
import LayoutColab_DetailStatusReview from "./detail/status/review/layout";
import Colab_DetailStatusReject from "./detail/status/reject";
import LayoutColab_DetailStatusReject from "./detail/status/reject/layout";
import Colab_Proyek from "./main/proyek";
import Colab_DetailStatusPublish from "./detail/status/publish";
import LayoutColab_DetailStatusPublish from "./detail/status/publish/layout";
import Colab_Edit from "./edit";
import LayoutColab_Edit from "./edit/layout";
import Colab_DetailPartisipasiProyek from "./detail/proyek/partisipasi";
import LayoutColab_DetailPartisipasiProyek from "./detail/proyek/partisipasi/layout";
import Colab_GrupDiskus from "./main/grup";
import Colab_DetailGrupDiskusi from "./detail/grup";
import LayoutColab_DetailGrupDiskusi from "./detail/grup/layout";
export {
Colab_Beranda,
LayoutColab_Main,
Colab_Splash,
Colab_Create,
LayoutColab_Create,
Colab_Status,
Colab_MainDetail,
LayoutColab_MainDetail,
Colab_DetailStatusReview,
LayoutColab_DetailStatusReview,
Colab_DetailStatusReject,
LayoutColab_DetailStatusReject,
Colab_Proyek,
Colab_DetailStatusPublish,
LayoutColab_DetailStatusPublish,
Colab_Edit,
LayoutColab_Edit,
Colab_DetailPartisipasiProyek,
LayoutColab_DetailPartisipasiProyek,
Colab_GrupDiskus,
Colab_DetailGrupDiskusi,
LayoutColab_DetailGrupDiskusi,
};

View File

@@ -0,0 +1,68 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/author_name_on_header";
import {
ActionIcon,
Affix,
Card,
Center,
Grid,
Paper,
Stack,
Text,
Textarea,
Title,
rem,
} from "@mantine/core";
import { useWindowScroll } from "@mantine/hooks";
import { IconPencilPlus } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
import ComponentColab_CardSectionData from "../component/card_view/card_section_data";
import ComponentColab_SectionHeaderAuthorName from "../component/card_view/card_section_header_author_name";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
import ComponentColab_CardSectionHeaderAuthorName from "../component/card_view/card_section_header_author_name";
export default function Colab_Beranda() {
const router = useRouter();
const [scroll, scrollTo] = useWindowScroll();
const [loadingCreate, setLoadingCreate] = useState(false);
return (
<>
<Affix position={{ bottom: rem(100), right: rem(30) }}>
<ActionIcon
loading={loadingCreate ? true : false}
opacity={scroll.y > 0 ? 0.5 : ""}
style={{
transition: "0.5s",
}}
size={"xl"}
radius={"xl"}
variant="transparent"
bg={"blue"}
onClick={() => {
setLoadingCreate(true);
router.push(RouterColab.create);
}}
>
<IconPencilPlus color="white" />
</ActionIcon>
</Affix>
{Array(5)
.fill(0)
.map((e, i) => (
<Card key={i} withBorder shadow="lg" mb={"lg"} radius={"md"}>
<ComponentColab_CardSectionHeaderAuthorName tglPublish={new Date} jumlah_partisipan={12} />
<ComponentColab_CardSectionData
colabId={i}
path={RouterColab.main_detail}
/>
</Card>
))}
</>
);
}

View File

@@ -0,0 +1,41 @@
"use client";
import { Center, Grid, Group, Paper, Stack, Text, Title } from "@mantine/core";
import ComponentColab_AuthorNameOnHeader from "../../component/header_author_name";
import { IconChevronCompactRight, IconChevronRight } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
export default function Colab_GrupDiskus() {
const router = useRouter();
return (
<>
<Stack>
{Array(10)
.fill(0)
.map((e, i) => (
<Paper
key={i}
withBorder
shadow="lg"
p={"md"}
onClick={() => {
router.push(RouterColab.detail_grup + i);
}}
>
<Grid align="center" h={"100%"}>
<Grid.Col span={"auto"}>
<Title order={6}>Nama Grup Diskusi</Title>
</Grid.Col>
<Grid.Col span={"content"}>
<Center>
<IconChevronRight color="gray" />
</Center>
</Grid.Col>
</Grid>
</Paper>
))}
</Stack>
</>
);
}

View File

@@ -0,0 +1,114 @@
"use client";
import {
ActionIcon,
AppShell,
Center,
Footer,
Grid,
Stack,
Text,
} from "@mantine/core";
import React, { useState } from "react";
import ComponentColab_HeaderTamplate from "../component/header_tamplate";
import router from "next/router";
import {
IconHistory,
IconHome,
IconMessages,
IconReservedLine,
IconUsersGroup,
} from "@tabler/icons-react";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { useRouter } from "next/navigation";
import { useAtom } from "jotai";
import { gs_colab_hot_menu } from "../global_state";
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
export default function LayoutColab_Main({
children,
}: {
children: React.ReactNode;
}) {
const router = useRouter();
const [hotMenu, setHotMenu] = useAtom(gs_colab_hot_menu);
const [loading, setLoading] = useState(false);
const listFooter = [
{
id: 1,
name: "Beranda",
path: RouterColab.beranda,
icon: <IconHome />,
},
{
id: 2,
name: "Status",
path: RouterColab.status,
icon: <IconReservedLine />,
},
{
id: 3,
name: "Partisipasi",
path: RouterColab.proyek,
icon: <IconUsersGroup />,
},
{
id: 4,
name: "Grup Diskusi",
path: RouterColab.grup_diskusi,
icon: <IconMessages />,
},
];
return (
<>
<AppShell
header={
<ComponentColab_HeaderTamplate
title="Project Collaboration"
route={RouterHome.main_home}
// icon={<IconUsersGroup />}
// route2={RouterColab.proyek}
/>
}
footer={
<Footer height={70} bg={"dark"}>
<Grid>
{listFooter.map((e) => (
<Grid.Col
key={e.id}
span={"auto"}
pt={"md"}
onClick={() => {
router.replace(e.path);
setHotMenu(e.id);
}}
>
<Center>
<Stack align="center" spacing={0}>
<ActionIcon
variant="transparent"
c={hotMenu === e.id ? "blue" : "white"}
>
{e.icon}
</ActionIcon>
<Text fz={10} c={hotMenu === e.id ? "blue" : "white"}>
{e.name}
</Text>
</Stack>
</Center>
</Grid.Col>
))}
</Grid>
</Footer>
}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,58 @@
"use client";
import { Stack, Tabs, Text } from "@mantine/core";
import { IconBrandOffice, IconUsersGroup, IconUser } from "@tabler/icons-react";
import { useState } from "react";
import Colab_ProyekSaya from "./saya";
import Colab_PartisipasiProyek from "./partisipasi";
import { useAtom } from "jotai";
import { gs_colab_proyek } from "../../global_state";
export default function Colab_Proyek() {
const [activeTab, setActiveTab] = useAtom(gs_colab_proyek);
const listTabs = [
{
id: 1,
icon: <IconUsersGroup />,
label: "Partisipasi Proyek",
value: "Partisipasi",
path: <Colab_PartisipasiProyek />,
},
{
id: 2,
icon: <IconUser />,
label: "Proyek Saya",
value: "Saya",
path: <Colab_ProyekSaya />,
},
];
return (
<Tabs variant="pills" value={activeTab} onTabChange={setActiveTab}>
<Stack>
<Tabs.List grow>
{listTabs.map((e) => (
<Tabs.Tab
key={e.id}
value={e.value}
bg={activeTab === e.value ? "blue" : "gray.2"}
fw={activeTab === e.value ? "bold" : "normal"}
>
<Stack align="center" justify="center" spacing={0}>
{e.icon}
<Text>{e.label}</Text>
</Stack>
</Tabs.Tab>
))}
</Tabs.List>
{listTabs.map((e) => (
<Tabs.Panel key={e.id} value={e.value}>
{e.path}
</Tabs.Panel>
))}
</Stack>
</Tabs>
);
}

View File

@@ -0,0 +1,34 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { Card } from "@mantine/core";
import ComponentColab_CardSectionData from "../../component/card_view/card_section_data";
import ComponentColab_CardSectionHeaderAuthorName from "../../component/card_view/card_section_header_author_name";
export default function Colab_PartisipasiProyek() {
return (
<>
{Array(5)
.fill(0)
.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
style={{ borderColor: "indigo", borderWidth: "0.5px" }}
>
<ComponentColab_CardSectionHeaderAuthorName
tglPublish={new Date()}
jumlah_partisipan={12}
/>
<ComponentColab_CardSectionData
colabId={i}
path={RouterColab.partisipasi_proyek}
/>
</Card>
))}
</>
);
}

View File

@@ -0,0 +1,34 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { Card, Stack } from "@mantine/core";
import ComponentColab_CardSectionData from "../../component/card_view/card_section_data";
import ComponentColab_CardSectionHeaderAuthorName from "../../component/card_view/card_section_header_author_name";
import ComponentColab_JumlahPartisipan from "../../component/card_view/jumlah_partisipan";
export default function Colab_ProyekSaya() {
return (
<>
{Array(5)
.fill(0)
.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
style={{ borderColor: "violet", borderWidth: "0.5px" }}
>
<Stack>
<ComponentColab_CardSectionData
colabId={i}
path={RouterColab.status_publish}
/>
<ComponentColab_JumlahPartisipan />
</Stack>
</Card>
))}
</>
);
}

View File

@@ -0,0 +1,78 @@
"use client";
import { Tabs, Stack, Paper } from "@mantine/core";
import { useState } from "react";
import Colab_StatusPublish from "./publish";
import Colab_StatusReject from "./reject";
import Colab_StatusReview from "./review";
import { useAtom } from "jotai";
import { gs_colab_status } from "../../global_state";
export default function Colab_Status() {
const [tabsStatus, setTabsStatus] = useAtom(gs_colab_status);
const [colorTab, setColorTab] = useState<string | null>("");
const listTabs = [
{
id: 1,
path: <Colab_StatusPublish />,
value: "Publish",
bg: "green",
},
{
id: 2,
path: <Colab_StatusReview />,
value: "Review",
bg: "orange",
},
{
id: 3,
path: <Colab_StatusReject />,
value: "Reject",
bg: "red",
},
];
return (
<>
<Tabs
color={
"blue"
// colorTab === "Publish"
// ? "green"
// : colorTab === "Review"
// ? "orange"
// : "red"
}
variant="pills"
radius={"xl"}
defaultValue={"Publish"}
value={tabsStatus}
onTabChange={(val) => {
setTabsStatus(val);
// setColorTab(val);
}}
>
<Stack>
<Tabs.List grow>
{listTabs.map((e) => (
<Tabs.Tab
key={e.id}
value={e.value}
bg={tabsStatus === e.value ? "cyan" : "gray.2"}
fw={tabsStatus === e.value ? "bold" : "normal"}
>
{e.value}
</Tabs.Tab>
))}
</Tabs.List>
{listTabs.map((e) => (
<Tabs.Panel key={e.id} value={e.value}>
{e.path}
</Tabs.Panel>
))}
</Stack>
</Tabs>
</>
);
}

View File

@@ -0,0 +1,37 @@
"use client";
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/author_name_on_header";
import { Card, Stack, Grid, Text, Divider, Center, Box } from "@mantine/core";
import ComponentColab_CardSectionData from "../../component/card_view/card_section_data";
import ComponentColab_AuthorNameOnHeader from "../../component/header_author_name";
import ComponentColab_CardSectionHeaderAuthorName from "../../component/card_view/card_section_header_author_name";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import ComponentColab_JumlahPartisipan from "../../component/card_view/jumlah_partisipan";
export default function Colab_StatusPublish() {
return (
<>
{Array(5)
.fill(0)
.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
// bg={"green.0.5"}
style={{ borderColor: "green", borderWidth: "0.5px" }}
>
<Stack>
<ComponentColab_CardSectionData
colabId={i}
path={RouterColab.status_publish}
/>
<ComponentColab_JumlahPartisipan/>
</Stack>
</Card>
))}
</>
);
}

View File

@@ -0,0 +1,31 @@
"use client";
import { Card } from "@mantine/core";
import ComponentColab_CardSectionData from "../../component/card_view/card_section_data";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
export default function Colab_StatusReject() {
return (
<>
{Array(5)
.fill(0)
.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
// bg={"red.1"}
style={{ borderColor: "red", borderWidth: "0.5px" }}
>
<ComponentColab_CardSectionData
colabId={i}
path={RouterColab.status_reject}
/>
</Card>
))}
</>
);
}

View File

@@ -0,0 +1,27 @@
"use client";
import { Card } from "@mantine/core";
import ComponentColab_CardSectionData from "../../component/card_view/card_section_data";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
export default function Colab_StatusReview() {
return (
<>
{Array(5)
.fill(0)
.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
// bg={"orange.0.5"}
style={{ borderColor: "orange", borderWidth: "0.5px" }}
>
<ComponentColab_CardSectionData colabId={i} path={RouterColab.status_review} />
</Card>
))}
</>
);
}

View File

@@ -0,0 +1,31 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { Center, Image, Paper } from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
import { useAtom } from "jotai";
import { useRouter } from "next/navigation";
import { gs_colab_hot_menu } from "../global_state";
export default function Colab_Splash() {
const router = useRouter();
const [hotMenu, setHotMenu] = useAtom(gs_colab_hot_menu);
useShallowEffect(() => {
setTimeout(() => {
setHotMenu(1);
// setStatus("Publish");
router.replace(RouterColab.beranda);
}, 2000);
}, []);
return (
<>
<Center h={"100vh"}>
<Paper p={{ base: 50, md: 60, lg: 80 }}>
<Image alt="logo" src={"/aset/colab/logo.png"} />
</Paper>
</Center>
</>
);
}

View File

@@ -40,6 +40,7 @@ import { useState } from "react";
import { useDisclosure } from "@mantine/hooks";
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
import ComponentGlobal_V2_LoadingPage from "../component_global/loading_page_v2";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
export default function HomeView({ dataUser }: { dataUser: MODEL_USER }) {
const router = useRouter();
@@ -77,7 +78,7 @@ export default function HomeView({ dataUser }: { dataUser: MODEL_USER }) {
id: 5,
name: "Project Collaboration",
icon: <IconAffiliate size={50} />,
link: "",
link: RouterColab.splash,
},
{
id: 6,