# fix
## Deskripsi: - Perubahan tampilan notifikasi - Pin map sesuai logo - Pin map bisa custom ### No Issue
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { ComponentInvestasi_FrameFileView } from "./file_view/frame_file_view";
|
||||
import { ComponentInvestasi_BoxMetodePembayaran } from "./transaksi/box_metode_pembayaran";
|
||||
import { ComponentInvestasi_BoxPembelian } from "./transaksi/box_pembelian";
|
||||
import { ComponentInvestasi_ProsesAccAdmin } from "./transaksi/proses_acc_admin";
|
||||
import { ComponentInvestasi_ViewInvoice } from "./transaksi/view_invoice";
|
||||
|
||||
export { ComponentInvestasi_BoxPembelian };
|
||||
export { ComponentInvestasi_BoxMetodePembayaran };
|
||||
export { ComponentInvestasi_FrameFileView };
|
||||
export { ComponentInvestasi_ViewInvoice };
|
||||
export { ComponentInvestasi_ProsesAccAdmin };
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { NEW_RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { Button, Paper, Radio, Stack, Text, Title } from "@mantine/core";
|
||||
import { useLocalStorage } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
export function ComponentInvestasi_BoxMetodePembayaran({
|
||||
@@ -10,12 +13,17 @@ export function ComponentInvestasi_BoxMetodePembayaran({
|
||||
}: {
|
||||
listBank: any[];
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [bank, setBank] = useState(listBank);
|
||||
const [pilihBank, setPilihBank] = useState("");
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [total, setTotal] = useLocalStorage({
|
||||
key: "total_investasi",
|
||||
defaultValue: 0,
|
||||
});
|
||||
|
||||
async function onProses() {
|
||||
console.log(pilihBank);
|
||||
router.push(NEW_RouterInvestasi.invoice + "1", { scroll: false });
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
import { Warna } from "@/app/lib/warna";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import {
|
||||
Stack,
|
||||
Paper,
|
||||
Title,
|
||||
Center,
|
||||
Loader,
|
||||
Group,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { IconBrandWhatsapp } from "@tabler/icons-react";
|
||||
import Link from "next/link";
|
||||
|
||||
export function ComponentInvestasi_ProsesAccAdmin() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Stack spacing={"md"}>
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: MainColor.darkblue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Stack align="center" justify="center">
|
||||
<Title order={6}>Admin sedang memproses transaksimu</Title>
|
||||
<Paper radius={1000} w={100} h={100}>
|
||||
<Center h={"100%"}>
|
||||
<Loader size={"lg"} color="yellow" variant="bars" />
|
||||
</Center>
|
||||
</Paper>
|
||||
<Title order={6}>Mohon menunggu !</Title>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</Paper>
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Group position="center">
|
||||
<Stack spacing={0}>
|
||||
<Text fz={"xs"} fs={"italic"}>
|
||||
Hubungi admin jika tidak kunjung di proses!
|
||||
</Text>
|
||||
<Text fz={"xs"} fs={"italic"}>
|
||||
Klik pada logo Whatsapp ini.
|
||||
</Text>
|
||||
</Stack>
|
||||
{/* <Link
|
||||
color="white"
|
||||
style={{
|
||||
color: "black",
|
||||
textDecoration: "none",
|
||||
}}
|
||||
target="_blank"
|
||||
href={`https://wa.me/+${nomorAdmin.nomor}?text=Hallo Admin , Saya ada kendala dalam proses transfer donasi!`}
|
||||
>
|
||||
<IconBrandWhatsapp size={40} color={Warna.hijau_cerah} />
|
||||
</Link> */}
|
||||
</Group>
|
||||
</Paper>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
267
src/app_modules/investasi/_component/transaksi/view_invoice.tsx
Normal file
267
src/app_modules/investasi/_component/transaksi/view_invoice.tsx
Normal file
@@ -0,0 +1,267 @@
|
||||
"use client";
|
||||
|
||||
import { NEW_RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import TampilanRupiahDonasi from "@/app_modules/donasi/component/tampilan_rupiah";
|
||||
import {
|
||||
Stack,
|
||||
Title,
|
||||
Group,
|
||||
Paper,
|
||||
Grid,
|
||||
CopyButton,
|
||||
Button,
|
||||
Center,
|
||||
FileButton,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { IconCamera, IconCircleCheck } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
export function ComponentInvestasi_ViewInvoice({
|
||||
dataInvoice,
|
||||
}: {
|
||||
dataInvoice: any;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [invoice, setDataInvoice] = useState(dataInvoice);
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
const [image, setImage] = useState<any | null>(null);
|
||||
// const [active, setActive] = useAtom(gs_donasi_hot_menu);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"lg"} py={"md"}>
|
||||
<Stack
|
||||
spacing={0}
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Title order={5}>Mohon transfer ke rekening dibawah</Title>
|
||||
<Group spacing={"xs"}>
|
||||
<Text>untuk diteruskan ke </Text>
|
||||
<Text fw={"bold"}>{invoice?.Donasi?.Author.username}</Text>
|
||||
</Group>
|
||||
</Stack>
|
||||
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
>
|
||||
<Stack spacing={"md"}>
|
||||
<Stack spacing={0}>
|
||||
<Text>Bank {invoice?.DonasiMaster_Bank?.name}</Text>
|
||||
<Text>PT. Himpunan Pengusaha Badung</Text>
|
||||
</Stack>
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col span={8}>
|
||||
<Group position="left" align="center" h={"100%"}>
|
||||
<Title order={4} color={MainColor.yellow}>
|
||||
{invoice?.DonasiMaster_Bank?.norek}
|
||||
</Title>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={4}>
|
||||
<Group position="right">
|
||||
<CopyButton value={invoice?.DonasiMaster_Bank?.norek}>
|
||||
{({ copied, copy }) => (
|
||||
<Button
|
||||
style={{
|
||||
transition: "0.5s",
|
||||
}}
|
||||
radius={"xl"}
|
||||
onClick={copy}
|
||||
color={copied ? "teal" : "yellow"}
|
||||
c={"black"}
|
||||
>
|
||||
{copied ? "Berhasil" : "Salin"}
|
||||
</Button>
|
||||
)}
|
||||
</CopyButton>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</Paper>
|
||||
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
>
|
||||
<Stack spacing={"md"}>
|
||||
<Stack spacing={0}>
|
||||
<Text>Jumlah transfer</Text>
|
||||
</Stack>
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col span={8}>
|
||||
<Group position="left" align="center" h={"100%"}>
|
||||
<Title order={4} color="white">
|
||||
<TampilanRupiahDonasi nominal={+(+invoice.nominal)} />
|
||||
</Title>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={4}>
|
||||
<Group position="right">
|
||||
<CopyButton value={"" + +invoice.nominal}>
|
||||
{({ copied, copy }) => (
|
||||
<Button
|
||||
style={{
|
||||
transition: "0.5s",
|
||||
}}
|
||||
variant="filled"
|
||||
radius={"xl"}
|
||||
color={copied ? "teal" : "yellow"}
|
||||
c={"black"}
|
||||
onClick={copy}
|
||||
>
|
||||
{copied ? "Berhasil" : "Salin"}
|
||||
</Button>
|
||||
)}
|
||||
</CopyButton>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Paper>
|
||||
{/* <Text fz={"xs"} c={"gray"}>
|
||||
Sudah termasuk biaya admin Rp. 2.500,-
|
||||
</Text> */}
|
||||
</Stack>
|
||||
</Paper>
|
||||
|
||||
<Paper
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `2px solid ${AccentColor.darkblue}`,
|
||||
padding: "15px",
|
||||
cursor: "pointer",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
>
|
||||
<Stack spacing={"sm"}>
|
||||
<Center>
|
||||
<FileButton
|
||||
onChange={async (files: any | null) => {
|
||||
try {
|
||||
// const buffer = URL.createObjectURL(
|
||||
// new Blob([new Uint8Array(await files.arrayBuffer())])
|
||||
// );
|
||||
// console.log(buffer, "ini buffer");
|
||||
// console.log(files, " ini file");
|
||||
setFile(files);
|
||||
// onUpload(invoice.id, files);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}}
|
||||
accept="image/png,image/jpeg"
|
||||
>
|
||||
{(props) => (
|
||||
<Button
|
||||
{...props}
|
||||
radius={"xl"}
|
||||
leftIcon={<IconCamera />}
|
||||
bg={MainColor.yellow}
|
||||
color="yellow"
|
||||
c={"black"}
|
||||
>
|
||||
Upload
|
||||
</Button>
|
||||
)}
|
||||
</FileButton>
|
||||
</Center>
|
||||
{file ? (
|
||||
<Center>
|
||||
<Group spacing={"xs"}>
|
||||
<Text fz={"xs"} fs={"italic"}>
|
||||
Upload berhasil{" "}
|
||||
</Text>
|
||||
<IconCircleCheck color="green" />
|
||||
</Group>
|
||||
</Center>
|
||||
) : (
|
||||
<Center>
|
||||
<Text fz={"xs"} fs={"italic"}>
|
||||
Upload bukti transfer anda !
|
||||
</Text>
|
||||
</Center>
|
||||
)}
|
||||
</Stack>
|
||||
</Paper>
|
||||
|
||||
{file !== null ? (
|
||||
<Button
|
||||
radius={"xl"}
|
||||
bg={MainColor.yellow}
|
||||
color="yellow"
|
||||
c={"black"}
|
||||
// onClick={() => onClick(router, invoice.id, setActive)}
|
||||
onClick={() => {
|
||||
router.push(NEW_RouterInvestasi.proses_transaksi + "1", {
|
||||
scroll: false,
|
||||
});
|
||||
}}
|
||||
>
|
||||
Saya Sudah Transfer
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
disabled
|
||||
radius={"xl"}
|
||||
// bg={"orange"}
|
||||
// color="orange"
|
||||
// onClick={() => onClick(router, invoice.id)}
|
||||
>
|
||||
Menunggu Bukti Transfer
|
||||
</Button>
|
||||
)}
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
import { Investasi_UiFileView } from "./file_view";
|
||||
import { Investasi_UiInvoice } from "./transaksi/invoice";
|
||||
import { Investasi_UiMetodePembayaran } from "./transaksi/metode_pembayaran";
|
||||
import { Investasi_UiProsesPembelian } from "./transaksi/proses_pembelian";
|
||||
import { Investasi_UiProsesTransaksi } from "./transaksi/proses_transaksi";
|
||||
|
||||
export { Investasi_UiProsesTransaksi };
|
||||
export { Investasi_UiProsesPembelian };
|
||||
export { Investasi_UiMetodePembayaran };
|
||||
export { Investasi_UiFileView };
|
||||
export { Investasi_UiInvoice };
|
||||
export { Investasi_UiProsesTransaksi };
|
||||
|
||||
15
src/app_modules/investasi/_ui/transaksi/invoice.tsx
Normal file
15
src/app_modules/investasi/_ui/transaksi/invoice.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import { ComponentInvestasi_ViewInvoice } from "../../_component";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
|
||||
export function Investasi_UiInvoice() {
|
||||
return (
|
||||
<UIGlobal_LayoutTamplate
|
||||
header={<UIGlobal_LayoutHeaderTamplate title="Invoice" />}
|
||||
>
|
||||
<ComponentInvestasi_ViewInvoice dataInvoice={{}} />
|
||||
</UIGlobal_LayoutTamplate>
|
||||
);
|
||||
}
|
||||
22
src/app_modules/investasi/_ui/transaksi/proses_pembelian.tsx
Normal file
22
src/app_modules/investasi/_ui/transaksi/proses_pembelian.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import { ComponentInvestasi_BoxPembelian } from "../../_component";
|
||||
|
||||
|
||||
export function Investasi_UiProsesPembelian({
|
||||
dataInvestasi,
|
||||
}: {
|
||||
dataInvestasi: any;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutTamplate
|
||||
header={<UIGlobal_LayoutHeaderTamplate title="Pembelian Saham" />}
|
||||
>
|
||||
<ComponentInvestasi_BoxPembelian dataInvestasi={dataInvestasi} />
|
||||
</UIGlobal_LayoutTamplate>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,21 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import { ComponentInvestasi_BoxPembelian } from "../../_component";
|
||||
import { ComponentInvestasi_ProsesAccAdmin } from "../../_component";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import { IconX } from "@tabler/icons-react";
|
||||
|
||||
|
||||
export function Investasi_UiProsesTransaksi({
|
||||
dataInvestasi,
|
||||
}: {
|
||||
dataInvestasi: any;
|
||||
}) {
|
||||
export function Investasi_UiProsesTransaksi() {
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutTamplate
|
||||
header={<UIGlobal_LayoutHeaderTamplate title="Pembelian Saham" />}
|
||||
header={
|
||||
<UIGlobal_LayoutHeaderTamplate
|
||||
title="Proses Transaksi"
|
||||
iconLeft={<IconX />}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<ComponentInvestasi_BoxPembelian dataInvestasi={dataInvestasi} />
|
||||
<ComponentInvestasi_ProsesAccAdmin />
|
||||
</UIGlobal_LayoutTamplate>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
|
||||
import {
|
||||
NEW_RouterInvestasi,
|
||||
RouterInvestasi_OLD,
|
||||
RouterInvestasi_OLD
|
||||
} from "@/app/lib/router_hipmi/router_investasi";
|
||||
import { Warna } from "@/app/lib/warna";
|
||||
import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile";
|
||||
import {
|
||||
ActionIcon,
|
||||
@@ -19,10 +23,9 @@ import {
|
||||
Image,
|
||||
Paper,
|
||||
Progress,
|
||||
SimpleGrid,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
Title
|
||||
} from "@mantine/core";
|
||||
import {
|
||||
IconBookDownload,
|
||||
@@ -35,12 +38,8 @@ import { useAtom } from "jotai";
|
||||
import moment from "moment";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { gs_TransferValue } from "../g_state";
|
||||
import { MODEL_INVESTASI } from "../_lib/interface";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import { gs_TransferValue } from "../g_state";
|
||||
|
||||
export default function DetailInvestasi({
|
||||
dataInvestasi,
|
||||
@@ -86,10 +85,11 @@ export default function DetailInvestasi({
|
||||
|
||||
async function onSubmit() {
|
||||
//NEW
|
||||
// router.push(NEW_RouterInvestasi.pembelian + data.id, { scroll: false });
|
||||
router.push(NEW_RouterInvestasi.pembelian + data.id, { scroll: false });
|
||||
|
||||
// OLD
|
||||
router.push(RouterInvestasi_OLD.proses_transaksi + `${data.id}`);
|
||||
// router.push(RouterInvestasi_OLD.proses_transaksi + `${data.id}`);
|
||||
|
||||
setTransaksiValue({
|
||||
...transaksiValue,
|
||||
lembarTerbeli: "",
|
||||
|
||||
Reference in New Issue
Block a user