diff --git a/coba.js b/coba.js new file mode 100644 index 00000000..e69de29b diff --git a/package.json b/package.json index 7fead380..7162d8bd 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@emotion/react": "^11.11.1", "@emotion/server": "^11.11.0", + "@mantine/carousel": "^7.1.5", "@mantine/core": "^6.0.17", "@mantine/dropzone": "^7.1.3", "@mantine/hooks": "^6.0.17", @@ -23,15 +24,18 @@ "@types/react-dom": "18.2.7", "@types/uuid": "^9.0.4", "autoprefixer": "10.4.14", + "embla-carousel-react": "^8.0.0-rc14", "eslint": "8.45.0", "eslint-config-next": "13.4.12", "iron-session": "^6.3.1", "jotai": "^2.4.3", "lodash": "^4.17.21", + "moment": "^2.29.4", "next": "^13.5.4-canary.8", "postcss": "8.4.27", "react": "18.2.0", "react-dom": "18.2.0", + "react-responsive-carousel": "^3.2.23", "react-simple-toasts": "^5.10.0", "react-toastify": "^9.1.3", "socket.io-client": "^4.7.2", diff --git a/public/aset/dummy_file.pdf b/public/aset/dummy_file.pdf new file mode 100644 index 00000000..92b2f709 Binary files /dev/null and b/public/aset/dummy_file.pdf differ diff --git a/public/investasi/4e37855a-049c-45a6-a459-0af2d4a23445.jpeg b/public/investasi/4e37855a-049c-45a6-a459-0af2d4a23445.jpeg new file mode 100644 index 00000000..0df106e4 Binary files /dev/null and b/public/investasi/4e37855a-049c-45a6-a459-0af2d4a23445.jpeg differ diff --git a/src/app/api/investasi/gambar/[id]/route.ts b/src/app/api/investasi/gambar/[id]/route.ts index c684886d..85584050 100644 --- a/src/app/api/investasi/gambar/[id]/route.ts +++ b/src/app/api/investasi/gambar/[id]/route.ts @@ -6,34 +6,27 @@ export async function GET( req: NextRequest, { params }: { params: { id: string } } ) { - + const data = await prisma.images.findUnique({ + where: { + id: params.id, + }, + select: { + url: true, + }, + }); - console.log(params.id) - const data = await prisma.images.findUnique({ - where: { - id: params.id, - }, - select: { - url: true, - }, - }); - - console.log(data) - - // return data - - if (!fs.existsSync(`./public/investasi/${data?.url}`)) { - const fl = fs.readFileSync(`./public/aset/no-img.png`); - return new NextResponse(fl, { - headers: { - "Content-Type": "image/png", - }, - }); - } - const fl = fs.readFileSync(`./public/investasi/${data?.url}`); + if (!fs.existsSync(`./public/investasi/${data?.url}`)) { + const fl = fs.readFileSync(`./public/aset/no-img.png`); return new NextResponse(fl, { headers: { "Content-Type": "image/png", }, }); + } + const fl = fs.readFileSync(`./public/investasi/${data?.url}`); + return new NextResponse(fl, { + headers: { + "Content-Type": "image/png", + }, + }); } diff --git a/src/app/dev/investasi/berita/[id]/layout.tsx b/src/app/dev/investasi/berita/[id]/layout.tsx new file mode 100644 index 00000000..d8d02c47 --- /dev/null +++ b/src/app/dev/investasi/berita/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/berita/[id]/page.tsx b/src/app/dev/investasi/berita/[id]/page.tsx new file mode 100644 index 00000000..86171eaf --- /dev/null +++ b/src/app/dev/investasi/berita/[id]/page.tsx @@ -0,0 +1,9 @@ +import { BeritaInvestasi } from "@/app_modules/investasi"; + +export default async function Page({params}: {params: {id: string}}) { + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/detail/[id]/layout.tsx b/src/app/dev/investasi/detail/[id]/layout.tsx new file mode 100644 index 00000000..bd4ccaa3 --- /dev/null +++ b/src/app/dev/investasi/detail/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/detail/[id]/page.tsx b/src/app/dev/investasi/detail/[id]/page.tsx new file mode 100644 index 00000000..ddef4c07 --- /dev/null +++ b/src/app/dev/investasi/detail/[id]/page.tsx @@ -0,0 +1,7 @@ +import { DetailInvestasi } 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/dev/investasi/detail_berita/[id]/layout.tsx b/src/app/dev/investasi/detail_berita/[id]/layout.tsx new file mode 100644 index 00000000..c75c0992 --- /dev/null +++ b/src/app/dev/investasi/detail_berita/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/detail_berita/[id]/page.tsx b/src/app/dev/investasi/detail_berita/[id]/page.tsx new file mode 100644 index 00000000..64c934ec --- /dev/null +++ b/src/app/dev/investasi/detail_berita/[id]/page.tsx @@ -0,0 +1,7 @@ +import { DetailBeritaInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return <> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_dokumen/[id]/layout.tsx b/src/app/dev/investasi/detail_dokumen/[id]/layout.tsx new file mode 100644 index 00000000..5f040396 --- /dev/null +++ b/src/app/dev/investasi/detail_dokumen/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailDokumenInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/detail_dokumen/[id]/page.tsx b/src/app/dev/investasi/detail_dokumen/[id]/page.tsx new file mode 100644 index 00000000..2eba85c7 --- /dev/null +++ b/src/app/dev/investasi/detail_dokumen/[id]/page.tsx @@ -0,0 +1,7 @@ +import { DetailDokumenInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_porto/[id]/layout.tsx b/src/app/dev/investasi/detail_porto/[id]/layout.tsx new file mode 100644 index 00000000..ae1e2728 --- /dev/null +++ b/src/app/dev/investasi/detail_porto/[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/detail_porto/[id]/page.tsx b/src/app/dev/investasi/detail_porto/[id]/page.tsx new file mode 100644 index 00000000..145ca1c8 --- /dev/null +++ b/src/app/dev/investasi/detail_porto/[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/dev/investasi/detail_prospektus/[id]/layout.tsx b/src/app/dev/investasi/detail_prospektus/[id]/layout.tsx new file mode 100644 index 00000000..49640fcf --- /dev/null +++ b/src/app/dev/investasi/detail_prospektus/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailPropektus } 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/detail_prospektus/[id]/page.tsx b/src/app/dev/investasi/detail_prospektus/[id]/page.tsx new file mode 100644 index 00000000..ecdbca72 --- /dev/null +++ b/src/app/dev/investasi/detail_prospektus/[id]/page.tsx @@ -0,0 +1,7 @@ +import { DetailPropektus } from "@/app_modules/investasi"; + +export default async function Page(params:any) { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_saham_terbeli/[id]/layout.tsx b/src/app/dev/investasi/detail_saham_terbeli/[id]/layout.tsx new file mode 100644 index 00000000..fed30f04 --- /dev/null +++ b/src/app/dev/investasi/detail_saham_terbeli/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailSahamTerbeli } 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/detail_saham_terbeli/[id]/page.tsx b/src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx new file mode 100644 index 00000000..a5a27e81 --- /dev/null +++ b/src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx @@ -0,0 +1,5 @@ +import { DetailSahamTerbeli } from "@/app_modules/investasi"; + +export default async function Page({ params }: { params: { id: string } }) { + return ; +} 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_berita/[id]/layout.tsx b/src/app/dev/investasi/edit_berita/[id]/layout.tsx new file mode 100644 index 00000000..68855271 --- /dev/null +++ b/src/app/dev/investasi/edit_berita/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutEditBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: { children: React.ReactNode }) { + return<> + {children} + +} diff --git a/src/app/dev/investasi/edit_berita/[id]/page.tsx b/src/app/dev/investasi/edit_berita/[id]/page.tsx new file mode 100644 index 00000000..12402450 --- /dev/null +++ b/src/app/dev/investasi/edit_berita/[id]/page.tsx @@ -0,0 +1,7 @@ +import { EditBeritaInvestasi } from "@/app_modules/investasi"; + +export default async function Page(params:any) { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit_dokumen/[id]/layout.tsx b/src/app/dev/investasi/edit_dokumen/[id]/layout.tsx new file mode 100644 index 00000000..b767c257 --- /dev/null +++ b/src/app/dev/investasi/edit_dokumen/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutEditDokumenInvestasi } 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_dokumen/[id]/page.tsx b/src/app/dev/investasi/edit_dokumen/[id]/page.tsx new file mode 100644 index 00000000..ac9561d9 --- /dev/null +++ b/src/app/dev/investasi/edit_dokumen/[id]/page.tsx @@ -0,0 +1,7 @@ +import { EditDokumenInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file 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/edit_prospektus/[id]/layout.tsx b/src/app/dev/investasi/edit_prospektus/[id]/layout.tsx new file mode 100644 index 00000000..a5e8156c --- /dev/null +++ b/src/app/dev/investasi/edit_prospektus/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutEditProspektusInvestasi } 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_prospektus/[id]/page.tsx b/src/app/dev/investasi/edit_prospektus/[id]/page.tsx new file mode 100644 index 00000000..712874be --- /dev/null +++ b/src/app/dev/investasi/edit_prospektus/[id]/page.tsx @@ -0,0 +1,7 @@ +import { EditProspektusInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file 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/metode_transfer/layout.tsx b/src/app/dev/investasi/metode_transfer/layout.tsx new file mode 100644 index 00000000..eb622d97 --- /dev/null +++ b/src/app/dev/investasi/metode_transfer/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutMetodeTransferInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/metode_transfer/page.tsx b/src/app/dev/investasi/metode_transfer/page.tsx new file mode 100644 index 00000000..94595b3a --- /dev/null +++ b/src/app/dev/investasi/metode_transfer/page.tsx @@ -0,0 +1,9 @@ +import { MetodeTransferInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/proses_investasi/layout.tsx b/src/app/dev/investasi/proses_investasi/layout.tsx new file mode 100644 index 00000000..2d8b6959 --- /dev/null +++ b/src/app/dev/investasi/proses_investasi/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutProsesInvestasi } 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/proses_investasi/page.tsx b/src/app/dev/investasi/proses_investasi/page.tsx new file mode 100644 index 00000000..1e091f48 --- /dev/null +++ b/src/app/dev/investasi/proses_investasi/page.tsx @@ -0,0 +1,7 @@ +import { ProsesInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/upload_bukti/layout.tsx b/src/app/dev/investasi/upload_bukti/layout.tsx new file mode 100644 index 00000000..2e61e6c1 --- /dev/null +++ b/src/app/dev/investasi/upload_bukti/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutBuktiTransferInvestasi } 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/upload_bukti/page.tsx b/src/app/dev/investasi/upload_bukti/page.tsx new file mode 100644 index 00000000..681868f8 --- /dev/null +++ b/src/app/dev/investasi/upload_bukti/page.tsx @@ -0,0 +1,5 @@ +import { UploadBuktiTransferInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return ; +} diff --git a/src/app/lib/app_route.ts b/src/app/lib/app_route.ts new file mode 100644 index 00000000..df36ab8b --- /dev/null +++ b/src/app/lib/app_route.ts @@ -0,0 +1,18 @@ +export const RouteInvestasi = { + //INVESTASI +// portofolio +portofolio: "/dev/investasi/main/portofolio", + // proses beli saham + metode_transfer: "/dev/investasi/metode_transfer", + // edit // + edit_intro: "/dev/investasi/edit_intro/", + edit_prospektus: "/dev/investasi/edit_prospektus/", + edit_dokumen: "/dev/investasi/edit_dokumen/", + edit_berita: "/dev/investasi/edit_berita/", + // detail // + berita: "/dev/investasi/berita/", + detail_saham_terbeli: "/dev/investasi/detail_saham_terbeli/", + detail_prospektus: "/dev/investasi/detail_prospektus/", + detail_dokumen: "/dev/investasi/detail_dokumen/", + detail_berita: "/dev/investasi/detail_berita/", +}; diff --git a/src/app_modules/crowd/main/view.tsx b/src/app_modules/crowd/main/view.tsx index eba52ea1..ceb4982a 100644 --- a/src/app_modules/crowd/main/view.tsx +++ b/src/app_modules/crowd/main/view.tsx @@ -1,5 +1,6 @@ "use client"; +import { Warna } from "@/app/lib/warna"; import { Button, Center, Stack, Text, Title } from "@mantine/core"; import { useRouter } from "next/navigation"; import toast from "react-simple-toasts"; @@ -14,14 +15,16 @@ export default function MainCrowd() { HIPMI Crowd Funding + + + ); +} diff --git a/src/app_modules/investasi/detail_berita/layout.tsx b/src/app_modules/investasi/detail_berita/layout.tsx new file mode 100644 index 00000000..3342c2fb --- /dev/null +++ b/src/app_modules/investasi/detail_berita/layout.tsx @@ -0,0 +1,19 @@ +"use client"; + +import HeaderTamplate from "@/app_modules/component/header_tamplate"; +import { AppShell } from "@mantine/core"; +import React from "react"; + +export default function LayoutDetailBeritaInvestasi({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + }> + {children} + + + ); +} diff --git a/src/app_modules/investasi/detail_berita/view.tsx b/src/app_modules/investasi/detail_berita/view.tsx new file mode 100644 index 00000000..8916cb27 --- /dev/null +++ b/src/app_modules/investasi/detail_berita/view.tsx @@ -0,0 +1,10 @@ +"use client" + +import { Text } from "@mantine/core" + +export default function DetailBeritaInvestasi(){ + return<> + Berita + + +} \ No newline at end of file diff --git a/src/app_modules/investasi/detail_dokumen/layout.tsx b/src/app_modules/investasi/detail_dokumen/layout.tsx new file mode 100644 index 00000000..46231d13 --- /dev/null +++ b/src/app_modules/investasi/detail_dokumen/layout.tsx @@ -0,0 +1,19 @@ +"use client"; + +import HeaderTamplate from "@/app_modules/component/header_tamplate"; +import { AppShell } from "@mantine/core"; +import React from "react"; + +export default function LayoutDetailDokumenInvestasi({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + }> + {children} + + + ); +} diff --git a/src/app_modules/investasi/detail_dokumen/view.tsx b/src/app_modules/investasi/detail_dokumen/view.tsx new file mode 100644 index 00000000..68d7e9c2 --- /dev/null +++ b/src/app_modules/investasi/detail_dokumen/view.tsx @@ -0,0 +1,36 @@ +"use client"; + +import { Paper, Grid, Center, Text } from "@mantine/core"; +import { IconChevronRight } from "@tabler/icons-react"; +import Link from "next/link"; + +export default function DetailDokumenInvestasi() { + return ( + <> + + + ""} + > + + Nama File.pdf + + +
+ +
+
+
+
+ + + ); +} diff --git a/src/app_modules/investasi/detail_porto/layout.tsx b/src/app_modules/investasi/detail_porto/layout.tsx new file mode 100644 index 00000000..e30bc105 --- /dev/null +++ b/src/app_modules/investasi/detail_porto/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/detail_porto/view.tsx b/src/app_modules/investasi/detail_porto/view.tsx new file mode 100644 index 00000000..a2e48637 --- /dev/null +++ b/src/app_modules/investasi/detail_porto/view.tsx @@ -0,0 +1,141 @@ +"use client"; +import { RouteInvestasi } from "@/app/lib/app_route"; +import { + ActionIcon, + AspectRatio, + Avatar, + Box, + Center, + 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({id}: {id: string}) { + const router = useRouter(); + const listBox = [ + { + id: 1, + name: "Prospektus", + icon: , + route: RouteInvestasi.edit_prospektus, + }, + { + id: 2, + name: "Dokumen", + icon: , + route: RouteInvestasi.edit_dokumen, + }, + { + id: 3, + name: "Berita", + icon: , + route: RouteInvestasi.edit_berita, + }, + ]; + return ( + <> + {/* + + + Username + + Sisa waktu : 20 Hari + */} +
+ 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) => ( + router.push(e.route + `${id}`)}> + + + {e.name} + + {e.icon} + + + + + ))} + */} + + ); +} diff --git a/src/app_modules/investasi/detail_prospektus/layout.tsx b/src/app_modules/investasi/detail_prospektus/layout.tsx new file mode 100644 index 00000000..ac6d266d --- /dev/null +++ b/src/app_modules/investasi/detail_prospektus/layout.tsx @@ -0,0 +1,24 @@ +"use client"; + +import HeaderTamplate from "@/app_modules/component/header_tamplate"; +import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core"; +import { IconArrowLeft } 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 LayoutDetailProspektus({ + children, +}: { + children: React.ReactNode; +}) { + const router = useRouter(); + return ( + <> + }> + {children} + + + ); +} diff --git a/src/app_modules/investasi/detail_prospektus/view.tsx b/src/app_modules/investasi/detail_prospektus/view.tsx new file mode 100644 index 00000000..fcb6274b --- /dev/null +++ b/src/app_modules/investasi/detail_prospektus/view.tsx @@ -0,0 +1,36 @@ +"use client"; + +import { Paper, Grid, Center, Text } from "@mantine/core"; +import { IconChevronRight } from "@tabler/icons-react"; +import Link from "next/link"; + +export default function DetailPropektus() { + return ( + <> + + + ""} + > + + Nama File.pdf + + +
+ +
+
+
+
+ + + ); +} diff --git a/src/app_modules/investasi/detail_saham_terbeli/layout.tsx b/src/app_modules/investasi/detail_saham_terbeli/layout.tsx new file mode 100644 index 00000000..6122fe9b --- /dev/null +++ b/src/app_modules/investasi/detail_saham_terbeli/layout.tsx @@ -0,0 +1,19 @@ +"use client"; + +import HeaderTamplate from "@/app_modules/component/header_tamplate"; +import { AppShell } from "@mantine/core"; +import React from "react"; + +export default function LayoutDetailSahamTerbeli({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + }> + {children} + + + ); +} diff --git a/src/app_modules/investasi/detail_saham_terbeli/view.tsx b/src/app_modules/investasi/detail_saham_terbeli/view.tsx new file mode 100644 index 00000000..51ec0c3d --- /dev/null +++ b/src/app_modules/investasi/detail_saham_terbeli/view.tsx @@ -0,0 +1,172 @@ +"use client"; + +import { RouteInvestasi } from "@/app/lib/app_route"; +import { Warna } from "@/app/lib/warna"; +import { + ActionIcon, + AspectRatio, + Avatar, + Box, + Button, + Center, + Divider, + 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 DetailSahamTerbeli({id}: {id: string}) { + const router = useRouter(); + const listBox = [ + { + id: 1, + name: "Prospektus", + icon: , + route: RouteInvestasi.detail_prospektus, + }, + { + id: 2, + name: "Dokumen", + icon: , + route: RouteInvestasi.detail_dokumen, + }, + { + id: 3, + name: "Berita", + icon: , + route: RouteInvestasi.detail_berita, + }, + ]; + return ( + <> + + + + Username + + Sisa waktu : 20 Hari + + + {/* Gambar Investasi */} + + + + + + + {/* 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 + + + + + + + + {/* Saham Terbeli */} + +
+ Saham Anda +
+ + + + + Total Pembelian + Rp. 0 + + + + + + + Lembar Dibeli + 100 + + + + +
+ + {/* List Box */} + + {listBox.map((e) => ( + router.push(e.route + `${id}`)}> +
+ + + {e.name} + + {e.icon} + + + +
+
+ ))} +
+ + ); +} diff --git a/src/app_modules/investasi/dummy/data_dummy.json b/src/app_modules/investasi/dummy/data_dummy.json new file mode 100644 index 00000000..9e3d83d0 --- /dev/null +++ b/src/app_modules/investasi/dummy/data_dummy.json @@ -0,0 +1,112 @@ +[ + { + "id": "clny2l8e20002tlagig62qv50", + "title": "Event EO", + "targetDana": "20000", + "hargaLembar": "1000", + "totalLembar": "200", + "roi": "7", + "active": true, + "createdAt": "2023-10-20T03:47:19.610Z", + "updatedAt": "2023-10-20T03:47:19.610Z", + "authorId": "clntsruqk0002tlrfyc9vzhxx", + "masterPeriodeDevidenId": "Akhir Project", + "masterPembagianDevidenId": 3, + "masterPencarianInvestorId": 60, + "imagesId": "clny2l8dj0000tlagcpsi9dmz", + "persentase": 40, + "saham_beli": 1, + "statusPorto": { + "id": 1, + "status": "Draft" + } + }, + { + "id": "clnxyjc0r0002tlamg8fn9ubk", + "title": "Subway ", + "targetDana": "1600000000", + "hargaLembar": "1000", + "totalLembar": "1600000", + "roi": "6", + "active": true, + "createdAt": "2023-10-20T01:53:52.539Z", + "updatedAt": "2023-10-20T01:53:52.539Z", + "authorId": "clntxvesu0002tlnbz030gx30", + "masterPeriodeDevidenId": "Selamanya", + "masterPembagianDevidenId": 6, + "masterPencarianInvestorId": 4, + "imagesId": "clnxyjc070000tlamc5jmsqse", + "persentase": 60, + "saham_beli": 0, + "statusPorto": { + "id": 2, + "status": "Review" + } + }, + { + "id": "clnwzrcqz0002tlqlrb3b8kif", + "title": "Weeding EO", + "targetDana": "300000", + "hargaLembar": "1000", + "totalLembar": "3000", + "roi": "6", + "active": true, + "createdAt": "2023-10-19T09:40:20.171Z", + "updatedAt": "2023-10-19T09:40:20.171Z", + "authorId": "clntxvesu0002tlnbz030gx30", + "masterPeriodeDevidenId": "Selamanya", + "masterPembagianDevidenId": 6, + "masterPencarianInvestorId": 30, + "imagesId": "clnwzrcqs0000tlqlfr2cmbo5", + "persentase": 30, + "saham_beli": 1, + "statusPorto": { + "id": 3, + "status": "Accept" + } + }, + { + "id": "clnwzmah00005tlwdn1h7htp6", + "title": "Exi EO", + "targetDana": "100000", + "hargaLembar": "1000", + "totalLembar": "1000", + "roi": "3", + "active": true, + "createdAt": "2023-10-19T09:36:23.940Z", + "updatedAt": "2023-10-19T09:36:23.940Z", + "authorId": "clntxvesu0002tlnbz030gx30", + "masterPeriodeDevidenId": "Selamanya", + "masterPembagianDevidenId": 3, + "masterPencarianInvestorId": 60, + "imagesId": "clnwzmagq0003tlwd2gldlzgb", + "persentase": 50, + "saham_beli": 1, + "statusPorto": { + "id": 2, + "status": "Review" + } + }, + { + "id": "clnwyvtlx0002tlfopdvez4yr", + "title": "Party EO", + "targetDana": "30000", + "hargaLembar": "1000", + "totalLembar": "30", + "roi": "1", + "active": true, + "createdAt": "2023-10-19T09:15:49.030Z", + "updatedAt": "2023-10-19T09:15:49.030Z", + "authorId": "clntxvesu0002tlnbz030gx30", + "masterPeriodeDevidenId": "Selamanya", + "masterPembagianDevidenId": 3, + "masterPencarianInvestorId": 90, + "imagesId": "clnwyvtlh0000tlfof0ec1x9k", + "persentase": 80, + "saham_beli": 0, + "statusPorto": { + "id": 3, + "status": "Accept" + } + } +] 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..0f4d533e --- /dev/null +++ b/src/app_modules/investasi/edit/view.tsx @@ -0,0 +1,57 @@ +"use client"; + +import { RouteInvestasi } from "@/app/lib/app_route"; +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: RouteInvestasi.edit_intro, + }, + { + id: 2, + name: "Prospektus", + route: RouteInvestasi.edit_prospektus, + }, + { + id: 3, + name: "Dokumen", + route: RouteInvestasi.edit_dokumen, + }, + { + id: 4, + name: "Berita", + route: RouteInvestasi.edit_berita, + }, + ]; + return ( + <> + {listEdit.map((e) => ( + router.push(e.route + `${id}`)} + > + + + {e.name} + + +
+ +
+
+
+
+ ))} + + ); +} diff --git a/src/app_modules/investasi/edit_berita/layout.tsx b/src/app_modules/investasi/edit_berita/layout.tsx new file mode 100644 index 00000000..0bcc3ada --- /dev/null +++ b/src/app_modules/investasi/edit_berita/layout.tsx @@ -0,0 +1,19 @@ +"use client"; + +import HeaderTamplate from "@/app_modules/component/header_tamplate"; +import { AppShell } from "@mantine/core"; +import React from "react"; + +export default function LayoutEditBeritaInvestasi({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + }> + {children} + + + ); +} diff --git a/src/app_modules/investasi/edit_berita/view.tsx b/src/app_modules/investasi/edit_berita/view.tsx new file mode 100644 index 00000000..b3148247 --- /dev/null +++ b/src/app_modules/investasi/edit_berita/view.tsx @@ -0,0 +1,10 @@ +"use client" + +import { Text } from "@mantine/core" + +export default function EditBeritaInvestasi(){ + return<> + Berita + + +} \ No newline at end of file diff --git a/src/app_modules/investasi/edit_dokumen/layout.tsx b/src/app_modules/investasi/edit_dokumen/layout.tsx new file mode 100644 index 00000000..7b32b537 --- /dev/null +++ b/src/app_modules/investasi/edit_dokumen/layout.tsx @@ -0,0 +1,19 @@ +"use client"; + +import HeaderTamplate from "@/app_modules/component/header_tamplate"; +import { AppShell } from "@mantine/core"; +import React from "react"; + +export default function LayoutEditDokumenInvestasi({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + }> + {children} + + + ); +} diff --git a/src/app_modules/investasi/edit_dokumen/view.tsx b/src/app_modules/investasi/edit_dokumen/view.tsx new file mode 100644 index 00000000..739fd86b --- /dev/null +++ b/src/app_modules/investasi/edit_dokumen/view.tsx @@ -0,0 +1,53 @@ +"use client" + +import { Paper, Grid, Center, Title, Divider, Button, Text } from "@mantine/core"; +import { IconChevronRight } from "@tabler/icons-react"; +import Link from "next/link"; +import { useState } from "react"; + +export default function EditDokumenInvestasi(){ + const [edit, setEdit] = useState(false); + + return ( + <> + {edit ? ( + + + ""} + > + + Nama File.pdf + + +
+ +
+
+
+
+ + ) : ( +
+ Tidak ada file +
+ )} + + + +
+ +
+ + ); +} \ No newline at end of file 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..4dc2fc9d --- /dev/null +++ b/src/app_modules/investasi/edit_intro/view.tsx @@ -0,0 +1,161 @@ +"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); + 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, + }); + }} + /> +