fix: Admin
Deskripsi: - Penambahan field nama rekening di db bank - Optimalisasi event ## No Issue
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { Investasi_ViewFileViewer } from "./file_view/view_file_viewer";
|
||||
import { Investasi_ViewBeranda } from "./main/view_beranda";
|
||||
import { Investasi_ViewTransaksiBerhasil } from "./status_transaksi/view_invoice_berhasil";
|
||||
import { Investasi_ViewTransaksiGagal } from "./status_transaksi/view_transaksi_gagal";
|
||||
import { Investasi_ViewInvoice } from "./transaksi/view_invoice";
|
||||
import { Investasi_ViewMetodePembayaran } from "./transaksi/view_metode_pembayaran";
|
||||
import { Investasi_ViewProsesPembelian } from "./transaksi/view_proses_pembelian";
|
||||
@@ -11,3 +13,5 @@ export { Investasi_ViewInvoice };
|
||||
export { Investasi_ViewProsesTransaksi };
|
||||
export { Investasi_ViewFileViewer };
|
||||
export { Investasi_ViewBeranda };
|
||||
export { Investasi_ViewTransaksiGagal };
|
||||
export { Investasi_ViewTransaksiBerhasil };
|
||||
|
||||
@@ -1,30 +1,11 @@
|
||||
import {
|
||||
NEW_RouterInvestasi,
|
||||
RouterInvestasi_OLD,
|
||||
} from "@/app/lib/router_hipmi/router_investasi";
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import {
|
||||
Stack,
|
||||
Box,
|
||||
Paper,
|
||||
Group,
|
||||
Title,
|
||||
Text,
|
||||
Center,
|
||||
Badge,
|
||||
Loader,
|
||||
} from "@mantine/core";
|
||||
import moment from "moment";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MODEL_INVOICE_INVESTASI } from "../../_lib/interface";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||
import _ from "lodash";
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { ComponentColab_CardBeranda } from "@/app_modules/colab/component/card_view/card_beranda";
|
||||
import colab_getListAllProyek from "@/app_modules/colab/fun/get/get_list_all_proyek";
|
||||
import { Box, Center, Loader } from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useState } from "react";
|
||||
import { Investasi_ComponentCardDaftarTransaksi } from "../../_component";
|
||||
import { MODEL_INVOICE_INVESTASI } from "../../_lib/interface";
|
||||
|
||||
export function Investasi_ViewDaftarTransaksi({
|
||||
dataTransaksi,
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
"use client";
|
||||
|
||||
import { RouterAdminInvestasi } from "@/app/lib/router_admin/router_admin_investasi";
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_TampilanRupiah } from "@/app_modules/_global/component";
|
||||
import {
|
||||
ActionIcon,
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Collapse,
|
||||
Grid,
|
||||
Group,
|
||||
Image,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import {
|
||||
IconBrandWhatsapp,
|
||||
IconMoneybag,
|
||||
IconMoodDollar,
|
||||
IconZoomMoney,
|
||||
} from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MODEL_INVOICE_INVESTASI } from "../../_lib/interface";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { IconBrandCashapp } from "@tabler/icons-react";
|
||||
|
||||
export function Investasi_ViewTransaksiBerhasil({
|
||||
dataTransaksi,
|
||||
}: {
|
||||
dataTransaksi: any;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [data, setData] = useState<MODEL_INVOICE_INVESTASI>(dataTransaksi);
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
const [opened, setOpened] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"lg"} py={"md"}>
|
||||
<Stack
|
||||
align="center"
|
||||
spacing={"md"}
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<IconBrandCashapp size={100} />
|
||||
<Title order={5} align="center">
|
||||
Terimakasih telah percaya pada kami untuk mengelola dana anda! Info
|
||||
mengenai update Investasi ini bisa di lihat di kolom berita.
|
||||
</Title>
|
||||
</Stack>
|
||||
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
>
|
||||
<Title order={4} align="center" mb={"lg"}>
|
||||
Detail Transaksi
|
||||
</Title>
|
||||
|
||||
<Stack px={"sm"}>
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Bank </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.MasterBank.namaBank}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Nama Rekening </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.MasterBank.namaAkun}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Nomor Rekening </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.MasterBank.norek}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Jumlah Transaksi </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Group spacing={2}>
|
||||
:
|
||||
<Text inherit span>
|
||||
<ComponentGlobal_TampilanRupiah
|
||||
color="white"
|
||||
nominal={+data?.nominal}
|
||||
/>
|
||||
</Text>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Lembar Terbeli </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.lembarTerbeli}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Bukti Transfer </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
compact
|
||||
onClick={() => {
|
||||
opened ? setOpened(false) : setOpened(true);
|
||||
}}
|
||||
>
|
||||
{opened ? "Sembunyikan" : "Tampilkan"}
|
||||
</Button>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Collapse
|
||||
mt={"md"}
|
||||
in={opened}
|
||||
transitionDuration={500}
|
||||
transitionTimingFunction="linear"
|
||||
>
|
||||
<Image
|
||||
alt="foto"
|
||||
src={RouterAdminInvestasi.api_bukti_transfer + data?.imagesId}
|
||||
/>
|
||||
</Collapse>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
"use client";
|
||||
|
||||
import { RouterAdminInvestasi } from "@/app/lib/router_admin/router_admin_investasi";
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_TampilanRupiah } from "@/app_modules/_global/component";
|
||||
import {
|
||||
ActionIcon,
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Collapse,
|
||||
Grid,
|
||||
Group,
|
||||
Image,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { IconBrandWhatsapp } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MODEL_INVOICE_INVESTASI } from "../../_lib/interface";
|
||||
import { Prisma } from "@prisma/client";
|
||||
|
||||
export function Investasi_ViewTransaksiGagal({
|
||||
dataTransaksi,
|
||||
nomorAdmin,
|
||||
}: {
|
||||
dataTransaksi: any;
|
||||
nomorAdmin: Prisma.NomorAdminCreateInput;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [data, setData] = useState<MODEL_INVOICE_INVESTASI>(dataTransaksi);
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
const [opened, setOpened] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"lg"} py={"md"}>
|
||||
<Stack
|
||||
spacing={"md"}
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Title order={5} align="center">
|
||||
Transaksi anda gagal karena bukti transfer tidak sesuai dengan data
|
||||
kami. Jika ini masalah khusus silahkan hubungi pada kontak whatsapp
|
||||
kami !
|
||||
</Title>
|
||||
<Center>
|
||||
<ActionIcon radius={"100%"} size={70} variant="light" color="white">
|
||||
<a
|
||||
href={`whatsapp://wa.me/${nomorAdmin.nomor}?text=Hallo admin ! Saya ada kendala pada transaksi Investasi`}
|
||||
>
|
||||
<IconBrandWhatsapp size={50} color="green" />
|
||||
</a>
|
||||
</ActionIcon>
|
||||
</Center>
|
||||
</Stack>
|
||||
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
>
|
||||
<Title order={4} align="center" mb={"lg"}>
|
||||
Detail Transaksi
|
||||
</Title>
|
||||
|
||||
<Stack px={"sm"}>
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Bank </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.MasterBank.namaBank}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Nama Rekening </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.MasterBank.namaAkun}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Nomor Rekening </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.MasterBank.norek}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Jumlah Transaksi </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Group spacing={2}>
|
||||
:
|
||||
<Text inherit span>
|
||||
<ComponentGlobal_TampilanRupiah
|
||||
color="white"
|
||||
nominal={+data?.nominal}
|
||||
/>
|
||||
</Text>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Lembar Terbeli </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text>: {data?.lembarTerbeli}</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Grid>
|
||||
<Grid.Col span={6}>
|
||||
<Text>Bukti Transfer </Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
compact
|
||||
onClick={() => {
|
||||
opened ? setOpened(false) : setOpened(true);
|
||||
}}
|
||||
>
|
||||
{opened ? "Sembunyikan" : "Tampilkan"}
|
||||
</Button>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
||||
<Collapse
|
||||
mt={"md"}
|
||||
in={opened}
|
||||
transitionDuration={500}
|
||||
transitionTimingFunction="linear"
|
||||
>
|
||||
<Image
|
||||
alt="foto"
|
||||
src={RouterAdminInvestasi.api_bukti_transfer + data?.imagesId}
|
||||
/>
|
||||
</Collapse>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -35,7 +35,6 @@ export function Investasi_ViewInvoice({
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [data, setData] = useState(dataInvoice);
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
// const [image, setImage] = useState<any | null>(null);
|
||||
|
||||
async function onUpload() {
|
||||
const gambar = new FormData();
|
||||
|
||||
@@ -46,6 +46,7 @@ export function Investasi_ViewMetodePembayaran({
|
||||
if (res.status !== 201)
|
||||
return ComponentGlobal_NotifikasiPeringatan(res.message);
|
||||
ComponentGlobal_NotifikasiBerhasil(res.message);
|
||||
setLoading(true);
|
||||
router.push(NEW_RouterInvestasi.invoice + res.data?.id, { scroll: false });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user