fix layout investasi
deskripsi: - fix detail portofolio - fix detail saham saya - fix detail transaksi
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
import { StatusTransaksiInvestasi } from "@/app_modules/investasi";
|
|
||||||
import { investasi_funGetOneInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
|
||||||
import { Investasi_UiTransaksiBerhasil } from "@/app_modules/investasi/_ui";
|
import { Investasi_UiTransaksiBerhasil } from "@/app_modules/investasi/_ui";
|
||||||
|
|
||||||
export default async function Page({params}: {params: {id: string}}) {
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
|||||||
@@ -4,18 +4,12 @@ import {
|
|||||||
ComponentGlobal_LoadImageLandscape,
|
ComponentGlobal_LoadImageLandscape,
|
||||||
} from "@/app_modules/_global/component";
|
} from "@/app_modules/_global/component";
|
||||||
import { MODEL_INVOICE_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
import { MODEL_INVOICE_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
||||||
import {
|
import { Box, Grid, SimpleGrid, Stack, Text, Title } from "@mantine/core";
|
||||||
Box,
|
|
||||||
Grid,
|
|
||||||
SimpleGrid,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { Investasi_ComponentBoxDaftarBerita } from "../comp_box_daftar_berita";
|
import { Investasi_ComponentBoxDaftarBerita } from "../comp_box_daftar_berita";
|
||||||
import { Investasi_ComponentBoxDaftarDokumen } from "../comp_box_daftar_dokumen";
|
import { Investasi_ComponentBoxDaftarDokumen } from "../comp_box_daftar_dokumen";
|
||||||
import { Investasi_ComponentBoxProspektus } from "../comp_box_prospektus";
|
import { Investasi_ComponentBoxProspektus } from "../comp_box_prospektus";
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
import { Investasi_ComponentBoxInvestor } from "../comp_box_investor";
|
||||||
|
|
||||||
export function Investasi_ComponentBoxDetailData({
|
export function Investasi_ComponentBoxDetailData({
|
||||||
data,
|
data,
|
||||||
@@ -116,6 +110,8 @@ export function Investasi_ComponentBoxDetailData({
|
|||||||
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
<Investasi_ComponentBoxInvestor id={data.Investasi.id} />
|
||||||
|
|
||||||
<Investasi_ComponentBoxProspektus
|
<Investasi_ComponentBoxProspektus
|
||||||
prospektusFileId={data.Investasi.prospektusFileId}
|
prospektusFileId={data.Investasi.prospektusFileId}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ import {
|
|||||||
Investasi_ViewDetailReject,
|
Investasi_ViewDetailReject,
|
||||||
Investasi_ViewDetailReview,
|
Investasi_ViewDetailReview,
|
||||||
} from "../../_view";
|
} from "../../_view";
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
|
import UI_NewLayoutTamplate, {
|
||||||
|
UI_NewHeader,
|
||||||
|
UI_NewChildren,
|
||||||
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
|
|
||||||
export function Investasi_UiDetailPortofolio() {
|
export function Investasi_UiDetailPortofolio() {
|
||||||
const params = useParams<{ id: string }>();
|
const params = useParams<{ id: string }>();
|
||||||
@@ -88,10 +93,11 @@ export function Investasi_UiDetailPortofolio() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DRAFT
|
||||||
if (data.masterStatusInvestasiId == "3")
|
if (data.masterStatusInvestasiId == "3")
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
{/* <UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title={`Detail Draft`}
|
title={`Detail Draft`}
|
||||||
@@ -107,7 +113,26 @@ export function Investasi_UiDetailPortofolio() {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Investasi_ViewDetailDraft dataInvestasi={data} />
|
<Investasi_ViewDetailDraft dataInvestasi={data} />
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate> */}
|
||||||
|
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header
|
||||||
|
title={`Detail Draft`}
|
||||||
|
customButtonRight={
|
||||||
|
<ActionIcon
|
||||||
|
variant="transparent"
|
||||||
|
onClick={() => setOpenDrawer(true)}
|
||||||
|
>
|
||||||
|
<IconDotsVertical color={MainColor.white} />
|
||||||
|
</ActionIcon>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
<Investasi_ViewDetailDraft dataInvestasi={data} />
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
|
|
||||||
<UIGlobal_DrawerCustom
|
<UIGlobal_DrawerCustom
|
||||||
opened={openDrawer}
|
opened={openDrawer}
|
||||||
@@ -122,7 +147,7 @@ export function Investasi_UiDetailPortofolio() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setPageId(e?.id);
|
setPageId(e?.id);
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
router.push(e?.path, { scroll: false });
|
router.push(e?.path, { scroll: false });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -144,20 +169,34 @@ export function Investasi_UiDetailPortofolio() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<UIGlobal_LayoutTamplate
|
// <UIGlobal_LayoutTamplate
|
||||||
header={
|
// header={
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
// <UIGlobal_LayoutHeaderTamplate
|
||||||
title={`Detail ${data.MasterStatusInvestasi.name}`}
|
// title={`Detail ${data.MasterStatusInvestasi.name}`}
|
||||||
/>
|
// />
|
||||||
}
|
// }
|
||||||
>
|
// >
|
||||||
{data.masterStatusInvestasiId === "2" && (
|
// {data.masterStatusInvestasiId === "2" && (
|
||||||
<Investasi_ViewDetailReview dataInvestasi={data} />
|
// <Investasi_ViewDetailReview dataInvestasi={data} />
|
||||||
)}
|
// )}
|
||||||
|
|
||||||
{data.masterStatusInvestasiId === "4" && (
|
// {data.masterStatusInvestasiId === "4" && (
|
||||||
<Investasi_ViewDetailReject dataInvestasi={data} />
|
// <Investasi_ViewDetailReject dataInvestasi={data} />
|
||||||
)}
|
// )}
|
||||||
</UIGlobal_LayoutTamplate>
|
// </UIGlobal_LayoutTamplate>
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header title={`Detail ${data.MasterStatusInvestasi.name}`} />
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
{data.masterStatusInvestasiId === "2" && (
|
||||||
|
<Investasi_ViewDetailReview dataInvestasi={data} />
|
||||||
|
)}
|
||||||
|
|
||||||
|
{data.masterStatusInvestasiId === "4" && (
|
||||||
|
<Investasi_ViewDetailReject dataInvestasi={data} />
|
||||||
|
)}
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,26 @@
|
|||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
import { Investasi_ViewDetailSahamSaya } from "../../_view";
|
import { Investasi_ViewDetailSahamSaya } from "../../_view";
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
|
import UI_NewLayoutTamplate, { UI_NewHeader, UI_NewChildren } from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
|
|
||||||
export function Investasi_UiDetailSahamSaya() {
|
export function Investasi_UiDetailSahamSaya() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
{/* <UIGlobal_LayoutTamplate
|
||||||
header={<UIGlobal_LayoutHeaderTamplate title="Detail Saham" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail Saham" />}
|
||||||
>
|
>
|
||||||
<Investasi_ViewDetailSahamSaya />
|
<Investasi_ViewDetailSahamSaya />
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate> */}
|
||||||
|
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header title="Detail Saham" />
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
<Investasi_ViewDetailSahamSaya />
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,33 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { UIGlobal_LayoutHeaderTamplate, UIGlobal_LayoutTamplate, } from "@/app_modules/_global/ui";
|
import {
|
||||||
|
UIGlobal_LayoutHeaderTamplate,
|
||||||
|
UIGlobal_LayoutTamplate,
|
||||||
|
} from "@/app_modules/_global/ui";
|
||||||
import { Investasi_ViewEditInvestasiNew } from "../../_view/edit/view_edit_investasi_new";
|
import { Investasi_ViewEditInvestasiNew } from "../../_view/edit/view_edit_investasi_new";
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
|
import UI_NewLayoutTamplate, {
|
||||||
|
UI_NewHeader,
|
||||||
|
UI_NewChildren,
|
||||||
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
|
|
||||||
export function Investasi_UiEditInvestasiNew() {
|
export function Investasi_UiEditInvestasiNew() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
{/* <UIGlobal_LayoutTamplate
|
||||||
header={<UIGlobal_LayoutHeaderTamplate title="Edit Investasi" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Investasi" />}
|
||||||
>
|
>
|
||||||
<Investasi_ViewEditInvestasiNew />
|
<Investasi_ViewEditInvestasiNew />
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate> */}
|
||||||
</>
|
|
||||||
);
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header title="Edit Investasi" />
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
<Investasi_ViewEditInvestasiNew />
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,28 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
UIGlobal_LayoutHeaderTamplate,
|
import UI_NewLayoutTamplate, {
|
||||||
UIGlobal_LayoutTamplate,
|
UI_NewChildren,
|
||||||
} from "@/app_modules/_global/ui";
|
UI_NewHeader,
|
||||||
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
import { Investasi_ViewEditProspektus } from "../../_view";
|
import { Investasi_ViewEditProspektus } from "../../_view";
|
||||||
|
|
||||||
export function Investasi_UiEditProspektus() {
|
export function Investasi_UiEditProspektus() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
{/* <UIGlobal_LayoutTamplate
|
||||||
header={<UIGlobal_LayoutHeaderTamplate title="Edit Prospektus" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Prospektus" />}
|
||||||
>
|
>
|
||||||
<Investasi_ViewEditProspektus />
|
<Investasi_ViewEditProspektus />
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate> */}
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header title="Edit Prospektus" />
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
<Investasi_ViewEditProspektus />
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
import {
|
import {
|
||||||
apiGetPdfToImage,
|
apiGetPdfToImage,
|
||||||
PageData,
|
PageData,
|
||||||
@@ -9,6 +10,7 @@ import {
|
|||||||
import { UIGlobal_DrawerCustom } from "@/app_modules/_global/ui";
|
import { UIGlobal_DrawerCustom } from "@/app_modules/_global/ui";
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
|
import UI_NewLayoutTamplate, { UI_NewHeader, UI_NewChildren } from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||||
import { ActionIcon, Box, Stack, Text } from "@mantine/core";
|
import { ActionIcon, Box, Stack, Text } from "@mantine/core";
|
||||||
import { IconDotsVertical, IconDownload, IconX } from "@tabler/icons-react";
|
import { IconDotsVertical, IconDownload, IconX } from "@tabler/icons-react";
|
||||||
@@ -67,7 +69,7 @@ export function Investasi_UiFileViewDokumen() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
{/* <UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="Pratinjau Dokumen"
|
title="Pratinjau Dokumen"
|
||||||
@@ -116,7 +118,59 @@ export function Investasi_UiFileViewDokumen() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate> */}
|
||||||
|
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header
|
||||||
|
title="Pratinjau Dokumen"
|
||||||
|
iconLeft={<IconX />}
|
||||||
|
customButtonRight={
|
||||||
|
<ActionIcon
|
||||||
|
variant="transparent"
|
||||||
|
onClick={() => {
|
||||||
|
setOpen(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconDotsVertical color="white" />
|
||||||
|
</ActionIcon>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
<Box mb="lg">
|
||||||
|
{loading ? (
|
||||||
|
<CustomSkeleton height={"80vh"} width={"100%"} />
|
||||||
|
) : error ? (
|
||||||
|
<Stack>
|
||||||
|
<ComponentGlobal_IsEmptyData text="Maaf, PDF mengalami error" />
|
||||||
|
<ComponentGlobal_IsEmptyData text={error} />
|
||||||
|
</Stack>
|
||||||
|
) : (
|
||||||
|
<div
|
||||||
|
ref={pdfsRef}
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{pdfPages?.map((page, index) => (
|
||||||
|
<Image
|
||||||
|
key={`page-${index}`}
|
||||||
|
src={page.imageUrl}
|
||||||
|
alt={`Page ${page.pageNumber}`}
|
||||||
|
className="pdf-page"
|
||||||
|
width={500} // Adjust width as needed
|
||||||
|
height={707} // Adjust height as needed
|
||||||
|
style={{ width: "100%", marginBottom: "10px" }}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
|
|
||||||
<UIGlobal_DrawerCustom
|
<UIGlobal_DrawerCustom
|
||||||
close={() => setOpen(false)}
|
close={() => setOpen(false)}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
import {
|
import {
|
||||||
apiGetPdfToImage,
|
apiGetPdfToImage,
|
||||||
PageData,
|
PageData,
|
||||||
@@ -9,6 +10,10 @@ import {
|
|||||||
import { UIGlobal_DrawerCustom } from "@/app_modules/_global/ui";
|
import { UIGlobal_DrawerCustom } from "@/app_modules/_global/ui";
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
|
import UI_NewLayoutTamplate, {
|
||||||
|
UI_NewHeader,
|
||||||
|
UI_NewChildren,
|
||||||
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||||
import { ActionIcon, Box, Stack, Text } from "@mantine/core";
|
import { ActionIcon, Box, Stack, Text } from "@mantine/core";
|
||||||
import { IconDotsVertical, IconDownload, IconX } from "@tabler/icons-react";
|
import { IconDotsVertical, IconDownload, IconX } from "@tabler/icons-react";
|
||||||
@@ -70,7 +75,7 @@ export function Investasi_UiFileViewProspektus() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
{/* <UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="Pratinjau Prospektus"
|
title="Pratinjau Prospektus"
|
||||||
@@ -100,7 +105,6 @@ export function Investasi_UiFileViewProspektus() {
|
|||||||
) : error && error !== "" ? (
|
) : error && error !== "" ? (
|
||||||
<Stack>
|
<Stack>
|
||||||
<ComponentGlobal_IsEmptyData text="Maaf, PDF mengalami error" />
|
<ComponentGlobal_IsEmptyData text="Maaf, PDF mengalami error" />
|
||||||
{/* <ComponentGlobal_IsEmptyData text={error} /> */}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
@@ -125,7 +129,65 @@ export function Investasi_UiFileViewProspektus() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate> */}
|
||||||
|
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header
|
||||||
|
title="Pratinjau Prospektus"
|
||||||
|
iconLeft={<IconX />}
|
||||||
|
customButtonRight={
|
||||||
|
loading ? (
|
||||||
|
<CustomSkeleton circle height={30} width={30} />
|
||||||
|
) : error && error !== "" ? (
|
||||||
|
<ActionIcon disabled />
|
||||||
|
) : (
|
||||||
|
<ActionIcon
|
||||||
|
variant="transparent"
|
||||||
|
onClick={() => {
|
||||||
|
setOpen(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconDotsVertical color="white" />
|
||||||
|
</ActionIcon>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</UI_NewHeader>
|
||||||
|
<UI_NewChildren>
|
||||||
|
<Box mb="lg">
|
||||||
|
{loading ? (
|
||||||
|
<CustomSkeleton height={"80vh"} width={"100%"} />
|
||||||
|
) : error && error !== "" ? (
|
||||||
|
<Stack>
|
||||||
|
<ComponentGlobal_IsEmptyData text="Maaf, PDF mengalami error" />
|
||||||
|
{/* <ComponentGlobal_IsEmptyData text={error} /> */}
|
||||||
|
</Stack>
|
||||||
|
) : (
|
||||||
|
<div
|
||||||
|
ref={pdfsRef}
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{pdfPages?.map((page, index) => (
|
||||||
|
<Image
|
||||||
|
key={`page-${index}`}
|
||||||
|
src={page.imageUrl}
|
||||||
|
alt={`Page ${page.pageNumber}`}
|
||||||
|
className="pdf-page"
|
||||||
|
width={500} // Adjust width as needed
|
||||||
|
height={707} // Adjust height as needed
|
||||||
|
style={{ width: "100%", marginBottom: "10px" }}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
|
|
||||||
<UIGlobal_DrawerCustom
|
<UIGlobal_DrawerCustom
|
||||||
close={() => setOpen(false)}
|
close={() => setOpen(false)}
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
|
import UI_NewLayoutTamplate, {
|
||||||
|
UI_NewChildren,
|
||||||
|
UI_NewHeader,
|
||||||
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
import { RouterInvestasi_OLD } from "@/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi_OLD } from "@/lib/router_hipmi/router_investasi";
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
import { ActionIcon, Loader } from "@mantine/core";
|
import { ActionIcon, Loader } from "@mantine/core";
|
||||||
import { IconX } from "@tabler/icons-react";
|
import { IconX } from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { useParams, useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Investasi_ViewTransaksiBerhasil } from "../../_view";
|
import { Investasi_ViewTransaksiBerhasil } from "../../_view";
|
||||||
import { gs_investas_menu } from "../../g_state";
|
import { gs_investas_menu } from "../../g_state";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { apiGetOneSahamInvestasiById } from "../../_lib/api_fetch_new_investasi";
|
|
||||||
import { MODEL_INVOICE_INVESTASI } from "../../_lib/interface";
|
|
||||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
|
||||||
|
|
||||||
export function Investasi_UiTransaksiBerhasil() {
|
export function Investasi_UiTransaksiBerhasil() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -21,9 +20,32 @@ export function Investasi_UiTransaksiBerhasil() {
|
|||||||
const [isLoading, setLoading] = useState(false);
|
const [isLoading, setLoading] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<UIGlobal_LayoutTamplate
|
// <UIGlobal_LayoutTamplate
|
||||||
header={
|
// header={
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
// <UIGlobal_LayoutHeaderTamplate
|
||||||
|
// title="Transaksi Berhasil"
|
||||||
|
// customButtonLeft={
|
||||||
|
// <ActionIcon
|
||||||
|
// variant="transparent"
|
||||||
|
// onClick={() => {
|
||||||
|
// setHotMenu(3);
|
||||||
|
// setLoading(true);
|
||||||
|
// router.push(RouterInvestasi_OLD.main_transaksi);
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// {isLoading ? <Loader color="yellow" /> : <IconX />}
|
||||||
|
// </ActionIcon>
|
||||||
|
// }
|
||||||
|
// />
|
||||||
|
// }
|
||||||
|
// >
|
||||||
|
|
||||||
|
// <Investasi_ViewTransaksiBerhasil />
|
||||||
|
// </UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header
|
||||||
title="Transaksi Berhasil"
|
title="Transaksi Berhasil"
|
||||||
customButtonLeft={
|
customButtonLeft={
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
@@ -38,11 +60,10 @@ export function Investasi_UiTransaksiBerhasil() {
|
|||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
}
|
</UI_NewHeader>
|
||||||
>
|
<UI_NewChildren>
|
||||||
|
<Investasi_ViewTransaksiBerhasil />
|
||||||
|
</UI_NewChildren>
|
||||||
<Investasi_ViewTransaksiBerhasil />
|
</UI_NewLayoutTamplate>
|
||||||
</UIGlobal_LayoutTamplate>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
|
import UI_NewLayoutTamplate, {
|
||||||
|
UI_NewChildren,
|
||||||
|
UI_NewHeader,
|
||||||
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
import { RouterInvestasi_OLD } from "@/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi_OLD } from "@/lib/router_hipmi/router_investasi";
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
import { ActionIcon, Loader } from "@mantine/core";
|
import { ActionIcon, Loader } from "@mantine/core";
|
||||||
import { IconX } from "@tabler/icons-react";
|
import { IconX } from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
@@ -17,9 +20,31 @@ export function Investasi_UiTransaksiGagal() {
|
|||||||
const [isLoading, setLoading] = useState(false);
|
const [isLoading, setLoading] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<UIGlobal_LayoutTamplate
|
// <UIGlobal_LayoutTamplate
|
||||||
header={
|
// header={
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
// <UIGlobal_LayoutHeaderTamplate
|
||||||
|
// title="Transaksi Gagal"
|
||||||
|
// customButtonLeft={
|
||||||
|
// <ActionIcon
|
||||||
|
// variant="transparent"
|
||||||
|
// onClick={() => {
|
||||||
|
// setHotMenu(3);
|
||||||
|
// setLoading(true);
|
||||||
|
// router.push(RouterInvestasi_OLD.main_transaksi);
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// {isLoading ? <Loader color="yellow" /> : <IconX />}
|
||||||
|
// </ActionIcon>
|
||||||
|
// }
|
||||||
|
// />
|
||||||
|
// }
|
||||||
|
// >
|
||||||
|
// <Investasi_ViewTransaksiGagal />
|
||||||
|
// </UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
|
<UI_NewLayoutTamplate>
|
||||||
|
<UI_NewHeader>
|
||||||
|
<Component_Header
|
||||||
title="Transaksi Gagal"
|
title="Transaksi Gagal"
|
||||||
customButtonLeft={
|
customButtonLeft={
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
@@ -34,9 +59,10 @@ export function Investasi_UiTransaksiGagal() {
|
|||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
}
|
</UI_NewHeader>
|
||||||
>
|
<UI_NewChildren>
|
||||||
<Investasi_ViewTransaksiGagal />
|
<Investasi_ViewTransaksiGagal />
|
||||||
</UIGlobal_LayoutTamplate>
|
</UI_NewChildren>
|
||||||
|
</UI_NewLayoutTamplate>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,20 +4,9 @@ import {
|
|||||||
ComponentGlobal_ButtonUploadFileImage,
|
ComponentGlobal_ButtonUploadFileImage,
|
||||||
ComponentGlobal_CardStyles,
|
ComponentGlobal_CardStyles,
|
||||||
} from "@/app_modules/_global/component";
|
} from "@/app_modules/_global/component";
|
||||||
import {
|
import { Box, Button, Center, Grid, Stack, Text } from "@mantine/core";
|
||||||
Box,
|
import { IconCircleCheck, IconFileTypePdf } from "@tabler/icons-react";
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Grid,
|
|
||||||
Stack,
|
|
||||||
Text
|
|
||||||
} from "@mantine/core";
|
|
||||||
import {
|
|
||||||
IconCircleCheck,
|
|
||||||
IconFileTypePdf
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
|
|
||||||
import { DIRECTORY_ID } from "@/lib";
|
|
||||||
import {
|
import {
|
||||||
funGlobal_DeleteFileById,
|
funGlobal_DeleteFileById,
|
||||||
funGlobal_UploadToStorage,
|
funGlobal_UploadToStorage,
|
||||||
@@ -26,6 +15,7 @@ import {
|
|||||||
ComponentGlobal_NotifikasiBerhasil,
|
ComponentGlobal_NotifikasiBerhasil,
|
||||||
ComponentGlobal_NotifikasiPeringatan,
|
ComponentGlobal_NotifikasiPeringatan,
|
||||||
} from "@/app_modules/_global/notif_global";
|
} from "@/app_modules/_global/notif_global";
|
||||||
|
import { DIRECTORY_ID } from "@/lib";
|
||||||
import { clientLogger } from "@/util/clientLogger";
|
import { clientLogger } from "@/util/clientLogger";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { useParams, useRouter } from "next/navigation";
|
import { useParams, useRouter } from "next/navigation";
|
||||||
@@ -160,7 +150,7 @@ export function Investasi_ViewEditProspektus() {
|
|||||||
transition: "all 0.3s ease",
|
transition: "all 0.3s ease",
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
width: "90%",
|
width: 300,
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpload();
|
onUpload();
|
||||||
|
|||||||
Reference in New Issue
Block a user