Bursa Investasi
# feat: - Tampilan portofolio selesai - Hapus investasi - Function get data publish ### no issue
This commit is contained in:
BIN
public/file/6576e0ab-2803-4cb4-8fb7-5d91cd6c8cd8.pdf
Normal file
BIN
public/file/6576e0ab-2803-4cb4-8fb7-5d91cd6c8cd8.pdf
Normal file
Binary file not shown.
BIN
public/investasi/d300094c-1ce5-4d9a-9178-47b0be1df5c1.png
Normal file
BIN
public/investasi/d300094c-1ce5-4d9a-9178-47b0be1df5c1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 263 KiB |
8
src/app/dev/auth/validasi/layout.tsx
Normal file
8
src/app/dev/auth/validasi/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { LayoutValidasi } from "@/app_modules/auth";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||||
|
return<>
|
||||||
|
<LayoutValidasi>{children}</LayoutValidasi>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
|
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||||
import { DetailInvestasi } from "@/app_modules/investasi";
|
import { DetailInvestasi } from "@/app_modules/investasi";
|
||||||
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
|
|
||||||
export default async function Page({params}: {params: {id: string}}) {
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
const dataInvestasi = await getOneInvestasiById(params.id)
|
||||||
|
const dataUser = await funGetUserProfile(dataInvestasi?.authorId as any)
|
||||||
return<>
|
return<>
|
||||||
<DetailInvestasi id={params.id}/>
|
<DetailInvestasi dataInvestasi={dataInvestasi as any} dataUser={dataUser as any}/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { LayoutPortofolioDetailInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
|
||||||
return<>
|
|
||||||
<LayoutPortofolioDetailInvestasi id={params.id}>{children}</LayoutPortofolioDetailInvestasi>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { PortofolioDetailInvestasi } from "@/app_modules/investasi";
|
|
||||||
|
|
||||||
export default async function Page({params} : {params: {id: string}}) {
|
|
||||||
return<>
|
|
||||||
<PortofolioDetailInvestasi id={params.id}/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { DetailPublishInvestasi } from "@/app_modules/investasi";
|
||||||
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
|
|
||||||
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
|
||||||
|
const dataInvestasi = await getOneInvestasiById(params.id)
|
||||||
|
return<>
|
||||||
|
<DetailPublishInvestasi dataInvestasi={dataInvestasi as any}/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { DetailPublishInvestasi } from "@/app_modules/investasi";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return<>
|
|
||||||
<DetailPublishInvestasi/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { LayoutDetailRejectInvestasi } from "@/app_modules/investasi";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
params,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
params: { id: string };
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutDetailRejectInvestasi idInves={params.id}>
|
||||||
|
{children}
|
||||||
|
</LayoutDetailRejectInvestasi>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
10
src/app/dev/investasi/detail_portofolio/reject/[id]/page.tsx
Normal file
10
src/app/dev/investasi/detail_portofolio/reject/[id]/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { DetailRejectInvestasi } from "@/app_modules/investasi";
|
||||||
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
|
|
||||||
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
const dataInvestasi = await getOneInvestasiById(params.id)
|
||||||
|
// console.log(dataInvestasi)
|
||||||
|
return<>
|
||||||
|
<DetailRejectInvestasi dataInvestasi={dataInvestasi as any}/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { LayoutDetailRejectInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
|
||||||
return<>
|
|
||||||
<LayoutDetailRejectInvestasi>{children}</LayoutDetailRejectInvestasi>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { DetailRejectInvestasi } from "@/app_modules/investasi";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return<>
|
|
||||||
<DetailRejectInvestasi/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,21 @@
|
|||||||
import { LayoutEditProspektusInvestasi } from "@/app_modules/investasi";
|
import { LayoutEditProspektusInvestasi } from "@/app_modules/investasi";
|
||||||
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
export default async function Layout({
|
||||||
return<>
|
children,
|
||||||
<LayoutEditProspektusInvestasi idInves={params.id}>{children}</LayoutEditProspektusInvestasi>
|
params,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
params: { id: string };
|
||||||
|
}) {
|
||||||
|
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutEditProspektusInvestasi dataInvestasi={dataInvestasi as any}>
|
||||||
|
{children}
|
||||||
|
</LayoutEditProspektusInvestasi>
|
||||||
</>
|
</>
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
import { MainInvestasi } from "@/app_modules/investasi";
|
import { MainInvestasi } from "@/app_modules/investasi";
|
||||||
import { getListAllInvestasi } from "@/app_modules/investasi/fun/get_list_all_investasi";
|
import { getListAllPublish } from "@/app_modules/investasi/fun/get_list_all_publish";
|
||||||
import getPembagianDeviden from "@/app_modules/investasi/fun/master/get_pembagian_deviden";
|
import getPembagianDeviden from "@/app_modules/investasi/fun/master/get_pembagian_deviden";
|
||||||
import getPencarianInvestor from "@/app_modules/investasi/fun/master/get_pencarian_investor";
|
import getPencarianInvestor from "@/app_modules/investasi/fun/master/get_pencarian_investor";
|
||||||
import getPeriodeDeviden from "@/app_modules/investasi/fun/master/get_periode_deviden";
|
import getPeriodeDeviden from "@/app_modules/investasi/fun/master/get_periode_deviden";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const data = await getListAllInvestasi()
|
const data = await getListAllPublish();
|
||||||
const pencarianInvestor = await getPencarianInvestor();
|
const pencarianInvestor = await getPencarianInvestor();
|
||||||
const periodeDeviden = await getPeriodeDeviden();
|
const periodeDeviden = await getPeriodeDeviden();
|
||||||
const pembagianDeviden = await getPembagianDeviden();
|
const pembagianDeviden = await getPembagianDeviden();
|
||||||
|
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
return <>
|
return (
|
||||||
<MainInvestasi
|
<>
|
||||||
listData={data as any}
|
<MainInvestasi
|
||||||
pencarianInvestor={pencarianInvestor as any}
|
listData={data as any}
|
||||||
periodeDeviden={periodeDeviden as any}
|
pencarianInvestor={pencarianInvestor as any}
|
||||||
pembagianDeviden={pembagianDeviden as any}
|
periodeDeviden={periodeDeviden as any}
|
||||||
|
pembagianDeviden={pembagianDeviden as any}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ import { cookies } from "next/headers";
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import yaml from "yaml";
|
import yaml from "yaml";
|
||||||
import { unsealData } from "iron-session";
|
import { unsealData } from "iron-session";
|
||||||
import getInvestasiById from "@/app_modules/investasi/fun/get_investasi_by_id";
|
import getInvestasiByStatusId from "@/app_modules/investasi/fun/get_investasi_by_id";
|
||||||
import getStatusInvestasi from "@/app_modules/investasi/fun/master/get_status_investasi";
|
import getStatusInvestasi from "@/app_modules/investasi/fun/master/get_status_investasi";
|
||||||
|
import getPortoByStatusId from "@/app_modules/investasi/fun/get_porto_status_by_id";
|
||||||
|
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|
||||||
@@ -16,13 +17,23 @@ export default async function Page() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataInvestasi = await getInvestasiById(tkn.id)
|
const listStatusInvestasi = await getStatusInvestasi();
|
||||||
const listStatusInvestasi = await getStatusInvestasi()
|
const dataDraft = await getPortoByStatusId(tkn.id, 1)
|
||||||
// console.log(listStatusInvestasi)
|
const dataReview = await getPortoByStatusId(tkn.id, 2)
|
||||||
|
const dataPublish = await getPortoByStatusId(tkn.id, 3)
|
||||||
|
const dataReject = await getPortoByStatusId(tkn.id, 4)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PortofolioInvestasi dataInvestasi={dataInvestasi as any} listStatusInvestasi={listStatusInvestasi as any} />
|
<PortofolioInvestasi
|
||||||
|
listStatusInvestasi={listStatusInvestasi as any}
|
||||||
|
dataDraft={dataDraft}
|
||||||
|
dataReview={dataReview}
|
||||||
|
dataPublish={dataPublish}
|
||||||
|
dataReject={dataReject}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const RouterInvestasi = {
|
|||||||
edit_prospektus: "/dev/investasi/edit_prospektus/",
|
edit_prospektus: "/dev/investasi/edit_prospektus/",
|
||||||
edit_dokumen: "/dev/investasi/edit_dokumen/",
|
edit_dokumen: "/dev/investasi/edit_dokumen/",
|
||||||
edit_berita: "/dev/investasi/edit_berita/",
|
edit_berita: "/dev/investasi/edit_berita/",
|
||||||
|
|
||||||
// detail //
|
// detail //
|
||||||
detail_portofolio: "",
|
detail_portofolio: "",
|
||||||
detail_saham_terbeli: "/dev/investasi/detail_saham_terbeli/",
|
detail_saham_terbeli: "/dev/investasi/detail_saham_terbeli/",
|
||||||
@@ -34,9 +34,9 @@ export const RouterInvestasi = {
|
|||||||
detail_dokumen: "/dev/investasi/detail_dokumen/",
|
detail_dokumen: "/dev/investasi/detail_dokumen/",
|
||||||
detail_berita: "/dev/investasi/detail_berita/",
|
detail_berita: "/dev/investasi/detail_berita/",
|
||||||
detail_draft: "/dev/investasi/detail_portofolio/draft/",
|
detail_draft: "/dev/investasi/detail_portofolio/draft/",
|
||||||
detail_publish: "/dev/investasi/detail_portofolio/publish",
|
detail_publish: "/dev/investasi/detail_portofolio/publish/",
|
||||||
detail_review: "/dev/investasi/detail_portofolio/review/",
|
detail_review: "/dev/investasi/detail_portofolio/review/",
|
||||||
detail_reject: "/dev/investasi/detail_portofolio/reject",
|
detail_reject: "/dev/investasi/detail_portofolio/reject/",
|
||||||
|
|
||||||
// berita
|
// berita
|
||||||
berita: "/dev/investasi/berita/",
|
berita: "/dev/investasi/berita/",
|
||||||
@@ -45,6 +45,5 @@ export const RouterInvestasi = {
|
|||||||
|
|
||||||
//upload
|
//upload
|
||||||
upload_prospektus: "/dev/investasi/upload_prospektus/",
|
upload_prospektus: "/dev/investasi/upload_prospektus/",
|
||||||
upload_dokumen: "/dev/investasi/upload_dokumen/"
|
upload_dokumen: "/dev/investasi/upload_dokumen/",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
"use server"
|
"use server"
|
||||||
|
|
||||||
import prisma from "@/app/lib/prisma"
|
import prisma from "@/app/lib/prisma"
|
||||||
|
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin"
|
||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi"
|
||||||
|
import { revalidatePath } from "next/cache"
|
||||||
|
|
||||||
export default async function funRejectInvestasi(data: any) {
|
export default async function funRejectInvestasi(data: any) {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
@@ -14,6 +17,8 @@ export default async function funRejectInvestasi(data: any) {
|
|||||||
})
|
})
|
||||||
if(!res) return {status: 400, message: "Gagal reject"}
|
if(!res) return {status: 400, message: "Gagal reject"}
|
||||||
|
|
||||||
|
revalidatePath(RouterAdminInvestasi.main_investasi)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
status: 200,
|
status: 200,
|
||||||
message: "Reject berhasil"
|
message: "Reject berhasil"
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import SplashScreen from "./splash/view";
|
import SplashScreen from "./splash/view";
|
||||||
import Login from "./login/view";
|
import Login from "./login/view";
|
||||||
import Validasi from "./validasi/view";
|
import Validasi from "./validasi/view";
|
||||||
|
import LayoutValidasi from "./validasi/layout";
|
||||||
import Register from "./register/view";
|
import Register from "./register/view";
|
||||||
import Logout from "./logout/view";
|
import Logout from "./logout/view";
|
||||||
|
|
||||||
export { SplashScreen, Login, Validasi, Register, Logout };
|
export { SplashScreen, Login, Validasi, Register, Logout, LayoutValidasi };
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default function Login() {
|
|||||||
router.push(RouterAdminDashboard.splash_admin);
|
router.push(RouterAdminDashboard.splash_admin);
|
||||||
} else {
|
} else {
|
||||||
if (val.status == 200) {
|
if (val.status == 200) {
|
||||||
toast(val.message);
|
toast("Nomor OTP terkirim");
|
||||||
setCode(val.body.otp);
|
setCode(val.body.otp);
|
||||||
setInputNumber(val.body.nomor);
|
setInputNumber(val.body.nomor);
|
||||||
router.push("/dev/auth/validasi");
|
router.push("/dev/auth/validasi");
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { myConsole } from "@/app/fun/my_console";
|
import { myConsole } from "@/app/fun/my_console";
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
import { ApiHipmi } from "@/app/lib/api";
|
||||||
import { ActionIcon, Button } from "@mantine/core";
|
import { ActionIcon, Button, Group, Modal } from "@mantine/core";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { gs_nomor, gs_otp } from "../state/state";
|
import { gs_nomor, gs_otp } from "../state/state";
|
||||||
import { IconLogout } from "@tabler/icons-react";
|
import { IconLogout } from "@tabler/icons-react";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import { gs_token } from "@/app_modules/home/state/global_state";
|
import { gs_token } from "@/app_modules/home/state/global_state";
|
||||||
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
|
|
||||||
export default function Logout() {
|
export default function Logout() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -15,6 +16,7 @@ export default function Logout() {
|
|||||||
const [code, setCode] = useAtom(gs_otp);
|
const [code, setCode] = useAtom(gs_otp);
|
||||||
const [token, setToken] = useAtom(gs_token);
|
const [token, setToken] = useAtom(gs_token);
|
||||||
|
|
||||||
|
const [opened, { toggle }] = useDisclosure(false);
|
||||||
|
|
||||||
const onLogout = async () => {
|
const onLogout = async () => {
|
||||||
// MyConsole("keluar");
|
// MyConsole("keluar");
|
||||||
@@ -25,7 +27,7 @@ export default function Logout() {
|
|||||||
if (val.status == 200) {
|
if (val.status == 200) {
|
||||||
setnomor(null);
|
setnomor(null);
|
||||||
setCode(null);
|
setCode(null);
|
||||||
setToken(null)
|
setToken(null);
|
||||||
|
|
||||||
return router.push("/dev/auth/login");
|
return router.push("/dev/auth/login");
|
||||||
}
|
}
|
||||||
@@ -34,9 +36,25 @@ export default function Logout() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ActionIcon variant="transparent">
|
<Modal opened={opened} onClose={toggle} centered title="Yakin ingin keluar ?">
|
||||||
<IconLogout color={Warna.merah} onClick={() => onLogout()}/>
|
<Group align="center" position="center">
|
||||||
</ActionIcon>
|
<Button compact onClick={toggle} radius={50}>
|
||||||
|
Batal
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
compact
|
||||||
|
radius={50}
|
||||||
|
bg={Warna.merah}
|
||||||
|
color="red"
|
||||||
|
onClick={() => onLogout()}
|
||||||
|
>
|
||||||
|
Keluar
|
||||||
|
</Button>
|
||||||
|
</Group>
|
||||||
|
</Modal>
|
||||||
|
<ActionIcon variant="transparent">
|
||||||
|
<IconLogout color={Warna.merah} onClick={toggle} />
|
||||||
|
</ActionIcon>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
31
src/app_modules/auth/validasi/layout.tsx
Normal file
31
src/app_modules/auth/validasi/layout.tsx
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { ActionIcon, AppShell, Group, Header } from "@mantine/core";
|
||||||
|
import { IconChevronLeft } from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function LayoutValidasi({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
const router = useRouter()
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AppShell
|
||||||
|
header={
|
||||||
|
<Header height={50} sx={{borderStyle: "none"}} px={"md"}>
|
||||||
|
<Group h={50} align="center">
|
||||||
|
<ActionIcon variant="transparent" onClick={() => router.back()} >
|
||||||
|
<IconChevronLeft />
|
||||||
|
</ActionIcon>
|
||||||
|
</Group>
|
||||||
|
</Header>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</AppShell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import {
|
import {
|
||||||
|
ActionIcon,
|
||||||
Button,
|
Button,
|
||||||
Center,
|
Center,
|
||||||
Flex,
|
Flex,
|
||||||
@@ -14,7 +15,7 @@ import { gs_nomor, gs_otp } from "../state/state";
|
|||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { myConsole } from "@/app/fun/my_console";
|
import { myConsole } from "@/app/fun/my_console";
|
||||||
import { IconCircleLetterH } from "@tabler/icons-react";
|
import { IconChevronLeft, IconCircleLetterH } from "@tabler/icons-react";
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
import { ApiHipmi } from "@/app/lib/api";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -62,13 +63,14 @@ export default function Validasi() {
|
|||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(nomor)}
|
{/* {JSON.stringify(nomor)}
|
||||||
{JSON.stringify(code)} */}
|
{JSON.stringify(code)} */}
|
||||||
|
|
||||||
|
|
||||||
<Flex
|
<Flex
|
||||||
align={"center"}
|
align={"center"}
|
||||||
justify={"center"}
|
justify={"center"}
|
||||||
direction={"column"}
|
direction={"column"}
|
||||||
gap={50}
|
gap={50}
|
||||||
h={"100vh"}
|
h={"80vh"}
|
||||||
>
|
>
|
||||||
<Title order={4}>Validasi Kode OTP</Title>
|
<Title order={4}>Validasi Kode OTP</Title>
|
||||||
<IconCircleLetterH size={150} />
|
<IconCircleLetterH size={150} />
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export default function BeritaInvestasi({
|
|||||||
berita.BeritaInvestasi.map((e) => (
|
berita.BeritaInvestasi.map((e) => (
|
||||||
<Paper
|
<Paper
|
||||||
key={e.id}
|
key={e.id}
|
||||||
|
mb={"md"}
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
bg={"gray"}
|
bg={"gray"}
|
||||||
p={"sm"}
|
p={"sm"}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
Group,
|
Group,
|
||||||
Image,
|
Image,
|
||||||
Paper,
|
Paper,
|
||||||
|
Progress,
|
||||||
Slider,
|
Slider,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
@@ -21,13 +22,28 @@ import {
|
|||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import {
|
import {
|
||||||
IconBookDownload,
|
IconBookDownload,
|
||||||
|
IconCircleCheck,
|
||||||
IconFileDescription,
|
IconFileDescription,
|
||||||
IconSpeakerphone,
|
IconSpeakerphone,
|
||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { MODEL_Investasi } from "../model/model_investasi";
|
||||||
|
import moment from "moment";
|
||||||
|
import { MODEL_User_profile } from "@/app_modules/models/user_profile";
|
||||||
|
import { RouterUserProfile } from "@/app/lib/router_hipmi/router_user_profile";
|
||||||
|
|
||||||
export default function DetailInvestasi({id}: {id: string}) {
|
export default function DetailInvestasi({
|
||||||
|
dataInvestasi,
|
||||||
|
dataUser,
|
||||||
|
}: {
|
||||||
|
dataInvestasi: MODEL_Investasi;
|
||||||
|
dataUser: MODEL_User_profile;
|
||||||
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const [investasi, setInvestasi] = useState(dataInvestasi);
|
||||||
|
const [user, setUser] = useState(dataUser);
|
||||||
|
|
||||||
const listBox = [
|
const listBox = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -39,7 +55,7 @@ export default function DetailInvestasi({id}: {id: string}) {
|
|||||||
id: 2,
|
id: 2,
|
||||||
name: "Dokumen",
|
name: "Dokumen",
|
||||||
icon: <IconFileDescription size={70} />,
|
icon: <IconFileDescription size={70} />,
|
||||||
route: RouterInvestasi.detail_dokumen
|
route: RouterInvestasi.detail_dokumen,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
@@ -51,72 +67,81 @@ export default function DetailInvestasi({id}: {id: string}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{/* Foto username dan sisa waktu */}
|
||||||
<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
|
||||||
<Text>Username</Text>
|
radius={50}
|
||||||
|
src={
|
||||||
|
RouterUserProfile.api_foto + `${user.Profile?.ImageProfile?.url}`
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Text>{user.username}</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Text>Sisa waktu : 20 Hari</Text>
|
{Number(investasi.MasterPencarianInvestor.name) -
|
||||||
|
moment(new Date()).diff(new Date(investasi.updatedAt), "days") <=
|
||||||
|
0 ? (
|
||||||
|
<Group position="right">
|
||||||
|
<IconCircleCheck color="green" />
|
||||||
|
<Text c={"green"}>Selesai</Text>
|
||||||
|
</Group>
|
||||||
|
) : (
|
||||||
|
<Group position="right" spacing={"xs"}>
|
||||||
|
<Text>Sisa waktu:</Text>
|
||||||
|
<Text>
|
||||||
|
{Number(investasi.MasterPencarianInvestor.name) -
|
||||||
|
moment(new Date()).diff(new Date(investasi.updatedAt), "days")}
|
||||||
|
</Text>
|
||||||
|
<Text>Hari</Text>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Paper withBorder mb={"md"}>
|
<Paper withBorder mb={"md"} p={"xs"}>
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
<Image alt="" src={RouterInvestasi.api_gambar + `${investasi.imagesId}`} />
|
||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
{/* Title dan Persentase */}
|
{/* Title dan Progress */}
|
||||||
<Box mb={"md"}>
|
<Box mb={"md"}>
|
||||||
<Title order={4} mb={"xs"}>
|
<Title order={4} mb={"xs"}>
|
||||||
Judul Proyek
|
{investasi.title}
|
||||||
</Title>
|
</Title>
|
||||||
<Slider
|
<Progress label="0%" value={0} color="teal" size="xl" radius="xl" animate/>
|
||||||
disabled
|
|
||||||
size={10}
|
|
||||||
value={60}
|
|
||||||
marks={[{ value: 60, label: "60%" }]}
|
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Rincian Data */}
|
{/* Rincian Data */}
|
||||||
<Grid p={"md"} mb={"md"}>
|
<Grid p={"md"} mb={"md"}>
|
||||||
<Grid.Col span={6}>
|
<Grid.Col span={6}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Box>
|
|
||||||
<Text>Terkumpul</Text>
|
|
||||||
<Text>Rp. </Text>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Dana Dibutuhkan</Text>
|
<Text>Dana Dibutuhkan</Text>
|
||||||
<Text>Rp. </Text>
|
<Text>Rp. {investasi.targetDana}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Harga Per Lembar</Text>
|
<Text>Harga Per Lembar</Text>
|
||||||
<Text>Rp. </Text>
|
<Text>Rp. {investasi.hargaLembar}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Jadwal Pembagian</Text>
|
<Text>Jadwal Pembagian</Text>
|
||||||
<Text>3 Bulan </Text>
|
<Text>{investasi.MasterPembagianDeviden.name} bulan </Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={6}>
|
<Grid.Col span={6}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Box>
|
|
||||||
<Text>Investor</Text>
|
|
||||||
<Text>4657</Text>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
<Box>
|
||||||
<Text>ROI</Text>
|
<Text>ROI</Text>
|
||||||
<Text>%</Text>
|
<Text>{investasi.roi}%</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Total Lembar</Text>
|
<Text>Total Lembar</Text>
|
||||||
<Text>0</Text>
|
<Text>{investasi.totalLembar} lembar</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Pembagian Deviden</Text>
|
<Text>Pembagian Deviden</Text>
|
||||||
<Text>Selamanya</Text>
|
<Text>{investasi.MasterPeriodeDeviden.name}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
@@ -125,7 +150,11 @@ export default function DetailInvestasi({id}: {id: string}) {
|
|||||||
{/* List Box */}
|
{/* List Box */}
|
||||||
<Grid mb={"md"}>
|
<Grid mb={"md"}>
|
||||||
{listBox.map((e) => (
|
{listBox.map((e) => (
|
||||||
<Grid.Col span={"auto"} key={e.id} onClick={() => router.push(e.route + `${id}`)}>
|
<Grid.Col
|
||||||
|
span={"auto"}
|
||||||
|
key={e.id}
|
||||||
|
onClick={() => router.push(e.route + `${investasi.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>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
Group,
|
Group,
|
||||||
Image,
|
Image,
|
||||||
Paper,
|
Paper,
|
||||||
|
Progress,
|
||||||
Slider,
|
Slider,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
@@ -21,22 +22,32 @@ import {
|
|||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import {
|
import {
|
||||||
IconBookDownload,
|
IconBookDownload,
|
||||||
|
IconCircleCheck,
|
||||||
IconFileDescription,
|
IconFileDescription,
|
||||||
IconSpeakerphone,
|
IconSpeakerphone,
|
||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
|
import { MODEL_Investasi } from "../../model/model_investasi";
|
||||||
|
import { useState } from "react";
|
||||||
|
import moment from "moment";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
export default function DetailPublishInvestasi() {
|
export default function DetailPublishInvestasi({
|
||||||
|
dataInvestasi,
|
||||||
|
}: {
|
||||||
|
dataInvestasi: MODEL_Investasi;
|
||||||
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const [investasi, setInvestasi] = useState(dataInvestasi);
|
||||||
|
|
||||||
const listBox = [
|
const listBox = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "Prospektus",
|
name: "Prospektus",
|
||||||
icon: <IconBookDownload size={70} />,
|
icon: <IconBookDownload size={70} />,
|
||||||
route: RouterInvestasi.edit_prospektus,
|
route: RouterInvestasi.detail_prospektus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
@@ -48,73 +59,81 @@ export default function DetailPublishInvestasi() {
|
|||||||
id: 3,
|
id: 3,
|
||||||
name: "Berita",
|
name: "Berita",
|
||||||
icon: <IconSpeakerphone size={70} />,
|
icon: <IconSpeakerphone size={70} />,
|
||||||
route: RouterInvestasi.edit_berita,
|
route: RouterInvestasi.list_edit_berita,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Center mb={"sm"}>
|
{Number(investasi.MasterPencarianInvestor.name) -
|
||||||
<Text>Sisa waktu : 20 Hari</Text>
|
moment(new Date()).diff(new Date(investasi.updatedAt), "days") <=
|
||||||
</Center>
|
0 ? (
|
||||||
|
<Group position="right">
|
||||||
|
<IconCircleCheck color="green" />
|
||||||
|
<Text c={"green"}>Selesai</Text>
|
||||||
|
</Group>
|
||||||
|
) : (
|
||||||
|
<Group mb={"sm"} position="center">
|
||||||
|
<Text>
|
||||||
|
Sisa waktu :{" "}
|
||||||
|
{Number(investasi.MasterPencarianInvestor.name) -
|
||||||
|
moment(new Date()).diff(
|
||||||
|
new Date(investasi.updatedAt),
|
||||||
|
"days"
|
||||||
|
)}{" "}
|
||||||
|
hari
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
|
||||||
<Paper withBorder mb={"md"}>
|
<Paper withBorder mb={"md"}>
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
<Image
|
||||||
|
alt=""
|
||||||
|
src={RouterInvestasi.api_gambar + `${investasi.imagesId}`}
|
||||||
|
/>
|
||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
{/* Title dan Persentase */}
|
{/* Title dan Persentase */}
|
||||||
<Box mb={"md"}>
|
<Box mb={"md"}>
|
||||||
<Title order={4} mb={"xs"}>
|
<Title order={4} mb={"xs"}>
|
||||||
Judul Proyek
|
{investasi.title}
|
||||||
</Title>
|
</Title>
|
||||||
<Slider
|
<Progress color="lime" radius="xl" size="xl" value={0} label="0 %" />
|
||||||
disabled
|
|
||||||
size={10}
|
|
||||||
value={60}
|
|
||||||
marks={[{ value: 60, label: "60%" }]}
|
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Rincian Data */}
|
{/* Rincian Data */}
|
||||||
<Grid p={"md"} mb={"md"}>
|
<Grid p={"md"} mb={"md"}>
|
||||||
<Grid.Col span={6}>
|
<Grid.Col span={6}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Box>
|
|
||||||
<Text>Terkumpul</Text>
|
|
||||||
<Text>Rp. </Text>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Dana Dibutuhkan</Text>
|
<Text>Dana Dibutuhkan</Text>
|
||||||
<Text>Rp. </Text>
|
<Text>Rp. {investasi.targetDana}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Harga Per Lembar</Text>
|
<Text>Harga Per Lembar</Text>
|
||||||
<Text>Rp. </Text>
|
<Text>Rp. {investasi.hargaLembar}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Jadwal Pembagian</Text>
|
<Text>Jadwal Pembagian</Text>
|
||||||
<Text>3 Bulan </Text>
|
<Text>{investasi.MasterPembagianDeviden.name} bulan </Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={6}>
|
<Grid.Col span={6}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Box>
|
|
||||||
<Text>Investor</Text>
|
|
||||||
<Text>4657</Text>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
<Box>
|
||||||
<Text>ROI</Text>
|
<Text>ROI</Text>
|
||||||
<Text>%</Text>
|
<Text>{investasi.roi}%</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Total Lembar</Text>
|
<Text>Total Lembar</Text>
|
||||||
<Text>0</Text>
|
<Text>{investasi.totalLembar} lembar</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Pembagian Deviden</Text>
|
<Text>Pembagian Deviden</Text>
|
||||||
<Text>Selamanya</Text>
|
<Text>{investasi.MasterPeriodeDeviden.name}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
@@ -126,7 +145,7 @@ export default function DetailPublishInvestasi() {
|
|||||||
<Grid.Col
|
<Grid.Col
|
||||||
span={"auto"}
|
span={"auto"}
|
||||||
key={e.id}
|
key={e.id}
|
||||||
onClick={() => router.push(e.route + `${1}`)}
|
onClick={() => router.push(e.route + `${investasi.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"}>
|
||||||
|
|||||||
@@ -1,23 +1,30 @@
|
|||||||
"use client"
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate"
|
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core"
|
import { AppShell } from "@mantine/core";
|
||||||
import { IconEdit } from "@tabler/icons-react"
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
import React from "react"
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDetailRejecttInvestasi({children}: {children: React.ReactNode}){
|
export default function LayoutDetailRejecttInvestasi({
|
||||||
return<>
|
children,
|
||||||
|
idInves,
|
||||||
<AppShell
|
}: {
|
||||||
header={
|
children: React.ReactNode;
|
||||||
<HeaderTamplate title="Detail Reject"
|
idInves: string;
|
||||||
icon={<IconEdit />}
|
}) {
|
||||||
route2={`/dev/investasi/edit/${1}`}
|
return (
|
||||||
/>
|
<>
|
||||||
}
|
<AppShell
|
||||||
>
|
header={
|
||||||
|
<HeaderTamplate
|
||||||
|
title="Detail Reject"
|
||||||
|
icon={<IconEdit />}
|
||||||
|
route2={`/dev/investasi/edit/${idInves}`}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
Grid,
|
Grid,
|
||||||
Group,
|
Group,
|
||||||
Image,
|
Image,
|
||||||
|
Modal,
|
||||||
Paper,
|
Paper,
|
||||||
Slider,
|
Slider,
|
||||||
Stack,
|
Stack,
|
||||||
@@ -29,10 +30,21 @@ import { useAtom } from "jotai";
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { gs_StatusPortoInvestasi } from "../../g_state";
|
import { gs_StatusPortoInvestasi } from "../../g_state";
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
|
import { MODEL_Investasi } from "../../model/model_investasi";
|
||||||
|
import { useState } from "react";
|
||||||
|
import funGantiStatusInvestasi from "../../fun/fun_ganti_status";
|
||||||
|
import funDeleteInvestasi from "../../fun/fun_delete_investasi";
|
||||||
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
|
|
||||||
export default function DetailRejectInvestasi() {
|
export default function DetailRejectInvestasi({
|
||||||
|
dataInvestasi,
|
||||||
|
}: {
|
||||||
|
dataInvestasi: MODEL_Investasi;
|
||||||
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const [investasi, setInvestasi] = useState(dataInvestasi);
|
||||||
const [activeTab, setActiveTab] = useAtom(gs_StatusPortoInvestasi);
|
const [activeTab, setActiveTab] = useAtom(gs_StatusPortoInvestasi);
|
||||||
|
const [opened, { toggle }] = useDisclosure(false);
|
||||||
|
|
||||||
const listBox = [
|
const listBox = [
|
||||||
{
|
{
|
||||||
@@ -56,31 +68,53 @@ export default function DetailRejectInvestasi() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
async function onAjukan() {
|
async function onAjukan() {
|
||||||
toast("Project Diajukan Kembali");
|
await funGantiStatusInvestasi(investasi.id, "2").then((res) => {
|
||||||
router.push(RouterInvestasi.portofolio);
|
if (res.status === 200) {
|
||||||
setActiveTab("Review");
|
toast("Project Diajukan Kembali");
|
||||||
|
router.push(RouterInvestasi.portofolio);
|
||||||
|
setActiveTab("Review");
|
||||||
|
} else {
|
||||||
|
toast("Gagal Pengajuan");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onBatal() {
|
async function onBatal() {
|
||||||
toast("Project Dibatalkan");
|
await funDeleteInvestasi(investasi.id).then((res) => {
|
||||||
router.push(RouterInvestasi.portofolio);
|
if (res.status === 200) {
|
||||||
setActiveTab("Reject");
|
toast(res.message);
|
||||||
|
toggle();
|
||||||
|
router.push(RouterInvestasi.portofolio);
|
||||||
|
} else {
|
||||||
|
toast(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// setActiveTab("Reject");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{/* Pop up */}
|
||||||
|
<Modal
|
||||||
|
opened={opened}
|
||||||
|
onClose={toggle}
|
||||||
|
centered
|
||||||
|
title="Yakin menghapus data"
|
||||||
|
>
|
||||||
|
<Group position="center">
|
||||||
|
<Button onClick={toggle}>Batal</Button>
|
||||||
|
<Button bg={Warna.merah} onClick={() => onBatal()}>
|
||||||
|
Hapus
|
||||||
|
</Button>
|
||||||
|
</Group>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
{/* Alasan */}
|
{/* Alasan */}
|
||||||
<Box mb={"sm"}>
|
<Box mb={"sm"}>
|
||||||
<Title order={6}>Alasan :</Title>
|
<Title order={6}>Alasan :</Title>
|
||||||
<Box>
|
<Box>
|
||||||
<Paper>
|
<Paper>
|
||||||
<Text>
|
<Text>{investasi.catatan}</Text>
|
||||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab
|
|
||||||
necessitatibus dolores, doloribus porro quis velit unde voluptatem
|
|
||||||
delectus, nesciunt laboriosam non quae numquam sed tenetur! Minus
|
|
||||||
earum odio possimus dolore?
|
|
||||||
</Text>
|
|
||||||
</Paper>
|
</Paper>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -94,6 +128,7 @@ export default function DetailRejectInvestasi() {
|
|||||||
radius={50}
|
radius={50}
|
||||||
bg={"orange.7"}
|
bg={"orange.7"}
|
||||||
color="yellow"
|
color="yellow"
|
||||||
|
compact
|
||||||
onClick={() => onAjukan()}
|
onClick={() => onAjukan()}
|
||||||
>
|
>
|
||||||
Ajukan Kembali
|
Ajukan Kembali
|
||||||
@@ -101,17 +136,19 @@ export default function DetailRejectInvestasi() {
|
|||||||
</Center>
|
</Center>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
|
|
||||||
|
{/* Tombol Hapus */}
|
||||||
<Grid.Col span={6}>
|
<Grid.Col span={6}>
|
||||||
<Center>
|
<Center>
|
||||||
{" "}
|
{" "}
|
||||||
<Button
|
<Button
|
||||||
|
compact
|
||||||
mb={"xl"}
|
mb={"xl"}
|
||||||
radius={50}
|
radius={50}
|
||||||
bg={"red.7"}
|
bg={"red.7"}
|
||||||
color="yellow"
|
color="yellow"
|
||||||
onClick={() => onBatal()}
|
onClick={() => toggle()}
|
||||||
>
|
>
|
||||||
Batalkan Project
|
Hapus Project
|
||||||
</Button>
|
</Button>
|
||||||
</Center>
|
</Center>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
@@ -119,22 +156,18 @@ export default function DetailRejectInvestasi() {
|
|||||||
|
|
||||||
<Paper withBorder mb={"md"}>
|
<Paper withBorder mb={"md"}>
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
<Image
|
||||||
|
alt=""
|
||||||
|
src={RouterInvestasi.api_gambar + `${investasi.imagesId}`}
|
||||||
|
/>
|
||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
|
|
||||||
{/* Title dan Persentase */}
|
{/* Title dan Persentase */}
|
||||||
<Box mb={"md"}>
|
<Box mb={"md"}>
|
||||||
<Title order={4} mb={"xs"}>
|
<Title order={4} mb={"xs"}>
|
||||||
Judul Proyek
|
{investasi.title}
|
||||||
</Title>
|
</Title>
|
||||||
<Slider
|
|
||||||
disabled
|
|
||||||
size={10}
|
|
||||||
value={60}
|
|
||||||
marks={[{ value: 60, label: "60%" }]}
|
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Rincian Data */}
|
{/* Rincian Data */}
|
||||||
@@ -143,15 +176,19 @@ export default function DetailRejectInvestasi() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Dana Dibutuhkan</Text>
|
<Text>Dana Dibutuhkan</Text>
|
||||||
<Text>Rp. </Text>
|
<Text>Rp. {investasi.targetDana}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Harga Per Lembar</Text>
|
<Text>Harga Per Lembar</Text>
|
||||||
<Text>Rp. </Text>
|
<Text>Rp. {investasi.hargaLembar}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Jadwal Pembagian</Text>
|
<Text>Jadwal Pembagian</Text>
|
||||||
<Text>3 Bulan </Text>
|
<Text>{investasi.MasterPembagianDeviden.name} Bulan </Text>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text>Pencarian Investor</Text>
|
||||||
|
<Text>{investasi.MasterPencarianInvestor.name} Hari </Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
@@ -159,22 +196,22 @@ export default function DetailRejectInvestasi() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>ROI</Text>
|
<Text>ROI</Text>
|
||||||
<Text>%</Text>
|
<Text>{investasi.roi} %</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Total Lembar</Text>
|
<Text>Total Lembar</Text>
|
||||||
<Text>0</Text>
|
<Text>{investasi.totalLembar} lembar</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Pembagian Deviden</Text>
|
<Text>Pembagian Deviden</Text>
|
||||||
<Text>Selamanya</Text>
|
<Text>{investasi.MasterPeriodeDeviden.name}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{/* List Box */}
|
{/* List Box */}
|
||||||
<Grid mb={"md"}>
|
{/* <Grid mb={"md"}>
|
||||||
{listBox.map((e) => (
|
{listBox.map((e) => (
|
||||||
<Grid.Col
|
<Grid.Col
|
||||||
span={"auto"}
|
span={"auto"}
|
||||||
@@ -191,9 +228,7 @@ export default function DetailRejectInvestasi() {
|
|||||||
</Paper>
|
</Paper>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid> */}
|
||||||
|
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ export default function DetailPropektus({
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
style={{ textDecorationLine: "none" }}
|
style={{ textDecorationLine: "none" }}
|
||||||
>
|
>
|
||||||
<Paper w={"100%"} h={50} bg={"gray"} mb={"md"}>
|
<Paper w={"100%"} bg={"gray"} mb={"md"}>
|
||||||
<Grid
|
<Grid
|
||||||
align="center"
|
align="center"
|
||||||
justify="center"
|
justify="center"
|
||||||
h={50}
|
|
||||||
px={"sm"}
|
px={"sm"}
|
||||||
onClick={() => ""}
|
onClick={() => ""}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,17 +5,27 @@ import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
|||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import getOneInvestasiById from "../fun/get_one_investasi_by_id";
|
||||||
|
import { MODEL_Investasi } from "../model/model_investasi";
|
||||||
|
|
||||||
export default function LayoutEditProspektusInvestasi({
|
export default function LayoutEditProspektusInvestasi({
|
||||||
children,
|
children,
|
||||||
idInves
|
dataInvestasi,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
idInves: string
|
dataInvestasi: MODEL_Investasi;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Edit Prospektus" icon={<IconEdit/>}route2={RouterInvestasi.upload_prospektus + `${idInves}`} />}>
|
<AppShell
|
||||||
|
header={
|
||||||
|
<HeaderTamplate
|
||||||
|
title="Edit Prospektus"
|
||||||
|
icon={<IconEdit />}
|
||||||
|
route2={RouterInvestasi.upload_prospektus + `${dataInvestasi.id}`}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -49,13 +49,13 @@ export default function EditProspektusInvestasi({
|
|||||||
px={"sm"}
|
px={"sm"}
|
||||||
onClick={() => ""}
|
onClick={() => ""}
|
||||||
>
|
>
|
||||||
<Grid.Col span={10}>
|
<Grid.Col span={11}>
|
||||||
<Group>
|
<Group>
|
||||||
{/* <IconFileTypePdf /> */}
|
{/* <IconFileTypePdf /> */}
|
||||||
<Text lineClamp={1}>Prospektus_{prospek.title}</Text>
|
<Text lineClamp={1}>Prospektus_{prospek.title}</Text>
|
||||||
</Group>
|
</Group>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={2}>
|
<Grid.Col span={1}>
|
||||||
<Center>
|
<Center>
|
||||||
<IconChevronRight />
|
<IconChevronRight />
|
||||||
</Center>
|
</Center>
|
||||||
@@ -68,7 +68,7 @@ export default function EditProspektusInvestasi({
|
|||||||
<Title order={4}>Tidak ada file</Title>
|
<Title order={4}>Tidak ada file</Title>
|
||||||
</Center>
|
</Center>
|
||||||
)}
|
)}
|
||||||
<Divider my={"lg"} />
|
{/* <Divider my={"lg"} /> */}
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
26
src/app_modules/investasi/fun/fun_delete_investasi.ts
Normal file
26
src/app_modules/investasi/fun/fun_delete_investasi.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin";
|
||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
import { revalidatePath } from "next/cache";
|
||||||
|
|
||||||
|
export default async function funDeleteInvestasi(id: string) {
|
||||||
|
const res = await prisma.investasi.delete({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!res) return { status: 400, message: "Gagal Hapus Data" };
|
||||||
|
|
||||||
|
|
||||||
|
revalidatePath(RouterInvestasi.portofolio)
|
||||||
|
revalidatePath(RouterAdminInvestasi.main_investasi)
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
status: 200,
|
||||||
|
message: "Berhasil Hapus",
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import prisma from "@/app/lib/prisma";
|
import prisma from "@/app/lib/prisma";
|
||||||
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin";
|
import { RouterAdminInvestasi } from "@/app/lib/router_hipmi/router_admin";
|
||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { revalidatePath } from "next/cache";
|
import { revalidatePath } from "next/cache";
|
||||||
|
|
||||||
export default async function funGantiStatusInvestasi(id: string, val: string) {
|
export default async function funGantiStatusInvestasi(id: string, val: string) {
|
||||||
@@ -16,7 +17,7 @@ export default async function funGantiStatusInvestasi(id: string, val: string) {
|
|||||||
|
|
||||||
if(!data) return {status: 400}
|
if(!data) return {status: 400}
|
||||||
|
|
||||||
revalidatePath("/dev/investasi/main/portofolio")
|
revalidatePath(RouterInvestasi.portofolio)
|
||||||
revalidatePath(RouterAdminInvestasi.main_investasi)
|
revalidatePath(RouterAdminInvestasi.main_investasi)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
import prisma from "@/app/lib/prisma";
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
export default async function getInvestasiById(id: string) {
|
export default async function getInvestasiByStatusId(
|
||||||
|
id: string,
|
||||||
|
) {
|
||||||
const data = await prisma.user.findUnique({
|
const data = await prisma.user.findUnique({
|
||||||
where: { id: id },
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
select: {
|
select: {
|
||||||
Investasi: {
|
Investasi: {
|
||||||
select: {
|
select: {
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
"use server";
|
|
||||||
|
|
||||||
import prisma from "@/app/lib/prisma";
|
|
||||||
|
|
||||||
export async function getListAllInvestasi() {
|
|
||||||
const data = await prisma.investasi.findMany({
|
|
||||||
orderBy: {
|
|
||||||
createdAt: "desc"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
44
src/app_modules/investasi/fun/get_list_all_publish.ts
Normal file
44
src/app_modules/investasi/fun/get_list_all_publish.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
|
export async function getListAllPublish() {
|
||||||
|
const data = await prisma.investasi.findMany({
|
||||||
|
orderBy: {
|
||||||
|
updatedAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
MasterStatusInvestasi: {
|
||||||
|
name: {
|
||||||
|
equals: "Publish",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AND: {
|
||||||
|
active: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
title: true,
|
||||||
|
authorId: true,
|
||||||
|
hargaLembar: true,
|
||||||
|
targetDana: true,
|
||||||
|
totalLembar: true,
|
||||||
|
roi: true,
|
||||||
|
active: true,
|
||||||
|
createdAt: true,
|
||||||
|
updatedAt: true,
|
||||||
|
imagesId: true,
|
||||||
|
MasterStatusInvestasi: true,
|
||||||
|
BeritaInvestasi: true,
|
||||||
|
DokumenInvestasi: true,
|
||||||
|
ProspektusInvestasi: true,
|
||||||
|
MasterPembagianDeviden: true,
|
||||||
|
MasterPencarianInvestor: true,
|
||||||
|
MasterPeriodeDeviden: true,
|
||||||
|
SahamTerbeli: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
@@ -16,6 +16,9 @@ export default async function getOneInvestasiById(id: string) {
|
|||||||
totalLembar: true,
|
totalLembar: true,
|
||||||
roi: true,
|
roi: true,
|
||||||
active: true,
|
active: true,
|
||||||
|
createdAt: true,
|
||||||
|
updatedAt: true,
|
||||||
|
catatan: true,
|
||||||
imagesId: true,
|
imagesId: true,
|
||||||
MasterStatusInvestasi: true,
|
MasterStatusInvestasi: true,
|
||||||
BeritaInvestasi: true,
|
BeritaInvestasi: true,
|
||||||
|
|||||||
104
src/app_modules/investasi/fun/get_porto_status_by_id.ts
Normal file
104
src/app_modules/investasi/fun/get_porto_status_by_id.ts
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
|
export default async function getPortoByStatusId(id: string, statusId: number) {
|
||||||
|
// Draft
|
||||||
|
if (statusId === 1) {
|
||||||
|
const data = await prisma.investasi.findMany({
|
||||||
|
orderBy: {
|
||||||
|
updatedAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
authorId: id,
|
||||||
|
MasterStatusInvestasi: {
|
||||||
|
name: "Draft",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
title: true,
|
||||||
|
imagesId: true,
|
||||||
|
// hargaLembar: true,
|
||||||
|
// targetDana: true,
|
||||||
|
// totalLembar: true,
|
||||||
|
// roi: true,
|
||||||
|
// active: true,
|
||||||
|
// MasterStatusInvestasi: true,
|
||||||
|
// BeritaInvestasi: true,
|
||||||
|
// DokumenInvestasi: true,
|
||||||
|
// ProspektusInvestasi: true,
|
||||||
|
// MasterPembagianDeviden: true,
|
||||||
|
// MasterPencarianInvestor: true,
|
||||||
|
// MasterPeriodeDeviden: true,
|
||||||
|
// SahamTerbeli: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Review
|
||||||
|
if (statusId === 2) {
|
||||||
|
const data = await prisma.investasi.findMany({
|
||||||
|
orderBy: {
|
||||||
|
createdAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
authorId: id,
|
||||||
|
MasterStatusInvestasi: {
|
||||||
|
name: "Review",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
title: true,
|
||||||
|
imagesId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish
|
||||||
|
if (statusId === 3) {
|
||||||
|
const data = await prisma.investasi.findMany({
|
||||||
|
orderBy: {
|
||||||
|
updatedAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
authorId: id,
|
||||||
|
MasterStatusInvestasi: {
|
||||||
|
name: "Publish",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
title: true,
|
||||||
|
imagesId: true,
|
||||||
|
updatedAt: true,
|
||||||
|
MasterPencarianInvestor: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reject
|
||||||
|
if (statusId === 4) {
|
||||||
|
const data = await prisma.investasi.findMany({
|
||||||
|
orderBy: {
|
||||||
|
updatedAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
authorId: id,
|
||||||
|
MasterStatusInvestasi: {
|
||||||
|
name: "Reject",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
title: true,
|
||||||
|
imagesId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,10 +10,12 @@ import {
|
|||||||
Card,
|
Card,
|
||||||
CardSection,
|
CardSection,
|
||||||
Divider,
|
Divider,
|
||||||
|
Flex,
|
||||||
Grid,
|
Grid,
|
||||||
Group,
|
Group,
|
||||||
Image,
|
Image,
|
||||||
Paper,
|
Paper,
|
||||||
|
Progress,
|
||||||
Slider,
|
Slider,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
@@ -24,6 +26,8 @@ import dataDummy from "../dummy/data_dummy.json";
|
|||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { IconCheck, IconCircleCheck } from "@tabler/icons-react";
|
import { IconCheck, IconCircleCheck } from "@tabler/icons-react";
|
||||||
import { MODEL_Investasi } from "../model/model_investasi";
|
import { MODEL_Investasi } from "../model/model_investasi";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function MainInvestasi({
|
export default function MainInvestasi({
|
||||||
listData,
|
listData,
|
||||||
@@ -31,17 +35,19 @@ export default function MainInvestasi({
|
|||||||
periodeDeviden,
|
periodeDeviden,
|
||||||
pembagianDeviden,
|
pembagianDeviden,
|
||||||
}: {
|
}: {
|
||||||
listData: MODEL_Investasi[]
|
listData: MODEL_Investasi[];
|
||||||
pencarianInvestor: MODEL_DEFAULT_MASTER[];
|
pencarianInvestor: MODEL_DEFAULT_MASTER[];
|
||||||
periodeDeviden: MODEL_DEFAULT_MASTER[];
|
periodeDeviden: MODEL_DEFAULT_MASTER[];
|
||||||
pembagianDeviden: MODEL_DEFAULT_MASTER[];
|
pembagianDeviden: MODEL_DEFAULT_MASTER[];
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const [investasi, setInvestasi] = useState(listData);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <pre>{JSON.stringify(listData, null, 2)}</pre> */}
|
{/* <pre>{JSON.stringify(listData, null, 2)}</pre> */}
|
||||||
{dataDummy.map((e) => (
|
|
||||||
|
{investasi.map((e) => (
|
||||||
<Card
|
<Card
|
||||||
key={e.id}
|
key={e.id}
|
||||||
withBorder
|
withBorder
|
||||||
@@ -58,17 +64,12 @@ export default function MainInvestasi({
|
|||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
</CardSection>
|
</CardSection>
|
||||||
|
|
||||||
|
{/* Progress dan titlr */}
|
||||||
<CardSection p={"lg"}>
|
<CardSection p={"lg"}>
|
||||||
<Box mb={"md"}>
|
<Stack >
|
||||||
<Title order={4}>{e.title}</Title>
|
<Title order={4}>{e.title}</Title>
|
||||||
<Slider
|
<Progress label="0%" value={0} color="teal" size="xl" radius="xl" animate/>
|
||||||
size={10}
|
</Stack>
|
||||||
disabled
|
|
||||||
labelAlwaysOn
|
|
||||||
value={e.persentase}
|
|
||||||
marks={[{ value: e.persentase, label: e.persentase + `%` }]}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</CardSection>
|
</CardSection>
|
||||||
<CardSection p={"md"}>
|
<CardSection p={"md"}>
|
||||||
<Box>
|
<Box>
|
||||||
@@ -102,9 +103,9 @@ export default function MainInvestasi({
|
|||||||
</CardSection>
|
</CardSection>
|
||||||
<Divider />
|
<Divider />
|
||||||
<CardSection p={"md"}>
|
<CardSection p={"md"}>
|
||||||
<Group position="apart" px={"sm"}>
|
<Flex gap={"xl"} align={"center"} justify={"center"}>
|
||||||
<Box>
|
<Box>
|
||||||
{e.saham_beli === 0 ? (
|
{e.SahamTerbeli === null ? (
|
||||||
""
|
""
|
||||||
) : (
|
) : (
|
||||||
<Badge variant="dot" color="teal">
|
<Badge variant="dot" color="teal">
|
||||||
@@ -112,9 +113,10 @@ export default function MainInvestasi({
|
|||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{(() => {
|
{(() => {
|
||||||
if (
|
if (
|
||||||
e.masterPencarianInvestorId -
|
Number(e.MasterPencarianInvestor.name) -
|
||||||
moment(new Date()).diff(new Date(e.createdAt), "days") <=
|
moment(new Date()).diff(new Date(e.createdAt), "days") <=
|
||||||
0
|
0
|
||||||
) {
|
) {
|
||||||
@@ -132,9 +134,9 @@ export default function MainInvestasi({
|
|||||||
<Group position="right" spacing={"xs"}>
|
<Group position="right" spacing={"xs"}>
|
||||||
<Text>Sisa waktu:</Text>
|
<Text>Sisa waktu:</Text>
|
||||||
<Text>
|
<Text>
|
||||||
{e.masterPencarianInvestorId -
|
{Number(e.MasterPencarianInvestor.name) -
|
||||||
moment(new Date()).diff(
|
moment(new Date()).diff(
|
||||||
new Date(e.createdAt),
|
new Date(e.updatedAt),
|
||||||
"days"
|
"days"
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -144,7 +146,7 @@ export default function MainInvestasi({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
</Group>
|
</Flex>
|
||||||
</CardSection>
|
</CardSection>
|
||||||
</Card>
|
</Card>
|
||||||
))}
|
))}
|
||||||
|
|||||||
61
src/app_modules/investasi/portofolio/draft.tsx
Normal file
61
src/app_modules/investasi/portofolio/draft.tsx
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardSection,
|
||||||
|
AspectRatio,
|
||||||
|
Box,
|
||||||
|
Title,
|
||||||
|
Divider,
|
||||||
|
Group,
|
||||||
|
Badge,
|
||||||
|
Image,
|
||||||
|
Text,
|
||||||
|
Center,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { MODEL_Investasi } from "../model/model_investasi";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default function Draft({ data }: { data: MODEL_Investasi[] }) {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{/* <pre> {JSON.stringify(data,null, 2)}</pre> */}
|
||||||
|
{data.map((e) =>
|
||||||
|
<Card
|
||||||
|
key={e.id}
|
||||||
|
withBorder
|
||||||
|
mb={40}
|
||||||
|
bg={"gray.5"}
|
||||||
|
onClick={() =>
|
||||||
|
router.push(RouterInvestasi.detail_draft + `${e.id}`)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<CardSection p={"xs"}>
|
||||||
|
<AspectRatio ratio={16 / 9}>
|
||||||
|
<Image
|
||||||
|
alt=""
|
||||||
|
src={RouterInvestasi.api_gambar + `${e.imagesId}`}
|
||||||
|
/>
|
||||||
|
</AspectRatio>
|
||||||
|
</CardSection>
|
||||||
|
|
||||||
|
<CardSection p={"lg"}>
|
||||||
|
<Box>
|
||||||
|
<Title order={4}>{e.title}</Title>
|
||||||
|
</Box>
|
||||||
|
</CardSection>
|
||||||
|
<Divider />
|
||||||
|
<CardSection p={"md"}>
|
||||||
|
<Group position="center">
|
||||||
|
<Badge color="yellow" variant="dot">
|
||||||
|
Draft
|
||||||
|
</Badge>
|
||||||
|
</Group>
|
||||||
|
</CardSection>
|
||||||
|
</Card>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
96
src/app_modules/investasi/portofolio/publish.tsx
Normal file
96
src/app_modules/investasi/portofolio/publish.tsx
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardSection,
|
||||||
|
AspectRatio,
|
||||||
|
Box,
|
||||||
|
Title,
|
||||||
|
Slider,
|
||||||
|
Divider,
|
||||||
|
Group,
|
||||||
|
Badge,
|
||||||
|
Image,
|
||||||
|
Text,
|
||||||
|
Center,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import {
|
||||||
|
MODEL_Investasi,
|
||||||
|
MODEL_Status_investasi,
|
||||||
|
} from "../model/model_investasi";
|
||||||
|
import _ from "lodash";
|
||||||
|
import moment from "moment";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { IconCircleCheck } from "@tabler/icons-react";
|
||||||
|
|
||||||
|
export default function Publish({ data }: { data: MODEL_Investasi[] }) {
|
||||||
|
const router = useRouter();
|
||||||
|
const [sisaWaktu, setSisaWaktu] = useState();
|
||||||
|
if (_.isEmpty(data))
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Center h={"50vh"}>Tidak ada Publish</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{data.map((e) => (
|
||||||
|
<Card
|
||||||
|
key={e.id}
|
||||||
|
withBorder
|
||||||
|
mb={40}
|
||||||
|
bg={"gray.5"}
|
||||||
|
onClick={() =>
|
||||||
|
router.push(RouterInvestasi.detail_publish + `${e.id}`)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<CardSection p={"xs"}>
|
||||||
|
<AspectRatio ratio={16 / 9}>
|
||||||
|
<Image
|
||||||
|
alt=""
|
||||||
|
src={RouterInvestasi.api_gambar + `${e.imagesId}`}
|
||||||
|
/>
|
||||||
|
</AspectRatio>
|
||||||
|
</CardSection>
|
||||||
|
|
||||||
|
<CardSection p={"lg"}>
|
||||||
|
<Box mb={"md"}>
|
||||||
|
<Title order={4}>{e.title}</Title>
|
||||||
|
{/* <Slider
|
||||||
|
size={10}
|
||||||
|
disabled
|
||||||
|
labelAlwaysOn
|
||||||
|
value={60}
|
||||||
|
marks={[{ value: 60, label: 60 + `%` }]}
|
||||||
|
/> */}
|
||||||
|
</Box>
|
||||||
|
</CardSection>
|
||||||
|
<Divider />
|
||||||
|
<CardSection p={"md"}>
|
||||||
|
{Number(e.MasterPencarianInvestor.name) -
|
||||||
|
moment(new Date()).diff(new Date(e.updatedAt), "days") <=
|
||||||
|
0 ? (
|
||||||
|
<Group position="right">
|
||||||
|
<IconCircleCheck color="green" />
|
||||||
|
<Text c={"green"}>Selesai</Text>
|
||||||
|
</Group>
|
||||||
|
) : (
|
||||||
|
<Group position="apart">
|
||||||
|
<Badge color="green" variant="dot">
|
||||||
|
Publish
|
||||||
|
</Badge>
|
||||||
|
<Text>
|
||||||
|
Sisa Waktu :{" "}
|
||||||
|
{Number(e.MasterPencarianInvestor.name) -
|
||||||
|
moment(new Date()).diff(new Date(e.updatedAt), "days")}{" "}
|
||||||
|
hari
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
</CardSection>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
71
src/app_modules/investasi/portofolio/reject.tsx
Normal file
71
src/app_modules/investasi/portofolio/reject.tsx
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardSection,
|
||||||
|
AspectRatio,
|
||||||
|
Box,
|
||||||
|
Title,
|
||||||
|
Divider,
|
||||||
|
Group,
|
||||||
|
Badge,
|
||||||
|
Image,
|
||||||
|
Text,
|
||||||
|
Center,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import {
|
||||||
|
MODEL_Investasi,
|
||||||
|
MODEL_Status_investasi,
|
||||||
|
} from "../model/model_investasi";
|
||||||
|
import { useState } from "react";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default function Reject({ data }: { data: MODEL_Investasi[] }) {
|
||||||
|
const [investasi, setInvestasi] = useState(data);
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
if (_.isEmpty(data))
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Center h={"50vh"}>Tidak ada Reject</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
|
||||||
|
{investasi.map((e) => (
|
||||||
|
<Card
|
||||||
|
key={e.id}
|
||||||
|
withBorder
|
||||||
|
mb={40}
|
||||||
|
bg={"gray.5"}
|
||||||
|
onClick={() => router.push(RouterInvestasi.detail_reject + `${e.id}`)}
|
||||||
|
>
|
||||||
|
<CardSection p={"xs"}>
|
||||||
|
<AspectRatio ratio={16 / 9}>
|
||||||
|
<Image
|
||||||
|
alt=""
|
||||||
|
src={RouterInvestasi.api_gambar + `${e.imagesId}`}
|
||||||
|
/>
|
||||||
|
</AspectRatio>
|
||||||
|
</CardSection>
|
||||||
|
|
||||||
|
<CardSection p={"lg"}>
|
||||||
|
<Box>
|
||||||
|
<Title order={4}>{e.title}</Title>
|
||||||
|
</Box>
|
||||||
|
</CardSection>
|
||||||
|
<Divider />
|
||||||
|
<CardSection p={"md"}>
|
||||||
|
<Group position="center">
|
||||||
|
<Badge color="red" variant="dot">
|
||||||
|
Reject
|
||||||
|
</Badge>
|
||||||
|
</Group>
|
||||||
|
</CardSection>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
67
src/app_modules/investasi/portofolio/review.tsx
Normal file
67
src/app_modules/investasi/portofolio/review.tsx
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardSection,
|
||||||
|
AspectRatio,
|
||||||
|
Box,
|
||||||
|
Title,
|
||||||
|
Divider,
|
||||||
|
Group,
|
||||||
|
Badge,
|
||||||
|
Image,
|
||||||
|
Center,
|
||||||
|
Text,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import {
|
||||||
|
MODEL_Status_investasi,
|
||||||
|
MODEL_Investasi,
|
||||||
|
} from "../model/model_investasi";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default function Review({ data }: { data: MODEL_Investasi[] }) {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
if (_.isEmpty(data))
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Center h={"50vh"}>Tidak ada Review</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{data.map((e) => (
|
||||||
|
<Card
|
||||||
|
key={e.id}
|
||||||
|
withBorder
|
||||||
|
mb={40}
|
||||||
|
bg={"gray.5"}
|
||||||
|
onClick={() => router.push(RouterInvestasi.detail_review + `${e.id}`)}
|
||||||
|
>
|
||||||
|
<CardSection p={"xs"}>
|
||||||
|
<AspectRatio ratio={16 / 9}>
|
||||||
|
<Image
|
||||||
|
alt=""
|
||||||
|
src={RouterInvestasi.api_gambar + `${e.imagesId}`}
|
||||||
|
/>
|
||||||
|
</AspectRatio>
|
||||||
|
</CardSection>
|
||||||
|
|
||||||
|
<CardSection p={"lg"}>
|
||||||
|
<Box>
|
||||||
|
<Title order={4}>{e.title}</Title>
|
||||||
|
</Box>
|
||||||
|
</CardSection>
|
||||||
|
<Divider />
|
||||||
|
<CardSection p={"md"}>
|
||||||
|
<Group position="center">
|
||||||
|
<Badge color="yellow" variant="dot">
|
||||||
|
Review
|
||||||
|
</Badge>
|
||||||
|
</Group>
|
||||||
|
</CardSection>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -47,18 +47,26 @@ import {
|
|||||||
MODEL_Status_investasi,
|
MODEL_Status_investasi,
|
||||||
} from "../model/model_investasi";
|
} from "../model/model_investasi";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import Draft from "./draft";
|
||||||
|
import Review from "./review";
|
||||||
|
import Publish from "./publish";
|
||||||
|
import Reject from "./reject";
|
||||||
|
|
||||||
export default function PortofolioInvestasi({
|
export default function PortofolioInvestasi({
|
||||||
dataInvestasi,
|
|
||||||
listStatusInvestasi,
|
listStatusInvestasi,
|
||||||
|
dataDraft,
|
||||||
|
dataReview,
|
||||||
|
dataPublish,
|
||||||
|
dataReject,
|
||||||
}: {
|
}: {
|
||||||
dataInvestasi: any
|
|
||||||
listStatusInvestasi: any;
|
listStatusInvestasi: any;
|
||||||
|
dataDraft: any;
|
||||||
|
dataReview: any;
|
||||||
|
dataPublish: any;
|
||||||
|
dataReject: any;
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [activeTab, setActiveTab] = useAtom(gs_StatusPortoInvestasi);
|
const [activeTab, setActiveTab] = useAtom(gs_StatusPortoInvestasi);
|
||||||
|
|
||||||
const [investasi, setInvestasi] = useState<MODEL_Investasi[]>(dataInvestasi);
|
|
||||||
const [status_inves, setStatus_inves] =
|
const [status_inves, setStatus_inves] =
|
||||||
useState<MODEL_Status_investasi[]>(listStatusInvestasi);
|
useState<MODEL_Status_investasi[]>(listStatusInvestasi);
|
||||||
|
|
||||||
@@ -85,190 +93,18 @@ export default function PortofolioInvestasi({
|
|||||||
</Tabs.List>
|
</Tabs.List>
|
||||||
<Divider my={"xs"} />
|
<Divider my={"xs"} />
|
||||||
<Tabs.Panel key={"1"} value="Draft">
|
<Tabs.Panel key={"1"} value="Draft">
|
||||||
<Draft data={investasi as any} />
|
<Draft data={dataDraft as any} />
|
||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
<Tabs.Panel key={"2"} value="Review">
|
<Tabs.Panel key={"2"} value="Review">
|
||||||
<Review status={status_inves as any} data={investasi as any} />
|
<Review data={dataReview as any} />
|
||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
<Tabs.Panel key={"3"} value="Publish">
|
<Tabs.Panel key={"3"} value="Publish">
|
||||||
<Publish status={status_inves as any} />
|
<Publish data={dataPublish as any} />
|
||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
<Tabs.Panel key={"4"} value="Reject">
|
<Tabs.Panel key={"4"} value="Reject">
|
||||||
<Reject status={status_inves as any} />
|
<Reject data={dataReject as any} />
|
||||||
</Tabs.Panel>
|
</Tabs.Panel>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Draft({ data }: { data: MODEL_Investasi[] }) {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{data.map((e) =>
|
|
||||||
e.MasterStatusInvestasi.id === "1" ? (
|
|
||||||
<Card
|
|
||||||
key={e.id}
|
|
||||||
withBorder
|
|
||||||
mb={40}
|
|
||||||
bg={"gray.5"}
|
|
||||||
onClick={() =>
|
|
||||||
router.push(RouterInvestasi.detail_draft + `${e.id}`)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<CardSection p={"xs"}>
|
|
||||||
<AspectRatio ratio={16 / 9}>
|
|
||||||
<Image
|
|
||||||
alt=""
|
|
||||||
src={RouterInvestasi.api_gambar + `${e.imagesId}`}
|
|
||||||
/>
|
|
||||||
</AspectRatio>
|
|
||||||
</CardSection>
|
|
||||||
|
|
||||||
<CardSection p={"lg"}>
|
|
||||||
<Box>
|
|
||||||
<Title order={4}>{e.title}</Title>
|
|
||||||
</Box>
|
|
||||||
</CardSection>
|
|
||||||
<Divider />
|
|
||||||
<CardSection p={"md"}>
|
|
||||||
<Group position="center">
|
|
||||||
<Badge color="yellow" variant="dot">
|
|
||||||
Draft
|
|
||||||
</Badge>
|
|
||||||
</Group>
|
|
||||||
</CardSection>
|
|
||||||
</Card>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Review({
|
|
||||||
status,
|
|
||||||
data,
|
|
||||||
}: {
|
|
||||||
status: MODEL_Status_investasi;
|
|
||||||
data: MODEL_Investasi[];
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{data.map((e) =>
|
|
||||||
e.MasterStatusInvestasi.id === "2" ? (
|
|
||||||
<Card
|
|
||||||
key={e.id}
|
|
||||||
withBorder
|
|
||||||
mb={40}
|
|
||||||
bg={"gray.5"}
|
|
||||||
onClick={() => router.push(RouterInvestasi.detail_review + `${e.id}`)}
|
|
||||||
>
|
|
||||||
<CardSection p={"xs"}>
|
|
||||||
<AspectRatio ratio={16 / 9}>
|
|
||||||
<Image
|
|
||||||
alt=""
|
|
||||||
src={RouterInvestasi.api_gambar + `${e.imagesId}`}
|
|
||||||
/>
|
|
||||||
</AspectRatio>
|
|
||||||
</CardSection>
|
|
||||||
|
|
||||||
<CardSection p={"lg"}>
|
|
||||||
<Box>
|
|
||||||
<Title order={4}>{e.title}</Title>
|
|
||||||
</Box>
|
|
||||||
</CardSection>
|
|
||||||
<Divider />
|
|
||||||
<CardSection p={"md"}>
|
|
||||||
<Group position="center">
|
|
||||||
<Badge color="yellow" variant="dot">
|
|
||||||
Review
|
|
||||||
</Badge>
|
|
||||||
</Group>
|
|
||||||
</CardSection>
|
|
||||||
</Card>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Publish({ status }: { status: MODEL_Status_investasi }) {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Card
|
|
||||||
withBorder
|
|
||||||
mb={40}
|
|
||||||
bg={"gray.5"}
|
|
||||||
onClick={() => router.push(RouterInvestasi.detail_publish)}
|
|
||||||
>
|
|
||||||
<CardSection p={"xs"}>
|
|
||||||
<AspectRatio ratio={16 / 9}>
|
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
|
||||||
</AspectRatio>
|
|
||||||
</CardSection>
|
|
||||||
|
|
||||||
<CardSection p={"lg"}>
|
|
||||||
<Box mb={"md"}>
|
|
||||||
<Title order={4}>Judul Investasi</Title>
|
|
||||||
<Slider
|
|
||||||
size={10}
|
|
||||||
disabled
|
|
||||||
labelAlwaysOn
|
|
||||||
value={60}
|
|
||||||
marks={[{ value: 60, label: 60 + `%` }]}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</CardSection>
|
|
||||||
<Divider />
|
|
||||||
<CardSection p={"md"}>
|
|
||||||
<Group position="apart">
|
|
||||||
<Badge color="green" variant="dot">
|
|
||||||
{status.name}
|
|
||||||
</Badge>
|
|
||||||
<Text>Sisa Waktu : 30 Hari</Text>
|
|
||||||
</Group>
|
|
||||||
</CardSection>
|
|
||||||
</Card>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Reject({ status }: { status: MODEL_Status_investasi }) {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Card
|
|
||||||
withBorder
|
|
||||||
mb={40}
|
|
||||||
bg={"gray.5"}
|
|
||||||
onClick={() => router.push(RouterInvestasi.detail_reject)}
|
|
||||||
>
|
|
||||||
<CardSection p={"xs"}>
|
|
||||||
<AspectRatio ratio={16 / 9}>
|
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
|
||||||
</AspectRatio>
|
|
||||||
</CardSection>
|
|
||||||
|
|
||||||
<CardSection p={"lg"}>
|
|
||||||
<Box>
|
|
||||||
<Title order={4}>Judul Investasi</Title>
|
|
||||||
</Box>
|
|
||||||
</CardSection>
|
|
||||||
<Divider />
|
|
||||||
<CardSection p={"md"}>
|
|
||||||
<Group position="center">
|
|
||||||
<Badge color="red" variant="dot">
|
|
||||||
{status.name}
|
|
||||||
</Badge>
|
|
||||||
</Group>
|
|
||||||
</CardSection>
|
|
||||||
</Card>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user