# Event Join
## feat - Join event - kontribusi event - histoty in progress ### No Issue
This commit is contained in:
48
src/app_modules/event/component/box_list_status.tsx
Normal file
48
src/app_modules/event/component/box_list_status.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
"use client";
|
||||
|
||||
import { RouterEvent } from "@/app/lib/router_hipmi/router_event";
|
||||
import { Paper, Stack, Group, Title, Text, Grid } from "@mantine/core";
|
||||
import moment from "moment";
|
||||
import { MODEL_EVENT } from "../model/interface";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
export default function ComponentEvent_BoxListStatus({
|
||||
data,
|
||||
path,
|
||||
}: {
|
||||
data: MODEL_EVENT;
|
||||
path: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<>
|
||||
<Paper
|
||||
shadow="lg"
|
||||
radius={"md"}
|
||||
p={"md"}
|
||||
withBorder
|
||||
mb={"sm"}
|
||||
onClick={() => router.push(path + data.id)}
|
||||
>
|
||||
<Stack>
|
||||
<Grid>
|
||||
<Grid.Col span={8}>
|
||||
<Title order={6} truncate>
|
||||
{data.title}
|
||||
</Title>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={4}>
|
||||
<Text fz={"sm"} truncate>
|
||||
{moment(data.tanggal).format("ll")}
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Text fz={"sm"} lineClamp={2}>
|
||||
{data.deskripsi}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
18
src/app_modules/event/component/catatan_reject.tsx
Normal file
18
src/app_modules/event/component/catatan_reject.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
"use client"
|
||||
|
||||
import { Paper, Stack, Text } from "@mantine/core"
|
||||
|
||||
export default function ComponentEvent_CatatanReject({catatan}: {catatan:string}){
|
||||
return<>
|
||||
<Paper bg={"blue.3"} p={"sm"}>
|
||||
<Stack spacing={0}>
|
||||
<Text fz={"xs"} fw={"bold"} fs={"italic"}>
|
||||
* Alasan Penolakan
|
||||
</Text>
|
||||
<Text fz={"xs"} fs={"italic"}>
|
||||
{catatan}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</>
|
||||
}
|
||||
82
src/app_modules/event/component/detail/detail_data.tsx
Normal file
82
src/app_modules/event/component/detail/detail_data.tsx
Normal file
@@ -0,0 +1,82 @@
|
||||
"use client";
|
||||
|
||||
import { Stack, Title, Grid, Text, Paper, Spoiler } from "@mantine/core";
|
||||
import moment from "moment";
|
||||
import { MODEL_EVENT } from "../../model/interface";
|
||||
|
||||
export default function ComponentEvent_DetailData({
|
||||
data,
|
||||
}: {
|
||||
data: MODEL_EVENT;
|
||||
}) {
|
||||
const tgl = data.tanggal;
|
||||
const hari = tgl.toLocaleString("id-ID", { dateStyle: "full" });
|
||||
|
||||
const jam = tgl.toLocaleTimeString([], {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: false,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<Paper withBorder p={"md"} shadow="lg">
|
||||
<Stack px={"sm"}>
|
||||
<Title order={4}>{data ? data.title : null}</Title>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Lokasi
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text>{data ? data.lokasi : null}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Tipe Acara
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text>{data ? data.EventMaster_TipeAcara.name : null}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Tanggal
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>{hari}</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Jam
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>{jam}</Grid.Col>
|
||||
</Grid>
|
||||
<Stack spacing={2}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Deskripsi
|
||||
</Text>
|
||||
<Spoiler
|
||||
hideLabel="Lihat sedikit"
|
||||
maxHeight={50}
|
||||
showLabel="Lihat banyak"
|
||||
>
|
||||
{data ? data.deskripsi : null}
|
||||
</Spoiler>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
90
src/app_modules/event/component/detail/detail_main.tsx
Normal file
90
src/app_modules/event/component/detail/detail_main.tsx
Normal file
@@ -0,0 +1,90 @@
|
||||
"use client";
|
||||
|
||||
import { Stack, Title, Grid, Text, Paper, Spoiler } from "@mantine/core";
|
||||
import moment from "moment";
|
||||
import { MODEL_EVENT } from "../../model/interface";
|
||||
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/author_name_on_header";
|
||||
|
||||
export default function ComponentEvent_DetailMainData({
|
||||
data,
|
||||
}: {
|
||||
data: MODEL_EVENT;
|
||||
}) {
|
||||
const tgl = data.tanggal;
|
||||
const hari = tgl.toLocaleString("id-ID", { dateStyle: "full" });
|
||||
|
||||
const jam = tgl.toLocaleTimeString([], {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: false,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<Paper withBorder p={"md"} shadow="lg">
|
||||
<Stack>
|
||||
<ComponentGlobal_AuthorNameOnHeader
|
||||
authorName={data.Author.Profile.name}
|
||||
imagesId={data.Author.Profile.imagesId}
|
||||
profileId={data.Author.Profile.id}
|
||||
/>
|
||||
<Stack px={"sm"}>
|
||||
<Title order={4}>{data ? data.title : null}</Title>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Lokasi
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text>{data ? data.lokasi : null}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Tipe Acara
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text>{data ? data.EventMaster_TipeAcara.name : null}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Tanggal
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>{hari}</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={4}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Jam
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>{jam}</Grid.Col>
|
||||
</Grid>
|
||||
<Stack spacing={2}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Deskripsi
|
||||
</Text>
|
||||
<Spoiler
|
||||
hideLabel="Lihat sedikit"
|
||||
maxHeight={50}
|
||||
showLabel="Lihat banyak"
|
||||
>
|
||||
{data ? data.deskripsi : null}
|
||||
</Spoiler>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
77
src/app_modules/event/component/detail/list_peserta.tsx
Normal file
77
src/app_modules/event/component/detail/list_peserta.tsx
Normal file
@@ -0,0 +1,77 @@
|
||||
"use client";
|
||||
|
||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||
import {
|
||||
Paper,
|
||||
Stack,
|
||||
Center,
|
||||
Title,
|
||||
Grid,
|
||||
Avatar,
|
||||
Divider,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
import router from "next/router";
|
||||
import peserta from "../../main/kontribusi/peserta";
|
||||
import { MODEL_EVENT_PESERTA } from "../../model/interface";
|
||||
|
||||
export default function ComponentEvent_ListPeserta({
|
||||
listPeserta,
|
||||
total,
|
||||
}: {
|
||||
listPeserta: MODEL_EVENT_PESERTA[];
|
||||
total: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Paper withBorder mt={"lg"}>
|
||||
<Stack spacing={"md"} p={"md"}>
|
||||
<Center>
|
||||
<Title order={5}>Daftar Peserta ({total})</Title>
|
||||
</Center>
|
||||
|
||||
{_.isEmpty(listPeserta) ? (
|
||||
<Center>
|
||||
<Text fz={"xs"} fw={"bold"}>
|
||||
- Tidak ada peserta -
|
||||
</Text>
|
||||
</Center>
|
||||
) : (
|
||||
<Stack>
|
||||
{listPeserta.map((e, i) => (
|
||||
<Stack key={i} spacing={"sm"}>
|
||||
<Grid>
|
||||
<Grid.Col
|
||||
span={"content"}
|
||||
onClick={() => {
|
||||
router.push(RouterProfile.katalog + e.User.Profile.id);
|
||||
}}
|
||||
>
|
||||
<Avatar
|
||||
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
|
||||
radius={"xl"}
|
||||
bg={"gray"}
|
||||
size={30}
|
||||
src={
|
||||
RouterProfile.api_foto_profile +
|
||||
e.User.Profile.imagesId
|
||||
}
|
||||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Stack justify="center" h={"100%"}>
|
||||
<Text>{e.User.Profile.name}</Text>
|
||||
</Stack>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Divider />
|
||||
</Stack>
|
||||
))}
|
||||
</Stack>
|
||||
)}
|
||||
</Stack>
|
||||
</Paper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { Stack, Title, Grid, Text, Paper } from "@mantine/core";
|
||||
import moment from "moment";
|
||||
|
||||
export default function ComponentEvent_DetailData() {
|
||||
return (
|
||||
<>
|
||||
<Paper withBorder p={"md"} shadow="lg">
|
||||
<Stack px={"sm"}>
|
||||
<Title order={4}>Nama Event</Title>
|
||||
<Grid>
|
||||
<Grid.Col span={3}>
|
||||
<Text fw={"bold"}>Lokasi</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text>Lokasi Acara</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={3}>
|
||||
<Text fw={"bold"}>Tanggal</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>{moment(Date.now()).format("ll")}</Grid.Col>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.Col span={3}>
|
||||
<Text fw={"bold"}>Jam</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>:</Grid.Col>
|
||||
<Grid.Col span={"auto"}>{moment(Date.now()).format("LT")}</Grid.Col>
|
||||
</Grid>
|
||||
<Stack spacing={2}>
|
||||
<Text fw={"bold"}>Deskripsi</Text>
|
||||
<Text>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Harum
|
||||
ipsum voluptate doloremque optio explicabo temporibus delectus
|
||||
voluptatum similique tempora voluptatem. Exercitationem veritatis
|
||||
tempora impedit ipsam, fugit vitae repellat sint fugiat
|
||||
</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user