Fix: Db Profile
Deskripsi: - Menghapus field imagesId dan imagesBackgroundId - Menhapus table backgroundImage - Menghapus component avatar dan header card yang lama ## No Issue
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { RouterAdminEvent } from "@/app/lib/router_admin/router_admin_event";
|
||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||
import {
|
||||
MODEL_EVENT,
|
||||
@@ -23,14 +24,12 @@ import {
|
||||
TextInput,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { useDisclosure, useShallowEffect } from "@mantine/hooks";
|
||||
import { useDisclosure } from "@mantine/hooks";
|
||||
import { IconCircleCheck, IconSearch } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { adminEvent_funGetListAllRiwayat } from "../fun";
|
||||
import { adminEvent_getListPesertaById } from "../fun/get/get_list_peserta_by_id";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { RouterAdminEvent } from "@/app/lib/router_admin/router_admin_event";
|
||||
|
||||
export default function AdminEvent_Riwayat({
|
||||
listRiwayat,
|
||||
@@ -49,8 +48,6 @@ export default function AdminEvent_Riwayat({
|
||||
|
||||
function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) {
|
||||
const router = useRouter();
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [peserta, setPeserta] = useState<MODEL_EVENT_PESERTA[]>();
|
||||
const [eventId, setEventId] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -89,14 +86,6 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) {
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
router.push(RouterAdminEvent.detail_peserta + e.id);
|
||||
// setEventId(e.id);
|
||||
// setLoading(true);
|
||||
// await new Promise((v) => setTimeout(v, 500));
|
||||
// await AdminEvent_getListPesertaById(e.id).then((res: any) => {
|
||||
// setPeserta(res);
|
||||
// setLoading(false);
|
||||
// });
|
||||
// open();
|
||||
}}
|
||||
>
|
||||
Lihat Peserta
|
||||
@@ -146,16 +135,6 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) {
|
||||
</tr>
|
||||
));
|
||||
|
||||
// useShallowEffect(() => {
|
||||
// getAllPeserta(eventId);
|
||||
// }, [eventId]);
|
||||
|
||||
// async function getAllPeserta(eventId: string) {
|
||||
// await adminEvent_getListPesertaById(eventId).then((res: any) =>
|
||||
// setPeserta(res)
|
||||
// );
|
||||
// }
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
@@ -229,46 +208,6 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: any }) {
|
||||
</Center>
|
||||
</Paper>
|
||||
</Stack>
|
||||
|
||||
<Modal
|
||||
opened={opened}
|
||||
onClose={close}
|
||||
size={"md"}
|
||||
// closeOnClickOutside={false}
|
||||
withCloseButton={false}
|
||||
>
|
||||
<Paper>
|
||||
<Stack>
|
||||
<Center>
|
||||
<Title order={3}>Daftar Peserta</Title>
|
||||
</Center>
|
||||
<Stack>
|
||||
{peserta?.map((e) => (
|
||||
<Stack key={e.id} spacing={"xs"}>
|
||||
<Grid>
|
||||
<Grid.Col span={"content"}>
|
||||
<Avatar
|
||||
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
|
||||
radius={"xl"}
|
||||
src={
|
||||
RouterProfile.api_foto_profile +
|
||||
e?.User?.Profile?.imagesId
|
||||
}
|
||||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Group align="center" h={"100%"}>
|
||||
<Text>{e?.User?.Profile?.name}</Text>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Divider />
|
||||
</Stack>
|
||||
))}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,13 +51,10 @@ export default function AdminEvent_TablePublish({
|
||||
|
||||
function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
const router = useRouter();
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [data, setData] = useState<MODEL_EVENT[]>(listPublish.data);
|
||||
const [isNPage, setNPage] = useState(listPublish.nPage);
|
||||
const [isActivePage, setActivePage] = useState(1);
|
||||
const [isSearch, setSearch] = useState("");
|
||||
|
||||
const [peserta, setPeserta] = useState<MODEL_EVENT_PESERTA[]>();
|
||||
const [eventId, setEventId] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -132,14 +129,6 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
radius={"xl"}
|
||||
onClick={async () => {
|
||||
router.push(RouterAdminEvent.detail_peserta + e.id);
|
||||
// setEventId(e.id);
|
||||
// setLoading(true);
|
||||
// await new Promise((v) => setTimeout(v, 500));
|
||||
// await adminEvent_getListPesertaById(e.id).then((res: any) => {
|
||||
// setPeserta(res);
|
||||
// setLoading(false);
|
||||
// });
|
||||
// open();
|
||||
}}
|
||||
>
|
||||
Lihat Peserta
|
||||
@@ -221,46 +210,6 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
</Center>
|
||||
</Paper>
|
||||
</Stack>
|
||||
|
||||
<Modal opened={opened} onClose={close}>
|
||||
<Paper>
|
||||
<Stack>
|
||||
<Center>
|
||||
<Title order={3}>Daftar Peserta</Title>
|
||||
</Center>
|
||||
<Stack>
|
||||
{_.isEmpty(peserta) ? (
|
||||
<Center>
|
||||
<Text c={"gray"}>Tidak ada peserta</Text>
|
||||
</Center>
|
||||
) : (
|
||||
peserta?.map((e) => (
|
||||
<Stack key={e.id} spacing={"xs"}>
|
||||
<Grid>
|
||||
<Grid.Col span={"content"}>
|
||||
<Avatar
|
||||
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
|
||||
radius={"xl"}
|
||||
src={
|
||||
RouterProfile.api_foto_profile +
|
||||
e?.User?.Profile?.imagesId
|
||||
}
|
||||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Group align="center" h={"100%"}>
|
||||
<Text>{e?.User?.Profile?.name}</Text>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
<Divider />
|
||||
</Stack>
|
||||
))
|
||||
)}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export async function adminForum_getListKomentarById({
|
||||
Profile: {
|
||||
select: {
|
||||
name: true,
|
||||
imagesId: true,
|
||||
imageId: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/_admin_global/header_tamplate";
|
||||
import {
|
||||
MODEL_FORUM_REPORT_KOMENTAR,
|
||||
MODEL_FORUM_REPORT_POSTING,
|
||||
MODEL_FORUM_REPORT_KOMENTAR
|
||||
} from "@/app_modules/forum/model/interface";
|
||||
import {
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
@@ -20,18 +18,15 @@ import {
|
||||
Table,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
Title
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { IconFlag3, IconSearch } from "@tabler/icons-react";
|
||||
import { isEmpty } from "lodash";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||
import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete";
|
||||
import adminForum_funGetAllReportPosting from "../fun/get/get_all_report_posting";
|
||||
import { Forum_Komentar } from "@/app_modules/forum";
|
||||
import adminForum_funGetAllReportKomentar from "../fun/get/get_all_report_komentar";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
|
||||
export default function AdminForum_TableReportKomentar({
|
||||
listData,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { pathAssetImage, RouterImagePreview } from "@/app/lib";
|
||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||
import {
|
||||
MODEL_VOTE_KONTRIBUTOR,
|
||||
@@ -72,7 +73,8 @@ export default function ComponentAdminVote_DetailHasil({
|
||||
span={2}
|
||||
onClick={() =>
|
||||
router.push(
|
||||
RouterProfile.katalogOLD + e?.Author?.Profile?.id
|
||||
RouterProfile.katalogOLD +
|
||||
e?.Author?.Profile?.id
|
||||
)
|
||||
}
|
||||
>
|
||||
@@ -84,12 +86,7 @@ export default function ComponentAdminVote_DetailHasil({
|
||||
}}
|
||||
radius={"xl"}
|
||||
bg={"gray.1"}
|
||||
src={
|
||||
e
|
||||
? RouterProfile.api_foto_profile +
|
||||
e?.Author?.Profile?.imagesId
|
||||
: "/aset/global/avatar.png"
|
||||
}
|
||||
src={pathAssetImage.avatar}
|
||||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={5}>
|
||||
|
||||
Reference in New Issue
Block a user