Hold persiapan persentase pak fahmi

- Sudah bisa create
- Sudah bisa join proyek
- Tambahan untuk mengisi form jika ingin join
### No issue
This commit is contained in:
2024-04-18 14:14:08 +08:00
parent ed77b569a6
commit 4b78a45479
45 changed files with 809 additions and 143 deletions

View File

@@ -29,8 +29,10 @@ import ComponentColab_JumlahPartisipan from "../component/card_view/card_section
export default function Colab_Beranda({
listData,
userLoginId,
}: {
listData: MODEL_COLLABORATION[];
userLoginId: string;
}) {
const router = useRouter();
const [scroll, scrollTo] = useWindowScroll();
@@ -67,15 +69,17 @@ export default function Colab_Beranda({
authorName={e?.Author?.Profile?.name}
imagesId={e?.Author?.Profile?.imagesId}
profileId={e?.Author?.Profile?.id}
tglPublish={new Date()}
jumlah_partisipan={e?.ProjectCollaboration_Partisipasi}
isAuthor={userLoginId === e.Author.id ? true : false}
colabId={e.id}
/>
<ComponentColab_CardSectionData
colabId={e.id}
path={RouterColab.main_detail}
data={e}
/>
<ComponentColab_JumlahPartisipan jumlah={e.ProjectCollaboration_Partisipasi} />
<ComponentColab_JumlahPartisipan
jumlah={e.ProjectCollaboration_Partisipasi}
/>
</Stack>
</Card>
))}

View File

@@ -13,6 +13,7 @@ import React, { useState } from "react";
import ComponentColab_HeaderTamplate from "../component/header_tamplate";
import router from "next/router";
import {
IconBell,
IconHistory,
IconHome,
IconMessages,
@@ -42,12 +43,12 @@ export default function LayoutColab_Main({
icon: <IconHome />,
},
{
id: 2,
name: "Status",
path: RouterColab.status,
icon: <IconReservedLine />,
},
// {
// id: 2,
// name: "Status",
// path: RouterColab.status,
// icon: <IconReservedLine />,
// },
{
id: 3,
@@ -55,13 +56,18 @@ export default function LayoutColab_Main({
path: RouterColab.proyek,
icon: <IconUsersGroup />,
},
{
id: 4,
name: "Grup Diskusi",
path: RouterColab.grup_diskusi,
icon: <IconMessages />,
},
{
id: 5,
name: "Notifikasi",
path: RouterColab.notifikasi,
icon: <IconBell />,
},
];
return (

View File

@@ -0,0 +1,11 @@
"use client"
import { Text, Title } from "@mantine/core";
export default function Colab_NotifikasiView() {
return (
<>
<Text>ini notif</Text>
</>
);
}

View File

@@ -7,8 +7,18 @@ import Colab_ProyekSaya from "./saya";
import Colab_PartisipasiProyek from "./partisipasi";
import { useAtom } from "jotai";
import { gs_colab_proyek } from "../../global_state";
import {
MODEL_COLLABORATION,
MODEL_COLLABORATION_PARTISIPASI,
} from "../../model/interface";
export default function Colab_Proyek() {
export default function Colab_Proyek({
listPartisipasiUser,
listProyekSaya,
}: {
listPartisipasiUser: MODEL_COLLABORATION_PARTISIPASI[];
listProyekSaya: MODEL_COLLABORATION[];
}) {
const [activeTab, setActiveTab] = useAtom(gs_colab_proyek);
const listTabs = [
@@ -17,14 +27,18 @@ export default function Colab_Proyek() {
icon: <IconUsersGroup />,
label: "Partisipasi Proyek",
value: "Partisipasi",
path: <Colab_PartisipasiProyek />,
path: (
<Colab_PartisipasiProyek
listPartisipasiUser={listPartisipasiUser as any}
/>
),
},
{
id: 2,
icon: <IconUser />,
label: "Proyek Saya",
value: "Saya",
path: <Colab_ProyekSaya />,
path: <Colab_ProyekSaya listProyekSaya={listProyekSaya as any} />,
},
];

View File

@@ -1,34 +1,50 @@
"use client";
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { Card } from "@mantine/core";
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 { MODEL_COLLABORATION_PARTISIPASI } from "../../model/interface";
import ComponentColab_JumlahPartisipan from "../../component/card_view/card_section_jumlah_partisipan";
import ComponentColab_IsEmptyData from "../../component/is_empty_data";
import _ from "lodash";
export default function Colab_PartisipasiProyek({
listPartisipasiUser,
}: {
listPartisipasiUser: MODEL_COLLABORATION_PARTISIPASI[];
}) {
if (_.isEmpty(listPartisipasiUser))
return <ComponentColab_IsEmptyData text="Tidak ikut berpartisipasi" />;
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" }}
>
{listPartisipasiUser.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
style={{ borderColor: "indigo", borderWidth: "0.5px" }}
>
<Stack>
<ComponentColab_CardSectionHeaderAuthorName
tglPublish={new Date()}
jumlah_partisipan={[]}
authorName={e?.ProjectCollaboration.Author.Profile.name}
imagesId={e?.ProjectCollaboration.Author.Profile.imagesId}
profileId={e?.ProjectCollaboration.Author.Profile.id}
/>
<ComponentColab_CardSectionData
colabId={i}
path={RouterColab.partisipasi_proyek}
colabId={e?.ProjectCollaboration.id}
path={RouterColab.detail_partisipasi_proyek}
data={e?.ProjectCollaboration}
/>
</Card>
))}
<ComponentColab_JumlahPartisipan
jumlah={e?.ProjectCollaboration.ProjectCollaboration_Partisipasi}
/>
</Stack>
</Card>
))}
</>
);
}

