fix ui dashboard & event

This commit is contained in:
2025-01-28 21:26:33 +08:00
parent 93874478ac
commit 22fa1e8bcd
18 changed files with 137 additions and 96 deletions

View File

@@ -1,3 +1,4 @@
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import { MODEL_USER } from "@/app_modules/home/model/interface";
import { Paper, Stack, Title, Grid, Text } from "@mantine/core";
@@ -7,8 +8,8 @@ export function ComponentAdminInvestasi_DetailDataAuthor({
data: any;
}) {
return (
<Paper withBorder p={"lg"}>
<Stack>
<Paper bg={AdminColor.softBlue} p={"lg"}>
<Stack c={AdminColor.white}>
<Title order={3}>Data User</Title>
<Stack spacing={"xs"}>
<Grid>

View File

@@ -1,10 +1,11 @@
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import { Paper, Stack, Title, Grid, Box, Text } from "@mantine/core";
export function ComponentAdminInvestasi_DetailData({ data }: { data: any }) {
return (
<>
<Paper withBorder p={"lg"}>
<Stack>
<Paper bg={AdminColor.softBlue} p={"lg"}>
<Stack c={AdminColor.white}>
<Title order={3}>Rincian Data Investasi</Title>
<Grid justify="center">
<Grid.Col span={6}>

View File

@@ -1,12 +1,13 @@
import { Paper, Stack, Title } from "@mantine/core";
import { Admin_ComponentLoadImageLandscape } from "../../_admin_global";
import { AccentColor, AdminColor } from "@/app_modules/_global/color/color_pallet";
export function ComponentAdminInvestasi_DetailGambar({imagesId}: {imagesId: any}) {
return (
<>
<Paper withBorder p={"lg"}>
<Paper bg={AdminColor.softBlue} p={"lg"}>
<Stack>
<Title align="center" order={3}>
<Title c={AdminColor.white} align="center" order={3}>
Gambar Proyek
</Title>

View File

@@ -1,5 +1,6 @@
import { APIs } from "@/app/lib";
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import { MODEL_INVESTASI_DOKUMEN } from "@/app_modules/investasi/_lib/interface";
import {
SimpleGrid,
@@ -37,8 +38,8 @@ export function ComponentAdminInvestasi_UIDetailFile({
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
]}
>
<Paper withBorder p={"lg"}>
<Stack>
<Paper bg={AdminColor.softBlue} p={"lg"}>
<Stack c={AdminColor.white}>
<Title order={3}>File & Dokumen</Title>
<Stack spacing={50}>

View File

@@ -26,6 +26,7 @@ import {
AdminInvestasi_ComponentCekBuktiTransfer,
} from "../../_component";
import { adminInvestasi_funGetAllTransaksiById } from "../../fun";
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
export function AdminInvestasi_ViewDaftarTransaksi({
dataTransaksi,
@@ -167,7 +168,7 @@ export function AdminInvestasi_ViewDaftarTransaksi({
<Stack spacing={"xs"} h={"100%"}>
<ComponentAdminGlobal_TitlePage
name="Transkasi"
color="gray.4"
color={AdminColor.softBlue}
component={<Group>
<ActionIcon
size={"lg"}
@@ -232,7 +233,7 @@ export function AdminInvestasi_ViewDaftarTransaksi({
</Group>
</Group> */}
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
<Paper bg={AdminColor.softBlue} p={"md"} shadow="lg" h={"80vh"}>
<ScrollArea w={"100%"} h={"90%"}>
<Table
verticalSpacing={"xl"}
@@ -245,28 +246,28 @@ export function AdminInvestasi_ViewDaftarTransaksi({
<thead>
<tr>
<th>
<Center>Nama Investor</Center>
<Center c={AdminColor.white}>Nama Investor</Center>
</th>
<th>
<Center>Nama Bank</Center>
<Center c={AdminColor.white}>Nama Bank</Center>
</th>
<th>
<Center>Jumlah Investasi</Center>
<Center c={AdminColor.white}>Jumlah Investasi</Center>
</th>
<th>
<Center>Lembar Terbeli</Center>
<Center c={AdminColor.white}>Lembar Terbeli</Center>
</th>
<th>
<Center>Tanggal</Center>
<Center c={AdminColor.white}>Tanggal</Center>
</th>
<th>
<Center>Status</Center>
<Center c={AdminColor.white}>Status</Center>
</th>
<th>
<Center>Bukti Transfer</Center>
<Center c={AdminColor.white}>Bukti Transfer</Center>
</th>
<th>
<Center>Aksi</Center>
<Center c={AdminColor.white}>Aksi</Center>
</th>
</tr>
</thead>

View File

@@ -1,7 +1,7 @@
"use client";
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
import { Button, Group, Stack } from "@mantine/core";
import { Button, Group, Stack, Tabs } from "@mantine/core";
import { IconCircleCheck } from "@tabler/icons-react";
import { useState } from "react";
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
@@ -50,7 +50,7 @@ export function AdminInvestasi_DetailPublish({
<Group>
{listPage.map((e) => (
<Button
<Button variant="outline"
key={e.id}
color={selectPage == e.id ? "green" : "gray"}
radius={"xl"}

View File

@@ -24,7 +24,7 @@ import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data"
import { adminInvestasi_funGetAllPublish } from "../fun/get/get_all_publish";
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
import { MainColor } from "@/app_modules/_global/color";
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import { AccentColor, AdminColor } from "@/app_modules/_global/color/color_pallet";
export default function Admin_TablePublishInvestasi({
dataInvestsi,
@@ -76,26 +76,26 @@ function TableView({ listData }: { listData: any }) {
<tr key={e.id}>
<td>
<Center w={200}>
<Text lineClamp={1}>{e.author.username}</Text>
<Text c={AccentColor.white} lineClamp={1}>{e.author.username}</Text>
</Center>
</td>
<td>
<Center w={400}>
<Text lineClamp={1}>{e.title}</Text>
<Text c={AccentColor.white} lineClamp={1}>{e.title}</Text>
</Center>
</td>
<td>
<Center w={200}>{_.toNumber(e.progress).toFixed(2)} %</Center>
<Center c={AccentColor.white} w={200}>{_.toNumber(e.progress).toFixed(2)} %</Center>
</td>
<td>
<Center w={200}>
<Center c={AccentColor.white} w={200}>
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+e.sisaLembar)}
</Center>
</td>
<td>
<Center w={200}>
<Center c={AccentColor.white} w={200}>
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+e.totalLembar)}
@@ -103,7 +103,7 @@ function TableView({ listData }: { listData: any }) {
</td>
<td>
<Center w={200}>
<Text lineClamp={1}>{e.Investasi_Invoice.length}</Text>
<Text c={AccentColor.white} lineClamp={1}>{e.Investasi_Invoice.length}</Text>
</Center>
</td>
<td>
@@ -133,16 +133,16 @@ function TableView({ listData }: { listData: any }) {
<Stack spacing={"xs"} h={"100%"}>
<ComponentAdminGlobal_TitlePage
name="Publish"
color={AdminColor.green}
color={AdminColor.softBlue}
component={
<TextInput
icon={<IconSearch size={20} />}
radius={"xl"}
placeholder="Cari nama proyek"
onChange={(val) => {
onSearch(val.currentTarget.value);
}}
/>
icon={<IconSearch size={20} />}
radius={"xl"}
placeholder={"Cari nama proyek"}
onChange={(val) => {
onSearch(val.currentTarget.value);
}}
/>
}
/>
{/* <Group
@@ -167,7 +167,7 @@ function TableView({ listData }: { listData: any }) {
{_.isEmpty(data) ? (
<ComponentAdminGlobal_IsEmptyData />
) : (
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
<Paper bg={AdminColor.softBlue} p={"md"} shadow="lg" h={"80vh"}>
<ScrollArea w={"100%"} h={"90%"} offsetScrollbars>
<Table
verticalSpacing={"md"}
@@ -175,31 +175,31 @@ function TableView({ listData }: { listData: any }) {
p={"md"}
w={"100%"}
h={"100%"}
striped
highlightOnHover
>
<thead>
<tr>
<th>
<Center w={200}>Username</Center>
<Center c={AccentColor.white} w={200}>Username</Center>
</th>
<th>
<Center w={400}>Nama Proyek</Center>
<Center c={AccentColor.white} w={400}>Nama Proyek</Center>
</th>
<th>
<Center w={200}>Progres</Center>
<Center c={AccentColor.white} w={200}>Progres</Center>
</th>
<th>
<Center w={200}>Sisa Saham</Center>
<Center c={AccentColor.white} w={200}>Sisa Saham</Center>
</th>
<th>
<Center w={200}>Total Saham</Center>
<Center c={AccentColor.white} w={200}>Total Saham</Center>
</th>
<th>
<Center w={200}>Validasi</Center>
<Center c={AccentColor.white} w={200}>Validasi</Center>
</th>
<th>
<Center w={200}>Aksi</Center>
<Center c={AccentColor.white} w={200}>Aksi</Center>
</th>
</tr>
</thead>

View File

@@ -101,29 +101,29 @@ function TableView({ listData }: { listData: any }) {
const tableBody = data.map((e) => (
<tr key={e.id}>
<td>
<Center w={200}>
<Center c={AccentColor.white} w={200}>
<Text lineClamp={1}>{e.author.username}</Text>
</Center>
</td>
<td>
<Center w={400}>
<Center c={AccentColor.white} w={400}>
<Text lineClamp={1}>{e.title}</Text>
</Center>
</td>
<td>
<Center w={200}>
<Center c={AccentColor.white} w={200}>
<Text lineClamp={1}>{e.roi} %</Text>
</Center>
</td>
<td>
<Center w={200}>
<Center c={AccentColor.white} w={200}>
<ComponentAdminGlobal_TampilanRupiahDonasi
nominal={_.toNumber(e.targetDana)}
/>
</Center>
</td>
<td>
<Center w={200}>
<Center c={AccentColor.white} w={200}>
<ComponentAdminGlobal_TampilanRupiahDonasi
nominal={_.toNumber(e.hargaLembar)}
/>
@@ -155,7 +155,7 @@ function TableView({ listData }: { listData: any }) {
<Stack spacing={"xs"} h={"100%"}>
<ComponentAdminGlobal_TitlePage
name="Review"
color={AdminColor.orange}
color={AdminColor.softBlue}
component={
<TextInput
icon={<IconSearch size={20} />}
@@ -189,7 +189,7 @@ function TableView({ listData }: { listData: any }) {
{_.isEmpty(data) ? (
<ComponentAdminGlobal_IsEmptyData />
) : (
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
<Paper p={"md"} bg={AdminColor.softBlue} shadow="lg" h={"80vh"}>
{isShowReload && (
<Paper bg={"red"} w={"50%"}>
<Affix position={{ top: rem(200) }} w={"100%"}>
@@ -221,29 +221,27 @@ function TableView({ listData }: { listData: any }) {
p={"md"}
w={"100%"}
h={"100%"}
striped
highlightOnHover
>
<thead>
<tr>
<th>
<Center w={200}>Username</Center>
<Center c={AccentColor.white} w={200}>Username</Center>
</th>
<th>
<Center w={400}>Nama Proyek</Center>
<Center c={AccentColor.white} w={400}>Nama Proyek</Center>
</th>
<th>
<Center w={200}>ROI</Center>
<Center c={AccentColor.white} w={200}>ROI</Center>
</th>
<th>
<Center w={200}>Target Dana</Center>
<Center c={AccentColor.white} w={200}>Target Dana</Center>
</th>
<th>
<Center w={200}>Harga Perlembar</Center>
<Center c={AccentColor.white} w={200}>Harga Perlembar</Center>
</th>
<th>
<Center w={200}>Aksi</Center>
<Center c={AccentColor.white} w={200}>Aksi</Center>
</th>
</tr>
</thead>

View File

@@ -1,7 +1,7 @@
"use client";
import { RouterAdminInvestasi_OLD } from "@/app/lib/router_hipmi/router_admin";
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
import {
ActionIcon,
Avatar,
@@ -9,6 +9,7 @@ import {
Box,
Center,
Divider,
Flex,
Grid,
Group,
Paper,
@@ -17,16 +18,20 @@ import {
Stack,
Table,
Text,
ThemeIcon,
Title,
} from "@mantine/core";
import {
IconAlertTriangle,
IconArrowBadgeRight,
IconArrowBigRightLine,
IconArrowsMaximize,
IconBookmark,
IconCaretRight,
IconChevronsDownRight,
IconChevronsRight,
IconEdit,
IconUpload,
IconZoomCheck,
} from "@tabler/icons-react";
import { useRouter } from "next/navigation";
@@ -39,6 +44,8 @@ import _ from "lodash";
import TableTotalInvestasi from "./table_total_investasi";
import TablePublikasiProgresInvestasi from "./table_publikasi_progres";
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
import { AccentColor, MainColor } from "@/app_modules/_global/color";
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
export default function Admin_Investasi({
listInvestasi,
@@ -66,21 +73,25 @@ export default function Admin_Investasi({
name: "Publish",
jumlah: countPublish,
link: RouterAdminInvestasi_OLD.table_status_publish,
color: "green",
color: MainColor.green,
icon: <IconUpload size={18} color="#4CAF4F" />,
},
{
id: 2,
name: "Review",
jumlah: countReview,
link: RouterAdminInvestasi_OLD.table_status_review,
color: "orange",
color: MainColor.orange,
icon: <IconBookmark size={18} color="#FF7043" />
},
{
id: 3,
name: "Reject",
jumlah: countReject,
link: RouterAdminInvestasi_OLD.table_status_reject,
color: "red",
color: MainColor.red,
icon: <IconAlertTriangle size={18} color="#FF4B4C" />
},
];
@@ -101,18 +112,23 @@ export default function Admin_Investasi({
{listBox.map((e, i) => (
<Paper
key={i}
bg={`${e.color}.2`}
bg={AdminColor.softBlue}
shadow="md"
radius="md"
p="md"
// sx={{ borderColor: e.color, borderStyle: "solid" }}
// sx={{ borderColor: e.color, borderStyle: "solid" }}
>
<Group position="center">
<Stack align="center" spacing={0}>
<Text>{e.name}</Text>
<Title>{e.jumlah}</Title>
</Stack>
</Group>
<Stack spacing={0}>
<Text fw={"bold"} color={AccentColor.white}>{e.name}</Text>
<Flex align={"center"} justify={"space-between"}>
<Title c={AccentColor.white}>{e.jumlah}</Title>
<ThemeIcon radius={"xl"} size={"md"} color={AccentColor.white}>
{e.icon}
</ThemeIcon>
</Flex>
</Stack>
</Paper>
))}
</SimpleGrid>