feat
Desc: - Fitur admin: 1. Main page investasi 2. Konfirmasi investasi 3. Detail Konfirmasi investasi #No isssu
This commit is contained in:
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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user