Fix: Avatar
Deskripsi: - Avatar job - Avatar collaboration - Avatar event ## No Issuue
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||
import { Box, Paper, Stack, Text, Title } from "@mantine/core";
|
||||
import ComponentColab_HeaderTamplate from "../../component/header_tamplate";
|
||||
import { MODEL_COLLABORATION_ROOM_CHAT } from "../../model/interface";
|
||||
import ComponentColab_DetailData from "../../component/detail/detail_data";
|
||||
import ComponentColab_AuthorNameOnListPartisipan from "../../component/detail/header_author_list_partisipan";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_AvatarAndUsername, ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import { Box, Paper, Stack, Title } from "@mantine/core";
|
||||
import ComponentColab_DetailData from "../../component/detail/detail_data";
|
||||
import { MODEL_COLLABORATION_ROOM_CHAT } from "../../model/interface";
|
||||
|
||||
export default function Colab_DetailInfoGrup({
|
||||
dataRoom,
|
||||
@@ -20,7 +18,7 @@ export default function Colab_DetailInfoGrup({
|
||||
<UIGlobal_LayoutTamplate
|
||||
header={<UIGlobal_LayoutHeaderTamplate title="Info Grup" />}
|
||||
>
|
||||
{<InfoGroup dataRoom={dataRoom} />}
|
||||
<InfoGroup dataRoom={dataRoom} />
|
||||
</UIGlobal_LayoutTamplate>
|
||||
</>
|
||||
);
|
||||
@@ -29,42 +27,30 @@ export default function Colab_DetailInfoGrup({
|
||||
function InfoGroup({ dataRoom }: { dataRoom: MODEL_COLLABORATION_ROOM_CHAT }) {
|
||||
return (
|
||||
<>
|
||||
<Stack
|
||||
px={"xs"}
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
marginBottom: "20px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
<ComponentColab_DetailData data={dataRoom.ProjectCollaboration} />
|
||||
<Paper
|
||||
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.softblue}`,
|
||||
backgroundColor: AccentColor.blue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
marginBottom: "20px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Title order={6}>Anggota Grup</Title>
|
||||
{dataRoom.ProjectCollaboration_AnggotaRoomChat.map((e, i) => (
|
||||
<Box key={i}>
|
||||
<ComponentColab_AuthorNameOnListPartisipan
|
||||
author={e.User}
|
||||
// isPembatas={true}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Stack>
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack>
|
||||
<ComponentColab_DetailData data={dataRoom.ProjectCollaboration} />
|
||||
<Paper
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.softblue}`,
|
||||
backgroundColor: AccentColor.blue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Title order={6}>Anggota Grup</Title>
|
||||
{dataRoom.ProjectCollaboration_AnggotaRoomChat.map((e, i) => (
|
||||
<Box key={i}>
|
||||
|
||||
<ComponentGlobal_AvatarAndUsername profile={e.User.Profile as any}/>
|
||||
</Box>
|
||||
))}
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import {
|
||||
Stack
|
||||
} from "@mantine/core";
|
||||
import { Stack } from "@mantine/core";
|
||||
import ComponentColab_DetailData from "../../component/detail/detail_data";
|
||||
import ComponentColab_DetailListPartisipasiUser from "../../component/detail/list_partisipasi_user";
|
||||
import ComponentColab_AuthorNameOnHeader from "../../component/header_author_name";
|
||||
import { MODEL_COLLABORATION } from "../../model/interface";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
|
||||
export default function Colab_MainDetail({
|
||||
dataColab,
|
||||
@@ -18,37 +17,26 @@ export default function Colab_MainDetail({
|
||||
dataColab?: MODEL_COLLABORATION;
|
||||
userLoginId?: string;
|
||||
listPartisipan?: any[];
|
||||
cekPartisipan: boolean
|
||||
cekPartisipan: boolean;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Stack
|
||||
px={5}
|
||||
spacing={"xl"}
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
marginBottom: "20px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
<ComponentColab_AuthorNameOnHeader
|
||||
tglPublish={new Date()}
|
||||
authorName={dataColab?.Author?.Profile?.name}
|
||||
imagesId={dataColab?.Author?.Profile?.imagesId}
|
||||
profileId={dataColab?.Author?.Profile?.id}
|
||||
/>
|
||||
<ComponentColab_DetailData data={dataColab} />
|
||||
<ComponentColab_DetailListPartisipasiUser
|
||||
listPartisipan={listPartisipan}
|
||||
userLoginId={userLoginId}
|
||||
authorId={dataColab?.Author.id}
|
||||
colabId={dataColab?.id}
|
||||
cekPartisipan={cekPartisipan}
|
||||
/>
|
||||
</Stack>
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack>
|
||||
<ComponentColab_AuthorNameOnHeader
|
||||
tglPublish={new Date()}
|
||||
profile={dataColab?.Author?.Profile as any}
|
||||
/>
|
||||
<ComponentColab_DetailData data={dataColab} />
|
||||
<ComponentColab_DetailListPartisipasiUser
|
||||
listPartisipan={listPartisipan}
|
||||
userLoginId={userLoginId}
|
||||
authorId={dataColab?.Author.id}
|
||||
colabId={dataColab?.id}
|
||||
cekPartisipan={cekPartisipan}
|
||||
/>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||
import ComponentColab_HeaderTamplate from "../../component/header_tamplate";
|
||||
import { Center, Stack } from "@mantine/core";
|
||||
import { MODEL_COLLABORATION_NOTIFIKSI } from "../../model/interface";
|
||||
import ComponentColab_NotedBox from "../../component/noted_box";
|
||||
import ComponentColab_DetailData from "../../component/detail/detail_data";
|
||||
|
||||
export default function Colab_DetailNotifikasi({
|
||||
data,
|
||||
}: {
|
||||
data: MODEL_COLLABORATION_NOTIFIKSI;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<AppComponentGlobal_LayoutTamplate
|
||||
header={<ComponentColab_HeaderTamplate title="Detail Notifikasi" />}
|
||||
>
|
||||
<DetailNotif data={data} />
|
||||
</AppComponentGlobal_LayoutTamplate>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function DetailNotif({ data }: { data?: MODEL_COLLABORATION_NOTIFIKSI }) {
|
||||
return (
|
||||
<>
|
||||
<Stack px={"sm"}>
|
||||
<ComponentColab_NotedBox
|
||||
informasi={data?.ProjectCollaboration.report as any}
|
||||
/>
|
||||
<ComponentColab_DetailData data={data?.ProjectCollaboration} />
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
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 { MODEL_COLLABORATION, MODEL_COLLABORATION_PARTISIPASI } from "@/app_modules/colab/model/interface";
|
||||
import {
|
||||
MODEL_COLLABORATION,
|
||||
MODEL_COLLABORATION_PARTISIPASI,
|
||||
} from "@/app_modules/colab/model/interface";
|
||||
import { Stack, Text } from "@mantine/core";
|
||||
|
||||
export default function Colab_DetailPartisipasiProyek({
|
||||
@@ -12,34 +16,21 @@ export default function Colab_DetailPartisipasiProyek({
|
||||
listPartisipan,
|
||||
}: {
|
||||
dataColab: MODEL_COLLABORATION;
|
||||
listPartisipan: MODEL_COLLABORATION_PARTISIPASI[]
|
||||
listPartisipan: MODEL_COLLABORATION_PARTISIPASI[];
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Stack
|
||||
px={5}
|
||||
spacing={"xl"}
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
marginBottom: "20px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
{/* <pre>{JSON.stringify(dataColab, null,2)}</pre> */}
|
||||
<ComponentColab_AuthorNameOnHeader
|
||||
authorName={dataColab?.Author.Profile.name}
|
||||
profileId={dataColab?.Author.Profile.id}
|
||||
imagesId={dataColab?.Author.Profile.imagesId}
|
||||
tglPublish={dataColab?.createdAt}
|
||||
/>
|
||||
<ComponentColab_DetailData data={dataColab} />
|
||||
<ComponentColab_DetailListPartisipasiUser
|
||||
listPartisipan={listPartisipan}
|
||||
/>
|
||||
</Stack>
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack>
|
||||
<ComponentColab_AuthorNameOnHeader
|
||||
profile={dataColab.Author.Profile}
|
||||
/>
|
||||
<ComponentColab_DetailData data={dataColab} />
|
||||
<ComponentColab_DetailListPartisipasiUser
|
||||
listPartisipan={listPartisipan}
|
||||
/>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||
@@ -17,7 +18,7 @@ import {
|
||||
MODEL_COLLABORATION,
|
||||
MODEL_COLLABORATION_PARTISIPASI,
|
||||
} from "@/app_modules/colab/model/interface";
|
||||
import { notifikasiToUser_CreateGroupCollaboration } from "@/app_modules/notifikasi/fun/create/create_notif_to_user_collaboration";
|
||||
import mqtt_client from "@/util/mqtt_client";
|
||||
import {
|
||||
ActionIcon,
|
||||
Button,
|
||||
@@ -38,8 +39,6 @@ import { useAtom } from "jotai";
|
||||
import _ from "lodash";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import mqtt_client from "@/util/mqtt_client";
|
||||
|
||||
|
||||
export default function Colab_DetailProyekSaya({
|
||||
dataColab,
|
||||
@@ -50,24 +49,15 @@ export default function Colab_DetailProyekSaya({
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Stack
|
||||
px={5}
|
||||
spacing={"xl"}
|
||||
style={{
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
color: "white",
|
||||
borderRadius: "10px",
|
||||
marginBottom: "20px",
|
||||
padding: "15px",
|
||||
}}
|
||||
>
|
||||
<ComponentColab_DetailData data={dataColab} />
|
||||
<CheckBoxPartisipan
|
||||
listPartisipan={listPartisipan}
|
||||
colabId={dataColab.id}
|
||||
/>
|
||||
</Stack>
|
||||
<ComponentGlobal_CardStyles marginBottom={"15px"}>
|
||||
<Stack>
|
||||
<ComponentColab_DetailData data={dataColab} />
|
||||
<CheckBoxPartisipan
|
||||
listPartisipan={listPartisipan}
|
||||
colabId={dataColab.id}
|
||||
/>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -119,8 +109,8 @@ function CheckBoxPartisipan({
|
||||
) : (
|
||||
listPartisipan.map((e, i) => (
|
||||
<Grid key={i} align="center">
|
||||
<Grid.Col span={"content"}>
|
||||
<Checkbox value={e?.User?.id} />
|
||||
<Grid.Col span={2}>
|
||||
<Checkbox color={"yellow"} value={e?.User?.id} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<ComponentColab_AuthorNameOnListPartisipan
|
||||
|
||||
@@ -16,7 +16,7 @@ export default function LayoutColab_DetailProyekSaya({
|
||||
colabId,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
colabId: string
|
||||
colabId: string;
|
||||
}) {
|
||||
const [openDrawer, setOpenDrawer] = useState(false);
|
||||
const listPage = [
|
||||
@@ -38,10 +38,8 @@ export default function LayoutColab_DetailProyekSaya({
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
onClick={() => setOpenDrawer(true)}
|
||||
|
||||
|
||||
>
|
||||
<IconDotsVertical />
|
||||
<IconDotsVertical color="white" />
|
||||
</ActionIcon>
|
||||
}
|
||||
/>
|
||||
@@ -51,10 +49,9 @@ export default function LayoutColab_DetailProyekSaya({
|
||||
</UIGlobal_LayoutTamplate>
|
||||
|
||||
<UIGlobal_Drawer
|
||||
opened={openDrawer}
|
||||
close={() => setOpenDrawer(false)}
|
||||
component={listPage}
|
||||
|
||||
opened={openDrawer}
|
||||
close={() => setOpenDrawer(false)}
|
||||
component={listPage}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
|
||||
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_hot_menu } from "@/app_modules/colab/global_state";
|
||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
"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_DetailStatusPublish({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<AppShell header={<ComponentColab_HeaderTamplate title="Proyek Saya" />}>
|
||||
{children}
|
||||
</AppShell>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
"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/_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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
"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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
"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/_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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
"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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user