Perbaikan Tabel

This commit is contained in:
2025-03-04 12:13:58 +08:00
parent b71ced595a
commit 4ee88d10b0
9 changed files with 60 additions and 59 deletions

View File

@@ -147,7 +147,7 @@ function TampilanListDonatur({ setReloadDonasi, donasi, isReload }: { setReloadD
</td> </td>
<td> <td>
<Center > <Center >
<Badge c={AccentColor.white} w={150} variant="dot"> <Badge c={AccentColor.white} variant="dot">
{e?.DonasiMaster_StatusInvoice?.name} {e?.DonasiMaster_StatusInvoice?.name}
</Badge> </Badge>
</Center> </Center>
@@ -251,7 +251,7 @@ function TampilanListDonatur({ setReloadDonasi, donasi, isReload }: { setReloadD
verticalSpacing={"xl"} verticalSpacing={"xl"}
horizontalSpacing={"md"} horizontalSpacing={"md"}
p={"md"} p={"md"}
w={1500} w={1120}
> >
<thead> <thead>
<tr> <tr>

View File

@@ -36,7 +36,7 @@ function TampilanListPencairan({
<Text>{e.title}</Text> <Text>{e.title}</Text>
</Center> </Center>
</td> </td>
<td width={500}> <td>
<Box w={"100%"}> <Box w={"100%"}>
<Spoiler c={AdminColor.white} hideLabel="Sembunyikan" maxHeight={70} showLabel="Lihat"> <Spoiler c={AdminColor.white} hideLabel="Sembunyikan" maxHeight={70} showLabel="Lihat">
{e.deskripsi} {e.deskripsi}
@@ -106,7 +106,7 @@ function TampilanListPencairan({
verticalSpacing={"xl"} verticalSpacing={"xl"}
horizontalSpacing={"md"} horizontalSpacing={"md"}
p={"md"} p={"md"}
w={1500} w={1100}
> >
<thead> <thead>

View File

@@ -183,7 +183,7 @@ function TableStatus() {
verticalSpacing={"md"} verticalSpacing={"md"}
horizontalSpacing={"md"} horizontalSpacing={"md"}
p={"md"} p={"md"}
w={1500} w={1120}
> >
<thead> <thead>

View File

@@ -185,7 +185,7 @@ function TableStatus() {
verticalSpacing={"md"} verticalSpacing={"md"}
horizontalSpacing={"md"} horizontalSpacing={"md"}
p={"md"} p={"md"}
w={1500} w={1125}
> >
<thead> <thead>

View File

@@ -221,7 +221,7 @@ function TableStatus() {
verticalSpacing={"md"} verticalSpacing={"md"}
horizontalSpacing={"md"} horizontalSpacing={"md"}
p={"md"} p={"md"}
w={1500} w={1120}
h={"100%"} h={"100%"}
> >

View File

@@ -14,6 +14,7 @@ import { clientLogger } from "@/util/clientLogger";
import { import {
ActionIcon, ActionIcon,
Badge, Badge,
Button,
Center, Center,
Group, Group,
Pagination, Pagination,
@@ -25,7 +26,7 @@ import {
Text, Text,
} from "@mantine/core"; } from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks"; import { useShallowEffect } from "@mantine/hooks";
import { IconReload } from "@tabler/icons-react"; import { IconEyeCheck, IconReload } from "@tabler/icons-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";
import { useState } from "react"; import { useState } from "react";
import { import {
@@ -46,6 +47,8 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
const [isNPage, setNPage] = useState<number>(1); const [isNPage, setNPage] = useState<number>(1);
const [isActivePage, setActivePage] = useState(1); const [isActivePage, setActivePage] = useState(1);
const [selectedStatus, setSelectedStatus] = useState(""); const [selectedStatus, setSelectedStatus] = useState("");
const [isLoading, setLoading] = useState(false);
const [idData, setIdData] = useState("");
useShallowEffect(() => { useShallowEffect(() => {
handleLoadData(); handleLoadData();
@@ -123,21 +126,11 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
<td> <td>
<Center c={AdminColor.white}>{e?.Author?.username}</Center> <Center c={AdminColor.white}>{e?.Author?.username}</Center>
</td> </td>
<td>
<Center c={AdminColor.white}>{e?.MasterBank?.namaBank}</Center>
</td>
<td> <td>
<Center c={AdminColor.white}> <Center c={AdminColor.white}>
<ComponentAdminGlobal_TampilanRupiah nominal={+e?.nominal} /> <ComponentAdminGlobal_TampilanRupiah nominal={+e?.nominal} />
</Center> </Center>
</td> </td>
<td>
<Center c={AdminColor.white}>
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+e?.lembarTerbeli)}
</Center>
</td>
<td> <td>
<Center c={AdminColor.white}> <Center c={AdminColor.white}>
{new Intl.DateTimeFormat("id-ID", { dateStyle: "full" }).format( {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> </Center>
</td> </td>
</tr> </tr>
@@ -249,22 +256,16 @@ export function AdminInvestasi_ViewDaftarTransaksi() {
verticalSpacing={"xl"} verticalSpacing={"xl"}
horizontalSpacing={"md"} horizontalSpacing={"md"}
p={"md"} p={"md"}
w={1500} w={1100}
> >
<thead> <thead>
<tr> <tr>
<th> <th>
<Center c={AdminColor.white}>Nama Investor</Center> <Center c={AdminColor.white}>Nama Investor</Center>
</th> </th>
<th>
<Center c={AdminColor.white}>Nama Bank</Center>
</th>
<th> <th>
<Center c={AdminColor.white}>Jumlah Investasi</Center> <Center c={AdminColor.white}>Jumlah Investasi</Center>
</th> </th>
<th>
<Center c={AdminColor.white}>Lembar Terbeli</Center>
</th>
<th> <th>
<Center c={AdminColor.white}>Tanggal</Center> <Center c={AdminColor.white}>Tanggal</Center>
</th> </th>

View File

@@ -114,47 +114,47 @@ function TableView() {
return data.map((e, i) => ( return data.map((e, i) => (
<tr key={i}> <tr key={i}>
<td> <td>
<Center w={200}> <Center >
<Text c={AccentColor.white} lineClamp={1}> <Text c={AccentColor.white} lineClamp={1}>
{e.author.username} {e.author.username}
</Text> </Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center w={400}> <Center >
<Text c={AccentColor.white} lineClamp={1}> <Text c={AccentColor.white} lineClamp={1}>
{e.title} {e.title}
</Text> </Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
{_.toNumber(e.progress).toFixed(2)} % {_.toNumber(e.progress).toFixed(2)} %
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
{new Intl.NumberFormat("id-ID", { {new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10, maximumFractionDigits: 10,
}).format(+e.sisaLembar)} }).format(+e.sisaLembar)}
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
{new Intl.NumberFormat("id-ID", { {new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10, maximumFractionDigits: 10,
}).format(+e.totalLembar)} }).format(+e.totalLembar)}
</Center> </Center>
</td> </td>
<td> <td>
<Center w={200}> <Center >
<Text c={AccentColor.white} lineClamp={1}> <Text c={AccentColor.white} lineClamp={1}>
{e.Investasi_Invoice.length} {e.Investasi_Invoice.length}
</Text> </Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center w={200}> <Center >
<Button <Button
loading={isLoading && idData === e.id} loading={isLoading && idData === e.id}
loaderPosition="center" loaderPosition="center"
@@ -227,37 +227,37 @@ function TableView() {
<thead> <thead>
<tr> <tr>
<th> <th>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
Username Username
</Center> </Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={400}> <Center c={AccentColor.white} >
Nama Proyek Nama Proyek
</Center> </Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
Progres Progres
</Center> </Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
Sisa Saham Sisa Saham
</Center> </Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
Total Saham Total Saham
</Center> </Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
Validasi Validasi
</Center> </Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
Aksi Aksi
</Center> </Center>
</th> </th>

View File

@@ -173,23 +173,23 @@ function TableView() {
return data.map((e, i) => ( return data.map((e, i) => (
<tr key={i}> <tr key={i}>
<td> <td>
<Center w={200}> <Center >
<Text c={AccentColor.white} lineClamp={1}>{e.author.username}</Text> <Text c={AccentColor.white} lineClamp={1}>{e.author.username}</Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center w={400}> <Center >
<Text c={AccentColor.white} lineClamp={1}>{e.title}</Text> <Text c={AccentColor.white} lineClamp={1}>{e.title}</Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center w={400}> <Center >
<Text c={AccentColor.white} lineClamp={1}>{e.catatan}</Text> <Text c={AccentColor.white} lineClamp={1}>{e.catatan}</Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center w={200}> <Center >
<Button <Button
loading={isLoading && idData === e.id} loading={isLoading && idData === e.id}
loaderPosition="center" loaderPosition="center"
@@ -264,16 +264,16 @@ function TableView() {
<thead> <thead>
<tr> <tr>
<th> <th>
<Center c={AccentColor.white} w={200}>Username</Center> <Center c={AccentColor.white} >Username</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={400}>Nama Proyek</Center> <Center c={AccentColor.white} >Nama Proyek</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={400}>Catatan Penolakan</Center> <Center c={AccentColor.white} >Catatan Penolakan</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}>Aksi</Center> <Center c={AccentColor.white} >Aksi</Center>
</th> </th>
</tr> </tr>
</thead> </thead>

View File

@@ -113,36 +113,36 @@ function TableView() {
return data.map((e, i) => ( return data.map((e, i) => (
<tr key={i}> <tr key={i}>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
<Text lineClamp={1}>{e.author.username}</Text> <Text lineClamp={1}>{e.author.username}</Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={400}> <Center c={AccentColor.white} >
<Text lineClamp={1}>{e.title}</Text> <Text lineClamp={1}>{e.title}</Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
<Text lineClamp={1}>{e.roi} %</Text> <Text lineClamp={1}>{e.roi} %</Text>
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
<ComponentAdminGlobal_TampilanRupiahDonasi <ComponentAdminGlobal_TampilanRupiahDonasi
nominal={_.toNumber(e.targetDana)} nominal={_.toNumber(e.targetDana)}
/> />
</Center> </Center>
</td> </td>
<td> <td>
<Center c={AccentColor.white} w={200}> <Center c={AccentColor.white} >
<ComponentAdminGlobal_TampilanRupiahDonasi <ComponentAdminGlobal_TampilanRupiahDonasi
nominal={_.toNumber(e.hargaLembar)} nominal={_.toNumber(e.hargaLembar)}
/> />
</Center> </Center>
</td> </td>
<td> <td>
<Center w={200}> <Center >
<Button <Button
loading={isLoading && idData === e.id} loading={isLoading && idData === e.id}
loaderPosition="center" loaderPosition="center"
@@ -238,23 +238,23 @@ function TableView() {
<thead> <thead>
<tr> <tr>
<th> <th>
<Center c={AccentColor.white} w={200}>Username</Center> <Center c={AccentColor.white} >Username</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={400}>Nama Proyek</Center> <Center c={AccentColor.white} >Nama Proyek</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}>ROI</Center> <Center c={AccentColor.white} >ROI</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}>Target Dana</Center> <Center c={AccentColor.white} >Target Dana</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}>Harga Perlembar</Center> <Center c={AccentColor.white} >Harga Perlembar</Center>
</th> </th>
<th> <th>
<Center c={AccentColor.white} w={200}>Aksi</Center> <Center c={AccentColor.white} >Aksi</Center>
</th> </th>
</tr> </tr>
</thead> </thead>