View File

@@ -5,30 +5,42 @@ 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/card_section_jumlah_partisipan";
import { MODEL_COLLABORATION } from "../../model/interface";
import _ from "lodash";
import ComponentColab_IsEmptyData from "../../component/is_empty_data";
export default function Colab_ProyekSaya({
listProyekSaya,
}: {
listProyekSaya: MODEL_COLLABORATION[];
}) {
if (_.isEmpty(listProyekSaya))
return <ComponentColab_IsEmptyData text="Tidak ada data" />;
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>
))}
{listProyekSaya.map((e, i) => (
<Card
key={i}
withBorder
shadow="lg"
mb={"lg"}
radius={"md"}
style={{ borderColor: "violet", borderWidth: "0.5px" }}
>
<Stack>
<ComponentColab_CardSectionData
colabId={e.id}
path={RouterColab.detail_proyek_saya}
data={e}
/>
<ComponentColab_JumlahPartisipan
jumlah={e.ProjectCollaboration_Partisipasi}
/>
</Stack>
</Card>
))}
</>
);
}

View File

@@ -8,23 +8,31 @@ import Colab_StatusReview from "./review";
import { useAtom } from "jotai";
import { gs_colab_status } from "../../global_state";
export default function Colab_Status() {
export default function Colab_Status({
listPublish,
listReview,
listReject,
}: {
listPublish: any[];
listReview: any[];
listReject: any[];
}) {
const [tabsStatus, setTabsStatus] = useAtom(gs_colab_status);
const [colorTab, setColorTab] = useState<string | null>("");
const listTabs = [
{
id: 1,
path: <Colab_StatusPublish />,
path: <Colab_StatusPublish listPublish={listPublish as any} />,
value: "Publish",
bg: "green",
},
{
id: 2,
path: <Colab_StatusReview />,
value: "Review",
bg: "orange",
},
// {
// id: 2,
// path: <Colab_StatusReview />,
// value: "Review",
// bg: "orange",
// },
{
id: 3,
path: <Colab_StatusReject />,

View File

@@ -7,31 +7,35 @@ import ComponentColab_AuthorNameOnHeader from "../../component/header_author_nam
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/card_section_jumlah_partisipan";
import { MODEL_COLLABORATION } from "../../model/interface";
export default function Colab_StatusPublish() {
export default function Colab_StatusPublish({
listPublish,
}: {
listPublish: MODEL_COLLABORATION[];
}) {
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>
))}
{listPublish.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={e.id}
path={RouterColab.status_publish}
data={e}
/>
<ComponentColab_JumlahPartisipan jumlah={e.ProjectCollaboration_Partisipasi} />
</Stack>
</Card>
))}
</>
);
}