diff --git a/src/app/dev/investasi/edit/[id]/layout.tsx b/src/app/dev/investasi/edit/[id]/layout.tsx
new file mode 100644
index 00000000..5ab6c294
--- /dev/null
+++ b/src/app/dev/investasi/edit/[id]/layout.tsx
@@ -0,0 +1,9 @@
+
+import { LayoutEditInvestasi } from "@/app_modules/investasi";
+import React from "react";
+
+export default async function Layout({children, params}: {children: React.ReactNode, params:{id: string}}) {
+ return<>
+ {children}
+ >
+}
\ No newline at end of file
diff --git a/src/app/dev/investasi/edit/[id]/page.tsx b/src/app/dev/investasi/edit/[id]/page.tsx
new file mode 100644
index 00000000..e4aa7e1a
--- /dev/null
+++ b/src/app/dev/investasi/edit/[id]/page.tsx
@@ -0,0 +1,11 @@
+import { EditInvestasi } from "@/app_modules/investasi";
+
+
+export default async function Page({params}: {params: {id: string}}) {
+ return (
+ <>
+
+
+ >
+ );
+}
diff --git a/src/app/dev/investasi/edit_intro/[id]/layout.tsx b/src/app/dev/investasi/edit_intro/[id]/layout.tsx
new file mode 100644
index 00000000..cd2a32e7
--- /dev/null
+++ b/src/app/dev/investasi/edit_intro/[id]/layout.tsx
@@ -0,0 +1,8 @@
+import { LayoutEditIntroInvestasi } from "@/app_modules/investasi";
+import React from "react";
+
+export default async function Layout({children}: {children: React.ReactNode}) {
+ return<>
+ {children}
+ >
+}
\ No newline at end of file
diff --git a/src/app/dev/investasi/edit_intro/[id]/page.tsx b/src/app/dev/investasi/edit_intro/[id]/page.tsx
new file mode 100644
index 00000000..4cfe4792
--- /dev/null
+++ b/src/app/dev/investasi/edit_intro/[id]/page.tsx
@@ -0,0 +1,9 @@
+import { EditIntroInvestasi } from "@/app_modules/investasi";
+
+export default async function Page({ params }: { params: { id: string } }) {
+ return (
+ <>
+
+ >
+ );
+}
diff --git a/src/app/dev/investasi/konfirmasi/page.tsx b/src/app/dev/investasi/konfirmasi/page.tsx
new file mode 100644
index 00000000..9dec4842
--- /dev/null
+++ b/src/app/dev/investasi/konfirmasi/page.tsx
@@ -0,0 +1,7 @@
+import { KonfirmasiBuktiInvestasi } from "@/app_modules/investasi";
+
+export default async function Page() {
+ return <>
+
+ >
+}
\ No newline at end of file
diff --git a/src/app/dev/investasi/main/portofolio/page.tsx b/src/app/dev/investasi/main/portofolio/page.tsx
new file mode 100644
index 00000000..a8f6cbf2
--- /dev/null
+++ b/src/app/dev/investasi/main/portofolio/page.tsx
@@ -0,0 +1,7 @@
+import { PortofolioInvestasi } from "@/app_modules/investasi";
+
+export default async function Page() {
+ return<>
+
+ >
+}
\ No newline at end of file
diff --git a/src/app/dev/investasi/porto_detail/[id]/layout.tsx b/src/app/dev/investasi/porto_detail/[id]/layout.tsx
new file mode 100644
index 00000000..ae1e2728
--- /dev/null
+++ b/src/app/dev/investasi/porto_detail/[id]/layout.tsx
@@ -0,0 +1,8 @@
+import { LayoutPortofolioDetailInvestasi } from "@/app_modules/investasi";
+import React from "react";
+
+export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
+ return<>
+ {children}
+ >
+}
\ No newline at end of file
diff --git a/src/app/dev/investasi/porto_detail/[id]/page.tsx b/src/app/dev/investasi/porto_detail/[id]/page.tsx
new file mode 100644
index 00000000..4370ad01
--- /dev/null
+++ b/src/app/dev/investasi/porto_detail/[id]/page.tsx
@@ -0,0 +1,7 @@
+import { PortofolioDetailInvestasi } from "@/app_modules/investasi";
+
+export default async function Page({params} : {params: {id: string}}) {
+ return<>
+
+ >
+}
\ No newline at end of file
diff --git a/src/app_modules/investasi/create/layout.tsx b/src/app_modules/investasi/create/layout.tsx
index d172af76..9407f40c 100644
--- a/src/app_modules/investasi/create/layout.tsx
+++ b/src/app_modules/investasi/create/layout.tsx
@@ -13,7 +13,7 @@ export default function InvestasiCreateLayout({
<>
+
}
>
{children}
diff --git a/src/app_modules/investasi/dummy/data_dummy.json b/src/app_modules/investasi/dummy/data_dummy.json
index d256ff7f..c31d100b 100644
--- a/src/app_modules/investasi/dummy/data_dummy.json
+++ b/src/app_modules/investasi/dummy/data_dummy.json
@@ -11,8 +11,8 @@
"updatedAt": "2023-10-20T03:47:19.610Z",
"authorId": "clntsruqk0002tlrfyc9vzhxx",
"masterPeriodeDevidenId": "Akhir Project",
- "masterPembagianDevidenId": "3",
- "masterPencarianInvestorId": "60",
+ "masterPembagianDevidenId": 3,
+ "masterPencarianInvestorId": 60,
"imagesId": "clny2l8dj0000tlagcpsi9dmz",
"persentase": 40
},
@@ -28,8 +28,8 @@
"updatedAt": "2023-10-20T01:53:52.539Z",
"authorId": "clntxvesu0002tlnbz030gx30",
"masterPeriodeDevidenId": "Selamanya",
- "masterPembagianDevidenId": "6",
- "masterPencarianInvestorId": "30",
+ "masterPembagianDevidenId": 6,
+ "masterPencarianInvestorId": 4,
"imagesId": "clnxyjc070000tlamc5jmsqse",
"persentase": 60
}
diff --git a/src/app_modules/investasi/edit/layout.tsx b/src/app_modules/investasi/edit/layout.tsx
new file mode 100644
index 00000000..cfae68e7
--- /dev/null
+++ b/src/app_modules/investasi/edit/layout.tsx
@@ -0,0 +1,13 @@
+"use client"
+
+import HeaderTamplate from "@/app_modules/component/header_tamplate"
+import { AppShell } from "@mantine/core"
+import React from "react"
+
+export default function LayoutEditInvestasi({children}: {children: React.ReactNode}){
+ return<>
+ }>
+ {children}
+
+ >
+}
\ No newline at end of file
diff --git a/src/app_modules/investasi/edit/view.tsx b/src/app_modules/investasi/edit/view.tsx
new file mode 100644
index 00000000..2f09808e
--- /dev/null
+++ b/src/app_modules/investasi/edit/view.tsx
@@ -0,0 +1,56 @@
+"use client";
+
+import { Center, Grid, Group, Paper, Text, Title } from "@mantine/core";
+import { IconChevronRight } from "@tabler/icons-react";
+import { useRouter } from "next/navigation";
+
+export default function EditInvestasi({id}:{id:string}) {
+ const router = useRouter();
+ const listEdit = [
+ {
+ id: 1,
+ name: "Intro",
+ route: "/dev/investasi/edit_intro/",
+ },
+ {
+ id: 2,
+ name: "Prospektus",
+ route: "",
+ },
+ {
+ id: 3,
+ name: "Dokumen",
+ route: "",
+ },
+ {
+ id: 4,
+ name: "Berita",
+ route: "",
+ },
+ ];
+ return (
+ <>
+ {listEdit.map((e) => (
+ router.push(e.route + `${id}`)}
+ >
+
+
+ {e.name}
+
+
+
+
+
+
+
+
+ ))}
+ >
+ );
+}
diff --git a/src/app_modules/investasi/edit_intro/layout.tsx b/src/app_modules/investasi/edit_intro/layout.tsx
new file mode 100644
index 00000000..56c93217
--- /dev/null
+++ b/src/app_modules/investasi/edit_intro/layout.tsx
@@ -0,0 +1,15 @@
+"use client"
+
+import HeaderTamplate from "@/app_modules/component/header_tamplate"
+import { AppShell } from "@mantine/core"
+import React from "react"
+
+export default function LayoutEditIntroInvestasi({children}: {children: React.ReactNode}){
+ return<>
+ }
+ >
+ {children}
+
+ >
+}
\ No newline at end of file
diff --git a/src/app_modules/investasi/edit_intro/view.tsx b/src/app_modules/investasi/edit_intro/view.tsx
new file mode 100644
index 00000000..e6f25ad9
--- /dev/null
+++ b/src/app_modules/investasi/edit_intro/view.tsx
@@ -0,0 +1,198 @@
+"use client";
+
+import { Paper, Grid, Center, Text, Title, Button, Divider, AspectRatio, Box, FileButton, Group, Select, TextInput, Image } from "@mantine/core";
+import { IconCamera, IconChevronRight } from "@tabler/icons-react";
+import Link from "next/link";
+import { useRouter } from "next/navigation";
+
+import { useState } from "react";
+
+export default function EditIntroInvestasi() {
+ const router = useRouter()
+ const [edit, setEdit] = useState(true);
+ // return (
+ // <>
+ // {edit ? (
+ //
+ //
+ // ""}
+ // >
+ //
+ // Nama File.pdf
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ // ) : (
+ //
+ // Tidak ada file
+ //
+ // )}
+
+ //
+
+ //
+ //
+ //
+ // >
+ // );
+ const [img, setImg] = useState();
+ const [value, setValue] = useState({
+ title: "",
+ targetDana: "",
+ hargaLembar: "",
+ totalLembar: "",
+ roi: "",
+ pencarianInvestorId: "",
+ periodeDevidenId: "",
+ pembagianDevidenId: "",
+ });
+
+ return<>
+
+
+ {img ? (
+
+ ) : (
+
+ )}
+
+
+ {
+ const buffer = URL.createObjectURL(
+ new Blob([new Uint8Array(await files.arrayBuffer())])
+ );
+ // setImg(buffer);
+ // setFl(files);
+ }}
+ accept="image/png,image/jpeg"
+ >
+ {(props) => (
+
+ )}
+
+
+
+
+
+ {
+ setValue({
+ ...value,
+ title: val.target.value,
+ });
+ }}
+ />
+ {
+ setValue({
+ ...value,
+ targetDana: val.target.value,
+ });
+ }}
+ />
+ {
+ setValue({
+ ...value,
+ hargaLembar: val.target.value,
+ });
+ }}
+ />
+ {
+ setValue({
+ ...value,
+ totalLembar: val.target.value,
+ });
+ }}
+ />
+ {
+ setValue({
+ ...value,
+ roi: val.target.value,
+ });
+ }}
+ />
+
+
+
+
+
+
+ >
+}
diff --git a/src/app_modules/investasi/index.ts b/src/app_modules/investasi/index.ts
index e62b3c35..5a9a4d6b 100644
--- a/src/app_modules/investasi/index.ts
+++ b/src/app_modules/investasi/index.ts
@@ -10,6 +10,14 @@ import ProsesInvestasi from "./proses_investasi/view";
import LayoutProsesInvestasi from "./proses_investasi/layout";
import UploadBuktiTransferInvestasi from "./upload_bukti/view";
import LayoutBuktiTransferInvestasi from "./upload_bukti/layout";
+import KonfirmasiBuktiInvestasi from "./konfirmasi/view";
+import PortofolioInvestasi from "./portofolio/view";
+import PortofolioDetailInvestasi from "./porto_detail/view";
+import LayoutPortofolioDetailInvestasi from "./porto_detail/layout";
+import EditInvestasi from "./edit/view";
+import LayoutEditInvestasi from "./edit/layout";
+import EditIntroInvestasi from "./edit_intro/view";
+import LayoutEditIntroInvestasi from "./edit_intro/layout";
export {
MainInvestasi,
@@ -24,4 +32,12 @@ export {
LayoutProsesInvestasi,
UploadBuktiTransferInvestasi,
LayoutBuktiTransferInvestasi,
+ KonfirmasiBuktiInvestasi,
+ PortofolioInvestasi,
+ PortofolioDetailInvestasi,
+ LayoutPortofolioDetailInvestasi,
+ EditInvestasi,
+ LayoutEditInvestasi,
+ EditIntroInvestasi,
+ LayoutEditIntroInvestasi,
};
diff --git a/src/app_modules/investasi/konfirmasi/view.tsx b/src/app_modules/investasi/konfirmasi/view.tsx
new file mode 100644
index 00000000..5c2ee49d
--- /dev/null
+++ b/src/app_modules/investasi/konfirmasi/view.tsx
@@ -0,0 +1,26 @@
+"use client";
+
+import { Center, Stack, Text } from "@mantine/core";
+import { useShallowEffect } from "@mantine/hooks";
+import { IconCircleCheck } from "@tabler/icons-react";
+import { useRouter } from "next/navigation";
+
+export default function KonfirmasiBuktiInvestasi() {
+ const router = useRouter();
+ useShallowEffect(() => {
+ setTimeout(() => router.push("/dev/investasi/main/portofolio"), 2000);
+ }, []);
+
+ return (
+ <>
+
+
+ Bukti Transfer Berhasil Di Upload
+
+
+
+
+
+ >
+ );
+}
diff --git a/src/app_modules/investasi/main/layout.tsx b/src/app_modules/investasi/main/layout.tsx
index c80f8273..207b614c 100644
--- a/src/app_modules/investasi/main/layout.tsx
+++ b/src/app_modules/investasi/main/layout.tsx
@@ -17,13 +17,16 @@ import {
IconChartPieFilled,
IconPencilPlus,
} from "@tabler/icons-react";
-import React from "react";
+import { useRouter } from "next/navigation";
+import React, { useState } from "react";
export default function LayoutMainInvestasi({
children,
}: {
children: React.ReactNode;
}) {
+ const router = useRouter();
+
return (
<>
-
+ {
+ router.push("/dev/investasi/main");
+ }}
+ >
@@ -48,7 +56,12 @@ export default function LayoutMainInvestasi({
-
+ {
+ router.push("/dev/investasi/main/portofolio");
+ }}
+ >
diff --git a/src/app_modules/investasi/main/view.tsx b/src/app_modules/investasi/main/view.tsx
index 16b45e7b..06a5c6c4 100644
--- a/src/app_modules/investasi/main/view.tsx
+++ b/src/app_modules/investasi/main/view.tsx
@@ -20,8 +20,9 @@ import {
Title,
} from "@mantine/core";
import { useRouter } from "next/navigation";
-import dataDummy from "../dummy/data_dummy.json"
-import moment from "moment"
+import dataDummy from "../dummy/data_dummy.json";
+import moment from "moment";
+import { IconCheck, IconCircleCheck } from "@tabler/icons-react";
export default function MainInvestasi({
listData,
@@ -39,7 +40,12 @@ export default function MainInvestasi({
<>
{/* {JSON.stringify(listData, null, 2)} */}
{dataDummy.map((e) => (
- router.push(`/dev/investasi/detail/${e.id}`)}>
+ router.push(`/dev/investasi/detail/${e.id}`)}
+ >
{e.imagesId ? (
@@ -57,11 +63,7 @@ export default function MainInvestasi({
disabled
labelAlwaysOn
value={e.persentase}
- marks={
- [
- {value: e.persentase, label: e.persentase + `%`}
- ]
- }
+ marks={[{ value: e.persentase, label: e.persentase + `%` }]}
/>
{e.title}
@@ -96,9 +98,33 @@ export default function MainInvestasi({
-
- {moment(e.createdAt).fromNow()}
-
+ {(() => {
+ if (
+ e.masterPencarianInvestorId -
+ moment(new Date()).diff(new Date(e.createdAt), "days") ===
+ 0
+ ) {
+ return (
+ <>
+
+
+ Selesai
+
+ >
+ );
+ } else {
+ return<>
+
+ Sisa waktu:
+
+ {e.masterPencarianInvestorId -
+ moment(new Date()).diff(new Date(e.createdAt), "days")}
+
+ Hari
+
+ >
+ }
+ })()}
))}
diff --git a/src/app_modules/investasi/porto_detail/layout.tsx b/src/app_modules/investasi/porto_detail/layout.tsx
new file mode 100644
index 00000000..e158ff52
--- /dev/null
+++ b/src/app_modules/investasi/porto_detail/layout.tsx
@@ -0,0 +1,34 @@
+"use client";
+
+import HeaderTamplate from "@/app_modules/component/header_tamplate";
+import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
+import { IconArrowLeft, IconEdit } from "@tabler/icons-react";
+import { useRouter } from "next/navigation";
+import router from "next/router";
+import { title } from "process";
+import React from "react";
+
+export default function LayoutPortofolioDetailInvestasi({
+ children,
+ id,
+}: {
+ children: React.ReactNode;
+ id: string;
+}) {
+ const router = useRouter();
+ return (
+ <>
+ }
+ route2={`/dev/investasi/edit/${id}`}
+ />
+ }
+ >
+ {children}
+
+ >
+ );
+}
diff --git a/src/app_modules/investasi/porto_detail/view.tsx b/src/app_modules/investasi/porto_detail/view.tsx
new file mode 100644
index 00000000..9acc1c61
--- /dev/null
+++ b/src/app_modules/investasi/porto_detail/view.tsx
@@ -0,0 +1,136 @@
+"use client";
+import {
+ ActionIcon,
+ AspectRatio,
+ Avatar,
+ Box,
+ Flex,
+ Grid,
+ Group,
+ Image,
+ Paper,
+ Slider,
+ Stack,
+ Text,
+ Title,
+} from "@mantine/core";
+import {
+ IconBookDownload,
+ IconFileDescription,
+ IconSpeakerphone,
+} from "@tabler/icons-react";
+import { useRouter } from "next/navigation";
+
+export default function PortofolioDetailInvestasi() {
+ const router = useRouter();
+ const listBox = [
+ {
+ id: 1,
+ name: "Prospektus",
+ icon: ,
+ route: "",
+ },
+ {
+ id: 2,
+ name: "Dokumen",
+ icon: ,
+ route: "",
+ },
+ {
+ id: 3,
+ name: "Berita",
+ icon: ,
+ route: "",
+ },
+ ];
+ return (
+ <>
+
+
+
+ Username
+
+ Sisa waktu : 20 Hari
+
+
+
+
+
+
+
+
+ {/* Title dan Persentase */}
+
+
+ Judul Proyek
+
+
+
+
+ {/* Rincian Data */}
+
+
+
+
+ Terkumpul
+ Rp.
+
+
+ Dana Dibutuhkan
+ Rp.
+
+
+ Harga Per Lembar
+ Rp.
+
+
+ Jadwal Pembagian
+ 3 Bulan
+
+
+
+
+
+
+ Investor
+ 4657
+
+
+ ROI
+ %
+
+
+ Total Lembar
+ 0
+
+
+ Pembagian Deviden
+ Selamanya
+
+
+
+
+
+ {/* List Box */}
+
+ {listBox.map((e) => (
+
+
+
+ {e.name}
+
+ {e.icon}
+
+
+
+
+ ))}
+
+ >
+ );
+}
diff --git a/src/app_modules/investasi/portofolio/view.tsx b/src/app_modules/investasi/portofolio/view.tsx
new file mode 100644
index 00000000..f3f46193
--- /dev/null
+++ b/src/app_modules/investasi/portofolio/view.tsx
@@ -0,0 +1,105 @@
+"use client"
+
+import { AspectRatio, Box, Card, CardSection, Divider, Grid, Group, Image, Slider, Stack, Text, Title } from "@mantine/core"
+import dataDummy from "../dummy/data_dummy.json"
+import moment from "moment"
+import { useRouter } from "next/navigation"
+import { IconCircleCheck } from "@tabler/icons-react"
+
+
+export default function PortofolioInvestasi() {
+ const router = useRouter()
+ return<>
+
+ {dataDummy.map((e) => (
+ router.push(`/dev/investasi/porto_detail/${e.id}`)}>
+
+
+ {/* {e.imagesId ? (
+
+ ) : (
+
+ )} */}
+
+
+
+
+
+
+
+
+ {e.title}
+
+
+
+
+
+
+ Dana Dibutuhkan
+ Rp. {e.targetDana}
+
+
+ Harga Per Lembar
+ Rp. {e.hargaLembar}
+
+
+
+
+
+
+ ROI
+ {e.roi}%
+
+
+ Total Lembar
+ {e.totalLembar}
+
+
+
+
+
+
+
+
+ {(() => {
+ if (
+ e.masterPencarianInvestorId -
+ moment(new Date()).diff(new Date(e.createdAt), "days") ===
+ 0
+ ) {
+ return (
+ <>
+
+
+ Selesai
+
+ >
+ );
+ } else {
+ return<>
+
+ Sisa waktu:
+
+ {e.masterPencarianInvestorId -
+ moment(new Date()).diff(new Date(e.createdAt), "days")}
+
+ Hari
+
+ >
+ }
+ })()}
+
+
+ ))}
+ >
+}
\ No newline at end of file
diff --git a/src/app_modules/investasi/upload_bukti/view.tsx b/src/app_modules/investasi/upload_bukti/view.tsx
index 9376b015..7b95dfaf 100644
--- a/src/app_modules/investasi/upload_bukti/view.tsx
+++ b/src/app_modules/investasi/upload_bukti/view.tsx
@@ -1,29 +1,109 @@
-"use client"
+"use client";
-import { Warna } from "@/app/lib/warna"
-import { Button, CopyButton, Grid, Group, Text } from "@mantine/core"
+import { Warna } from "@/app/lib/warna";
+import {
+ AspectRatio,
+ Button,
+ Center,
+ CopyButton,
+ FileButton,
+ Grid,
+ Group,
+ Image,
+ Text,
+} from "@mantine/core";
+import { IconCamera } from "@tabler/icons-react";
+import { useRouter } from "next/navigation";
+import { useState } from "react";
+import toast from "react-simple-toasts";
-export default function UploadBuktiTransferInvestasi(){
- return<>
-
+export default function UploadBuktiTransferInvestasi() {
+ const router = useRouter()
+ const [fl, setFl] = useState(null);
+ const [img, setImg] = useState(null);
+ return (
+ <>
+
-
- Rekening
+ Rekening
-
- 908765467897654567
+ 908765467897654567
-
-
- {({ copied, copy }) => (
-
- )}
-
+
+ {({ copied, copy }) => (
+
+ )}
+
-
+
+
+
+ Total Harga
+
+
+ Rp. 100.000
+
+
+
+
+ {/* Upload */}
+
+ {
+ const buffer = URL.createObjectURL(
+ new Blob([new Uint8Array(await files.arrayBuffer())])
+ );
+ setImg(buffer);
+ setFl(files);
+ }}
+ accept="image/png,image/jpeg"
+ >
+ {(props) => (
+
+ )}
+
+
+
+ {img ? (
+
+ ) : (
+
+ )}
+
+
+
+ {img === null ? (
+
+ ) : (
+
+ )}
+
>
-}
\ No newline at end of file
+ );
+}