Fix: Avatar
Deskripsi: - Avatar job - Avatar collaboration - Avatar event ## No Issuue
This commit is contained in:
@@ -30,38 +30,18 @@ export default function LayoutColab_Main({
|
||||
path: RouterColab.beranda,
|
||||
icon: <IconHome />,
|
||||
},
|
||||
|
||||
// {
|
||||
// id: 2,
|
||||
// name: "Status",
|
||||
// path: RouterColab.status,
|
||||
// icon: <IconReservedLine />,
|
||||
// },
|
||||
|
||||
{
|
||||
id: 3,
|
||||
id: 2,
|
||||
name: "Partisipasi",
|
||||
path: RouterColab.proyek,
|
||||
icon: <IconUsersGroup />,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
id: 3,
|
||||
name: "Grup Diskusi",
|
||||
path: RouterColab.grup_diskusi,
|
||||
icon: <IconMessages />,
|
||||
},
|
||||
// {
|
||||
// id: 5,
|
||||
// name: "Notifikasi",
|
||||
// path: RouterColab.notifikasi,
|
||||
// icon: cekNotif ? (
|
||||
// <Indicator processing color="orange">
|
||||
// <IconBell />
|
||||
// </Indicator>
|
||||
// ) : (
|
||||
// <IconBell />
|
||||
// ),
|
||||
// },
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
ActionIcon,
|
||||
Center,
|
||||
Group,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import ComponentColab_IsEmptyData from "../../component/is_empty_data";
|
||||
import _ from "lodash";
|
||||
import { MODEL_COLLABORATION_NOTIFIKSI } from "../../model/interface";
|
||||
import { IconChevronRight } from "@tabler/icons-react";
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
|
||||
import colab_funUpdateIsReadByNotifId from "../../fun/edit/fun_is_read_by_id";
|
||||
|
||||
export default function Colab_NotifikasiView({
|
||||
listNotifikasi,
|
||||
}: {
|
||||
listNotifikasi?: MODEL_COLLABORATION_NOTIFIKSI[];
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [notifId, setNotifId] = useState("");
|
||||
|
||||
if (_.isEmpty(listNotifikasi))
|
||||
return <ComponentColab_IsEmptyData text="Tidak ada data" />;
|
||||
|
||||
async function onRead(notifId: string) {
|
||||
await colab_funUpdateIsReadByNotifId(notifId).then((res) => {
|
||||
if (res.status === 200) {
|
||||
setNotifId(notifId);
|
||||
router.push(RouterColab.detail_notifikasi + notifId);
|
||||
} else {
|
||||
console.log(``);
|
||||
}
|
||||
});
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
{listNotifikasi?.map((e, i) => (
|
||||
<Paper
|
||||
key={i}
|
||||
bg={e?.isRead ? "gray.1" : "gray.4"}
|
||||
p={"md"}
|
||||
onClick={() => {
|
||||
onRead(e?.id);
|
||||
}}
|
||||
>
|
||||
<Group position="apart">
|
||||
<Stack spacing={0} w={"80%"}>
|
||||
<Text fw={"bold"} fz={"xs"} lineClamp={1}>
|
||||
{e.note}
|
||||
</Text>
|
||||
<Text lineClamp={1}>{e.ProjectCollaboration.report}</Text>
|
||||
</Stack>
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
loading={e?.id === notifId ? true : false}
|
||||
>
|
||||
<IconChevronRight />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
</Paper>
|
||||
))}
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,19 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
|
||||
import { Box, Card, Center, Loader, 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 ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { Box, Center, Loader } from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
import ComponentColab_IsEmptyData from "../../component/is_empty_data";
|
||||
import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useState } from "react";
|
||||
import { ComponentColab_CardProyekSaya } from "../../component/card_view/card_proyek_saya";
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { event_getAllDraft } from "@/app_modules/event/fun/get/status/get_all_draft";
|
||||
import { ScrollOnly } from "next-scroll-loader";
|
||||
import colab_getListAllProyekSayaByAuthorId from "../../fun/get/pasrtisipan/get_list_proyek_saya_by_author_id";
|
||||
import { MODEL_COLLABORATION } from "../../model/interface";
|
||||
|
||||
export default function Colab_ProyekSaya({
|
||||
listProyekSaya,
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
"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({
|
||||
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 listPublish={listPublish as any} />,
|
||||
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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_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/card_section_jumlah_partisipan";
|
||||
import { MODEL_COLLABORATION } from "../../model/interface";
|
||||
|
||||
export default function Colab_StatusPublish({
|
||||
listPublish,
|
||||
}: {
|
||||
listPublish: MODEL_COLLABORATION[];
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
{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>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
"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>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
"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>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user