Fix Icon Button & Modal Investasi & Event
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
import { Group, Modal, Stack } from '@mantine/core';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
function Admin_ComponentModalPublish({ onClose, opened, title, buttonKiri, buttonKanan, }: {
|
||||||
|
onClose: () => void;
|
||||||
|
opened: any;
|
||||||
|
title: string;
|
||||||
|
buttonKiri: React.ReactNode;
|
||||||
|
buttonKanan: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Modal
|
||||||
|
style={{ fontWeight: "bold" }}
|
||||||
|
fw={"bold"}
|
||||||
|
centered
|
||||||
|
opened={opened}
|
||||||
|
onClose={onClose}
|
||||||
|
title={title}
|
||||||
|
size={"sm"}
|
||||||
|
withCloseButton={false}
|
||||||
|
>
|
||||||
|
<Stack>
|
||||||
|
<Group position="center">
|
||||||
|
{buttonKiri}
|
||||||
|
{buttonKanan}
|
||||||
|
</Group>
|
||||||
|
</Stack>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Admin_ComponentModalPublish;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { RouterAdminEvent } from '@/app/lib/router_admin/router_admin_event';
|
import { RouterAdminEvent } from '@/app/lib/router_admin/router_admin_event';
|
||||||
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 { IconImageInPicture } from '@tabler/icons-react';
|
import { IconDeviceDesktop, IconDownload, IconImageInPicture } from '@tabler/icons-react';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ function AdminEvent_DetailDataSponsor() {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>
|
<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>
|
</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -41,7 +41,7 @@ function AdminEvent_DetailDataSponsor() {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>
|
<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>
|
</Center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default function AdminEvent_ComponentTableReview({
|
|||||||
const [isActivePage, setActivePage] = useState(1);
|
const [isActivePage, setActivePage] = useState(1);
|
||||||
const [isSearch, setSearch] = useState("");
|
const [isSearch, setSearch] = useState("");
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
const [isModal, setModal] = useState(false);
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
const [catatan, setCatatan] = useState("");
|
const [catatan, setCatatan] = useState("");
|
||||||
const [eventId, setEventId] = useState("");
|
const [eventId, setEventId] = useState("");
|
||||||
@@ -123,6 +123,7 @@ export default function AdminEvent_ComponentTableReview({
|
|||||||
|
|
||||||
const res = await AdminEvent_funEditStatusPublishById(eventId, "1");
|
const res = await AdminEvent_funEditStatusPublishById(eventId, "1");
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
setIsLoading(true)
|
||||||
const dataNotifikasi: IRealtimeData = {
|
const dataNotifikasi: IRealtimeData = {
|
||||||
appId: res.data?.id as any,
|
appId: res.data?.id as any,
|
||||||
status: res.data?.EventMaster_Status?.name as any,
|
status: res.data?.EventMaster_Status?.name as any,
|
||||||
@@ -159,9 +160,12 @@ export default function AdminEvent_ComponentTableReview({
|
|||||||
|
|
||||||
ComponentAdminGlobal_NotifikasiBerhasil("Berhasil update status");
|
ComponentAdminGlobal_NotifikasiBerhasil("Berhasil update status");
|
||||||
} else {
|
} else {
|
||||||
|
setModal(false)
|
||||||
|
setIsLoading(false)
|
||||||
ComponentAdminGlobal_NotifikasiGagal(res.message);
|
ComponentAdminGlobal_NotifikasiGagal(res.message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
setModal(false)
|
||||||
ComponentAdminGlobal_NotifikasiPeringatan(
|
ComponentAdminGlobal_NotifikasiPeringatan(
|
||||||
"Review di batalkan oleh user, reload halaman review !"
|
"Review di batalkan oleh user, reload halaman review !"
|
||||||
);
|
);
|
||||||
@@ -448,6 +452,43 @@ export default function AdminEvent_ComponentTableReview({
|
|||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</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>
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function AdminEvent_DetailSponsor() {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center>
|
<Center>
|
||||||
<Button radius={"xl"} style={{ color: "green" }} bg={"white"}>Terima</Button>
|
<Button radius={"xl"} style={{ color: "white" }} bg={"green"}>Terima</Button>
|
||||||
</Center>
|
</Center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconCircleCheck, IconSearch } from "@tabler/icons-react";
|
import { IconCircleCheck, IconDetails, IconEyeCheck, IconSearch } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -25,6 +25,8 @@ import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamp
|
|||||||
import { adminEvent_funGetListPublish } from "../fun";
|
import { adminEvent_funGetListPublish } from "../fun";
|
||||||
import QRCode from "react-qr-code";
|
import QRCode from "react-qr-code";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
|
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||||
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
export default function AdminEvent_TablePublish({
|
export default function AdminEvent_TablePublish({
|
||||||
listPublish,
|
listPublish,
|
||||||
@@ -202,6 +204,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
|||||||
e.id === eventId ? (loading === true ? true : false) : false
|
e.id === eventId ? (loading === true ? true : false) : false
|
||||||
}
|
}
|
||||||
color={"green"}
|
color={"green"}
|
||||||
|
leftIcon={<IconEyeCheck size={20}/>}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setEventId(e.id);
|
setEventId(e.id);
|
||||||
@@ -219,7 +222,21 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<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"
|
position="apart"
|
||||||
bg={"green.4"}
|
bg={"green.4"}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
@@ -234,7 +251,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
|||||||
onSearch(val.currentTarget.value);
|
onSearch(val.currentTarget.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group> */}
|
||||||
|
|
||||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||||
<ScrollArea w={"100%"} h={"90%"}>
|
<ScrollArea w={"100%"} h={"90%"}>
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import { useState } from "react";
|
|||||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||||
import { adminEvent_funGetListReject } from "../fun";
|
import { adminEvent_funGetListReject } from "../fun";
|
||||||
import { AdminEvent_funEditCatatanById } from "../fun/edit/fun_edit_status_reject_by_id";
|
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({
|
export default function AdminEvent_TableReject({
|
||||||
listReject,
|
listReject,
|
||||||
@@ -177,7 +179,21 @@ function TableStatus({ listReject }: { listReject: any }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<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"
|
position="apart"
|
||||||
bg={"red.4"}
|
bg={"red.4"}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
@@ -192,7 +208,7 @@ function TableStatus({ listReject }: { listReject: any }) {
|
|||||||
onSearch(val.currentTarget.value);
|
onSearch(val.currentTarget.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group> */}
|
||||||
|
|
||||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||||
<ScrollArea w={"100%"} h={"90%"}>
|
<ScrollArea w={"100%"} h={"90%"}>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { IRealtimeData } from "@/app/lib/global_state";
|
import { IRealtimeData } from "@/app/lib/global_state";
|
||||||
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
||||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
import { Button, Group, SimpleGrid, Stack } from "@mantine/core";
|
import { Button, Group, SimpleGrid, Stack } from "@mantine/core";
|
||||||
@@ -10,6 +11,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { WibuRealtime } from "wibu-pkg";
|
import { WibuRealtime } from "wibu-pkg";
|
||||||
import { Admin_ComponentModalReport } from "../../_admin_global/_component";
|
import { Admin_ComponentModalReport } from "../../_admin_global/_component";
|
||||||
|
import Admin_ComponentModalPublish from "../../_admin_global/_component/comp_admin_modal_publish";
|
||||||
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
|
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
|
||||||
import { ComponentAdminGlobal_NotifikasiGagal } from "../../_admin_global/admin_notifikasi/notifikasi_gagal";
|
import { ComponentAdminGlobal_NotifikasiGagal } from "../../_admin_global/admin_notifikasi/notifikasi_gagal";
|
||||||
import { ComponentAdminGlobal_NotifikasiPeringatan } from "../../_admin_global/admin_notifikasi/notifikasi_peringatan";
|
import { ComponentAdminGlobal_NotifikasiPeringatan } from "../../_admin_global/admin_notifikasi/notifikasi_peringatan";
|
||||||
@@ -30,7 +32,8 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [data, setData] = useState(dataInvestasi);
|
const [data, setData] = useState(dataInvestasi);
|
||||||
const [publish, setPublish] = useState(true);
|
const [publish, setPublish] = useState(true);
|
||||||
const [openModal, setOpenModal] = useState(false);
|
const [openModalPublish, setOpenModalPublish] = useState(false);
|
||||||
|
const [openModalReject, setOpenModalReject] = useState(false);
|
||||||
const [isLoadingPublish, setIsLoadingPublish] = useState(false);
|
const [isLoadingPublish, setIsLoadingPublish] = useState(false);
|
||||||
const [isLoadingReject, setIsLoadingReject] = useState(false);
|
const [isLoadingReject, setIsLoadingReject] = useState(false);
|
||||||
const [report, setReport] = useState("");
|
const [report, setReport] = useState("");
|
||||||
@@ -82,11 +85,11 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
|
|
||||||
ComponentAdminGlobal_NotifikasiBerhasil(res.message);
|
ComponentAdminGlobal_NotifikasiBerhasil(res.message);
|
||||||
router.back();
|
router.back();
|
||||||
setOpenModal(false);
|
setOpenModalReject(false);
|
||||||
setIsLoadingReject(false);
|
setIsLoadingReject(false);
|
||||||
} else {
|
} else {
|
||||||
ComponentAdminGlobal_NotifikasiGagal(res.message);
|
ComponentAdminGlobal_NotifikasiGagal(res.message);
|
||||||
setOpenModal(false);
|
setOpenModalReject(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +100,7 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
progesInvestasiId: "1",
|
progesInvestasiId: "1",
|
||||||
});
|
});
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
setIsLoadingPublish(true);
|
||||||
const dataNotifikasi: IRealtimeData = {
|
const dataNotifikasi: IRealtimeData = {
|
||||||
appId: res.data?.id as string,
|
appId: res.data?.id as string,
|
||||||
userId: res.data?.authorId as any,
|
userId: res.data?.authorId as any,
|
||||||
@@ -127,11 +131,14 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
setData(loadData as any);
|
setData(loadData as any);
|
||||||
|
|
||||||
ComponentAdminGlobal_NotifikasiBerhasil("Proyek Investasi Di Publish");
|
ComponentAdminGlobal_NotifikasiBerhasil("Proyek Investasi Di Publish");
|
||||||
|
setOpenModalPublish(false);
|
||||||
|
setIsLoadingPublish(false);
|
||||||
router.back();
|
router.back();
|
||||||
// router.push(RouterAdminInvestasi_OLD.table_status_review);
|
// router.push(RouterAdminInvestasi_OLD.table_status_review);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ComponentAdminGlobal_NotifikasiGagal(res.message);
|
ComponentAdminGlobal_NotifikasiGagal(res.message);
|
||||||
|
setOpenModalPublish(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,14 +155,14 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
loading={isLoadingPublish}
|
loading={isLoadingPublish}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
color="green"
|
color="green"
|
||||||
onClick={() => onPublish()}
|
onClick={() => setOpenModalPublish(true)}
|
||||||
>
|
>
|
||||||
Publish
|
Publish
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
color="red"
|
color="red"
|
||||||
onClick={() => setOpenModal(true)}
|
onClick={() => setOpenModalReject(true)}
|
||||||
>
|
>
|
||||||
Reject
|
Reject
|
||||||
</Button>
|
</Button>
|
||||||
@@ -193,18 +200,19 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Admin_ComponentModalReport
|
<Admin_ComponentModalReport
|
||||||
opened={openModal}
|
opened={openModalReject}
|
||||||
onClose={() => setOpenModal(false)}
|
onClose={() => setOpenModalReject(false)}
|
||||||
title="Alasan Penolakan"
|
title="Alasan Penolakan"
|
||||||
onHandlerChange={(val) => setReport(val.target.value)}
|
onHandlerChange={(val) => setReport(val.target.value)}
|
||||||
buttonKiri={
|
buttonKiri={
|
||||||
<Button radius={"xl"} onClick={() => setOpenModal(false)}>
|
<Button radius={"xl"} onClick={() => setOpenModalReject(false)}>
|
||||||
Batal
|
Batal
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
buttonKanan={
|
buttonKanan={
|
||||||
<Button
|
<Button
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
|
bg={MainColor.green}
|
||||||
loading={isLoadingReject}
|
loading={isLoadingReject}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -215,6 +223,29 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Admin_ComponentModalPublish
|
||||||
|
opened={openModalPublish}
|
||||||
|
onClose={() => setOpenModalPublish(false)}
|
||||||
|
title="Anda Yakin Ingin Mempublish Investasi Ini ?"
|
||||||
|
buttonKiri={
|
||||||
|
<Button radius={"xl"} onClick={() => setOpenModalPublish(false)}>
|
||||||
|
Batal
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
buttonKanan={
|
||||||
|
<Button
|
||||||
|
loaderPosition="center"
|
||||||
|
bg={MainColor.green}
|
||||||
|
loading={isLoadingPublish}
|
||||||
|
radius={"xl"}
|
||||||
|
onClick={() => {
|
||||||
|
onPublish();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Simpan
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,13 +15,15 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconSearch } from "@tabler/icons-react";
|
import { IconDetails, IconEye, IconEyeCheck, IconInfoCircle, IconSearch } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||||
import { adminInvestasi_funGetAllPublish } from "../fun/get/get_all_publish";
|
import { adminInvestasi_funGetAllPublish } from "../fun/get/get_all_publish";
|
||||||
|
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||||
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
export default function Admin_TablePublishInvestasi({
|
export default function Admin_TablePublishInvestasi({
|
||||||
dataInvestsi,
|
dataInvestsi,
|
||||||
@@ -111,6 +113,7 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
bg={"green"}
|
bg={"green"}
|
||||||
color="green"
|
color="green"
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
|
leftIcon={<IconEyeCheck size={20} />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIdData(e.id);
|
setIdData(e.id);
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@@ -127,7 +130,21 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Stack spacing={"xs"} h={"100%"}>
|
||||||
<Group
|
<ComponentAdminGlobal_TitlePage
|
||||||
|
name="Publish"
|
||||||
|
color={MainColor.green}
|
||||||
|
component={
|
||||||
|
<TextInput
|
||||||
|
icon={<IconSearch size={20} />}
|
||||||
|
radius={"xl"}
|
||||||
|
placeholder="Cari nama proyek"
|
||||||
|
onChange={(val) => {
|
||||||
|
onSearch(val.currentTarget.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{/* <Group
|
||||||
position="apart"
|
position="apart"
|
||||||
bg={"green.4"}
|
bg={"green.4"}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
@@ -144,7 +161,7 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
onSearch(val.currentTarget.value);
|
onSearch(val.currentTarget.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group> */}
|
||||||
|
|
||||||
{_.isEmpty(data) ? (
|
{_.isEmpty(data) ? (
|
||||||
<ComponentAdminGlobal_IsEmptyData />
|
<ComponentAdminGlobal_IsEmptyData />
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconChevronLeft, IconEdit, IconSearch } from "@tabler/icons-react";
|
import { IconChevronLeft, IconDetails, IconEdit, IconEyeCheck, IconSearch } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -28,6 +28,8 @@ import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data"
|
|||||||
import { adminInvestasi_funGetAllReview } from "../fun/get/get_all_review";
|
import { adminInvestasi_funGetAllReview } from "../fun/get/get_all_review";
|
||||||
import { adminInvestasi_funGetAllReject } from "../fun/get/get_all_reject";
|
import { adminInvestasi_funGetAllReject } from "../fun/get/get_all_reject";
|
||||||
import { RouterAdminInvestasi } from "@/app/lib/router_admin/router_admin_investasi";
|
import { RouterAdminInvestasi } from "@/app/lib/router_admin/router_admin_investasi";
|
||||||
|
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||||
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
export default function Admin_TableRejectInvestasi({
|
export default function Admin_TableRejectInvestasi({
|
||||||
dataInvestsi,
|
dataInvestsi,
|
||||||
@@ -169,7 +171,8 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
<Button
|
<Button
|
||||||
loading={isLoading && idData === e.id}
|
loading={isLoading && idData === e.id}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
color="orange"
|
color="green"
|
||||||
|
leftIcon={<IconEyeCheck size={20}/>}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIdData(e.id);
|
setIdData(e.id);
|
||||||
@@ -187,7 +190,21 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Stack spacing={"xs"} h={"100%"}>
|
||||||
<Group
|
<ComponentAdminGlobal_TitlePage
|
||||||
|
name="Reject"
|
||||||
|
color={MainColor.red}
|
||||||
|
component={
|
||||||
|
<TextInput
|
||||||
|
icon={<IconSearch size={20} />}
|
||||||
|
radius={"xl"}
|
||||||
|
placeholder="Cari nama proyek"
|
||||||
|
onChange={(val) => {
|
||||||
|
onSearch(val.currentTarget.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{/* <Group
|
||||||
position="apart"
|
position="apart"
|
||||||
bg={"red.4"}
|
bg={"red.4"}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
@@ -204,7 +221,7 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
onSearch(val.currentTarget.value);
|
onSearch(val.currentTarget.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group> */}
|
||||||
|
|
||||||
{_.isEmpty(data) ? (
|
{_.isEmpty(data) ? (
|
||||||
<ComponentAdminGlobal_IsEmptyData />
|
<ComponentAdminGlobal_IsEmptyData />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { gs_adminInvestasi_triggerReview } from "@/app/lib/global_state";
|
import { gs_adminInvestasi_triggerReview } from "@/app/lib/global_state";
|
||||||
import { RouterAdminInvestasi_OLD } from "@/app/lib/router_hipmi/router_admin";
|
import { RouterAdminInvestasi_OLD } from "@/app/lib/router_hipmi/router_admin";
|
||||||
import { AccentColor } from "@/app_modules/_global/color";
|
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||||
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
||||||
import {
|
import {
|
||||||
Affix,
|
Affix,
|
||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { IconRefresh, IconSearch } from "@tabler/icons-react";
|
import { IconDetails, IconEyeCheck, IconRefresh, IconSearch } from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -28,6 +28,7 @@ import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamp
|
|||||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||||
import ComponentAdminGlobal_TampilanRupiahDonasi from "../../_admin_global/tampilan_rupiah";
|
import ComponentAdminGlobal_TampilanRupiahDonasi from "../../_admin_global/tampilan_rupiah";
|
||||||
import { adminInvestasi_funGetAllReview } from "../fun/get/get_all_review";
|
import { adminInvestasi_funGetAllReview } from "../fun/get/get_all_review";
|
||||||
|
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||||
|
|
||||||
export default function Admin_TableReviewInvestasi({
|
export default function Admin_TableReviewInvestasi({
|
||||||
dataInvestsi,
|
dataInvestsi,
|
||||||
@@ -132,7 +133,8 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
<Button
|
<Button
|
||||||
loading={isLoading && idData === e.id}
|
loading={isLoading && idData === e.id}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
color="orange"
|
color="green"
|
||||||
|
leftIcon={<IconEyeCheck size={20}/>}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIdData(e.id);
|
setIdData(e.id);
|
||||||
@@ -150,7 +152,21 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Stack spacing={"xs"} h={"100%"}>
|
||||||
<Group
|
<ComponentAdminGlobal_TitlePage
|
||||||
|
name="Review"
|
||||||
|
color={MainColor.orange}
|
||||||
|
component={
|
||||||
|
<TextInput
|
||||||
|
icon={<IconSearch size={20} />}
|
||||||
|
radius={"xl"}
|
||||||
|
placeholder="Cari nama proyek"
|
||||||
|
onChange={(val) => {
|
||||||
|
onSearch(val.currentTarget.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{/* <Group
|
||||||
position="apart"
|
position="apart"
|
||||||
bg={"orange.4"}
|
bg={"orange.4"}
|
||||||
p={"xs"}
|
p={"xs"}
|
||||||
@@ -167,7 +183,7 @@ function TableView({ listData }: { listData: any }) {
|
|||||||
onSearch(val.currentTarget.value);
|
onSearch(val.currentTarget.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group> */}
|
||||||
|
|
||||||
{_.isEmpty(data) ? (
|
{_.isEmpty(data) ? (
|
||||||
<ComponentAdminGlobal_IsEmptyData />
|
<ComponentAdminGlobal_IsEmptyData />
|
||||||
|
|||||||
Reference in New Issue
Block a user