feat
Desc: - Detail portofolio investasi - Detail saham terbeli - Berita - Detail berita - Detail dokumen - Detail prospektus - Edit berita - Edit dokumen - Edit prospektus #No issue
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
|
"@mantine/carousel": "^7.1.5",
|
||||||
"@mantine/core": "^6.0.17",
|
"@mantine/core": "^6.0.17",
|
||||||
"@mantine/dropzone": "^7.1.3",
|
"@mantine/dropzone": "^7.1.3",
|
||||||
"@mantine/hooks": "^6.0.17",
|
"@mantine/hooks": "^6.0.17",
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
"@types/react-dom": "18.2.7",
|
"@types/react-dom": "18.2.7",
|
||||||
"@types/uuid": "^9.0.4",
|
"@types/uuid": "^9.0.4",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "10.4.14",
|
||||||
|
"embla-carousel-react": "^8.0.0-rc14",
|
||||||
"eslint": "8.45.0",
|
"eslint": "8.45.0",
|
||||||
"eslint-config-next": "13.4.12",
|
"eslint-config-next": "13.4.12",
|
||||||
"iron-session": "^6.3.1",
|
"iron-session": "^6.3.1",
|
||||||
@@ -33,6 +35,7 @@
|
|||||||
"postcss": "8.4.27",
|
"postcss": "8.4.27",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
|
"react-responsive-carousel": "^3.2.23",
|
||||||
"react-simple-toasts": "^5.10.0",
|
"react-simple-toasts": "^5.10.0",
|
||||||
"react-toastify": "^9.1.3",
|
"react-toastify": "^9.1.3",
|
||||||
"socket.io-client": "^4.7.2",
|
"socket.io-client": "^4.7.2",
|
||||||
|
|||||||
14
src/app/dev/investasi/berita/[id]/layout.tsx
Normal file
14
src/app/dev/investasi/berita/[id]/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { LayoutBeritaInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutBeritaInvestasi>{children}</LayoutBeritaInvestasi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
9
src/app/dev/investasi/berita/[id]/page.tsx
Normal file
9
src/app/dev/investasi/berita/[id]/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { BeritaInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<BeritaInvestasi id={params.id}/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,8 +1,14 @@
|
|||||||
import { LayoutDetailInvestasi } from "@/app_modules/investasi";
|
import { LayoutDetailInvestasi } from "@/app_modules/investasi";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
export default async function Layout({
|
||||||
return<>
|
children,
|
||||||
<LayoutDetailInvestasi>{children}</LayoutDetailInvestasi>
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutDetailInvestasi>{children}</LayoutDetailInvestasi>
|
||||||
</>
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { DetailInvestasi } from "@/app_modules/investasi";
|
import { DetailInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
return<>
|
return<>
|
||||||
<DetailInvestasi/>
|
<DetailInvestasi id={params.id}/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
14
src/app/dev/investasi/detail_berita/[id]/layout.tsx
Normal file
14
src/app/dev/investasi/detail_berita/[id]/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { LayoutDetailBeritaInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutDetailBeritaInvestasi>{children}</LayoutDetailBeritaInvestasi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
7
src/app/dev/investasi/detail_berita/[id]/page.tsx
Normal file
7
src/app/dev/investasi/detail_berita/[id]/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { DetailBeritaInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return <>
|
||||||
|
<DetailBeritaInvestasi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
14
src/app/dev/investasi/detail_dokumen/[id]/layout.tsx
Normal file
14
src/app/dev/investasi/detail_dokumen/[id]/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { LayoutDetailDokumenInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutDetailDokumenInvestasi>{children}</LayoutDetailDokumenInvestasi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
7
src/app/dev/investasi/detail_dokumen/[id]/page.tsx
Normal file
7
src/app/dev/investasi/detail_dokumen/[id]/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { DetailDokumenInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return<>
|
||||||
|
<DetailDokumenInvestasi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -2,6 +2,6 @@ import { PortofolioDetailInvestasi } from "@/app_modules/investasi";
|
|||||||
|
|
||||||
export default async function Page({params} : {params: {id: string}}) {
|
export default async function Page({params} : {params: {id: string}}) {
|
||||||
return<>
|
return<>
|
||||||
<PortofolioDetailInvestasi/>
|
<PortofolioDetailInvestasi id={params.id}/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
8
src/app/dev/investasi/detail_prospektus/[id]/layout.tsx
Normal file
8
src/app/dev/investasi/detail_prospektus/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { LayoutDetailPropektus } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||||
|
return<>
|
||||||
|
<LayoutDetailPropektus>{children}</LayoutDetailPropektus>
|
||||||
|
</>
|
||||||
|
}
|
||||||
7
src/app/dev/investasi/detail_prospektus/[id]/page.tsx
Normal file
7
src/app/dev/investasi/detail_prospektus/[id]/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { DetailPropektus } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page(params:any) {
|
||||||
|
return<>
|
||||||
|
<DetailPropektus/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { LayoutDetailSahamTerbeli } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||||
|
return<>
|
||||||
|
<LayoutDetailSahamTerbeli>{children}</LayoutDetailSahamTerbeli>
|
||||||
|
</>
|
||||||
|
}
|
||||||
5
src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx
Normal file
5
src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { DetailSahamTerbeli } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
return <DetailSahamTerbeli id={params.id} />;
|
||||||
|
}
|
||||||
8
src/app/dev/investasi/edit_berita/[id]/layout.tsx
Normal file
8
src/app/dev/investasi/edit_berita/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { LayoutEditBeritaInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: { children: React.ReactNode }) {
|
||||||
|
return<>
|
||||||
|
<LayoutEditBeritaInvestasi>{children}</LayoutEditBeritaInvestasi>
|
||||||
|
</>
|
||||||
|
}
|
||||||
7
src/app/dev/investasi/edit_berita/[id]/page.tsx
Normal file
7
src/app/dev/investasi/edit_berita/[id]/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { EditBeritaInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page(params:any) {
|
||||||
|
return<>
|
||||||
|
<EditBeritaInvestasi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
8
src/app/dev/investasi/edit_dokumen/[id]/layout.tsx
Normal file
8
src/app/dev/investasi/edit_dokumen/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { LayoutEditDokumenInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||||
|
return<>
|
||||||
|
<LayoutEditDokumenInvestasi>{children}</LayoutEditDokumenInvestasi>
|
||||||
|
</>
|
||||||
|
}
|
||||||
7
src/app/dev/investasi/edit_dokumen/[id]/page.tsx
Normal file
7
src/app/dev/investasi/edit_dokumen/[id]/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { EditDokumenInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return<>
|
||||||
|
<EditDokumenInvestasi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
8
src/app/dev/investasi/edit_prospektus/[id]/layout.tsx
Normal file
8
src/app/dev/investasi/edit_prospektus/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { LayoutEditProspektusInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||||
|
return<>
|
||||||
|
<LayoutEditProspektusInvestasi>{children}</LayoutEditProspektusInvestasi>
|
||||||
|
</>
|
||||||
|
}
|
||||||
7
src/app/dev/investasi/edit_prospektus/[id]/page.tsx
Normal file
7
src/app/dev/investasi/edit_prospektus/[id]/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { EditProspektusInvestasi } from "@/app_modules/investasi";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return<>
|
||||||
|
<EditProspektusInvestasi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
14
src/app/lib/app_route.ts
Normal file
14
src/app/lib/app_route.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export const RouteInvestasi = {
|
||||||
|
//INVESTASI
|
||||||
|
// 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/",
|
||||||
|
};
|
||||||
19
src/app_modules/investasi/berita/layout.tsx
Normal file
19
src/app_modules/investasi/berita/layout.tsx
Normal file
@@ -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 LayoutBeritaInvestasi({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Berita" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
28
src/app_modules/investasi/berita/view.tsx
Normal file
28
src/app_modules/investasi/berita/view.tsx
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { RouteInvestasi } from "@/app/lib/app_route";
|
||||||
|
import { AspectRatio, Grid, Image, Paper, Text, Title } from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
|
export default function BeritaInvestasi({id}: {id: string}) {
|
||||||
|
const router = useRouter()
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Paper h={100} w={"100%"} bg={"gray"} p={"sm"} onClick={() => router.push(RouteInvestasi.detail_berita + `${id}`)}>
|
||||||
|
<Title order={6}>Judul berita</Title>
|
||||||
|
<Grid pt={5}>
|
||||||
|
<Grid.Col span={8}>
|
||||||
|
<Text fz={12}>
|
||||||
|
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
|
||||||
|
</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={4}>
|
||||||
|
<AspectRatio ratio={16 / 9} h={50} w={100}>
|
||||||
|
<Image alt="" src={"/aset/no-img.png"} />
|
||||||
|
</AspectRatio>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { RouteInvestasi } from "@/app/lib/app_route";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
@@ -25,26 +26,26 @@ import {
|
|||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function DetailInvestasi() {
|
export default function DetailInvestasi({id}: {id: string}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const listBox = [
|
const listBox = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
icon: <IconBookDownload size={70} />,
|
icon: <IconBookDownload size={70} />,
|
||||||
route: "",
|
route: RouteInvestasi.detail_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
icon: <IconFileDescription size={70} />,
|
icon: <IconFileDescription size={70} />,
|
||||||
route: "",
|
route: RouteInvestasi.detail_dokumen
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
icon: <IconSpeakerphone size={70} />,
|
icon: <IconSpeakerphone size={70} />,
|
||||||
route: "",
|
route: RouteInvestasi.berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -124,7 +125,7 @@ export default function DetailInvestasi() {
|
|||||||
{/* List Box */}
|
{/* List Box */}
|
||||||
<Grid mb={"md"}>
|
<Grid mb={"md"}>
|
||||||
{listBox.map((e) => (
|
{listBox.map((e) => (
|
||||||
<Grid.Col span={"auto"} key={e.id}>
|
<Grid.Col span={"auto"} key={e.id} onClick={() => router.push(e.route + `${id}`)}>
|
||||||
<Paper h={100} w={100} bg={"gray.4"} withBorder py={"xs"}>
|
<Paper h={100} w={100} bg={"gray.4"} withBorder py={"xs"}>
|
||||||
<Flex direction={"column"} align={"center"} justify={"center"}>
|
<Flex direction={"column"} align={"center"} justify={"center"}>
|
||||||
<Text fz={12}>{e.name}</Text>
|
<Text fz={12}>{e.name}</Text>
|
||||||
|
|||||||
19
src/app_modules/investasi/detail_berita/layout.tsx
Normal file
19
src/app_modules/investasi/detail_berita/layout.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Detail Berita" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
10
src/app_modules/investasi/detail_berita/view.tsx
Normal file
10
src/app_modules/investasi/detail_berita/view.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
|
import { Text } from "@mantine/core"
|
||||||
|
|
||||||
|
export default function DetailBeritaInvestasi(){
|
||||||
|
return<>
|
||||||
|
<Text>Berita</Text>
|
||||||
|
|
||||||
|
</>
|
||||||
|
}
|
||||||
19
src/app_modules/investasi/detail_dokumen/layout.tsx
Normal file
19
src/app_modules/investasi/detail_dokumen/layout.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Dokumen" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
35
src/app_modules/investasi/detail_dokumen/view.tsx
Normal file
35
src/app_modules/investasi/detail_dokumen/view.tsx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
"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<>
|
||||||
|
<Link
|
||||||
|
href={"https://pii.or.id/uploads/dummies.pdf"}
|
||||||
|
target="_blank"
|
||||||
|
style={{ textDecorationLine: "none" }}
|
||||||
|
>
|
||||||
|
<Paper w={"100%"} h={50} bg={"gray"} mb={"md"}>
|
||||||
|
<Grid
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
h={50}
|
||||||
|
px={"sm"}
|
||||||
|
onClick={() => ""}
|
||||||
|
>
|
||||||
|
<Grid.Col span={10}>
|
||||||
|
<Text>Nama File.pdf</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<Center>
|
||||||
|
<IconChevronRight />
|
||||||
|
</Center>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ export default function LayoutPortofolioDetailInvestasi({
|
|||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate
|
<HeaderTamplate
|
||||||
title="Detail Porto"
|
title="Portofolio Investasi"
|
||||||
icon={<IconEdit />}
|
icon={<IconEdit />}
|
||||||
route2={`/dev/investasi/edit/${id}`}
|
route2={`/dev/investasi/edit/${id}`}
|
||||||
/>
|
/>
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
import { RouteInvestasi } from "@/app/lib/app_route";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
Avatar,
|
Avatar,
|
||||||
Box,
|
Box,
|
||||||
|
Center,
|
||||||
Flex,
|
Flex,
|
||||||
Grid,
|
Grid,
|
||||||
Group,
|
Group,
|
||||||
@@ -21,37 +23,40 @@ import {
|
|||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function PortofolioDetailInvestasi() {
|
export default function PortofolioDetailInvestasi({id}: {id: string}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const listBox = [
|
const listBox = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
icon: <IconBookDownload size={70} />,
|
icon: <IconBookDownload size={70} />,
|
||||||
route: "",
|
route: RouteInvestasi.edit_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
icon: <IconFileDescription size={70} />,
|
icon: <IconFileDescription size={70} />,
|
||||||
route: "",
|
route: RouteInvestasi.edit_dokumen,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
icon: <IconSpeakerphone size={70} />,
|
icon: <IconSpeakerphone size={70} />,
|
||||||
route: "",
|
route: RouteInvestasi.edit_berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Group position="apart" mb={"md"}>
|
{/* <Group position="apart" mb={"md"}>
|
||||||
<Flex align={"center"} gap={"xs"}>
|
<Flex align={"center"} gap={"xs"}>
|
||||||
<Avatar src={"/aset/avatar.png"} />
|
<Avatar src={"/aset/avatar.png"} />
|
||||||
<Text>Username</Text>
|
<Text>Username</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Text>Sisa waktu : 20 Hari</Text>
|
<Text>Sisa waktu : 20 Hari</Text>
|
||||||
</Group>
|
</Group> */}
|
||||||
|
<Center mb={'sm'}>
|
||||||
|
<Text>Sisa waktu : 20 Hari</Text>
|
||||||
|
</Center>
|
||||||
|
|
||||||
<Paper withBorder mb={"md"}>
|
<Paper withBorder mb={"md"}>
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
@@ -117,9 +122,9 @@ export default function PortofolioDetailInvestasi() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{/* List Box */}
|
{/* List Box */}
|
||||||
<Grid mb={"md"}>
|
{/* <Grid mb={"md"}>
|
||||||
{listBox.map((e) => (
|
{listBox.map((e) => (
|
||||||
<Grid.Col span={"auto"} key={e.id}>
|
<Grid.Col span={"auto"} key={e.id} onClick={() => router.push(e.route + `${id}`)}>
|
||||||
<Paper h={100} w={100} bg={"gray.4"} withBorder py={"xs"}>
|
<Paper h={100} w={100} bg={"gray.4"} withBorder py={"xs"}>
|
||||||
<Flex direction={"column"} align={"center"} justify={"center"}>
|
<Flex direction={"column"} align={"center"} justify={"center"}>
|
||||||
<Text fz={12}>{e.name}</Text>
|
<Text fz={12}>{e.name}</Text>
|
||||||
@@ -130,7 +135,7 @@ export default function PortofolioDetailInvestasi() {
|
|||||||
</Paper>
|
</Paper>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid> */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
24
src/app_modules/investasi/detail_prospektus/layout.tsx
Normal file
24
src/app_modules/investasi/detail_prospektus/layout.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Prospektus" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
36
src/app_modules/investasi/detail_prospektus/view.tsx
Normal file
36
src/app_modules/investasi/detail_prospektus/view.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<Link
|
||||||
|
href={"https://pii.or.id/uploads/dummies.pdf"}
|
||||||
|
target="_blank"
|
||||||
|
style={{ textDecorationLine: "none" }}
|
||||||
|
>
|
||||||
|
<Paper w={"100%"} h={50} bg={"gray"} mb={"md"}>
|
||||||
|
<Grid
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
h={50}
|
||||||
|
px={"sm"}
|
||||||
|
onClick={() => ""}
|
||||||
|
>
|
||||||
|
<Grid.Col span={10}>
|
||||||
|
<Text>Nama File.pdf</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<Center>
|
||||||
|
<IconChevronRight />
|
||||||
|
</Center>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
</Link>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
19
src/app_modules/investasi/detail_saham_terbeli/layout.tsx
Normal file
19
src/app_modules/investasi/detail_saham_terbeli/layout.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Saham Terbeli" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
172
src/app_modules/investasi/detail_saham_terbeli/view.tsx
Normal file
172
src/app_modules/investasi/detail_saham_terbeli/view.tsx
Normal file
@@ -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: <IconBookDownload size={70} />,
|
||||||
|
route: RouteInvestasi.detail_prospektus,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Dokumen",
|
||||||
|
icon: <IconFileDescription size={70} />,
|
||||||
|
route: RouteInvestasi.detail_dokumen,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "Berita",
|
||||||
|
icon: <IconSpeakerphone size={70} />,
|
||||||
|
route: RouteInvestasi.detail_berita,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Group position="apart" mb={"md"}>
|
||||||
|
<Flex align={"center"} gap={"xs"}>
|
||||||
|
<Avatar src={"/aset/avatar.png"} />
|
||||||
|
<Text>Username</Text>
|
||||||
|
</Flex>
|
||||||
|
<Text>Sisa waktu : 20 Hari</Text>
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
{/* Gambar Investasi */}
|
||||||
|
<Paper withBorder mb={"md"}>
|
||||||
|
<AspectRatio ratio={16 / 9}>
|
||||||
|
<Image alt="" src={"/aset/no-img.png"} />
|
||||||
|
</AspectRatio>
|
||||||
|
</Paper>
|
||||||
|
|
||||||
|
{/* Title dan Persentase */}
|
||||||
|
<Box mb={"md"}>
|
||||||
|
<Title order={4} mb={"xs"}>
|
||||||
|
Judul Proyek
|
||||||
|
</Title>
|
||||||
|
<Slider
|
||||||
|
disabled
|
||||||
|
size={10}
|
||||||
|
value={60}
|
||||||
|
marks={[{ value: 60, label: "60%" }]}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
{/* Rincian Data */}
|
||||||
|
<Grid p={"md"}>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Stack>
|
||||||
|
<Box>
|
||||||
|
<Text>Terkumpul</Text>
|
||||||
|
<Text>Rp. </Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Dana Dibutuhkan</Text>
|
||||||
|
<Text>Rp. </Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Harga Per Lembar</Text>
|
||||||
|
<Text>Rp. </Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Jadwal Pembagian</Text>
|
||||||
|
<Text>3 Bulan </Text>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Stack>
|
||||||
|
<Box>
|
||||||
|
<Text>Investor</Text>
|
||||||
|
<Text>4657</Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>ROI</Text>
|
||||||
|
<Text>%</Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Total Lembar</Text>
|
||||||
|
<Text>0</Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Pembagian Deviden</Text>
|
||||||
|
<Text>Selamanya</Text>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Divider my={"md"} />
|
||||||
|
|
||||||
|
{/* Saham Terbeli */}
|
||||||
|
<Box>
|
||||||
|
<Center>
|
||||||
|
<Title order={5}>Saham Anda</Title>
|
||||||
|
</Center>
|
||||||
|
<Grid p={"md"}>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Stack>
|
||||||
|
<Box>
|
||||||
|
<Text>Total Pembelian</Text>
|
||||||
|
<Text>Rp. 0</Text>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Stack>
|
||||||
|
<Box>
|
||||||
|
<Text>Lembar Dibeli</Text>
|
||||||
|
<Text>100</Text>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
{/* List Box */}
|
||||||
|
<Grid mb={"sm"} justify="center">
|
||||||
|
{listBox.map((e) => (
|
||||||
|
<Grid.Col span={"auto"} key={e.id} onClick={() => router.push(e.route + `${id}`)}>
|
||||||
|
<Center>
|
||||||
|
<Paper h={100} w={100} bg={"gray.4"} withBorder py={"xs"}>
|
||||||
|
<Flex direction={"column"} align={"center"} justify={"center"}>
|
||||||
|
<Text fz={12}>{e.name}</Text>
|
||||||
|
<ActionIcon variant="transparent" size={60}>
|
||||||
|
{e.icon}
|
||||||
|
</ActionIcon>
|
||||||
|
</Flex>
|
||||||
|
</Paper>
|
||||||
|
</Center>
|
||||||
|
</Grid.Col>
|
||||||
|
))}
|
||||||
|
</Grid>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { RouteInvestasi } from "@/app/lib/app_route";
|
||||||
import { Center, Grid, Group, Paper, Text, Title } from "@mantine/core";
|
import { Center, Grid, Group, Paper, Text, Title } from "@mantine/core";
|
||||||
import { IconChevronRight } from "@tabler/icons-react";
|
import { IconChevronRight } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -10,22 +11,22 @@ export default function EditInvestasi({id}:{id:string}) {
|
|||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "Intro",
|
name: "Intro",
|
||||||
route: "/dev/investasi/edit_intro/",
|
route: RouteInvestasi.edit_intro,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
route: "",
|
route: RouteInvestasi.edit_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
route: "",
|
route: RouteInvestasi.edit_dokumen,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
route: "",
|
route: RouteInvestasi.edit_berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|||||||
19
src/app_modules/investasi/edit_berita/layout.tsx
Normal file
19
src/app_modules/investasi/edit_berita/layout.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Edit Berita" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
10
src/app_modules/investasi/edit_berita/view.tsx
Normal file
10
src/app_modules/investasi/edit_berita/view.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
|
import { Text } from "@mantine/core"
|
||||||
|
|
||||||
|
export default function EditBeritaInvestasi(){
|
||||||
|
return<>
|
||||||
|
<Text>Berita</Text>
|
||||||
|
|
||||||
|
</>
|
||||||
|
}
|
||||||
19
src/app_modules/investasi/edit_dokumen/layout.tsx
Normal file
19
src/app_modules/investasi/edit_dokumen/layout.tsx
Normal file
@@ -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 (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Edit Dokumen" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
53
src/app_modules/investasi/edit_dokumen/view.tsx
Normal file
53
src/app_modules/investasi/edit_dokumen/view.tsx
Normal file
@@ -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 ? (
|
||||||
|
<Link
|
||||||
|
href={"https://pii.or.id/uploads/dummies.pdf"}
|
||||||
|
target="_blank"
|
||||||
|
style={{ textDecorationLine: "none" }}
|
||||||
|
>
|
||||||
|
<Paper w={"100%"} h={50} bg={"gray"} mb={"md"}>
|
||||||
|
<Grid
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
h={50}
|
||||||
|
px={"sm"}
|
||||||
|
onClick={() => ""}
|
||||||
|
>
|
||||||
|
<Grid.Col span={10}>
|
||||||
|
<Text>Nama File.pdf</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<Center>
|
||||||
|
<IconChevronRight />
|
||||||
|
</Center>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<Center>
|
||||||
|
<Title order={4}>Tidak ada file</Title>
|
||||||
|
</Center>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<Divider mt={"lg"} />
|
||||||
|
|
||||||
|
<Center>
|
||||||
|
<Button mt={"md"} compact radius={50}>
|
||||||
|
Upload
|
||||||
|
</Button>
|
||||||
|
</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -10,44 +10,6 @@ import { useState } from "react";
|
|||||||
export default function EditIntroInvestasi() {
|
export default function EditIntroInvestasi() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const [edit, setEdit] = useState(true);
|
const [edit, setEdit] = useState(true);
|
||||||
// return (
|
|
||||||
// <>
|
|
||||||
// {edit ? (
|
|
||||||
// <Link href={"https://pii.or.id/uploads/dummies.pdf"} target="_blank" style={{textDecorationLine: "none"}}>
|
|
||||||
// <Paper w={"100%"} h={50} bg={"gray"} mb={"md"}>
|
|
||||||
// <Grid
|
|
||||||
// align="center"
|
|
||||||
// justify="center"
|
|
||||||
// h={50}
|
|
||||||
// px={"sm"}
|
|
||||||
// onClick={() => ""}
|
|
||||||
// >
|
|
||||||
// <Grid.Col span={10}>
|
|
||||||
// <Text>Nama File.pdf</Text>
|
|
||||||
// </Grid.Col>
|
|
||||||
// <Grid.Col span={2}>
|
|
||||||
// <Center>
|
|
||||||
// <IconChevronRight />
|
|
||||||
// </Center>
|
|
||||||
// </Grid.Col>
|
|
||||||
// </Grid>
|
|
||||||
// </Paper>
|
|
||||||
// </Link>
|
|
||||||
// ) : (
|
|
||||||
// <Center>
|
|
||||||
// <Title order={4}>Tidak ada file</Title>
|
|
||||||
// </Center>
|
|
||||||
// )}
|
|
||||||
|
|
||||||
// <Divider mt={"lg"}/>
|
|
||||||
|
|
||||||
// <Center>
|
|
||||||
// <Button mt={"md"} compact radius={50}>
|
|
||||||
// Upload
|
|
||||||
// </Button>
|
|
||||||
// </Center>
|
|
||||||
// </>
|
|
||||||
// );
|
|
||||||
const [img, setImg] = useState<any | null>();
|
const [img, setImg] = useState<any | null>();
|
||||||
const [value, setValue] = useState({
|
const [value, setValue] = useState({
|
||||||
title: "",
|
title: "",
|
||||||
@@ -189,6 +151,7 @@ export default function EditIntroInvestasi() {
|
|||||||
<Center my={"lg"}>
|
<Center my={"lg"}>
|
||||||
<Button w={200} radius={50}
|
<Button w={200} radius={50}
|
||||||
// onClick={() => onSubmit() }
|
// onClick={() => onSubmit() }
|
||||||
|
onClick={() => router.back()}
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
19
src/app_modules/investasi/edit_propektus/layout.tsx
Normal file
19
src/app_modules/investasi/edit_propektus/layout.tsx
Normal file
@@ -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 LayoutEditProspektusInvestasi({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Edit Prospektus" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
61
src/app_modules/investasi/edit_propektus/view.tsx
Normal file
61
src/app_modules/investasi/edit_propektus/view.tsx
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
"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 EditProspektusInvestasi() {
|
||||||
|
const [edit, setEdit] = useState(true);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{edit ? (
|
||||||
|
<Link
|
||||||
|
href={"https://pii.or.id/uploads/dummies.pdf"}
|
||||||
|
target="_blank"
|
||||||
|
style={{ textDecorationLine: "none" }}
|
||||||
|
>
|
||||||
|
<Paper w={"100%"} h={50} bg={"gray"} mb={"md"}>
|
||||||
|
<Grid
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
h={50}
|
||||||
|
px={"sm"}
|
||||||
|
onClick={() => ""}
|
||||||
|
>
|
||||||
|
<Grid.Col span={10}>
|
||||||
|
<Text>Nama File.pdf</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<Center>
|
||||||
|
<IconChevronRight />
|
||||||
|
</Center>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<Center>
|
||||||
|
<Title order={4}>Tidak ada file</Title>
|
||||||
|
</Center>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<Divider mt={"lg"} />
|
||||||
|
|
||||||
|
<Center>
|
||||||
|
<Button mt={"md"} compact radius={50}>
|
||||||
|
Upload
|
||||||
|
</Button>
|
||||||
|
</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -12,12 +12,28 @@ import UploadBuktiTransferInvestasi from "./upload_bukti/view";
|
|||||||
import LayoutBuktiTransferInvestasi from "./upload_bukti/layout";
|
import LayoutBuktiTransferInvestasi from "./upload_bukti/layout";
|
||||||
import KonfirmasiBuktiInvestasi from "./konfirmasi/view";
|
import KonfirmasiBuktiInvestasi from "./konfirmasi/view";
|
||||||
import PortofolioInvestasi from "./portofolio/view";
|
import PortofolioInvestasi from "./portofolio/view";
|
||||||
import PortofolioDetailInvestasi from "./porto_detail/view";
|
import PortofolioDetailInvestasi from "./detail_porto/view";
|
||||||
import LayoutPortofolioDetailInvestasi from "./porto_detail/layout";
|
import LayoutPortofolioDetailInvestasi from "./detail_porto/layout";
|
||||||
import EditInvestasi from "./edit/view";
|
import EditInvestasi from "./edit/view";
|
||||||
import LayoutEditInvestasi from "./edit/layout";
|
import LayoutEditInvestasi from "./edit/layout";
|
||||||
import EditIntroInvestasi from "./edit_intro/view";
|
import EditIntroInvestasi from "./edit_intro/view";
|
||||||
import LayoutEditIntroInvestasi from "./edit_intro/layout";
|
import LayoutEditIntroInvestasi from "./edit_intro/layout";
|
||||||
|
import EditProspektusInvestasi from "./edit_propektus/view";
|
||||||
|
import LayoutEditProspektusInvestasi from "./edit_propektus/layout";
|
||||||
|
import EditDokumenInvestasi from "./edit_dokumen/view";
|
||||||
|
import LayoutEditDokumenInvestasi from "./edit_dokumen/layout";
|
||||||
|
import EditBeritaInvestasi from "./edit_berita/view";
|
||||||
|
import LayoutEditBeritaInvestasi from "./edit_berita/layout";
|
||||||
|
import DetailSahamTerbeli from "./detail_saham_terbeli/view";
|
||||||
|
import LayoutDetailSahamTerbeli from "./detail_saham_terbeli/layout";
|
||||||
|
import DetailPropektus from "./detail_prospektus/view";
|
||||||
|
import LayoutDetailPropektus from "./detail_prospektus/layout";
|
||||||
|
import DetailDokumenInvestasi from "./detail_dokumen/view";
|
||||||
|
import LayoutDetailDokumenInvestasi from "./detail_dokumen/layout";
|
||||||
|
import DetailBeritaInvestasi from "./detail_berita/view";
|
||||||
|
import LayoutDetailBeritaInvestasi from "./detail_berita/layout";
|
||||||
|
import BeritaInvestasi from "./berita/view";
|
||||||
|
import LayoutBeritaInvestasi from "./berita/layout";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
MainInvestasi,
|
MainInvestasi,
|
||||||
@@ -40,4 +56,21 @@ export {
|
|||||||
LayoutEditInvestasi,
|
LayoutEditInvestasi,
|
||||||
EditIntroInvestasi,
|
EditIntroInvestasi,
|
||||||
LayoutEditIntroInvestasi,
|
LayoutEditIntroInvestasi,
|
||||||
|
EditProspektusInvestasi,
|
||||||
|
LayoutEditProspektusInvestasi,
|
||||||
|
EditDokumenInvestasi,
|
||||||
|
LayoutEditDokumenInvestasi,
|
||||||
|
EditBeritaInvestasi,
|
||||||
|
LayoutEditBeritaInvestasi,
|
||||||
|
DetailSahamTerbeli,
|
||||||
|
LayoutDetailSahamTerbeli,
|
||||||
|
DetailPropektus,
|
||||||
|
LayoutDetailPropektus,
|
||||||
|
DetailDokumenInvestasi,
|
||||||
|
LayoutDetailDokumenInvestasi,
|
||||||
|
DetailBeritaInvestasi,
|
||||||
|
LayoutDetailBeritaInvestasi,
|
||||||
|
BeritaInvestasi,
|
||||||
|
LayoutBeritaInvestasi as LayoutBeritaInvestasi,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export default function MainInvestasi({
|
|||||||
{(() => {
|
{(() => {
|
||||||
if (
|
if (
|
||||||
e.masterPencarianInvestorId -
|
e.masterPencarianInvestorId -
|
||||||
moment(new Date()).diff(new Date(e.createdAt), "days") ===
|
moment(new Date()).diff(new Date(e.createdAt), "days") <=
|
||||||
0
|
0
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,105 +1,255 @@
|
|||||||
"use client"
|
"use client";
|
||||||
|
|
||||||
import { AspectRatio, Box, Card, CardSection, Divider, Grid, Group, Image, Slider, Stack, Text, Title } from "@mantine/core"
|
import {
|
||||||
import dataDummy from "../dummy/data_dummy.json"
|
AspectRatio,
|
||||||
import moment from "moment"
|
Avatar,
|
||||||
import { useRouter } from "next/navigation"
|
Box,
|
||||||
import { IconCircleCheck } from "@tabler/icons-react"
|
Button,
|
||||||
|
Card,
|
||||||
|
CardSection,
|
||||||
|
Collapse,
|
||||||
|
Divider,
|
||||||
|
Flex,
|
||||||
|
Grid,
|
||||||
|
Group,
|
||||||
|
Image,
|
||||||
|
Paper,
|
||||||
|
Slider,
|
||||||
|
Stack,
|
||||||
|
Text,
|
||||||
|
Title,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import dataDummy from "../dummy/data_dummy.json";
|
||||||
|
import moment from "moment";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { IconCaretDown, IconCircleCheck } from "@tabler/icons-react";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
|
||||||
|
import { Carousel } from "react-responsive-carousel";
|
||||||
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
|
import { Warna } from "@/app/lib/warna";
|
||||||
|
import { RouteInvestasi } from "@/app/lib/app_route";
|
||||||
|
|
||||||
export default function PortofolioInvestasi() {
|
export default function PortofolioInvestasi() {
|
||||||
const router = useRouter()
|
const router = useRouter();
|
||||||
return<>
|
return (
|
||||||
|
<>
|
||||||
|
<MyPortofolioInvestasi />
|
||||||
|
<SahamTerbeli />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
{dataDummy.map((e) => (
|
function MyPortofolioInvestasi() {
|
||||||
<Card key={e.id} withBorder mb={"lg"} onClick={() => router.push(`/dev/investasi/porto_detail/${e.id}`)}>
|
const [opened, { toggle }] = useDisclosure(false);
|
||||||
<CardSection p={"xs"}>
|
const router = useRouter();
|
||||||
<AspectRatio ratio={16 / 9}>
|
|
||||||
{/* {e.imagesId ? (
|
return (
|
||||||
|
<Box mx="auto">
|
||||||
|
<Paper mb={5} onClick={toggle} bg={Warna.biru} px={"md"} h={40}>
|
||||||
|
<Group position="apart" align="center" h={40}>
|
||||||
|
<Title order={6}>Portofolio Saya</Title>
|
||||||
|
<IconCaretDown />
|
||||||
|
</Group>
|
||||||
|
</Paper>
|
||||||
|
|
||||||
|
<Collapse in={opened} transitionDuration={700}>
|
||||||
|
{dataDummy.map((e) => (
|
||||||
|
<Card
|
||||||
|
key={e.id}
|
||||||
|
withBorder
|
||||||
|
mb={"lg"}
|
||||||
|
onClick={() => router.push(`/dev/investasi/detail_porto/${e.id}`)}
|
||||||
|
>
|
||||||
|
<CardSection p={"xs"}>
|
||||||
|
<AspectRatio ratio={16 / 9}>
|
||||||
|
{/* {e.imagesId ? (
|
||||||
<Image alt="" src={`/api/investasi/gambar/${e.imagesId}`} />
|
<Image alt="" src={`/api/investasi/gambar/${e.imagesId}`} />
|
||||||
) : (
|
) : (
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
<Image alt="" src={"/aset/no-img.png"} />
|
||||||
)} */}
|
)} */}
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
<Image alt="" src={"/aset/no-img.png"} />
|
||||||
|
</AspectRatio>
|
||||||
|
</CardSection>
|
||||||
|
|
||||||
</AspectRatio>
|
<CardSection p={"lg"}>
|
||||||
</CardSection>
|
<Box mt={"md"}>
|
||||||
|
<Slider
|
||||||
<CardSection p={"lg"}>
|
size={10}
|
||||||
<Box mt={"md"}>
|
disabled
|
||||||
<Slider
|
labelAlwaysOn
|
||||||
size={10}
|
value={e.persentase}
|
||||||
disabled
|
marks={[{ value: e.persentase, label: e.persentase + `%` }]}
|
||||||
labelAlwaysOn
|
/>
|
||||||
value={e.persentase}
|
<Title order={4}>{e.title}</Title>
|
||||||
marks={
|
</Box>
|
||||||
[
|
</CardSection>
|
||||||
{value: e.persentase, label: e.persentase + `%`}
|
<Divider />
|
||||||
]
|
<CardSection p={"md"}>
|
||||||
|
{(() => {
|
||||||
|
if (
|
||||||
|
e.masterPencarianInvestorId -
|
||||||
|
moment(new Date()).diff(new Date(e.createdAt), "days") ===
|
||||||
|
0
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Group position="right">
|
||||||
|
<IconCircleCheck />
|
||||||
|
<Text>Selesai</Text>
|
||||||
|
</Group>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Group position="right" spacing={"xs"}>
|
||||||
|
<Text>Sisa waktu:</Text>
|
||||||
|
<Text>
|
||||||
|
{e.masterPencarianInvestorId -
|
||||||
|
moment(new Date()).diff(
|
||||||
|
new Date(e.createdAt),
|
||||||
|
"days"
|
||||||
|
)}
|
||||||
|
</Text>
|
||||||
|
<Text>Hari</Text>
|
||||||
|
</Group>
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
/>
|
})()}
|
||||||
<Title order={4}>{e.title}</Title>
|
</CardSection>
|
||||||
</Box>
|
</Card>
|
||||||
<Box mt={"md"}>
|
))}
|
||||||
<Grid>
|
</Collapse>
|
||||||
<Grid.Col span={6}>
|
</Box>
|
||||||
<Stack>
|
);
|
||||||
<Box>
|
}
|
||||||
<Text>Dana Dibutuhkan</Text>
|
|
||||||
<Text>Rp. {e.targetDana}</Text>
|
function SahamTerbeli() {
|
||||||
</Box>
|
const router = useRouter();
|
||||||
<Box>
|
const [opened, { toggle }] = useDisclosure(true);
|
||||||
<Text>Harga Per Lembar</Text>
|
|
||||||
<Text>Rp. {e.hargaLembar}</Text>
|
return (
|
||||||
</Box>
|
<>
|
||||||
</Stack>
|
<Box maw={400} mx="auto">
|
||||||
</Grid.Col>
|
<Paper mb={5} onClick={toggle} bg={Warna.hijau_tua} px={"md"} h={40}>
|
||||||
<Grid.Col span={6}>
|
<Group position="apart" align="center" h={40}>
|
||||||
<Stack>
|
<Title order={6}>Saham Saya</Title>
|
||||||
<Box>
|
<IconCaretDown />
|
||||||
<Text>ROI</Text>
|
</Group>
|
||||||
<Text>{e.roi}%</Text>
|
</Paper>
|
||||||
</Box>
|
|
||||||
<Box>
|
<Collapse in={opened} transitionDuration={700}>
|
||||||
<Text>Total Lembar</Text>
|
{dataDummy.map((e) => (
|
||||||
<Text>{e.totalLembar}</Text>
|
<Card
|
||||||
</Box>
|
key={e.id}
|
||||||
</Stack>
|
withBorder
|
||||||
</Grid.Col>
|
mb={"lg"}
|
||||||
</Grid>
|
onClick={() =>
|
||||||
</Box>
|
router.push(RouteInvestasi.detail_saham_terbeli + `${e.id}`)
|
||||||
</CardSection>
|
}
|
||||||
<Divider />
|
>
|
||||||
<CardSection p={"md"}>
|
<CardSection>
|
||||||
{(() => {
|
<Group position="left" mt={"sm"} px={"md"}>
|
||||||
if (
|
<Flex align={"center"} gap={"xs"}>
|
||||||
e.masterPencarianInvestorId -
|
<Avatar src={"/aset/avatar.png"} />
|
||||||
moment(new Date()).diff(new Date(e.createdAt), "days") ===
|
<Text>Username</Text>
|
||||||
0
|
</Flex>
|
||||||
) {
|
|
||||||
return (
|
</Group>
|
||||||
<>
|
</CardSection>
|
||||||
<Group position="right">
|
<CardSection p={"xs"}>
|
||||||
<IconCircleCheck/>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Text>Selesai</Text>
|
{/* {e.imagesId ? (
|
||||||
</Group>
|
<Image alt="" src={`/api/investasi/gambar/${e.imagesId}`} />
|
||||||
</>
|
) : (
|
||||||
);
|
<Image alt="" src={"/aset/no-img.png"} />
|
||||||
} else {
|
)} */}
|
||||||
return<>
|
<Image alt="" src={"/aset/no-img.png"} />
|
||||||
<Group position="right" spacing={"xs"}>
|
</AspectRatio>
|
||||||
<Text>Sisa waktu:</Text>
|
</CardSection>
|
||||||
<Text>
|
|
||||||
{e.masterPencarianInvestorId -
|
<CardSection p={"lg"}>
|
||||||
moment(new Date()).diff(new Date(e.createdAt), "days")}
|
<Box mt={"md"}>
|
||||||
</Text>
|
<Slider
|
||||||
<Text>Hari</Text>
|
size={10}
|
||||||
</Group>
|
disabled
|
||||||
</>
|
labelAlwaysOn
|
||||||
}
|
value={e.persentase}
|
||||||
})()}
|
marks={[{ value: e.persentase, label: e.persentase + `%` }]}
|
||||||
</CardSection>
|
/>
|
||||||
</Card>
|
<Title order={4}>{e.title}</Title>
|
||||||
))}
|
</Box>
|
||||||
</>
|
<Box mt={"md"}>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Stack>
|
||||||
|
<Box>
|
||||||
|
<Text>Dana Dibutuhkan</Text>
|
||||||
|
<Text>Rp. {e.targetDana}</Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Harga Per Lembar</Text>
|
||||||
|
<Text>Rp. {e.hargaLembar}</Text>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Stack>
|
||||||
|
<Box>
|
||||||
|
<Text>ROI</Text>
|
||||||
|
<Text>{e.roi}%</Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Total Lembar</Text>
|
||||||
|
<Text>{e.totalLembar}</Text>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Box>
|
||||||
|
</CardSection>
|
||||||
|
<Divider />
|
||||||
|
<CardSection p={"md"}>
|
||||||
|
{(() => {
|
||||||
|
if (
|
||||||
|
e.masterPencarianInvestorId -
|
||||||
|
moment(new Date()).diff(new Date(e.createdAt), "days") ===
|
||||||
|
0
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Group position="right">
|
||||||
|
<IconCircleCheck />
|
||||||
|
<Text>Selesai</Text>
|
||||||
|
</Group>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Group position="right" spacing={"xs"}>
|
||||||
|
<Text>Sisa waktu:</Text>
|
||||||
|
<Text>
|
||||||
|
{e.masterPencarianInvestorId -
|
||||||
|
moment(new Date()).diff(
|
||||||
|
new Date(e.createdAt),
|
||||||
|
"days"
|
||||||
|
)}
|
||||||
|
</Text>
|
||||||
|
<Text>Hari</Text>
|
||||||
|
</Group>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
})()}
|
||||||
|
</CardSection>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</Collapse>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useCounter } from "@mantine/hooks";
|
import { useCounter, useShallowEffect } from "@mantine/hooks";
|
||||||
import {
|
import {
|
||||||
IconMinus,
|
IconMinus,
|
||||||
IconNumber10Small,
|
IconNumber10Small,
|
||||||
@@ -22,17 +22,19 @@ import {
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import toast from "react-simple-toasts";
|
||||||
|
|
||||||
export default function ProsesInvestasi() {
|
export default function ProsesInvestasi() {
|
||||||
const [count, handlers] = useCounter(0, { min: 1, max: 100 });
|
const router = useRouter();
|
||||||
|
const [count, handlers] = useCounter(0, { min: 1, max: 1000 });
|
||||||
const [hargaLembar, setHargaLembar] = useState(1000);
|
const [hargaLembar, setHargaLembar] = useState(1000);
|
||||||
const router = useRouter()
|
|
||||||
|
|
||||||
// const formatter = new Intl.NumberFormat("", {
|
|
||||||
// style: 'currency',
|
|
||||||
// currency: 'RP',
|
|
||||||
|
|
||||||
// });
|
// const formatter = new Intl.NumberFormat("", {
|
||||||
|
// style: 'currency',
|
||||||
|
// currency: 'RP',
|
||||||
|
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -46,14 +48,6 @@ export default function ProsesInvestasi() {
|
|||||||
<IconRefresh />
|
<IconRefresh />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
|
|
||||||
<ActionIcon
|
|
||||||
variant="filled"
|
|
||||||
radius={50}
|
|
||||||
onClick={handlers.increment}
|
|
||||||
>
|
|
||||||
<IconPlus />
|
|
||||||
</ActionIcon>
|
|
||||||
<Text>{count}</Text>
|
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="filled"
|
variant="filled"
|
||||||
radius={50}
|
radius={50}
|
||||||
@@ -61,10 +55,19 @@ export default function ProsesInvestasi() {
|
|||||||
>
|
>
|
||||||
<IconMinus />
|
<IconMinus />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
|
{/* Jumlah saham */}
|
||||||
|
<Text>{count}</Text>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="filled"
|
variant="filled"
|
||||||
radius={50}
|
radius={50}
|
||||||
onClick={() => handlers.set(100)}
|
onClick={handlers.increment}
|
||||||
|
>
|
||||||
|
<IconPlus />
|
||||||
|
</ActionIcon>
|
||||||
|
<ActionIcon
|
||||||
|
variant="filled"
|
||||||
|
radius={50}
|
||||||
|
onClick={() => handlers.set(1000)}
|
||||||
>
|
>
|
||||||
<IconNumber10Small />
|
<IconNumber10Small />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
@@ -82,7 +85,22 @@ export default function ProsesInvestasi() {
|
|||||||
<Text fz={25}>Rp.{hargaLembar * count} </Text>
|
<Text fz={25}>Rp.{hargaLembar * count} </Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Center>
|
<Center>
|
||||||
<Button w={350} radius={50} bg={Warna.biru} onClick={()=>router.push("/dev/investasi/upload_bukti") }>Proses</Button>
|
<Button
|
||||||
|
w={350}
|
||||||
|
radius={50}
|
||||||
|
bg={Warna.biru}
|
||||||
|
onClick={() => {
|
||||||
|
|
||||||
|
if(hargaLembar * count === 1000){
|
||||||
|
return toast("Minimal pembelian 10.000")
|
||||||
|
} else {
|
||||||
|
router.push("/dev/investasi/upload_bukti");
|
||||||
|
localStorage.setItem("total_harga", (hargaLembar * count) as any)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Proses
|
||||||
|
</Button>
|
||||||
</Center>
|
</Center>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ export default function UploadBuktiTransferInvestasi() {
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const [fl, setFl] = useState<File | null>(null);
|
const [fl, setFl] = useState<File | null>(null);
|
||||||
const [img, setImg] = useState<any | null>(null);
|
const [img, setImg] = useState<any | null>(null);
|
||||||
|
|
||||||
|
const totalHarga = localStorage.getItem("total_harga")
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Grid align="center">
|
<Grid align="center">
|
||||||
@@ -50,7 +52,7 @@ export default function UploadBuktiTransferInvestasi() {
|
|||||||
<Text>Total Harga</Text>
|
<Text>Total Harga</Text>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={"auto"}>
|
<Grid.Col span={"auto"}>
|
||||||
<Text>Rp. 100.000</Text>
|
<Text>Rp. {totalHarga}</Text>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={"auto"}></Grid.Col>
|
<Grid.Col span={"auto"}></Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user