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, + }); + }} + /> + ({ value: e.id, label: e.name }))} + data={[]} + onChange={(val) => { + setValue({ + ...(value as any), + periodeDevidenId: val, + }); + }} + /> +