19
src/app/api/admin/event/detail/[id]/peserta/route.ts
Normal file
19
src/app/api/admin/event/detail/[id]/peserta/route.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import backendLogger from "@/util/backendLogger";
|
||||||
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(req: Request,
|
||||||
|
{ params }: { params: { id: string } }) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
backendLogger.error("Error get data event detail >>", error);
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Error get data event detail",
|
||||||
|
reason: (error as Error).message
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
19
src/app/api/admin/event/detail/[id]/route.ts
Normal file
19
src/app/api/admin/event/detail/[id]/route.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import backendLogger from "@/util/backendLogger";
|
||||||
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(req: Request,
|
||||||
|
{ params }: { params: { id: string } }) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
backendLogger.error("Error get data event detail >>", error);
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Error get data event detail",
|
||||||
|
reason: (error as Error).message
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
|
import { AdminColor } from '@/app_modules/_global/color/color_pallet';
|
||||||
import { Grid, Paper, Stack, Text, Title } from '@mantine/core';
|
import { Grid, Paper, Stack, Text, Title } from '@mantine/core';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
function ComponentEvent_DetailDataAuthor() {
|
function ComponentEvent_DetailDataAuthor() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Paper withBorder p={"lg"}>
|
<Paper bg={AdminColor.softBlue} p={"lg"}>
|
||||||
<Stack>
|
<Stack c={AdminColor.white}>
|
||||||
<Title order={3}>Data User</Title>
|
<Title order={3}>Data User</Title>
|
||||||
<Stack spacing={"xs"}>
|
<Stack spacing={"xs"}>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
|
import { AdminColor } from '@/app_modules/_global/color/color_pallet';
|
||||||
import { Box, Grid, Paper, Stack, Text, Title } from '@mantine/core';
|
import { Box, Grid, Paper, Stack, Text, Title } from '@mantine/core';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
function ComponentEvent_DetailDataEvent() {
|
function ComponentEvent_DetailDataEvent() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Paper withBorder p={"lg"}>
|
<Paper bg={AdminColor.softBlue} p={"lg"}>
|
||||||
<Stack>
|
<Stack c={AdminColor.white}>
|
||||||
<Title order={3}>Coba</Title>
|
<Title order={3}>Coba</Title>
|
||||||
<Stack spacing={"xs"}>
|
<Stack spacing={"xs"}>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { RouterAdminEvent } from '@/app/lib/router_admin/router_admin_event';
|
import { RouterAdminEvent } from '@/app/lib/router_admin/router_admin_event';
|
||||||
|
import { AdminColor } from '@/app_modules/_global/color/color_pallet';
|
||||||
import { Button, Center, Pagination, Paper, ScrollArea, Stack, Table, Title } from '@mantine/core';
|
import { Button, Center, Pagination, Paper, ScrollArea, Stack, Table, Title } from '@mantine/core';
|
||||||
import { IconDeviceDesktop, IconDownload, IconImageInPicture } from '@tabler/icons-react';
|
import { IconDeviceDesktop, IconDownload, IconImageInPicture } from '@tabler/icons-react';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
@@ -20,7 +21,7 @@ function AdminEvent_DetailDataSponsor() {
|
|||||||
const rows = tableRows.map((row, i) => (
|
const rows = tableRows.map((row, i) => (
|
||||||
<tr key={i}>
|
<tr key={i}>
|
||||||
<td>
|
<td>
|
||||||
<Center>{row.sponsor}</Center>
|
<Center c={AdminColor.white}>{row.sponsor}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>
|
<Center>
|
||||||
@@ -28,16 +29,16 @@ function AdminEvent_DetailDataSponsor() {
|
|||||||
</Center>
|
</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>{row.username}</Center>
|
<Center c={AdminColor.white}>{row.username}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>{row.name}</Center>
|
<Center c={AdminColor.white}>{row.name}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>{row.nomor}</Center>
|
<Center c={AdminColor.white}>{row.nomor}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>{row.email}</Center>
|
<Center c={AdminColor.white}>{row.email}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>
|
<Center>
|
||||||
@@ -50,45 +51,44 @@ function AdminEvent_DetailDataSponsor() {
|
|||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Stack spacing={"xs"} h={"100%"}>
|
||||||
<Paper
|
<Paper
|
||||||
bg={"gray.4"}
|
bg={AdminColor.softBlue}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
style={{ borderRadius: "6px" }}
|
style={{ borderRadius: "6px" }}
|
||||||
>
|
>
|
||||||
<Title order={4}>Daftar Sponsor</Title>
|
<Title c={AdminColor.white} order={4}>Daftar Sponsor</Title>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
<Paper p={"md"} withBorder shadow='lg' h={"80vh"}>
|
<Paper p={"md"} bg={AdminColor.softBlue} shadow='lg' h={"80vh"}>
|
||||||
<ScrollArea w={"100%"} h={"90%"}>
|
<ScrollArea w={"100%"} h={"90%"}>
|
||||||
<Table
|
<Table
|
||||||
verticalSpacing={"xl"}
|
verticalSpacing={"xl"}
|
||||||
horizontalSpacing={"md"}
|
horizontalSpacing={"md"}
|
||||||
p={"md"}
|
p={"md"}
|
||||||
w={1500}
|
w={1500}
|
||||||
striped
|
|
||||||
highlightOnHover
|
|
||||||
>
|
>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<Center>Sponsor</Center>
|
<Center c={AdminColor.white}>Sponsor</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Download</Center>
|
<Center c={AdminColor.white}>Download</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Username</Center>
|
<Center c={AdminColor.white}>Username</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Nama</Center>
|
<Center c={AdminColor.white}>Nama</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Nomor</Center>
|
<Center c={AdminColor.white}>Nomor</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Email</Center>
|
<Center c={AdminColor.white}>Email</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Aksi</Center>
|
<Center c={AdminColor.white}>Aksi</Center>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { useState } from "react";
|
|||||||
import { adminEvent_getListPesertaById } from "../fun";
|
import { adminEvent_getListPesertaById } from "../fun";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||||
|
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||||
|
|
||||||
export function AdminEvent_ViewDetailPeserta({
|
export function AdminEvent_ViewDetailPeserta({
|
||||||
dataPeserta,
|
dataPeserta,
|
||||||
@@ -44,16 +45,16 @@ export function AdminEvent_ViewDetailPeserta({
|
|||||||
: data.map((e, i) => (
|
: data.map((e, i) => (
|
||||||
<tr key={i}>
|
<tr key={i}>
|
||||||
<td>
|
<td>
|
||||||
<Center>{e?.User?.username}</Center>
|
<Center c={AdminColor.white}>{e?.User?.username}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>{e?.User?.Profile?.name}</Center>
|
<Center c={AdminColor.white}>{e?.User?.Profile?.name}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>+{e?.User?.nomor}</Center>
|
<Center c={AdminColor.white}>+{e?.User?.nomor}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>{e?.User?.Profile?.email}</Center>
|
<Center c={AdminColor.white}>{e?.User?.Profile?.email}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>
|
<Center>
|
||||||
@@ -70,37 +71,36 @@ export function AdminEvent_ViewDetailPeserta({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Stack spacing={"xs"} h={"100%"}>
|
||||||
<Paper bg={"gray.4"}
|
<Paper bg={AdminColor.softBlue}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
style={{ borderRadius: "6px" }}>
|
style={{ borderRadius: "6px" }}>
|
||||||
<Title order={4}>Daftar Peserta</Title>
|
<Title c={AdminColor.white} order={4}>Daftar Peserta</Title>
|
||||||
</Paper>
|
</Paper>
|
||||||
<Paper p={"md"} withBorder shadow="lg" h={"75vh"}>
|
<Paper p={"md"} bg={AdminColor.softBlue} shadow="lg" h={"75vh"}>
|
||||||
<ScrollArea w={"100%"} h={"90%"}>
|
<ScrollArea w={"100%"} h={"90%"}>
|
||||||
<Table
|
<Table
|
||||||
verticalSpacing={"md"}
|
verticalSpacing={"md"}
|
||||||
horizontalSpacing={"md"}
|
horizontalSpacing={"md"}
|
||||||
p={"md"}
|
p={"md"}
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
striped
|
|
||||||
highlightOnHover
|
|
||||||
>
|
>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<Center>Username</Center>
|
<Center c={AdminColor.white}>Username</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Name</Center>
|
<Center c={AdminColor.white}>Name</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Nomor</Center>
|
<Center c={AdminColor.white}>Nomor</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Email</Center>
|
<Center c={AdminColor.white}>Email</Center>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center>Konfirmasi Kehadiran</Center>
|
<Center c={AdminColor.white}>Konfirmasi Kehadiran</Center>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ export default function AdminEvent_ComponentTableReview() {
|
|||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Stack spacing={"xs"} h={"100%"}>
|
||||||
@@ -385,6 +386,9 @@ export default function AdminEvent_ComponentTableReview() {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{!data ? (
|
{!data ? (
|
||||||
<CustomSkeleton height={"80vh"} width="100%" />
|
<CustomSkeleton height={"80vh"} width="100%" />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ export function ComponentAdminInvestasi_DetailDataAuthor({
|
|||||||
data: any;
|
data: any;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Paper bg={AdminColor.softBlue} p={"lg"}>
|
<Paper bg={AdminColor.softBlue} p={"lg"}>
|
||||||
<Stack c={AdminColor.white}>
|
<Stack c={AdminColor.white}>
|
||||||
<Title order={3}>Data User</Title>
|
<Title order={3}>Data User</Title>
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
|
|
||||||
useShallowEffect(() => {
|
useShallowEffect(() => {
|
||||||
cekStatusPublish();
|
cekStatusPublish();
|
||||||
|
// omload()
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
async function cekStatusPublish() {
|
async function cekStatusPublish() {
|
||||||
@@ -142,6 +143,8 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack px={"lg"}>
|
<Stack px={"lg"}>
|
||||||
@@ -182,6 +185,9 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{/* Data Author */}
|
{/* Data Author */}
|
||||||
|
if(!data.author){
|
||||||
|
|
||||||
|
}
|
||||||
<ComponentAdminInvestasi_DetailDataAuthor data={data.author} />
|
<ComponentAdminInvestasi_DetailDataAuthor data={data.author} />
|
||||||
|
|
||||||
{/* Data Foto */}
|
{/* Data Foto */}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const apiPostVerifikasiCodeOtp = async ({ nomor }: { nomor: string }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const apiDeleteAktivasiKodeOtpByNomor = async ({ id }: { id: string }) => {
|
const apiDeleteAktivasiKodeOtpByNomor = async ({ id }: { id: string }) => {
|
||||||
const respone = await fetch(`/api/auth/code/${id}`, {
|
const respone = await fetch(`/api/auth/code/${id}/peserta`, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user