9
src/app/dev/admin/award/page.tsx
Normal file
9
src/app/dev/admin/award/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import Admin_Award from "@/app_modules/admin/award/main";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_Award />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
16
src/app/dev/admin/investasi/bukti_transfer/layout.tsx
Normal file
16
src/app/dev/admin/investasi/bukti_transfer/layout.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { Admin_LayoutBuktiTransferInvestasi } from "@/app_modules/admin/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_LayoutBuktiTransferInvestasi>
|
||||||
|
{children}
|
||||||
|
</Admin_LayoutBuktiTransferInvestasi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
9
src/app/dev/admin/investasi/bukti_transfer/page.tsx
Normal file
9
src/app/dev/admin/investasi/bukti_transfer/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { Admin_BuktiTransferInvestasi } from "@/app_modules/admin/investasi";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_BuktiTransferInvestasi />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
15
src/app/dev/admin/investasi/halaman_aksi/[id]/layout.tsx
Normal file
15
src/app/dev/admin/investasi/halaman_aksi/[id]/layout.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
import { Admin_LayoutHalamanAksi } from "@/app_modules/admin/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_LayoutHalamanAksi>{children}</Admin_LayoutHalamanAksi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
8
src/app/dev/admin/investasi/halaman_aksi/[id]/page.tsx
Normal file
8
src/app/dev/admin/investasi/halaman_aksi/[id]/page.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { Admin_HalamanAksi } from "@/app_modules/admin/investasi";
|
||||||
|
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return<>
|
||||||
|
<Admin_HalamanAksi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
17
src/app/dev/admin/investasi/konfirmasi/layout.tsx
Normal file
17
src/app/dev/admin/investasi/konfirmasi/layout.tsx
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
import { Admin_LayoutKonfirmasiInvestasi } from "@/app_modules/admin/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_LayoutKonfirmasiInvestasi>
|
||||||
|
{children}
|
||||||
|
</Admin_LayoutKonfirmasiInvestasi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
10
src/app/dev/admin/investasi/konfirmasi/page.tsx
Normal file
10
src/app/dev/admin/investasi/konfirmasi/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { Admin_KonfirmasiInvestasi } from "@/app_modules/admin/investasi";
|
||||||
|
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_KonfirmasiInvestasi id={params.id} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
9
src/app/dev/admin/main/award/page.tsx
Normal file
9
src/app/dev/admin/main/award/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { Admin_Award } from "@/app_modules/admin/award";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Admin_Award />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
5
src/app/dev/admin/main/dashboard/page.tsx
Normal file
5
src/app/dev/admin/main/dashboard/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { AdminMain } from "@/app_modules/admin/main";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return <AdminMain />;
|
||||||
|
}
|
||||||
7
src/app/dev/admin/main/investasi/page.tsx
Normal file
7
src/app/dev/admin/main/investasi/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { Admin_Investasi } from "@/app_modules/admin/investasi";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
return<>
|
||||||
|
<Admin_Investasi/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
14
src/app/dev/admin/main/layout.tsx
Normal file
14
src/app/dev/admin/main/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { AdminLayout } from "@/app_modules/admin/main";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AdminLayout>{children}</AdminLayout>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
14
src/app/lib/router_hipmi/router_admin.ts
Normal file
14
src/app/lib/router_hipmi/router_admin.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export const RouterAdminDashboard = {
|
||||||
|
main_admin: "/dev/admin/main/dashboard",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RouterAdminInvestasi = {
|
||||||
|
main_investasi: "/dev/admin/main/investasi",
|
||||||
|
halaman_aksi: "/dev/admin/investasi/halaman_aksi/",
|
||||||
|
konfirmasi: "/dev/admin/investasi/konfirmasi",
|
||||||
|
bukti_transfer: "/dev/admin/investasi/bukti_transfer"
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RouterAdminAward = {
|
||||||
|
main_award: "/dev/admin/main/award",
|
||||||
|
};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export const RouteInvestasi = {
|
export const RouterInvestasi = {
|
||||||
//INVESTASI
|
//INVESTASI
|
||||||
// portofolio
|
// portofolio
|
||||||
portofolio: "/dev/investasi/main/portofolio",
|
portofolio: "/dev/investasi/main/portofolio",
|
||||||
3
src/app_modules/admin/award/index.tsx
Normal file
3
src/app_modules/admin/award/index.tsx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import Admin_Award from "./main";
|
||||||
|
|
||||||
|
export {Admin_Award}
|
||||||
9
src/app_modules/admin/award/main.tsx
Normal file
9
src/app_modules/admin/award/main.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
|
import { Title } from "@mantine/core"
|
||||||
|
|
||||||
|
export default function Admin_Award(){
|
||||||
|
return<>
|
||||||
|
<Title>halaman award</Title>
|
||||||
|
</>
|
||||||
|
}
|
||||||
19
src/app_modules/admin/investasi/bukti_transfer/layout.tsx
Normal file
19
src/app_modules/admin/investasi/bukti_transfer/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 Admin_LayoutBuktiTransferInvestasi({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Bukti Transfer" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
56
src/app_modules/admin/investasi/bukti_transfer/view.tsx
Normal file
56
src/app_modules/admin/investasi/bukti_transfer/view.tsx
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import {
|
||||||
|
Avatar,
|
||||||
|
Badge,
|
||||||
|
Grid,
|
||||||
|
Group,
|
||||||
|
Paper,
|
||||||
|
Text,
|
||||||
|
ThemeIcon,
|
||||||
|
Title,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { IconChevronRight } from "@tabler/icons-react";
|
||||||
|
|
||||||
|
export default function Admin_BuktiTransferInvestasi() {
|
||||||
|
|
||||||
|
const listUsername = [
|
||||||
|
{
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{/* Box Username */}
|
||||||
|
{listUsername.map((e) => (
|
||||||
|
<Paper key={e.id} bg={"gray"} p={"md"} mb={"xs"}>
|
||||||
|
<Grid align="center">
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Text>Username</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={4}>
|
||||||
|
<Badge variant="dot">Status Transfer</Badge>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
))}
|
||||||
|
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
19
src/app_modules/admin/investasi/halaman_aksi/layout.tsx
Normal file
19
src/app_modules/admin/investasi/halaman_aksi/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 Admin_LayoutHalamanAksi({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Pilih Aksi" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
60
src/app_modules/admin/investasi/halaman_aksi/view.tsx
Normal file
60
src/app_modules/admin/investasi/halaman_aksi/view.tsx
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin";
|
||||||
|
import {
|
||||||
|
Box,
|
||||||
|
Center,
|
||||||
|
Flex,
|
||||||
|
Grid,
|
||||||
|
Group,
|
||||||
|
Paper,
|
||||||
|
Stack,
|
||||||
|
Text,
|
||||||
|
Title,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { IconChevronRight } from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
|
export default function Admin_HalamanAksi() {
|
||||||
|
const router = useRouter();
|
||||||
|
const listHalamanAksi = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Konfirmasi",
|
||||||
|
desc: "Publis atau non - aktifkan proyek invetsasi",
|
||||||
|
route: RouterAdminInvestasi.konfirmasi,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Bukti Transfer",
|
||||||
|
desc: "Lihat bukti transfer investor",
|
||||||
|
route: RouterAdminInvestasi.bukti_transfer,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Grid mb={"md"} align="center">
|
||||||
|
{listHalamanAksi.map((e) => (
|
||||||
|
<Grid.Col key={e.id} onClick={() => router.push(e.route)}>
|
||||||
|
<Paper bg={"gray"} p={"xs"}>
|
||||||
|
<Grid align="center">
|
||||||
|
<Grid.Col span={10}>
|
||||||
|
<Stack spacing={0}>
|
||||||
|
<Title order={5}>{e.name}</Title>
|
||||||
|
<Text fw={"lighter"} fz={"xs"}>
|
||||||
|
{e.desc}
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconChevronRight />
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Paper>
|
||||||
|
</Grid.Col>
|
||||||
|
))}
|
||||||
|
</Grid>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
17
src/app_modules/admin/investasi/index.tsx
Normal file
17
src/app_modules/admin/investasi/index.tsx
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import Admin_Investasi from "./main/view";
|
||||||
|
import Admin_HalamanAksi from "./halaman_aksi/view";
|
||||||
|
import Admin_LayoutHalamanAksi from "./halaman_aksi/layout";
|
||||||
|
import Admin_KonfirmasiInvestasi from "./konfirmasi/view";
|
||||||
|
import Admin_LayoutKonfirmasiInvestasi from "./konfirmasi/layout";
|
||||||
|
import Admin_BuktiTransferInvestasi from "./bukti_transfer/view";
|
||||||
|
import Admin_LayoutBuktiTransferInvestasi from "./bukti_transfer/layout";
|
||||||
|
|
||||||
|
export {
|
||||||
|
Admin_Investasi,
|
||||||
|
Admin_HalamanAksi,
|
||||||
|
Admin_LayoutHalamanAksi,
|
||||||
|
Admin_KonfirmasiInvestasi,
|
||||||
|
Admin_LayoutKonfirmasiInvestasi,
|
||||||
|
Admin_BuktiTransferInvestasi,
|
||||||
|
Admin_LayoutBuktiTransferInvestasi,
|
||||||
|
};
|
||||||
19
src/app_modules/admin/investasi/konfirmasi/layout.tsx
Normal file
19
src/app_modules/admin/investasi/konfirmasi/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 Admin_LayoutKonfirmasiInvestasi({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell header={<HeaderTamplate title="Konfimasi Investasi" />}>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
178
src/app_modules/admin/investasi/konfirmasi/view.tsx
Normal file
178
src/app_modules/admin/investasi/konfirmasi/view.tsx
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
import { Warna } from "@/app/lib/warna";
|
||||||
|
import {
|
||||||
|
Group,
|
||||||
|
Flex,
|
||||||
|
Avatar,
|
||||||
|
Paper,
|
||||||
|
AspectRatio,
|
||||||
|
Box,
|
||||||
|
Title,
|
||||||
|
Slider,
|
||||||
|
Grid,
|
||||||
|
Stack,
|
||||||
|
ActionIcon,
|
||||||
|
Center,
|
||||||
|
Button,
|
||||||
|
Text,
|
||||||
|
Image,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import {
|
||||||
|
IconBookDownload,
|
||||||
|
IconFileDescription,
|
||||||
|
IconSpeakerphone,
|
||||||
|
} from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import toast from "react-simple-toasts";
|
||||||
|
|
||||||
|
export default function Admin_KonfirmasiInvestasi({ id }: { id: string }) {
|
||||||
|
const router = useRouter();
|
||||||
|
const [publish, setPublish] = useState(true);
|
||||||
|
const listBox = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Prospektus",
|
||||||
|
icon: <IconBookDownload size={70} />,
|
||||||
|
route: RouterInvestasi.detail_prospektus,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Dokumen",
|
||||||
|
icon: <IconFileDescription size={70} />,
|
||||||
|
route: RouterInvestasi.detail_dokumen,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "Berita",
|
||||||
|
icon: <IconSpeakerphone size={70} />,
|
||||||
|
route: RouterInvestasi.berita,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Group position="left" mb={"md"}>
|
||||||
|
<Flex align={"center"} gap={"xs"}>
|
||||||
|
<Avatar src={"/aset/avatar.png"} />
|
||||||
|
<Text>Username</Text>
|
||||||
|
</Flex>
|
||||||
|
{/* <Text>Sisa waktu : 20 Hari</Text> */}
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<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"} mb={"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>
|
||||||
|
|
||||||
|
{/* List Box */}
|
||||||
|
<Grid mb={"md"}>
|
||||||
|
{listBox.map((e) => (
|
||||||
|
<Grid.Col
|
||||||
|
span={"auto"}
|
||||||
|
key={e.id}
|
||||||
|
onClick={() => router.push(e.route + `${id}`)}
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
</Grid.Col>
|
||||||
|
))}
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Center mb={100}>
|
||||||
|
{publish ? (
|
||||||
|
<Button
|
||||||
|
radius={50}
|
||||||
|
w={350}
|
||||||
|
bg={"green"}
|
||||||
|
color="green"
|
||||||
|
onClick={() => {
|
||||||
|
setTimeout(() => setPublish(false), 1000)
|
||||||
|
toast("Proyek Investasi Di Publish")
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Publish
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<Button
|
||||||
|
radius={50}
|
||||||
|
w={350}
|
||||||
|
bg={"red"}
|
||||||
|
color="red"
|
||||||
|
onClick={() => {
|
||||||
|
setTimeout(() => setPublish(true), 1000)
|
||||||
|
toast("Proyek Investasi Di Non-Aktifkan")
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Non - aktif
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
116
src/app_modules/admin/investasi/main/view.tsx
Normal file
116
src/app_modules/admin/investasi/main/view.tsx
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin";
|
||||||
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
Box,
|
||||||
|
Center,
|
||||||
|
Grid,
|
||||||
|
Paper,
|
||||||
|
Stack,
|
||||||
|
Table,
|
||||||
|
Text,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
|
const listBox = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Investasi Baru",
|
||||||
|
jumlah: 12,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Investasi Aktif",
|
||||||
|
jumlah: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "Investasi Selesai",
|
||||||
|
jumlah: 5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "Total Proyek INvestasi",
|
||||||
|
jumlah: 2,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const listTable = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Subway Kuta",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Event MCD",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "Villa Batubulan",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "Kost Alif Denpasar",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: "Pabrik Rokok",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default function Admin_Investasi() {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const tableBody = listTable.map((e) => (
|
||||||
|
<tr key={e.id}>
|
||||||
|
<td>{e.name}</td>
|
||||||
|
<td>
|
||||||
|
<ActionIcon variant="transparent"
|
||||||
|
onClick={() => router.push(RouterAdminInvestasi.halaman_aksi + `${e.id}`)}
|
||||||
|
>
|
||||||
|
<IconEdit />
|
||||||
|
</ActionIcon>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Grid mb={"md"}>
|
||||||
|
{listBox.map((e) => (
|
||||||
|
<Grid.Col sm={12} md={6} lg={4} key={e.id}>
|
||||||
|
<Paper h={100} bg={"gray"} p={"xs"}>
|
||||||
|
<Center>
|
||||||
|
<Stack spacing={0}>
|
||||||
|
<Text>{e.name}</Text>
|
||||||
|
<Center>
|
||||||
|
<Text fw={"bold"} fz={40}>
|
||||||
|
{e.jumlah}
|
||||||
|
</Text>
|
||||||
|
</Center>
|
||||||
|
</Stack>
|
||||||
|
</Center>
|
||||||
|
</Paper>
|
||||||
|
</Grid.Col>
|
||||||
|
))}
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Box>
|
||||||
|
<Center my={"xs"}>
|
||||||
|
<Text>List Investasi</Text>
|
||||||
|
</Center>
|
||||||
|
<Table withBorder>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Nama Proyek Investasi</th>
|
||||||
|
<th>Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>{tableBody}</tbody>
|
||||||
|
</Table>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
5
src/app_modules/admin/main/index.tsx
Normal file
5
src/app_modules/admin/main/index.tsx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import AdminMain from "./view";
|
||||||
|
import AdminLayout from "./layout";
|
||||||
|
|
||||||
|
|
||||||
|
export {AdminMain ,AdminLayout}
|
||||||
92
src/app_modules/admin/main/layout.tsx
Normal file
92
src/app_modules/admin/main/layout.tsx
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
AppShell,
|
||||||
|
Box,
|
||||||
|
Burger,
|
||||||
|
Drawer,
|
||||||
|
Group,
|
||||||
|
Header,
|
||||||
|
MediaQuery,
|
||||||
|
Navbar,
|
||||||
|
Stack,
|
||||||
|
Text,
|
||||||
|
Title,
|
||||||
|
useMantineTheme,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import HeaderTamplate from "../../component/header_tamplate";
|
||||||
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
|
import { IconLogout } from "@tabler/icons-react";
|
||||||
|
import {
|
||||||
|
RouterAdminAward,
|
||||||
|
RouterAdminDashboard,
|
||||||
|
RouterAdminInvestasi,
|
||||||
|
} from "@/app/lib/router_hipmi/router_admin";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
|
export default function AdminLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
const theme = useMantineTheme();
|
||||||
|
const [opened, setOpened] = useState(false);
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const listAdminPage = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Dashboard",
|
||||||
|
route: RouterAdminDashboard.main_admin,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Investasi",
|
||||||
|
route: RouterAdminInvestasi.main_investasi,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "Award",
|
||||||
|
route: RouterAdminAward.main_award,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell
|
||||||
|
header={
|
||||||
|
<Header height={50}>
|
||||||
|
<Group h={50} align="center" px={"md"} position="apart">
|
||||||
|
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
||||||
|
<Burger
|
||||||
|
opened={opened}
|
||||||
|
onClick={() => setOpened((o) => !o)}
|
||||||
|
size="sm"
|
||||||
|
color={theme.colors.gray[6]}
|
||||||
|
mr="xl"
|
||||||
|
/>
|
||||||
|
</MediaQuery>
|
||||||
|
<Title order={6}>Dashboard Admin</Title>
|
||||||
|
<ActionIcon disabled variant="transparent">
|
||||||
|
<IconLogout color="red" />
|
||||||
|
</ActionIcon>
|
||||||
|
</Group>
|
||||||
|
</Header>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
<Drawer opened={opened} onClose={() => setOpened(false)} size={"50%"}>
|
||||||
|
<Stack spacing={"lg"}>
|
||||||
|
{listAdminPage.map((e) => (
|
||||||
|
<Text key={e.id} onClick={() => router.push(e.route)}>
|
||||||
|
{e.name}
|
||||||
|
</Text>
|
||||||
|
))}
|
||||||
|
</Stack>
|
||||||
|
</Drawer>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
13
src/app_modules/admin/main/view.tsx
Normal file
13
src/app_modules/admin/main/view.tsx
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { Title } from "@mantine/core";
|
||||||
|
import Admin_Investasi from "../investasi/main/view";
|
||||||
|
|
||||||
|
|
||||||
|
export default function AdminMain() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Title>Main Dashboard</Title>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { AspectRatio, Grid, Image, Paper, Text, Title } from "@mantine/core";
|
import { AspectRatio, Grid, Image, Paper, Text, Title } from "@mantine/core";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ export default function BeritaInvestasi({id}: {id: string}) {
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Paper h={100} w={"100%"} bg={"gray"} p={"sm"} onClick={() => router.push(RouteInvestasi.detail_berita + `${id}`)}>
|
<Paper h={100} w={"100%"} bg={"gray"} p={"sm"} onClick={() => router.push(RouterInvestasi.detail_berita + `${id}`)}>
|
||||||
<Title order={6}>Judul berita</Title>
|
<Title order={6}>Judul berita</Title>
|
||||||
<Grid pt={5}>
|
<Grid pt={5}>
|
||||||
<Grid.Col span={8}>
|
<Grid.Col span={8}>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { funCreateInvestasi } from "../fun/fun_create_investasi";
|
import { funCreateInvestasi } from "../fun/fun_create_investasi";
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
|
||||||
export default function InvestasiCreate({
|
export default function InvestasiCreate({
|
||||||
id,
|
id,
|
||||||
@@ -60,7 +60,7 @@ export default function InvestasiCreate({
|
|||||||
masterPencarianInvestorId: value.pencarianInvestorId,
|
masterPencarianInvestorId: value.pencarianInvestorId,
|
||||||
};
|
};
|
||||||
toast("Berhasil disimpan")
|
toast("Berhasil disimpan")
|
||||||
return setTimeout(() => router.push(RouteInvestasi.portofolio), 2000);
|
return setTimeout(() => router.push(RouterInvestasi.portofolio), 2000);
|
||||||
|
|
||||||
|
|
||||||
// if (_.values(body).includes("")) return toast("Lengkapi data");
|
// if (_.values(body).includes("")) return toast("Lengkapi data");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
@@ -33,19 +33,19 @@ export default function DetailInvestasi({id}: {id: string}) {
|
|||||||
id: 1,
|
id: 1,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
icon: <IconBookDownload size={70} />,
|
icon: <IconBookDownload size={70} />,
|
||||||
route: RouteInvestasi.detail_prospektus,
|
route: RouterInvestasi.detail_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
icon: <IconFileDescription size={70} />,
|
icon: <IconFileDescription size={70} />,
|
||||||
route: RouteInvestasi.detail_dokumen
|
route: RouterInvestasi.detail_dokumen
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
icon: <IconSpeakerphone size={70} />,
|
icon: <IconSpeakerphone size={70} />,
|
||||||
route: RouteInvestasi.berita,
|
route: RouterInvestasi.berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
@@ -30,19 +30,19 @@ export default function PortofolioDetailInvestasi({id}: {id: string}) {
|
|||||||
id: 1,
|
id: 1,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
icon: <IconBookDownload size={70} />,
|
icon: <IconBookDownload size={70} />,
|
||||||
route: RouteInvestasi.edit_prospektus,
|
route: RouterInvestasi.edit_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
icon: <IconFileDescription size={70} />,
|
icon: <IconFileDescription size={70} />,
|
||||||
route: RouteInvestasi.edit_dokumen,
|
route: RouterInvestasi.edit_dokumen,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
icon: <IconSpeakerphone size={70} />,
|
icon: <IconSpeakerphone size={70} />,
|
||||||
route: RouteInvestasi.edit_berita,
|
route: RouterInvestasi.edit_berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
@@ -34,19 +34,19 @@ export default function DetailSahamTerbeli({id}: {id: string}) {
|
|||||||
id: 1,
|
id: 1,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
icon: <IconBookDownload size={70} />,
|
icon: <IconBookDownload size={70} />,
|
||||||
route: RouteInvestasi.detail_prospektus,
|
route: RouterInvestasi.detail_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
icon: <IconFileDescription size={70} />,
|
icon: <IconFileDescription size={70} />,
|
||||||
route: RouteInvestasi.detail_dokumen,
|
route: RouterInvestasi.detail_dokumen,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
icon: <IconSpeakerphone size={70} />,
|
icon: <IconSpeakerphone size={70} />,
|
||||||
route: RouteInvestasi.detail_berita,
|
route: RouterInvestasi.detail_berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
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";
|
||||||
@@ -11,22 +11,22 @@ export default function EditInvestasi({id}:{id:string}) {
|
|||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "Intro",
|
name: "Intro",
|
||||||
route: RouteInvestasi.edit_intro,
|
route: RouterInvestasi.edit_intro,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
route: RouteInvestasi.edit_prospektus,
|
route: RouterInvestasi.edit_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
route: RouteInvestasi.edit_dokumen,
|
route: RouterInvestasi.edit_dokumen,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
route: RouteInvestasi.edit_berita,
|
route: RouterInvestasi.edit_berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a lo
|
|||||||
import { Carousel } from "react-responsive-carousel";
|
import { Carousel } from "react-responsive-carousel";
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
|
||||||
export default function PortofolioInvestasi() {
|
export default function PortofolioInvestasi() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -176,7 +176,7 @@ function SahamTerbeli() {
|
|||||||
bg={"gray"}
|
bg={"gray"}
|
||||||
mb={"lg"}
|
mb={"lg"}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
router.push(RouteInvestasi.detail_saham_terbeli + `${e.id}`)
|
router.push(RouterInvestasi.detail_saham_terbeli + `${e.id}`)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CardSection>
|
<CardSection>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouteInvestasi } from "@/app/lib/app_route";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
@@ -48,7 +48,7 @@ export default function ProsesInvestasi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function onBeli() {
|
async function onBeli() {
|
||||||
router.push(RouteInvestasi.metode_transfer);
|
router.push(RouterInvestasi.metode_transfer);
|
||||||
localStorage.setItem("total_harga", total as any);
|
localStorage.setItem("total_harga", total as any);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
await funCreateNewProfile(body).then((res) => {
|
await funCreateNewProfile(body).then((res) => {
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
toast("Data tersimpan");
|
toast("Data tersimpan");
|
||||||
return router.push("/dev/katalog/view");
|
return router.push(`/dev/katalog/${userId}`);
|
||||||
} else {
|
} else {
|
||||||
toast("Gagal")
|
toast("Gagal")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import prisma from "@/app/lib/prisma";
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
export default async function funCreateNewProfile(data: any) {
|
export default async function funCreateNewProfile(data: any) {
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
const body = data;
|
const body = data;
|
||||||
|
|
||||||
const res = await prisma.profile.create({
|
const res = await prisma.profile.create({
|
||||||
|
|||||||
Reference in New Issue
Block a user