API Detail Publish Event Progresss
This commit is contained in:
105
src/app/api/admin/investasi/[id]/transaksi/route.ts
Normal file
105
src/app/api/admin/investasi/[id]/transaksi/route.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import backendLogger from "@/util/backendLogger";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
|
try {
|
||||||
|
let fixData
|
||||||
|
const { id } = params;
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const page = searchParams.get("page");
|
||||||
|
const status = searchParams.get("status");
|
||||||
|
const takeData = 10;
|
||||||
|
const skipData = Number(page) * takeData - takeData;
|
||||||
|
|
||||||
|
console.log("status >", status)
|
||||||
|
|
||||||
|
if (!page) {
|
||||||
|
|
||||||
|
fixData = await prisma.investasi_Invoice.findMany({
|
||||||
|
orderBy: [
|
||||||
|
{
|
||||||
|
createdAt: "desc",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
where: {
|
||||||
|
investasiId: id,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
Author: true,
|
||||||
|
Images: true,
|
||||||
|
StatusInvoice: true,
|
||||||
|
MasterBank: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
const data = await prisma.investasi_Invoice.findMany({
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
|
orderBy: [
|
||||||
|
{
|
||||||
|
createdAt: "desc",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
where: {
|
||||||
|
investasiId: id,
|
||||||
|
isActive: true,
|
||||||
|
StatusInvoice: {
|
||||||
|
name: {
|
||||||
|
contains: status ? status : "",
|
||||||
|
mode: "insensitive",
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
Author: true,
|
||||||
|
Images: true,
|
||||||
|
StatusInvoice: true,
|
||||||
|
MasterBank: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const nCount = await prisma.investasi_Invoice.count({
|
||||||
|
where: {
|
||||||
|
investasiId: id,
|
||||||
|
isActive: true,
|
||||||
|
StatusInvoice: {
|
||||||
|
name: {
|
||||||
|
contains: status ? status : "",
|
||||||
|
mode: "insensitive",
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = {
|
||||||
|
data: data,
|
||||||
|
nPage: _.ceil(nCount / takeData),
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
success: true,
|
||||||
|
message: "Success get status transaksi",
|
||||||
|
data: fixData
|
||||||
|
},
|
||||||
|
{ status: 200 }
|
||||||
|
)
|
||||||
|
} catch (error) {
|
||||||
|
backendLogger.error("Eror get status transaksi", error);
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Error get status transaksi",
|
||||||
|
reason: (error as Error).message
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export { apiGetMasterBank, apiGetMasterBidangBisnis };
|
export { apiGetMasterBank, apiGetMasterBidangBisnis, apiGetMasterStatusTransaksi };
|
||||||
|
|
||||||
const apiGetMasterBank = async () => {
|
const apiGetMasterBank = async () => {
|
||||||
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||||
@@ -31,3 +31,20 @@ const apiGetMasterBidangBisnis = async () => {
|
|||||||
|
|
||||||
return await respone.json().catch(() => null);
|
return await respone.json().catch(() => null);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const apiGetMasterStatusTransaksi = async () => {
|
||||||
|
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||||
|
if (!token) return await token.json().catch(() => null);
|
||||||
|
|
||||||
|
const response = await fetch(`/api/master/status_transaksi`, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: "application/json",
|
||||||
|
"Access-Control-Allow-Origin": "*",
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return await response.json().catch(() => null);
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@ export {
|
|||||||
apiGetAdminInvestasiCountDashboard,
|
apiGetAdminInvestasiCountDashboard,
|
||||||
apiGetAdminInvestasiByStatus,
|
apiGetAdminInvestasiByStatus,
|
||||||
apiGetAdminInvestasiById,
|
apiGetAdminInvestasiById,
|
||||||
|
apiGetAdminAllTransaksiById,
|
||||||
|
apiGetAdminStatusTransaksi
|
||||||
|
|
||||||
}
|
}
|
||||||
const apiGetAdminInvestasiCountDashboard = async ({ name }:
|
const apiGetAdminInvestasiCountDashboard = async ({ name }:
|
||||||
@@ -69,6 +71,40 @@ const apiGetAdminInvestasiById = async ({id} : {id: string}) => {
|
|||||||
return await response.json().catch(() => null);
|
return await response.json().catch(() => null);
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiGetAdminAllTransaksiById = async () => {
|
const apiGetAdminAllTransaksiById = async ({id, page, status} : {id: string, page: string, status?: string}) => {
|
||||||
|
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||||
|
if (!token) return await token.json().catch(() => null);
|
||||||
|
|
||||||
|
const isStatus = status ? `&status=${status}` : "";
|
||||||
|
|
||||||
|
|
||||||
|
const isPage = page ? `?page=${page}` : "";
|
||||||
|
const response = await fetch(`/api/admin/investasi/${id}/transaksi${isPage}${isStatus}`, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: "application/json",
|
||||||
|
"Access-Control-Allow-Origin": "*",
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return await response.json().catch(() => null);
|
||||||
|
}
|
||||||
|
|
||||||
|
const apiGetAdminStatusTransaksi = async () => {
|
||||||
|
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||||
|
if (!token) return await token.json().catch(() => null);
|
||||||
|
|
||||||
|
const response = await fetch(`/api/master/status_transaksi`, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: "application/json",
|
||||||
|
"Access-Control-Allow-Origin": "*",
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return await response.json().catch(() => null);
|
||||||
}
|
}
|
||||||
@@ -14,11 +14,12 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
Stack,
|
Stack,
|
||||||
Table,
|
Table,
|
||||||
|
Text,
|
||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconReload } from "@tabler/icons-react";
|
import { IconReload } from "@tabler/icons-react";
|
||||||
import { isEmpty } from "lodash";
|
import { isEmpty } from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useParams, useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import {
|
import {
|
||||||
AdminInvestasi_ComponentButtonBandingTransaksi,
|
AdminInvestasi_ComponentButtonBandingTransaksi,
|
||||||
@@ -27,142 +28,195 @@ import {
|
|||||||
} from "../../_component";
|
} from "../../_component";
|
||||||
import { adminInvestasi_funGetAllTransaksiById } from "../../fun";
|
import { adminInvestasi_funGetAllTransaksiById } from "../../fun";
|
||||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||||
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
|
import { apiGetAdminAllTransaksiById, apiGetAdminStatusTransaksi } from "../../_lib/api_fetch_admin_investasi";
|
||||||
|
import { clientLogger } from "@/util/clientLogger";
|
||||||
|
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||||
|
import { apiGetMasterStatusTransaksi } from "@/app_modules/_global/lib/api_master";
|
||||||
|
|
||||||
export function AdminInvestasi_ViewDaftarTransaksi({
|
export function AdminInvestasi_ViewDaftarTransaksi() {
|
||||||
dataTransaksi,
|
const params = useParams<{ id: string }>();
|
||||||
statusTransaksi,
|
const investasiId = params.id;
|
||||||
investasiId,
|
|
||||||
}: {
|
|
||||||
dataTransaksi: any;
|
|
||||||
statusTransaksi: MODEL_STATUS_INVOICE_INVESTASI[];
|
|
||||||
investasiId: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [isLoading, setLoading] = useState(false);
|
const [isLoading, setLoading] = useState(false);
|
||||||
const [idData, setIdData] = useState("");
|
const [idData, setIdData] = useState("");
|
||||||
const [listStatsus, setListStatus] = useState(statusTransaksi);
|
const [listStatus, setListStatus] = useState<MODEL_STATUS_INVOICE_INVESTASI[] | null>(null);
|
||||||
|
|
||||||
const [data, setData] = useState<MODEL_INVOICE_INVESTASI[]>(
|
const [data, setData] = useState<MODEL_INVOICE_INVESTASI[] | null>(null);
|
||||||
dataTransaksi.data
|
const [isNPage, setNPage] = useState<number>(1);
|
||||||
);
|
|
||||||
const [isNPage, setNPage] = useState(dataTransaksi.nPage);
|
|
||||||
const [isActivePage, setActivePage] = useState(1);
|
const [isActivePage, setActivePage] = useState(1);
|
||||||
const [selectedStatus, setSelectedStatus] = useState("");
|
const [selectedStatus, setSelectedStatus] = useState("");
|
||||||
|
|
||||||
async function onPageClick(p: any) {
|
useShallowEffect(() => {
|
||||||
setActivePage(p);
|
loadInitialData();
|
||||||
const loadData = await adminInvestasi_funGetAllTransaksiById({
|
}, [isActivePage, selectedStatus])
|
||||||
investasiId: investasiId,
|
|
||||||
page: p,
|
useShallowEffect(() => {
|
||||||
});
|
loadStatus();
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const loadInitialData = async () => {
|
||||||
|
try {
|
||||||
|
const response = await apiGetAdminAllTransaksiById({
|
||||||
|
id: investasiId,
|
||||||
|
page: `${isNPage}`,
|
||||||
|
status: selectedStatus,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (response?.success && response?.data?.data) {
|
||||||
|
setData(response.data.data);
|
||||||
|
setNPage(response.nPage || 1);
|
||||||
|
setListStatus(response.data.data);
|
||||||
|
} else {
|
||||||
|
console.error("Invalid data format received:", response);
|
||||||
|
setData([]);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
clientLogger.error("Error get data daftar tramnsaksi", error);
|
||||||
|
setData([]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const loadStatus = async () => {
|
||||||
|
try {
|
||||||
|
const response = await apiGetMasterStatusTransaksi()
|
||||||
|
|
||||||
|
if (response?.success && response?.data) {
|
||||||
|
setListStatus(response.data);
|
||||||
|
console.log("status", response.data)
|
||||||
|
} else {
|
||||||
|
console.error("Invalid data format received:", response);
|
||||||
|
setListStatus(null);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
clientLogger.error("Error get status transaksi", error);
|
||||||
|
setListStatus(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const onPageClick = async (page: number) => {
|
||||||
|
const loadData = await apiGetAdminAllTransaksiById({
|
||||||
|
id: investasiId,
|
||||||
|
page: `${isNPage}`
|
||||||
|
})
|
||||||
|
setActivePage(page);
|
||||||
setData(loadData.data as any);
|
setData(loadData.data as any);
|
||||||
setNPage(loadData.nPage);
|
setNPage(loadData.nPage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSelected(selectStatus: any) {
|
async function onSelected(selectStatus: any) {
|
||||||
setSelectedStatus(selectStatus);
|
setSelectedStatus(selectStatus);
|
||||||
const loadData = await adminInvestasi_funGetAllTransaksiById({
|
// const loadData = await apiGetAdminStatusTransaksi();
|
||||||
investasiId: investasiId,
|
// setData(loadData.data as any);
|
||||||
page: isActivePage,
|
// setNPage(loadData.nPage);
|
||||||
selectStatus: selectStatus,
|
|
||||||
});
|
|
||||||
setData(loadData.data as any);
|
|
||||||
setNPage(loadData.nPage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onReload() {
|
async function onReload() {
|
||||||
const loadData = await adminInvestasi_funGetAllTransaksiById({
|
const loadData = await apiGetAdminAllTransaksiById({
|
||||||
investasiId: investasiId,
|
id: investasiId,
|
||||||
page: 1,
|
page: '1'
|
||||||
});
|
});
|
||||||
setData(loadData.data as any);
|
setData(loadData.data as any);
|
||||||
setNPage(loadData.nPage);
|
setNPage(loadData.nPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableRows = data?.map((e, i) => (
|
const renderTableBody = () => {
|
||||||
<tr key={i}>
|
if (!Array.isArray(data) || data.length === 0) {
|
||||||
<td>
|
return (
|
||||||
<Center c={AdminColor.white}>{e?.Author.username}</Center>
|
<tr>
|
||||||
</td>
|
<td colSpan={12}>
|
||||||
<td>
|
<Center>
|
||||||
<Center c={AdminColor.white}>{e?.MasterBank.namaBank}</Center>
|
<Text color="gray">Tidak ada data</Text>
|
||||||
</td>
|
</Center>
|
||||||
<td>
|
</td>
|
||||||
<Center c={AdminColor.white}>
|
</tr>
|
||||||
<ComponentAdminGlobal_TampilanRupiah nominal={+e?.nominal} />
|
);
|
||||||
</Center>
|
}
|
||||||
</td>
|
return data?.map((e, i) => (
|
||||||
<td>
|
<tr key={i}>
|
||||||
<Center c={AdminColor.white}>
|
<td>
|
||||||
{new Intl.NumberFormat("id-ID", { maximumFractionDigits: 10 }).format(
|
<Center c={AdminColor.white}>{e?.Author?.username}</Center>
|
||||||
+e?.lembarTerbeli
|
</td>
|
||||||
)}
|
<td>
|
||||||
</Center>
|
<Center c={AdminColor.white}>{e?.MasterBank?.namaBank}</Center>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center c={AdminColor.white}>
|
<Center c={AdminColor.white}>
|
||||||
{new Intl.DateTimeFormat("id-ID", { dateStyle: "full" }).format(
|
<ComponentAdminGlobal_TampilanRupiah nominal={+e?.nominal} />
|
||||||
e?.createdAt
|
</Center>
|
||||||
)}
|
</td>
|
||||||
</Center>
|
<td>
|
||||||
</td>
|
<Center c={AdminColor.white}>
|
||||||
<td>
|
{new Intl.NumberFormat("id-ID", { maximumFractionDigits: 10 }).format(
|
||||||
<Center>
|
+e?.lembarTerbeli
|
||||||
<Badge
|
)}
|
||||||
w={150}
|
</Center>
|
||||||
variant="light"
|
</td>
|
||||||
color={
|
<td>
|
||||||
e.statusInvoiceId === "1"
|
<Center c={AdminColor.white}>
|
||||||
? "green"
|
{new Intl.DateTimeFormat("id-ID", { dateStyle: "full" }).format(new Date(e?.createdAt))}
|
||||||
: e.statusInvoiceId === "4"
|
</Center>
|
||||||
? "red"
|
</td>
|
||||||
: "blue"
|
<td>
|
||||||
}
|
<Center>
|
||||||
>
|
<Badge
|
||||||
{e?.StatusInvoice?.name}
|
w={150}
|
||||||
</Badge>
|
variant="light"
|
||||||
</Center>
|
color={
|
||||||
</td>
|
e.statusInvoiceId === "1"
|
||||||
<td>
|
? "green"
|
||||||
<Center>
|
: e.statusInvoiceId === "4"
|
||||||
{e?.statusInvoiceId !== "3" ? (
|
? "red"
|
||||||
<AdminInvestasi_ComponentCekBuktiTransfer imageId={e?.imageId} />
|
: "blue"
|
||||||
) : (
|
}
|
||||||
"-"
|
>
|
||||||
)}
|
{e?.StatusInvoice?.name}
|
||||||
</Center>
|
</Badge>
|
||||||
</td>
|
</Center>
|
||||||
<td>
|
</td>
|
||||||
<Center>
|
<td>
|
||||||
{e.statusInvoiceId === "1" && "-"}
|
<Center>
|
||||||
{e.statusInvoiceId === "2" && (
|
{e?.statusInvoiceId !== "3" ? (
|
||||||
<AdminInvestasi_ComponentButtonKonfirmasiTransaksi
|
<AdminInvestasi_ComponentCekBuktiTransfer imageId={e?.imageId} />
|
||||||
invoiceId={e.id}
|
) : (
|
||||||
investasiId={investasiId}
|
"-"
|
||||||
lembarTerbeli={e.lembarTerbeli}
|
)}
|
||||||
onLoadData={(val) => {
|
</Center>
|
||||||
setData(val.data);
|
</td>
|
||||||
setNPage(val.nPage);
|
<td>
|
||||||
}}
|
<Center>
|
||||||
/>
|
{e.statusInvoiceId === "1" && "-"}
|
||||||
)}
|
{e.statusInvoiceId === "2" && (
|
||||||
{e.statusInvoiceId === "3" && "-"}
|
<AdminInvestasi_ComponentButtonKonfirmasiTransaksi
|
||||||
{e.statusInvoiceId === "4" && (
|
invoiceId={e.id}
|
||||||
<AdminInvestasi_ComponentButtonBandingTransaksi
|
investasiId={investasiId}
|
||||||
|
lembarTerbeli={e.lembarTerbeli}
|
||||||
invoiceId={e.id}
|
onLoadData={(val) => {
|
||||||
investasiId={investasiId}
|
setData(val.data);
|
||||||
lembarTerbeli={e.lembarTerbeli}
|
setNPage(val.nPage);
|
||||||
onLoadData={(val) => {
|
}}
|
||||||
setData(val.data);
|
/>
|
||||||
setNPage(val.nPage);
|
)}
|
||||||
}}
|
{e.statusInvoiceId === "3" && "-"}
|
||||||
/>
|
{e.statusInvoiceId === "4" && (
|
||||||
)}
|
<AdminInvestasi_ComponentButtonBandingTransaksi
|
||||||
</Center>
|
|
||||||
</td>
|
invoiceId={e.id}
|
||||||
</tr>
|
investasiId={investasiId}
|
||||||
));
|
lembarTerbeli={e.lembarTerbeli}
|
||||||
|
onLoadData={(val) => {
|
||||||
|
setData(val.data);
|
||||||
|
setNPage(val.nPage);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Center>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -184,15 +238,12 @@ export function AdminInvestasi_ViewDaftarTransaksi({
|
|||||||
<Select
|
<Select
|
||||||
placeholder="Pilih status"
|
placeholder="Pilih status"
|
||||||
value={selectedStatus}
|
value={selectedStatus}
|
||||||
data={
|
data={listStatus?.map(status => ({
|
||||||
isEmpty(listStatsus)
|
value: status.id,
|
||||||
? []
|
label: status.name,
|
||||||
: listStatsus.map((e) => ({
|
})) || []}
|
||||||
value: e.id,
|
|
||||||
label: e.name,
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
onChange={(val: any) => {
|
onChange={(val: any) => {
|
||||||
|
console.log(val)
|
||||||
onSelected(val);
|
onSelected(val);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -234,57 +285,60 @@ export function AdminInvestasi_ViewDaftarTransaksi({
|
|||||||
</Group>
|
</Group>
|
||||||
</Group> */}
|
</Group> */}
|
||||||
|
|
||||||
<Paper bg={AdminColor.softBlue} p={"md"} shadow="lg" h={"80vh"}>
|
{!data ? (<CustomSkeleton height={"80vh"} width={"100%"} />) : (
|
||||||
<ScrollArea w={"100%"} h={"90%"}>
|
<Paper bg={AdminColor.softBlue} p={"md"} shadow="lg" h={"80vh"}>
|
||||||
<Table
|
<ScrollArea w={"100%"} h={"90%"}>
|
||||||
verticalSpacing={"xl"}
|
<Table
|
||||||
horizontalSpacing={"md"}
|
verticalSpacing={"xl"}
|
||||||
p={"md"}
|
horizontalSpacing={"md"}
|
||||||
w={1500}
|
p={"md"}
|
||||||
>
|
w={1500}
|
||||||
<thead>
|
>
|
||||||
<tr>
|
<thead>
|
||||||
<th>
|
<tr>
|
||||||
<Center c={AdminColor.white}>Nama Investor</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Nama Investor</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Nama Bank</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Nama Bank</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Jumlah Investasi</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Jumlah Investasi</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Lembar Terbeli</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Lembar Terbeli</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Tanggal</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Tanggal</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Status</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Status</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Bukti Transfer</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Bukti Transfer</Center>
|
||||||
<th>
|
</th>
|
||||||
<Center c={AdminColor.white}>Aksi</Center>
|
<th>
|
||||||
</th>
|
<Center c={AdminColor.white}>Aksi</Center>
|
||||||
</tr>
|
</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>{tableRows}</tbody>
|
</thead>
|
||||||
</Table>
|
<tbody>{renderTableBody()}</tbody>
|
||||||
</ScrollArea>
|
</Table>
|
||||||
|
</ScrollArea>
|
||||||
|
|
||||||
<Center mt={"xl"}>
|
<Center mt={"xl"}>
|
||||||
<Pagination
|
<Pagination
|
||||||
value={isActivePage}
|
value={isActivePage}
|
||||||
total={isNPage}
|
total={isNPage}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
onPageClick(val);
|
onPageClick(val);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Center>
|
</Center>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,9 +88,6 @@ export function AdminInvestasi_DetailPublish({
|
|||||||
) : null}
|
) : null}
|
||||||
{selectPage == "2" ? (
|
{selectPage == "2" ? (
|
||||||
<AdminInvestasi_ViewDaftarTransaksi
|
<AdminInvestasi_ViewDaftarTransaksi
|
||||||
dataTransaksi={dataTransaksi}
|
|
||||||
statusTransaksi={statusTransaksi}
|
|
||||||
investasiId={params.id}
|
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user