Fix Icon Button & Modal Investasi & Event

This commit is contained in:
2025-01-20 17:46:20 +08:00
parent 1f46b6bfec
commit 44fd58dc7f
10 changed files with 219 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
import { RouterAdminEvent } from '@/app/lib/router_admin/router_admin_event';
import { Button, Center, Pagination, Paper, ScrollArea, Stack, Table, Title } from '@mantine/core';
import { IconImageInPicture } from '@tabler/icons-react';
import { IconDeviceDesktop, IconDownload, IconImageInPicture } from '@tabler/icons-react';
import { useRouter } from 'next/navigation';
import React from 'react';
@@ -24,7 +24,7 @@ function AdminEvent_DetailDataSponsor() {
</td>
<td>
<Center>
<Button size='xs' style={{ borderColor: "black", color: "black" }} bg={"#e6e6e6"}>Download</Button>
<Button leftIcon={<IconDownload size={20} />} size='xs' style={{ borderColor: "black", color: "black" }} bg={"#e6e6e6"}>Download</Button>
</Center>
</td>
<td>
@@ -41,7 +41,7 @@ function AdminEvent_DetailDataSponsor() {
</td>
<td>
<Center>
<Button onClick={() => router.push(RouterAdminEvent.detail_sponsor)} radius={"xl"} bg={"green"}>Tampilkan</Button>
<Button leftIcon={<IconDeviceDesktop size={20} />} onClick={() => router.push(RouterAdminEvent.detail_sponsor)} radius={"xl"} bg={"green"}>Tampilkan</Button>
</Center>
</td>
</tr>

View File

@@ -58,7 +58,7 @@ export default function AdminEvent_ComponentTableReview({
const [isActivePage, setActivePage] = useState(1);
const [isSearch, setSearch] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [isModal, setModal] = useState(false);
const [opened, { open, close }] = useDisclosure(false);
const [catatan, setCatatan] = useState("");
const [eventId, setEventId] = useState("");
@@ -123,6 +123,7 @@ export default function AdminEvent_ComponentTableReview({
const res = await AdminEvent_funEditStatusPublishById(eventId, "1");
if (res.status === 200) {
setIsLoading(true)
const dataNotifikasi: IRealtimeData = {
appId: res.data?.id as any,
status: res.data?.EventMaster_Status?.name as any,
@@ -159,9 +160,12 @@ export default function AdminEvent_ComponentTableReview({
ComponentAdminGlobal_NotifikasiBerhasil("Berhasil update status");
} else {
setModal(false)
setIsLoading(false)
ComponentAdminGlobal_NotifikasiGagal(res.message);
}
} else {
setModal(false)
ComponentAdminGlobal_NotifikasiPeringatan(
"Review di batalkan oleh user, reload halaman review !"
);
@@ -448,6 +452,43 @@ export default function AdminEvent_ComponentTableReview({
</Group>
</Stack>
</Modal>
<Modal
opened={isModal}
title="Anda Yakin Ingin Mempublish Event Ini?"
onClose={() => setModal(false)}
centered
withCloseButton={false}
size={"md"}
>
<Stack>
<Group position="right">
<Button radius={"xl"} onClick={close}>
Batal
</Button>
<Button
radius={"xl"}
// onClick={() => {
// onPublish(eventId, tanggal);
// }}
>
Simpan
</Button>
</Group>
</Stack>
</Modal>
</>
);
function ModalPublish({
eventId,
tanggal,
}: {
eventId: string;
tanggal: Date;
}) {
return (
<Stack>
</Stack>
)
}
}

View File

@@ -46,7 +46,7 @@ function AdminEvent_DetailSponsor() {
</td>
<td>
<Center>
<Button radius={"xl"} style={{ color: "green" }} bg={"white"}>Terima</Button>
<Button radius={"xl"} style={{ color: "white" }} bg={"green"}>Terima</Button>
</Center>
</td>
</tr>

View File

@@ -17,7 +17,7 @@ import {
TextInput,
Title,
} from "@mantine/core";
import { IconCircleCheck, IconSearch } from "@tabler/icons-react";
import { IconCircleCheck, IconDetails, IconEyeCheck, IconSearch } from "@tabler/icons-react";
import _ from "lodash";
import { useRouter } from "next/navigation";
import { useState } from "react";
@@ -25,6 +25,8 @@ import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamp
import { adminEvent_funGetListPublish } from "../fun";
import QRCode from "react-qr-code";
import { useShallowEffect } from "@mantine/hooks";
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
import { MainColor } from "@/app_modules/_global/color";
export default function AdminEvent_TablePublish({
listPublish,
@@ -202,6 +204,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
e.id === eventId ? (loading === true ? true : false) : false
}
color={"green"}
leftIcon={<IconEyeCheck size={20}/>}
radius={"xl"}
onClick={async () => {
setEventId(e.id);
@@ -219,7 +222,21 @@ function TableStatus({ listPublish }: { listPublish: any }) {
return (
<>
<Stack spacing={"xs"} h={"100%"}>
<Group
<ComponentAdminGlobal_TitlePage
name="Publish"
color={MainColor.green}
component={
<TextInput
icon={<IconSearch size={20} />}
radius={"xl"}
placeholder="Masukan judul"
onChange={(val) => {
onSearch(val.currentTarget.value);
}}
/>
}
/>
{/* <Group
position="apart"
bg={"green.4"}
p={"xs"}
@@ -234,7 +251,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
onSearch(val.currentTarget.value);
}}
/>
</Group>
</Group> */}
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
<ScrollArea w={"100%"} h={"90%"}>

View File

@@ -26,6 +26,8 @@ import { useState } from "react";
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
import { adminEvent_funGetListReject } from "../fun";
import { AdminEvent_funEditCatatanById } from "../fun/edit/fun_edit_status_reject_by_id";
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
import { MainColor } from "@/app_modules/_global/color";
export default function AdminEvent_TableReject({
listReject,
@@ -177,7 +179,21 @@ function TableStatus({ listReject }: { listReject: any }) {
return (
<>
<Stack spacing={"xs"} h={"100%"}>
<Group
<ComponentAdminGlobal_TitlePage
name="Reject"
color={MainColor.red}
component={
<TextInput
icon={<IconSearch size={20} />}
radius={"xl"}
placeholder="Masukan judul"
onChange={(val) => {
onSearch(val.currentTarget.value);
}}
/>
}
/>
{/* <Group
position="apart"
bg={"red.4"}
p={"xs"}
@@ -192,7 +208,7 @@ function TableStatus({ listReject }: { listReject: any }) {
onSearch(val.currentTarget.value);
}}
/>
</Group>
</Group> */}
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
<ScrollArea w={"100%"} h={"90%"}>