Perbaikan Tabel
This commit is contained in:
@@ -147,7 +147,7 @@ function TampilanListDonatur({ setReloadDonasi, donasi, isReload }: { setReloadD
|
||||
</td>
|
||||
<td>
|
||||
<Center >
|
||||
<Badge c={AccentColor.white} w={150} variant="dot">
|
||||
<Badge c={AccentColor.white} variant="dot">
|
||||
{e?.DonasiMaster_StatusInvoice?.name}
|
||||
</Badge>
|
||||
</Center>
|
||||
@@ -251,7 +251,7 @@ function TampilanListDonatur({ setReloadDonasi, donasi, isReload }: { setReloadD
|
||||
verticalSpacing={"xl"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={1500}
|
||||
w={1120}
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -36,7 +36,7 @@ function TampilanListPencairan({
|
||||
<Text>{e.title}</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td width={500}>
|
||||
<td>
|
||||
<Box w={"100%"}>
|
||||
<Spoiler c={AdminColor.white} hideLabel="Sembunyikan" maxHeight={70} showLabel="Lihat">
|
||||
{e.deskripsi}
|
||||
@@ -106,7 +106,7 @@ function TampilanListPencairan({
|
||||
verticalSpacing={"xl"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={1500}
|
||||
w={1100}
|
||||
|
||||
>
|
||||
<thead>
|
||||
|
||||
@@ -183,7 +183,7 @@ function TableStatus() {
|
||||
verticalSpacing={"md"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={1500}
|
||||
w={1120}
|
||||
|
||||
>
|
||||
<thead>
|
||||
|
||||
@@ -185,7 +185,7 @@ function TableStatus() {
|
||||
verticalSpacing={"md"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={1500}
|
||||
w={1125}
|
||||
|
||||
>
|
||||
<thead>
|
||||
|
||||
@@ -221,7 +221,7 @@ function TableStatus() {
|
||||
verticalSpacing={"md"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={1500}
|
||||
w={1120}
|
||||
h={"100%"}
|
||||
|
||||
>
|
||||
|
||||
@@ -14,6 +14,7 @@ import { clientLogger } from "@/util/clientLogger";
|
||||
import {
|
||||
ActionIcon,
|
||||
Badge,
|
||||
Button,
|
||||
Center,
|
||||
Group,
|
||||
Pagination,
|
||||
@@ -25,7 +26,7 @@ import {
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { IconReload } from "@tabler/icons-react";
|
||||
import { IconEyeCheck, IconReload } from "@tabler/icons-react";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import {
|
||||
@@ -46,6 +47,8 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
|
||||
const [isNPage, setNPage] = useState<number>(1);
|
||||
const [isActivePage, setActivePage] = useState(1);
|
||||
const [selectedStatus, setSelectedStatus] = useState("");
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [idData, setIdData] = useState("");
|
||||
|
||||
useShallowEffect(() => {
|
||||
handleLoadData();
|
||||
@@ -123,21 +126,11 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
|
||||
<td>
|
||||
<Center c={AdminColor.white}>{e?.Author?.username}</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AdminColor.white}>{e?.MasterBank?.namaBank}</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AdminColor.white}>
|
||||
<ComponentAdminGlobal_TampilanRupiah nominal={+e?.nominal} />
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AdminColor.white}>
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
maximumFractionDigits: 10,
|
||||
}).format(+e?.lembarTerbeli)}
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AdminColor.white}>
|
||||
{new Intl.DateTimeFormat("id-ID", { dateStyle: "full" }).format(
|
||||
@@ -197,6 +190,20 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
loading={isLoading && idData == e.id}
|
||||
loaderPosition="center"
|
||||
color="blue"
|
||||
leftIcon={<IconEyeCheck size={20} />}
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
setIdData(e.id);
|
||||
setLoading(true);
|
||||
|
||||
}}
|
||||
>
|
||||
Detail
|
||||
</Button>
|
||||
</Center>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -249,22 +256,16 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
|
||||
verticalSpacing={"xl"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={1500}
|
||||
w={1100}
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center c={AdminColor.white}>Nama Investor</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}>Lembar Terbeli</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AdminColor.white}>Tanggal</Center>
|
||||
</th>
|
||||
|
||||
@@ -114,47 +114,47 @@ function TableView() {
|
||||
return data.map((e, i) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Center >
|
||||
<Text c={AccentColor.white} lineClamp={1}>
|
||||
{e.author.username}
|
||||
</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={400}>
|
||||
<Center >
|
||||
<Text c={AccentColor.white} lineClamp={1}>
|
||||
{e.title}
|
||||
</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
{_.toNumber(e.progress).toFixed(2)} %
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
maximumFractionDigits: 10,
|
||||
}).format(+e.sisaLembar)}
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
maximumFractionDigits: 10,
|
||||
}).format(+e.totalLembar)}
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Center >
|
||||
<Text c={AccentColor.white} lineClamp={1}>
|
||||
{e.Investasi_Invoice.length}
|
||||
</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Center >
|
||||
<Button
|
||||
loading={isLoading && idData === e.id}
|
||||
loaderPosition="center"
|
||||
@@ -227,37 +227,37 @@ function TableView() {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
Username
|
||||
</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={400}>
|
||||
<Center c={AccentColor.white} >
|
||||
Nama Proyek
|
||||
</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
Progres
|
||||
</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
Sisa Saham
|
||||
</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
Total Saham
|
||||
</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
Validasi
|
||||
</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
Aksi
|
||||
</Center>
|
||||
</th>
|
||||
|
||||
@@ -173,23 +173,23 @@ function TableView() {
|
||||
return data.map((e, i) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Center >
|
||||
<Text c={AccentColor.white} lineClamp={1}>{e.author.username}</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={400}>
|
||||
<Center >
|
||||
<Text c={AccentColor.white} lineClamp={1}>{e.title}</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={400}>
|
||||
<Center >
|
||||
<Text c={AccentColor.white} lineClamp={1}>{e.catatan}</Text>
|
||||
</Center>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Center >
|
||||
<Button
|
||||
loading={isLoading && idData === e.id}
|
||||
loaderPosition="center"
|
||||
@@ -264,16 +264,16 @@ function TableView() {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>Username</Center>
|
||||
<Center c={AccentColor.white} >Username</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={400}>Nama Proyek</Center>
|
||||
<Center c={AccentColor.white} >Nama Proyek</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={400}>Catatan Penolakan</Center>
|
||||
<Center c={AccentColor.white} >Catatan Penolakan</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>Aksi</Center>
|
||||
<Center c={AccentColor.white} >Aksi</Center>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -113,36 +113,36 @@ function TableView() {
|
||||
return data.map((e, i) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
<Text lineClamp={1}>{e.author.username}</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={400}>
|
||||
<Center c={AccentColor.white} >
|
||||
<Text lineClamp={1}>{e.title}</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
<Text lineClamp={1}>{e.roi} %</Text>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
<ComponentAdminGlobal_TampilanRupiahDonasi
|
||||
nominal={_.toNumber(e.targetDana)}
|
||||
/>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center c={AccentColor.white} w={200}>
|
||||
<Center c={AccentColor.white} >
|
||||
<ComponentAdminGlobal_TampilanRupiahDonasi
|
||||
nominal={_.toNumber(e.hargaLembar)}
|
||||
/>
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={200}>
|
||||
<Center >
|
||||
<Button
|
||||
loading={isLoading && idData === e.id}
|
||||
loaderPosition="center"
|
||||
@@ -238,23 +238,23 @@ function TableView() {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>Username</Center>
|
||||
<Center c={AccentColor.white} >Username</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={400}>Nama Proyek</Center>
|
||||
<Center c={AccentColor.white} >Nama Proyek</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>ROI</Center>
|
||||
<Center c={AccentColor.white} >ROI</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>Target Dana</Center>
|
||||
<Center c={AccentColor.white} >Target Dana</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>Harga Perlembar</Center>
|
||||
<Center c={AccentColor.white} >Harga Perlembar</Center>
|
||||
</th>
|
||||
|
||||
<th>
|
||||
<Center c={AccentColor.white} w={200}>Aksi</Center>
|
||||
<Center c={AccentColor.white} >Aksi</Center>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user