Fix: Navbar admin
Deskripsi: - Fix bug navbar yang terpotong bagian atasnya
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
import { Admin_LayoutHalamanAksi } from "@/app_modules/admin/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({ children }: { children: React.ReactNode }) {
|
|
||||||
return <>
|
|
||||||
<Admin_LayoutHalamanAksi>{children}</Admin_LayoutHalamanAksi>
|
|
||||||
</>;
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { Admin_HalamanAksi } from "@/app_modules/admin/investasi";
|
|
||||||
|
|
||||||
export default async function Page({params}:{params: {id: string}}) {
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Admin_HalamanAksi idInves={params.id} />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import { Admin_LayoutStatusTransferInvesatasi } from "@/app_modules/admin/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Admin_LayoutStatusTransferInvesatasi>
|
|
||||||
{children}
|
|
||||||
</Admin_LayoutStatusTransferInvesatasi>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { Admin_StatusTransferInvesatasi } from "@/app_modules/admin/investasi";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return<>
|
|
||||||
<Admin_StatusTransferInvesatasi/>
|
|
||||||
</>
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@ import adminNotifikasi_getByUserId from "@/app_modules/admin/notifikasi/fun/get/
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import versionUpdate from "../../../../package.json";
|
import versionUpdate from "../../../../package.json";
|
||||||
|
|
||||||
export default async function Layout({
|
export default async function Layout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
import LayoutCountDownTransaksiInvestasi from "@/app_modules/investasi/dialog_page/transaksi_saham/layout";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
|
||||||
return<>
|
|
||||||
<LayoutCountDownTransaksiInvestasi>{children}</LayoutCountDownTransaksiInvestasi>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { KonfirmasiBuktiInvestasi } from "@/app_modules/investasi";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return <>
|
|
||||||
<KonfirmasiBuktiInvestasi/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import { LayoutMetodeTransferInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LayoutMetodeTransferInvestasi>{children}</LayoutMetodeTransferInvestasi>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { MetodeTransferInvestasi } from "@/app_modules/investasi";
|
|
||||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
|
||||||
import getMaster_NamaBank from "@/app_modules/investasi/fun/master/get_nama_bank";
|
|
||||||
|
|
||||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
|
||||||
const userLoginId = await funGetUserIdByToken();
|
|
||||||
|
|
||||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
|
||||||
const namaBank = await getMaster_NamaBank();
|
|
||||||
// console.log(namaBank)
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<MetodeTransferInvestasi
|
|
||||||
dataInvestasi={dataInvestasi as any}
|
|
||||||
namaBank={namaBank as any}
|
|
||||||
authorId={userLoginId}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { LayoutProsesInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
|
||||||
return<>
|
|
||||||
<LayoutProsesInvestasi>{children}</LayoutProsesInvestasi>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { ProsesInvestasi } 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<>
|
|
||||||
<ProsesInvestasi dataInvestasi={dataInvestasi as any}/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import { LayoutTransferInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LayoutTransferInvestasi>{children}</LayoutTransferInvestasi>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { TransferInvestasi } from "@/app_modules/investasi";
|
|
||||||
import funCountDown from "@/app_modules/investasi/fun/fun_countdown_investasi";
|
|
||||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
|
||||||
import getTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_transaksi_investasi";
|
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
|
||||||
const dataTransaksi = await getTransaksiByIdInvestasi(params.id);
|
|
||||||
// const cd = await funCountDown(params.id)
|
|
||||||
// console.log(dataTransaksi)
|
|
||||||
// const cd = await funCountDown("" + dataTransaksi?.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<TransferInvestasi dataTransaksi={dataTransaksi as any} />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { LayoutUploadGambarInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
|
||||||
return<>
|
|
||||||
<LayoutUploadGambarInvestasi>{children}</LayoutUploadGambarInvestasi>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { UploadGambarInvestasi } from "@/app_modules/investasi";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return<>
|
|
||||||
<UploadGambarInvestasi/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { LayoutBuktiTransferInvestasi } from "@/app_modules/investasi";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
|
||||||
return<>
|
|
||||||
<LayoutBuktiTransferInvestasi>{children}</LayoutBuktiTransferInvestasi>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import { UploadBuktiTransferInvestasi } from "@/app_modules/investasi";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return <UploadBuktiTransferInvestasi />;
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
|
"use client";
|
||||||
import { CheckCookies_UiLayout } from "@/app_modules/check_cookies";
|
import { CheckCookies_UiLayout } from "@/app_modules/check_cookies";
|
||||||
|
|
||||||
export default async function Layout({
|
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CheckCookies_UiLayout>{children}</CheckCookies_UiLayout>
|
<CheckCookies_UiLayout>{children}</CheckCookies_UiLayout>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import MqttLoader from "@/util/mqtt_loader";
|
import MqttLoader from "@/util/mqtt_loader";
|
||||||
import RootStyleRegistry from "./emotion";
|
import RootStyleRegistry from "./emotion";
|
||||||
import "./globals.css";
|
// import "./globals.css";
|
||||||
import { TokenProvider } from "./lib/token";
|
import { TokenProvider } from "./lib/token";
|
||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
import { ServerEnv } from "./lib/server_env";
|
import { ServerEnv } from "./lib/server_env";
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
|
|
||||||
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function ComponentGlobal_HeaderTamplate({
|
|
||||||
route,
|
|
||||||
route2,
|
|
||||||
title,
|
|
||||||
icon,
|
|
||||||
}: {
|
|
||||||
route?: any;
|
|
||||||
route2?: any;
|
|
||||||
title: string;
|
|
||||||
icon?: any;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
|
||||||
const [isRightLoading, setRightLoading] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header height={50} sx={{ borderStyle: "none" }}>
|
|
||||||
<Group h={50} position="apart" px={"md"}>
|
|
||||||
<ActionIcon
|
|
||||||
loading={isLoading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setIsLoading(true);
|
|
||||||
if (route === null || route === undefined) {
|
|
||||||
return router.back();
|
|
||||||
} else {
|
|
||||||
return router.push(route);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconChevronLeft />
|
|
||||||
</ActionIcon>
|
|
||||||
<Title order={5}>{title}</Title>
|
|
||||||
{(() => {
|
|
||||||
if (route2 === null || route2 === undefined) {
|
|
||||||
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<ActionIcon
|
|
||||||
loading={isRightLoading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setRightLoading(true);
|
|
||||||
router.push(route2);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{icon}
|
|
||||||
</ActionIcon>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})()}
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -47,11 +47,15 @@ export default function UIGlobal_LayoutHeaderTamplate({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header
|
<Box
|
||||||
height={"8vh"}
|
h={"8vh"}
|
||||||
|
// w={"100%"}
|
||||||
|
// pos={"sticky"}
|
||||||
|
// top={0}
|
||||||
|
// style={{
|
||||||
|
// zIndex: 10,
|
||||||
|
// }}
|
||||||
sx={{
|
sx={{
|
||||||
// borderRadius: "0px 0px 20px 20px",
|
|
||||||
// borderBottom: `1px solid ${AccentColor.blue}`,
|
|
||||||
borderStyle: "none",
|
borderStyle: "none",
|
||||||
}}
|
}}
|
||||||
bg={backgroundColor ? backgroundColor : MainColor.darkblue}
|
bg={backgroundColor ? backgroundColor : MainColor.darkblue}
|
||||||
@@ -110,7 +114,7 @@ export default function UIGlobal_LayoutHeaderTamplate({
|
|||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
)}
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
</Header>
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
Box,
|
Box,
|
||||||
Container,
|
Container,
|
||||||
rem,
|
rem,
|
||||||
ScrollArea
|
ScrollArea,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { AccentColor, MainColor } from "../color/color_pallet";
|
import { AccentColor, MainColor } from "../color/color_pallet";
|
||||||
@@ -16,7 +16,7 @@ export default function UIGlobal_LayoutTamplate({
|
|||||||
footer,
|
footer,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
header?: React.ReactNode;
|
header: React.ReactNode;
|
||||||
footer?: React.ReactNode;
|
footer?: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
@@ -52,21 +52,18 @@ export default function UIGlobal_LayoutTamplate({
|
|||||||
export function UIHeader({ header }: { header: React.ReactNode }) {
|
export function UIHeader({ header }: { header: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{header ? (
|
<Box
|
||||||
<Box
|
h={"8vh"}
|
||||||
h={"8vh"}
|
style={{
|
||||||
style={{
|
zIndex: 10,
|
||||||
zIndex: 10,
|
alignContent: "center",
|
||||||
}}
|
}}
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
pos={"sticky"}
|
pos={"sticky"}
|
||||||
top={0}
|
top={0}
|
||||||
>
|
>
|
||||||
{header}
|
{header}
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Loader, Stack, ThemeIcon } from "@mantine/core";
|
import { Loader, Stack, ThemeIcon } from "@mantine/core";
|
||||||
import UIGlobal_LayoutTamplate from "./ui_layout_tamplate";
|
import UIGlobal_LayoutDefault from "./ui_layout_default";
|
||||||
|
|
||||||
export default function UIGlobal_SplashScreen({ icon }: { icon: any }) {
|
export default function UIGlobal_SplashScreen({ icon }: { icon: any }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate>
|
<UIGlobal_LayoutDefault>
|
||||||
<Stack h={"90vh"} align="center" justify="center" spacing={"xl"}>
|
<Stack h={"90vh"} align="center" justify="center" spacing={"xl"}>
|
||||||
<ThemeIcon variant="transparent" size={300} c="white">
|
<ThemeIcon variant="transparent" size={300} c="white">
|
||||||
{icon}
|
{icon}
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
<Loader variant="dots" color="white" />
|
<Loader variant="dots" color="white" />
|
||||||
</Stack>
|
</Stack>
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutDefault>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function Admin_LayoutBuktiTransferInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppShell header={<ComponentGlobal_HeaderTamplate title="Bukti Transfer" />}>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterAdminInvestasi_OLD } from "@/app/lib/router_hipmi/router_admin";
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import {
|
|
||||||
Avatar,
|
|
||||||
Badge,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Paper,
|
|
||||||
Text,
|
|
||||||
ThemeIcon,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconChevronRight } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
export default function Admin_BuktiTransferInvestasi() {
|
|
||||||
const router = useRouter();
|
|
||||||
const listUsername = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 5,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 6,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* Box Username */}
|
|
||||||
{listUsername.map((e) => (
|
|
||||||
<Paper
|
|
||||||
key={e.id}
|
|
||||||
bg={"gray"}
|
|
||||||
p={"md"}
|
|
||||||
mb={"xs"}
|
|
||||||
onClick={() => router.push(RouterAdminInvestasi_OLD.status_transfer)}
|
|
||||||
>
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={6}>
|
|
||||||
<Text>Username</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={4}>
|
|
||||||
<Badge variant="dot">Status Transfer</Badge>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Paper>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -217,25 +217,7 @@ export default function AdminInvestasi_DetailReview({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <Modal
|
|
||||||
opened={openModal}
|
|
||||||
onClose={() => setOpenModal(false)}
|
|
||||||
title="Alasan Penolakan"
|
|
||||||
size={"sm"}
|
|
||||||
centered
|
|
||||||
withCloseButton={false}
|
|
||||||
>
|
|
||||||
<Stack>
|
|
||||||
<Textarea
|
|
||||||
autosize
|
|
||||||
minRows={3}
|
|
||||||
maxRows={5}
|
|
||||||
placeholder="Masukan alasan penolakan"
|
|
||||||
onChange={(val) => setReport(val.target.value)}
|
|
||||||
/>
|
|
||||||
<Group position="right"></Group>
|
|
||||||
</Stack>
|
|
||||||
</Modal> */}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function Admin_LayoutHalamanAksi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* {children} */}
|
|
||||||
<AppShell padding={"md"} header={<ComponentGlobal_HeaderTamplate title="Pilih Aksi" />}>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterAdminInvestasi_OLD } from "@/app/lib/router_hipmi/router_admin";
|
|
||||||
import {
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Flex,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Paper,
|
|
||||||
SimpleGrid,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconChevronRight } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
export default function Admin_HalamanAksi({idInves}: {idInves: string}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const listHalamanAksi = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: "Konfirmasi",
|
|
||||||
desc: "Publis atau non - aktifkan proyek invetsasi",
|
|
||||||
route: RouterAdminInvestasi_OLD.konfirmasi,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: "Bukti Transfer",
|
|
||||||
desc: "Lihat bukti transfer investor",
|
|
||||||
route: RouterAdminInvestasi_OLD.bukti_transfer,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<SimpleGrid
|
|
||||||
cols={4}
|
|
||||||
spacing="sm"
|
|
||||||
breakpoints={[
|
|
||||||
// { maxWidth: "lg", cols: 6, spacing: "lg" },
|
|
||||||
{ maxWidth: "md", cols: 3, spacing: "md" },
|
|
||||||
{ maxWidth: "sm", cols: 2, spacing: "sm" },
|
|
||||||
{ maxWidth: "xs", cols: 1, spacing: "xs" },
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{listHalamanAksi.map((e) => (
|
|
||||||
<Paper key={e.id} bg={"gray"} p={"sm"}>
|
|
||||||
<Stack>
|
|
||||||
<Stack spacing={0}>
|
|
||||||
<Title order={6}>{e.name}</Title>
|
|
||||||
<Text fz={"sm"}>{e.desc}</Text>
|
|
||||||
</Stack>
|
|
||||||
<Center>
|
|
||||||
<Button
|
|
||||||
compact
|
|
||||||
radius={50}
|
|
||||||
w={100}
|
|
||||||
onClick={() => router.push(e.route + `${idInves}`)}
|
|
||||||
>
|
|
||||||
Lihat
|
|
||||||
</Button>
|
|
||||||
</Center>
|
|
||||||
</Stack>
|
|
||||||
</Paper>
|
|
||||||
))}
|
|
||||||
</SimpleGrid>
|
|
||||||
{/* <Grid mb={"md"} align="center">
|
|
||||||
{listHalamanAksi.map((e) => (
|
|
||||||
<Grid.Col key={e.id} onClick={() => router.push(e.route)}>
|
|
||||||
<Paper bg={"gray"} p={"xs"}>
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={10}>
|
|
||||||
<Stack spacing={0}>
|
|
||||||
<Title order={5}>{e.name}</Title>
|
|
||||||
<Text fw={"lighter"} fz={"xs"}>
|
|
||||||
{e.desc}
|
|
||||||
</Text>
|
|
||||||
</Stack>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconChevronRight />
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Paper>
|
|
||||||
</Grid.Col>
|
|
||||||
))}
|
|
||||||
</Grid> */}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,32 +1,18 @@
|
|||||||
import Admin_Investasi from "./main/view";
|
|
||||||
import Admin_HalamanAksi from "./halaman_aksi/view";
|
|
||||||
import Admin_LayoutHalamanAksi from "./halaman_aksi/layout";
|
|
||||||
import AdminInvestasi_DetailReview from "./detail/detail_review";
|
|
||||||
import Admin_LayoutKonfirmasiInvestasi from "./konfirmasi/layout";
|
|
||||||
import Admin_BuktiTransferInvestasi from "./bukti_transfer/view";
|
|
||||||
import Admin_LayoutBuktiTransferInvestasi from "./bukti_transfer/layout";
|
|
||||||
import Admin_StatusTransferInvesatasi from "./status_transfer/view";
|
|
||||||
import Admin_LayoutStatusTransferInvesatasi from "./status_transfer/layout";
|
|
||||||
import Admin_TableReviewInvestasi from "./main/table_review";
|
|
||||||
import Admin_TablePublishInvestasi from "./main/table_publish";
|
|
||||||
import Admin_TableRejectInvestasi from "./main/table_reject";
|
|
||||||
import { AdminInvestasi_DetailPublish } from "./detail/detail_publish";
|
import { AdminInvestasi_DetailPublish } from "./detail/detail_publish";
|
||||||
import { AdminInvestasi_DetailReject } from "./detail/detail_reject";
|
import { AdminInvestasi_DetailReject } from "./detail/detail_reject";
|
||||||
|
import AdminInvestasi_DetailReview from "./detail/detail_review";
|
||||||
|
import Admin_TablePublishInvestasi from "./main/table_publish";
|
||||||
|
import Admin_TableRejectInvestasi from "./main/table_reject";
|
||||||
|
import Admin_TableReviewInvestasi from "./main/table_review";
|
||||||
|
import Admin_Investasi from "./main/view";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Admin_Investasi,
|
Admin_Investasi,
|
||||||
Admin_HalamanAksi,
|
|
||||||
Admin_LayoutHalamanAksi,
|
|
||||||
AdminInvestasi_DetailReview as Admin_KonfirmasiInvestasi,
|
AdminInvestasi_DetailReview as Admin_KonfirmasiInvestasi,
|
||||||
Admin_LayoutKonfirmasiInvestasi,
|
|
||||||
Admin_BuktiTransferInvestasi,
|
|
||||||
Admin_LayoutBuktiTransferInvestasi,
|
|
||||||
Admin_StatusTransferInvesatasi,
|
|
||||||
Admin_LayoutStatusTransferInvesatasi,
|
|
||||||
Admin_TablePublishInvestasi,
|
Admin_TablePublishInvestasi,
|
||||||
Admin_TableReviewInvestasi,
|
|
||||||
Admin_TableRejectInvestasi,
|
Admin_TableRejectInvestasi,
|
||||||
|
Admin_TableReviewInvestasi,
|
||||||
AdminInvestasi_DetailPublish,
|
AdminInvestasi_DetailPublish,
|
||||||
AdminInvestasi_DetailReject,
|
AdminInvestasi_DetailReject
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function Admin_LayoutKonfirmasiInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppShell
|
|
||||||
header={<ComponentGlobal_HeaderTamplate title="Konfimasi Investasi" />}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function Admin_LayoutStatusTransferInvesatasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppShell header={<ComponentGlobal_HeaderTamplate title="Status Transfer" />}>
|
|
||||||
{children}
|
|
||||||
</AppShell>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import {
|
|
||||||
AspectRatio,
|
|
||||||
Avatar,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Group,
|
|
||||||
Image,
|
|
||||||
Select,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
export default function Admin_StatusTransferInvesatasi() {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Stack>
|
|
||||||
<Group>
|
|
||||||
<Avatar variant="outline" radius={50} />
|
|
||||||
<Text>Username</Text>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Select
|
|
||||||
label="Status investor"
|
|
||||||
data={[
|
|
||||||
{ value: "1", label: "Sudah Transfer" },
|
|
||||||
{ value: "2", label: "Menunggu Transfer" },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Center>
|
|
||||||
<AspectRatio ratio={1 / 1} bg={"blue"} h={400} w={250}>
|
|
||||||
<Image alt="" height={400} w={200} src={"/aset/no-img.png"} />
|
|
||||||
</AspectRatio>
|
|
||||||
</Center>
|
|
||||||
|
|
||||||
<Center mt={"lg"}>
|
|
||||||
<Button
|
|
||||||
w={300}
|
|
||||||
radius={50}
|
|
||||||
bg={Warna.biru}
|
|
||||||
color="blue"
|
|
||||||
onClick={() => {
|
|
||||||
router.back();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Simpan
|
|
||||||
</Button>
|
|
||||||
</Center>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,48 +1,19 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import mqtt_client from "@/util/mqtt_client";
|
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Box,
|
Box,
|
||||||
Burger,
|
useMantineTheme
|
||||||
Center,
|
|
||||||
Divider,
|
|
||||||
Drawer,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Indicator,
|
|
||||||
MediaQuery,
|
|
||||||
NavLink,
|
|
||||||
Navbar,
|
|
||||||
ScrollArea,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
useMantineTheme,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import {
|
|
||||||
IconBell,
|
|
||||||
IconCircleDot,
|
|
||||||
IconCircleDotFilled,
|
|
||||||
IconUserSquareRounded,
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import _ from "lodash";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { MODEL_USER } from "../home/model/interface";
|
import { MODEL_USER } from "../home/model/interface";
|
||||||
import { MODEL_NOTIFIKASI } from "../notifikasi/model/interface";
|
import { MODEL_NOTIFIKASI } from "../notifikasi/model/interface";
|
||||||
import Admin_Logout from "./_admin_global/logout";
|
|
||||||
import {
|
import {
|
||||||
gs_admin_hotMenu,
|
gs_admin_hotMenu,
|
||||||
gs_admin_subMenu,
|
gs_admin_subMenu,
|
||||||
gs_layout_admin_isNavbarOpen,
|
gs_layout_admin_isNavbarOpen,
|
||||||
} from "./global_state";
|
} from "./global_state";
|
||||||
import { listAdminPage } from "./list_page";
|
|
||||||
import adminNotifikasi_getByUserId from "./notifikasi/fun/get/get_notifikasi_by_user_id";
|
|
||||||
import { ComponentAdmin_UIDrawerNotifikasi } from "./notifikasi/ui_drawer_notifikasi";
|
|
||||||
import { AccentColor, MainColor } from "../_global/color";
|
|
||||||
|
|
||||||
export default function AdminLayout({
|
export default function AdminLayout({
|
||||||
children,
|
children,
|
||||||
@@ -71,142 +42,145 @@ export default function AdminLayout({
|
|||||||
const [countNotif, setCountNotif] = useState(countNotifikasi);
|
const [countNotif, setCountNotif] = useState(countNotifikasi);
|
||||||
const [isNavbarOpen, setIsNavbarOpen] = useAtom(gs_layout_admin_isNavbarOpen);
|
const [isNavbarOpen, setIsNavbarOpen] = useAtom(gs_layout_admin_isNavbarOpen);
|
||||||
|
|
||||||
const developerNavbar = listAdminPage.map((e, i) => (
|
// const developerNavbar = listAdminPage.map((e, i) => (
|
||||||
<Box key={e.id}>
|
// <Box key={e.id}>
|
||||||
<NavLink
|
// <NavLink
|
||||||
style={{ color: "white" }}
|
// style={{ color: "white" }}
|
||||||
sx={{
|
// sx={{
|
||||||
":hover": {
|
// ":hover": {
|
||||||
backgroundColor: "transparent",
|
// backgroundColor: "transparent",
|
||||||
},
|
// },
|
||||||
}}
|
// }}
|
||||||
fw={activeId === e.id ? "bold" : "normal"}
|
// fw={activeId === e.id ? "bold" : "normal"}
|
||||||
icon={
|
// icon={
|
||||||
// active === e.id ? loading ? <Loader size={10} /> : e.icon : e.icon
|
// // active === e.id ? loading ? <Loader size={10} /> : e.icon : e.icon
|
||||||
e.icon
|
// e.icon
|
||||||
}
|
// }
|
||||||
label={<Text size={"sm"}>{e.name}</Text>}
|
// label={<Text size={"sm"}>{e.name}</Text>}
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
setLoading(true);
|
// setLoading(true);
|
||||||
setActiveId(e.id);
|
// setActiveId(e.id);
|
||||||
setActiveChild(null);
|
// setActiveChild(null);
|
||||||
e.path === "" ? router.push(e.child[0].path) : router.push(e.path);
|
// e.path === "" ? router.push(e.child[0].path) : router.push(e.path);
|
||||||
e.path === "" ? setActiveChild(e.child[0].id) : "";
|
// e.path === "" ? setActiveChild(e.child[0].id) : "";
|
||||||
}}
|
// }}
|
||||||
>
|
// >
|
||||||
{_.isEmpty(e.child) ? (
|
// {_.isEmpty(e.child) ? (
|
||||||
""
|
// ""
|
||||||
) : (
|
// ) : (
|
||||||
<Box>
|
// <Box>
|
||||||
{e.child.map((v, ii) => (
|
// {e.child.map((v, ii) => (
|
||||||
<Box key={v.id}>
|
// <Box key={v.id}>
|
||||||
<NavLink
|
// <NavLink
|
||||||
style={{ color: "white" }}
|
// style={{ color: "white" }}
|
||||||
sx={{
|
// sx={{
|
||||||
":hover": {
|
// ":hover": {
|
||||||
backgroundColor: "transparent",
|
// backgroundColor: "transparent",
|
||||||
},
|
// },
|
||||||
}}
|
// }}
|
||||||
fw={activeChild === v.id ? "bold" : "normal"}
|
// fw={activeChild === v.id ? "bold" : "normal"}
|
||||||
label={<Text>{v.name}</Text>}
|
// label={<Text>{v.name}</Text>}
|
||||||
icon={
|
// icon={
|
||||||
activeChild === v.id ? (
|
// activeChild === v.id ? (
|
||||||
<IconCircleDotFilled size={10} />
|
// <IconCircleDotFilled size={10} />
|
||||||
) : (
|
// ) : (
|
||||||
<IconCircleDot size={10} />
|
// <IconCircleDot size={10} />
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
setActiveId(e.id);
|
// setActiveId(e.id);
|
||||||
setActiveChild(v.id);
|
// setActiveChild(v.id);
|
||||||
router.push(v.path);
|
// router.push(v.path);
|
||||||
}}
|
// }}
|
||||||
/>
|
// />
|
||||||
</Box>
|
// </Box>
|
||||||
))}
|
// ))}
|
||||||
</Box>
|
// </Box>
|
||||||
)}
|
// )}
|
||||||
</NavLink>
|
// </NavLink>
|
||||||
</Box>
|
// </Box>
|
||||||
));
|
// ));
|
||||||
|
|
||||||
const bukanDeveloper = listAdminPage.slice(0, -1);
|
// const bukanDeveloper = listAdminPage.slice(0, -1);
|
||||||
const adminNavbar = bukanDeveloper.map((e) => (
|
// const adminNavbar = bukanDeveloper.map((e) => (
|
||||||
<Box key={e.id}>
|
// <Box key={e.id}>
|
||||||
<NavLink
|
// <NavLink
|
||||||
style={{ color: "white" }}
|
// style={{ color: "white" }}
|
||||||
opened={e?.id === activeId && isNavbarOpen ? true : false}
|
// opened={e?.id === activeId && isNavbarOpen ? true : false}
|
||||||
sx={{
|
// sx={{
|
||||||
":hover": {
|
// ":hover": {
|
||||||
backgroundColor: "transparent",
|
// backgroundColor: "transparent",
|
||||||
},
|
// },
|
||||||
}}
|
// }}
|
||||||
fw={activeId === e.id ? "bold" : "normal"}
|
// fw={activeId === e.id ? "bold" : "normal"}
|
||||||
icon={e.icon}
|
// icon={e.icon}
|
||||||
label={<Text size={"sm"}>{e.name}</Text>}
|
// label={<Text size={"sm"}>{e.name}</Text>}
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
setLoading(true);
|
// setLoading(true);
|
||||||
setActiveId(e.id);
|
// setActiveId(e.id);
|
||||||
setActiveChild(null);
|
// setActiveChild(null);
|
||||||
e.path === "" ? router.push(e.child[0].path) : router.push(e.path);
|
// e.path === "" ? router.push(e.child[0].path) : router.push(e.path);
|
||||||
e.path === "" ? setActiveChild(e.child[0].id) : "";
|
// e.path === "" ? setActiveChild(e.child[0].id) : "";
|
||||||
|
|
||||||
setIsNavbarOpen(true);
|
// setIsNavbarOpen(true);
|
||||||
}}
|
// }}
|
||||||
>
|
// >
|
||||||
{_.isEmpty(e.child) ? (
|
// {_.isEmpty(e.child) ? (
|
||||||
""
|
// ""
|
||||||
) : (
|
// ) : (
|
||||||
<Box>
|
// <Box>
|
||||||
{e.child.map((v, ii) => (
|
// {e.child.map((v, ii) => (
|
||||||
<Box key={v.id}>
|
// <Box key={v.id}>
|
||||||
<NavLink
|
// <NavLink
|
||||||
sx={{
|
// sx={{
|
||||||
":hover": {
|
// ":hover": {
|
||||||
backgroundColor: "transparent",
|
// backgroundColor: "transparent",
|
||||||
},
|
// },
|
||||||
}}
|
// }}
|
||||||
fw={activeChild === v.id ? "bold" : "normal"}
|
// fw={activeChild === v.id ? "bold" : "normal"}
|
||||||
label={<Text>{v.name}</Text>}
|
// label={<Text>{v.name}</Text>}
|
||||||
icon={
|
// icon={
|
||||||
activeChild === v.id ? (
|
// activeChild === v.id ? (
|
||||||
<IconCircleDotFilled size={10} />
|
// <IconCircleDotFilled size={10} />
|
||||||
) : (
|
// ) : (
|
||||||
<IconCircleDot size={10} />
|
// <IconCircleDot size={10} />
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
setActiveId(e.id);
|
// setActiveId(e.id);
|
||||||
setActiveChild(v.id);
|
// setActiveChild(v.id);
|
||||||
router.push(v.path);
|
// router.push(v.path);
|
||||||
}}
|
// }}
|
||||||
/>
|
// />
|
||||||
</Box>
|
// </Box>
|
||||||
))}
|
// ))}
|
||||||
</Box>
|
// </Box>
|
||||||
)}
|
// )}
|
||||||
</NavLink>
|
// </NavLink>
|
||||||
</Box>
|
// </Box>
|
||||||
));
|
// ));
|
||||||
|
|
||||||
// async function onLoadNotifikasi() {
|
// async function onLoadNotifikasi() {
|
||||||
// const loadNotif = await adminNotifikasi_getByUserId();
|
// const loadNotif = await adminNotifikasi_getByUserId();
|
||||||
// setDataNotif(loadNotif as any);
|
// setDataNotif(loadNotif as any);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
mqtt_client.subscribe("ADMIN");
|
// mqtt_client.subscribe("ADMIN");
|
||||||
|
|
||||||
mqtt_client.on("message", (topic: any, message: any) => {
|
// mqtt_client.on("message", (topic: any, message: any) => {
|
||||||
const data = JSON.parse(message.toString());
|
// const data = JSON.parse(message.toString());
|
||||||
// console.log(data);
|
// // console.log(data);
|
||||||
setCountNotif(countNotif + data.count);
|
// setCountNotif(countNotif + data.count);
|
||||||
});
|
// });
|
||||||
}, [countNotif]);
|
// }, [countNotif]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell
|
<Box>{children}</Box>
|
||||||
|
|
||||||
|
|
||||||
|
{/*
|
||||||
padding="md"
|
padding="md"
|
||||||
navbarOffsetBreakpoint="md"
|
navbarOffsetBreakpoint="md"
|
||||||
asideOffsetBreakpoint="sm"
|
asideOffsetBreakpoint="sm"
|
||||||
@@ -216,7 +190,6 @@ export default function AdminLayout({
|
|||||||
bg={AccentColor.darkblue}
|
bg={AccentColor.darkblue}
|
||||||
style={{ color: "white", borderStyle: "none" }}
|
style={{ color: "white", borderStyle: "none" }}
|
||||||
>
|
>
|
||||||
{/* Web View */}
|
|
||||||
<MediaQuery smallerThan={"sm"} styles={{ display: "none" }}>
|
<MediaQuery smallerThan={"sm"} styles={{ display: "none" }}>
|
||||||
<Group position="apart" align="center" h={"100%"} px={"md"}>
|
<Group position="apart" align="center" h={"100%"} px={"md"}>
|
||||||
<Title order={3}>Dashboard Admin</Title>
|
<Title order={3}>Dashboard Admin</Title>
|
||||||
@@ -245,7 +218,6 @@ export default function AdminLayout({
|
|||||||
</Group>
|
</Group>
|
||||||
</MediaQuery>
|
</MediaQuery>
|
||||||
|
|
||||||
{/* Mobile View */}
|
|
||||||
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
|
||||||
<Group h={50} align="center" px={"md"} position="apart">
|
<Group h={50} align="center" px={"md"} position="apart">
|
||||||
<Burger
|
<Burger
|
||||||
@@ -256,7 +228,6 @@ export default function AdminLayout({
|
|||||||
mr="xl"
|
mr="xl"
|
||||||
/>
|
/>
|
||||||
<Title order={6}>Dashboard Admin</Title>
|
<Title order={6}>Dashboard Admin</Title>
|
||||||
{/* <Admin_Logout /> */}
|
|
||||||
<ActionIcon>
|
<ActionIcon>
|
||||||
<IconBell />
|
<IconBell />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
@@ -299,10 +270,10 @@ export default function AdminLayout({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
*/}
|
||||||
|
|
||||||
{/* Drawer Mobile View */}
|
{/* Drawer Mobile View */}
|
||||||
<Drawer opened={opened} onClose={() => setOpened(false)} size={"50%"}>
|
{/* <Drawer opened={opened} onClose={() => setOpened(false)} size={"50%"}>
|
||||||
<Stack spacing={"xl"}>
|
<Stack spacing={"xl"}>
|
||||||
{listAdminPage.map((e) => (
|
{listAdminPage.map((e) => (
|
||||||
<Text key={e.id} onClick={() => router.push(e.path)}>
|
<Text key={e.id} onClick={() => router.push(e.path)}>
|
||||||
@@ -310,10 +281,10 @@ export default function AdminLayout({
|
|||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Drawer>
|
</Drawer> */}
|
||||||
|
|
||||||
{/* Drawer Notifikasi */}
|
{/* Drawer Notifikasi */}
|
||||||
<Drawer
|
{/* <Drawer
|
||||||
title={
|
title={
|
||||||
<Group position="apart">
|
<Group position="apart">
|
||||||
<Text fw={"bold"} fz={"lg"}>
|
<Text fw={"bold"} fz={"lg"}>
|
||||||
@@ -326,7 +297,7 @@ export default function AdminLayout({
|
|||||||
position="right"
|
position="right"
|
||||||
size={"xs"}
|
size={"xs"}
|
||||||
>
|
>
|
||||||
{/* <ComponentAdmin_UIDrawerNotifikasi
|
<ComponentAdmin_UIDrawerNotifikasi
|
||||||
data={dataNotif}
|
data={dataNotif}
|
||||||
onLoadReadNotif={(val: any) => {
|
onLoadReadNotif={(val: any) => {
|
||||||
setDataNotif(val);
|
setDataNotif(val);
|
||||||
@@ -339,8 +310,8 @@ export default function AdminLayout({
|
|||||||
onLoadCountNotif={(val: any) => {
|
onLoadCountNotif={(val: any) => {
|
||||||
setCountNotif(val);
|
setCountNotif(val);
|
||||||
}}
|
}}
|
||||||
/> */}
|
/>
|
||||||
</Drawer>
|
</Drawer> */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ export function CheckCookies_UiLayout({
|
|||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
// useShallowEffect(() => {
|
useShallowEffect(() => {
|
||||||
// onCheckCookies();
|
onCheckCookies();
|
||||||
// }, []);
|
}, []);
|
||||||
|
|
||||||
async function onCheckCookies() {
|
async function onCheckCookies() {
|
||||||
const cek = await fetch("/api/check-cookies");
|
const cek = await fetch("/api/check-cookies");
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Button, Center } from "@mantine/core";
|
|
||||||
import { UIGlobal_LayoutTamplate } from "../_global/ui";
|
|
||||||
import { RouterAuth } from "@/app/lib/router_hipmi/router_auth";
|
import { RouterAuth } from "@/app/lib/router_hipmi/router_auth";
|
||||||
|
import { Button, Center } from "@mantine/core";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { UIGlobal_LayoutDefault } from "../_global/ui";
|
||||||
|
|
||||||
export function CheckCookies_UiView() {
|
export function CheckCookies_UiView() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate>
|
<UIGlobal_LayoutDefault>
|
||||||
<Center h={"80vh"}>
|
<Center h={"80vh"}>
|
||||||
<Button radius={"xl"} onClick={() => router.push(RouterAuth.login)}>
|
<Button radius={"xl"} onClick={() => router.push(RouterAuth.login)}>
|
||||||
Kembali ke Halaman Login
|
Kembali ke Halaman Login
|
||||||
</Button>
|
</Button>
|
||||||
</Center>
|
</Center>
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutDefault>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import {
|
|
||||||
Header,
|
|
||||||
Group,
|
|
||||||
ActionIcon,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
Center,
|
|
||||||
Loader,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function ComponentColab_HeaderTamplate({
|
|
||||||
hideBack,
|
|
||||||
changeIconBack,
|
|
||||||
route,
|
|
||||||
route2,
|
|
||||||
title,
|
|
||||||
icon,
|
|
||||||
bg,
|
|
||||||
}: {
|
|
||||||
hideBack?: boolean;
|
|
||||||
changeIconBack?: any;
|
|
||||||
route?: any;
|
|
||||||
route2?: any;
|
|
||||||
title: string;
|
|
||||||
icon?: any;
|
|
||||||
bg?: any;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
// if (loading) return <ComponentGlobal_V2_LoadingPage />;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header
|
|
||||||
height={50}
|
|
||||||
sx={{ borderStyle: "none" }}
|
|
||||||
bg={bg === null ? "" : bg}
|
|
||||||
>
|
|
||||||
<Group h={50} position="apart" px={"md"}>
|
|
||||||
{hideBack ? (
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon
|
|
||||||
radius={"xl"}
|
|
||||||
loading={loading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setLoading(true);
|
|
||||||
if (route === null || route === undefined) {
|
|
||||||
return router.back();
|
|
||||||
} else {
|
|
||||||
return router.push(route);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{changeIconBack ? changeIconBack : <IconChevronLeft />}
|
|
||||||
</ActionIcon>
|
|
||||||
)}
|
|
||||||
<Title order={5}>{title}</Title>
|
|
||||||
{(() => {
|
|
||||||
if (route2 === null || route2 === undefined) {
|
|
||||||
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<ActionIcon
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => router.push(route2)}
|
|
||||||
>
|
|
||||||
{icon}
|
|
||||||
</ActionIcon>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})()}
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentColab_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutColab_MainDetail({
|
export default function LayoutColab_MainDetail({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import ComponentColab_HeaderTamplate from "@/app_modules/colab/component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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";
|
||||||
|
|
||||||
export default function LayoutColab_DetailPartisipasiProyek({
|
export default function LayoutColab_DetailPartisipasiProyek({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
|
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
|
||||||
import ComponentColab_HeaderTamplate from "@/app_modules/colab/component/header_tamplate";
|
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
||||||
import { MODEL_COLLABORATION } from "@/app_modules/colab/model/interface";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
import { ActionIcon, AppShell } from "@mantine/core";
|
import { ActionIcon } from "@mantine/core";
|
||||||
import { IconDotsVertical, IconEdit } from "@tabler/icons-react";
|
import { IconDotsVertical, IconEdit } from "@tabler/icons-react";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
|
||||||
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
|
||||||
|
|
||||||
export default function LayoutColab_DetailProyekSaya({
|
export default function LayoutColab_DetailProyekSaya({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentColab_HeaderTamplate from "../component/header_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutColab_Edit({
|
export default function LayoutColab_Edit({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
|
|
||||||
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function ComponentDonasi_HeaderTamplate({
|
|
||||||
hideBack,
|
|
||||||
changeIconBack,
|
|
||||||
route,
|
|
||||||
route2,
|
|
||||||
title,
|
|
||||||
icon,
|
|
||||||
bg,
|
|
||||||
}: {
|
|
||||||
hideBack?: boolean;
|
|
||||||
changeIconBack?: any;
|
|
||||||
route?: any;
|
|
||||||
route2?: any;
|
|
||||||
title: string;
|
|
||||||
icon?: any;
|
|
||||||
bg?: any;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [isLoading, setLoading] = useState(false);
|
|
||||||
const [isRightLoading, setRightLoading] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header
|
|
||||||
height={50}
|
|
||||||
sx={{ borderStyle: "none" }}
|
|
||||||
bg={bg === null ? "" : bg}
|
|
||||||
>
|
|
||||||
<Group h={50} position="apart" px={"md"}>
|
|
||||||
{hideBack ? (
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon
|
|
||||||
loading={isLoading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setLoading(true);
|
|
||||||
if (route === null || route === undefined) {
|
|
||||||
return router.back();
|
|
||||||
} else {
|
|
||||||
return router.push(route);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{changeIconBack ? changeIconBack : <IconChevronLeft />}
|
|
||||||
</ActionIcon>
|
|
||||||
)}
|
|
||||||
<Title order={5}>{title}</Title>
|
|
||||||
{(() => {
|
|
||||||
if (route2 === null || route2 === undefined) {
|
|
||||||
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<ActionIcon
|
|
||||||
loading={isRightLoading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setRightLoading(true);
|
|
||||||
router.push(route2);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{icon}
|
|
||||||
</ActionIcon>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})()}
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutDonasi_CreateKabar({
|
export default function LayoutDonasi_CreateKabar({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi"
|
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi"
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate"
|
|
||||||
import React from "react"
|
|
||||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate"
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"
|
|
||||||
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 React from "react"
|
||||||
|
|
||||||
export default function LayoutDetailDonasiSaya({children}: {children: React.ReactNode}){
|
export default function LayoutDetailDonasiSaya({children}: {children: React.ReactNode}){
|
||||||
return<>
|
return<>
|
||||||
|
|||||||
@@ -1,27 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
||||||
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 { ActionIcon } from "@mantine/core";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
|
||||||
Button,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Modal,
|
|
||||||
Stack,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
|
||||||
import { IconTornado } from "@tabler/icons-react";
|
|
||||||
import {
|
|
||||||
IconChevronLeft,
|
|
||||||
IconCreditCard,
|
IconCreditCard,
|
||||||
IconDotsVertical,
|
IconDotsVertical,
|
||||||
IconEdit,
|
IconEdit,
|
||||||
IconEditCircle,
|
IconTornado,
|
||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
@@ -87,80 +75,4 @@ export default function LayoutDetailDraftDonasi({
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
// return (
|
|
||||||
// <>
|
|
||||||
// <AppComponentGlobal_LayoutTamplate
|
|
||||||
// header={
|
|
||||||
// <Header height={50} sx={{ borderStyle: "none" }}>
|
|
||||||
// <Group h={50} position="apart" px={"md"}>
|
|
||||||
// <ActionIcon
|
|
||||||
// variant="transparent"
|
|
||||||
// onClick={() => {
|
|
||||||
// router.back();
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// <IconChevronLeft />
|
|
||||||
// </ActionIcon>
|
|
||||||
// <Title order={5}>Detail Draft</Title>
|
|
||||||
// <ActionIcon variant="transparent" onClick={() => open()}>
|
|
||||||
// <IconEdit />
|
|
||||||
// </ActionIcon>
|
|
||||||
// </Group>
|
|
||||||
// </Header>
|
|
||||||
// }
|
|
||||||
// >
|
|
||||||
// {children}
|
|
||||||
// </AppComponentGlobal_LayoutTamplate>
|
|
||||||
// <Modal opened={opened} onClose={close} centered withCloseButton={false}>
|
|
||||||
// <Stack>
|
|
||||||
// <Button
|
|
||||||
// loaderPosition="center"
|
|
||||||
// loading={isLoadingDonasi ? true : false}
|
|
||||||
// style={{ transition: "0.5s" }}
|
|
||||||
// variant="outline"
|
|
||||||
// radius={"xl"}
|
|
||||||
// w={"100%"}
|
|
||||||
// color="blue"
|
|
||||||
// onClick={() => {
|
|
||||||
// setLoadingDonasi(true);
|
|
||||||
// router.push(RouterDonasi.edit_donasi + `${donasiId}`);
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// Edit Donasi
|
|
||||||
// </Button>
|
|
||||||
// <Button
|
|
||||||
// loaderPosition="center"
|
|
||||||
// loading={isLoadingCerita ? true : false}
|
|
||||||
// style={{ transition: "0.5s" }}
|
|
||||||
// variant="outline"
|
|
||||||
// radius={"xl"}
|
|
||||||
// w={"100%"}
|
|
||||||
// color="teal"
|
|
||||||
// onClick={() => {
|
|
||||||
// setLoadingCerita(true);
|
|
||||||
// router.push(RouterDonasi.edit_cerita_penggalang + `${donasiId}`);
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// Edit Cerita
|
|
||||||
// </Button>
|
|
||||||
// <Button
|
|
||||||
// loaderPosition="center"
|
|
||||||
// loading={isLoadingRekening ? true : false}
|
|
||||||
// style={{ transition: "0.5s" }}
|
|
||||||
// variant="outline"
|
|
||||||
// radius={"xl"}
|
|
||||||
// w={"100%"}
|
|
||||||
// color="orange"
|
|
||||||
// onClick={() => {
|
|
||||||
// setLoadingRekening(true);
|
|
||||||
// router.push(RouterDonasi.edit_rekening + `${donasiId}`);
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// Edit Rekening
|
|
||||||
// </Button>
|
|
||||||
// </Stack>
|
|
||||||
// </Modal>
|
|
||||||
// </>
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
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 ButtonDonasi from "@/app_modules/donasi/component/footer_button_donasi";
|
import ButtonDonasi from "@/app_modules/donasi/component/footer_button_donasi";
|
||||||
import ComponentDonasi_HeaderTamplate from "@/app_modules/donasi/component/header_tamplate";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutCeritaPenggalangDonasi({
|
export default function LayoutCeritaPenggalangDonasi({
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutEditCeritaPenggalangDonasi({
|
export default function LayoutEditCeritaPenggalangDonasi({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutDonasi_EditRekening({
|
export default function LayoutDonasi_EditRekening({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -87,83 +87,4 @@ export default function LayoutDonasi({
|
|||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
// return (
|
|
||||||
// <>
|
|
||||||
// <AppComponentGlobal_LayoutTamplate
|
|
||||||
// header={
|
|
||||||
// <Header height={50} sx={{ borderStyle: "none" }}>
|
|
||||||
// <Group h={50} position="apart" px={"md"}>
|
|
||||||
// <ActionIcon
|
|
||||||
// radius={"xl"}
|
|
||||||
// variant="transparent"
|
|
||||||
// loading={isLoading ? true : false}
|
|
||||||
// onClick={() => {
|
|
||||||
// setLoading(true);
|
|
||||||
// router.push(RouterCrowd.main);
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// <IconChevronLeft />
|
|
||||||
// </ActionIcon>
|
|
||||||
// <Title order={5}>Donasi</Title>
|
|
||||||
// <ActionIcon disabled variant="transparent" />
|
|
||||||
// {/* <ActionIcon
|
|
||||||
// radius={"md"}
|
|
||||||
// loading={isRightLoading ? true : false}
|
|
||||||
// variant="transparent"
|
|
||||||
// onClick={() => {
|
|
||||||
// setRightLoading(true);
|
|
||||||
// router.push(RouterDonasi.notif_page + `${userId}`);
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// {_.isEmpty(isRead) ? (
|
|
||||||
// <IconBell />
|
|
||||||
// ) : isRead.includes(false) ? (
|
|
||||||
// <Indicator processing color="orange">
|
|
||||||
// <IconBell />
|
|
||||||
// </Indicator>
|
|
||||||
// ) : (
|
|
||||||
// <IconBell />
|
|
||||||
// )}
|
|
||||||
// </ActionIcon> */}
|
|
||||||
// </Group>
|
|
||||||
// </Header>
|
|
||||||
// }
|
|
||||||
// footer={
|
|
||||||
// <Footer height={"10vh"} bg={"dark"}>
|
|
||||||
// <Grid align="center" h={"10vh"} pt={"xs"} grow>
|
|
||||||
// {/* Tampilan Bursa */}
|
|
||||||
// {listPage.map((e, i) => (
|
|
||||||
// <Grid.Col
|
|
||||||
// key={e.id}
|
|
||||||
// span={3}
|
|
||||||
// onClick={() => {
|
|
||||||
// router.push(e.path);
|
|
||||||
// setActive(i);
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// <Center>
|
|
||||||
// <Flex direction={"column"} align={"center"} w={"100%"}>
|
|
||||||
// <ActionIcon
|
|
||||||
// variant="transparent"
|
|
||||||
// c={active === i ? "orange" : "white"}
|
|
||||||
// >
|
|
||||||
// {e.icon}
|
|
||||||
// </ActionIcon>
|
|
||||||
// <Text c={active === i ? "orange" : "white"} fz={"xs"}>
|
|
||||||
// {e.name}
|
|
||||||
// </Text>
|
|
||||||
// </Flex>
|
|
||||||
// </Center>
|
|
||||||
// </Grid.Col>
|
|
||||||
// ))}
|
|
||||||
// </Grid>
|
|
||||||
// </Footer>
|
|
||||||
// }
|
|
||||||
// >
|
|
||||||
// {/* {JSON.stringify(isRead)} */}
|
|
||||||
// {children}
|
|
||||||
// </AppComponentGlobal_LayoutTamplate>
|
|
||||||
// </>
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ActionIcon, AppShell, Group, Header, Title } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import { IconChevronLeft, IconX } from "@tabler/icons-react";
|
|
||||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||||
import { gs_donasi_hot_menu } from "../../global_state";
|
import { ActionIcon } from "@mantine/core";
|
||||||
|
import { IconX } from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
|
import React from "react";
|
||||||
|
import { gs_donasi_hot_menu } from "../../global_state";
|
||||||
|
|
||||||
import { title } from "process";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function LayoutDonasi_InvoiceProses({
|
export default function LayoutDonasi_InvoiceProses({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ActionIcon, AppShell, Group, Header, Title } from "@mantine/core";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import { IconX } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { gs_donasi_hot_menu } from "../../global_state";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
|
||||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||||
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
|
import { ActionIcon } from "@mantine/core";
|
||||||
|
import { IconX } from "@tabler/icons-react";
|
||||||
|
import { useAtom } from "jotai";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { gs_donasi_hot_menu } from "../../global_state";
|
||||||
|
|
||||||
export default function LayoutDonasi_ProsesTransaksi({
|
export default function LayoutDonasi_ProsesTransaksi({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
|
|
||||||
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function ComponentEvent_HeaderTamplate({
|
|
||||||
hideBack,
|
|
||||||
changeIconBack,
|
|
||||||
route,
|
|
||||||
route2,
|
|
||||||
title,
|
|
||||||
icon,
|
|
||||||
bg,
|
|
||||||
}: {
|
|
||||||
hideBack?: boolean;
|
|
||||||
changeIconBack?: any;
|
|
||||||
route?: any;
|
|
||||||
route2?: any;
|
|
||||||
title: string;
|
|
||||||
icon?: any;
|
|
||||||
bg?: any;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [isLoadingBack, setLoadingBack] = useState(false);
|
|
||||||
const [isLoadingOtherIcon, setLoadingOtherIcon] = useState(false);
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header
|
|
||||||
height={50}
|
|
||||||
sx={{ borderStyle: "none" }}
|
|
||||||
bg={bg === null ? "" : bg}
|
|
||||||
>
|
|
||||||
<Group h={50} position="apart" px={"md"}>
|
|
||||||
{hideBack ? (
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon
|
|
||||||
loading={isLoadingBack ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setLoadingBack(true);
|
|
||||||
if (route === null || route === undefined) {
|
|
||||||
return router.back();
|
|
||||||
} else {
|
|
||||||
return router.push(route);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{changeIconBack ? changeIconBack : <IconChevronLeft />}
|
|
||||||
</ActionIcon>
|
|
||||||
)}
|
|
||||||
<Title order={5}>{title}</Title>
|
|
||||||
{(() => {
|
|
||||||
if (route2 === null || route2 === undefined) {
|
|
||||||
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<ActionIcon
|
|
||||||
loading={isLoadingOtherIcon ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setLoadingOtherIcon(true);
|
|
||||||
router.push(route2);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{icon}
|
|
||||||
</ActionIcon>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})()}
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentEvent_HeaderTamplate from "../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutEvent_Create({
|
export default function LayoutEvent_Create({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentEvent_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutEvent_DetailPublish({
|
export default function LayoutEvent_DetailPublish({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentEvent_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutEvent_DetailReview({
|
export default function LayoutEvent_DetailReview({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentEvent_HeaderTamplate from "../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutEvent_Edit({
|
export default function LayoutEvent_Edit({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { ActionIcon, Group, Header, Title } from "@mantine/core";
|
|
||||||
import { IconX } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
export default function ComponentForum_HeaderRataKiri({
|
|
||||||
title,
|
|
||||||
}: {
|
|
||||||
title: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header height={50} sx={{ borderStyle: "none" }}>
|
|
||||||
<Group h={50} px={"md"}>
|
|
||||||
<ActionIcon
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
router.back();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconX />
|
|
||||||
</ActionIcon>
|
|
||||||
<Title order={5}>{title}</Title>
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import {
|
|
||||||
Header,
|
|
||||||
Group,
|
|
||||||
ActionIcon,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
Center,
|
|
||||||
Loader,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function ComponentForum_HeaderTamplate({
|
|
||||||
hideBack,
|
|
||||||
changeIconBack,
|
|
||||||
route,
|
|
||||||
route2,
|
|
||||||
title,
|
|
||||||
icon,
|
|
||||||
bg,
|
|
||||||
}: {
|
|
||||||
hideBack?: boolean;
|
|
||||||
changeIconBack?: any;
|
|
||||||
route?: any;
|
|
||||||
route2?: any;
|
|
||||||
title: string;
|
|
||||||
icon?: any;
|
|
||||||
bg?: any;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [isLoading, setLoading] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header
|
|
||||||
height={50}
|
|
||||||
sx={{ borderStyle: "none" }}
|
|
||||||
bg={bg === null ? "" : bg}
|
|
||||||
>
|
|
||||||
<Group h={50} position="apart" px={"md"}>
|
|
||||||
{hideBack ? (
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon
|
|
||||||
loading={isLoading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setLoading(true);
|
|
||||||
if (route === null || route === undefined) {
|
|
||||||
return router.back();
|
|
||||||
} else {
|
|
||||||
return router.push(route);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{changeIconBack ? changeIconBack : <IconChevronLeft />}
|
|
||||||
</ActionIcon>
|
|
||||||
)}
|
|
||||||
<Title order={5}>{title}</Title>
|
|
||||||
{(() => {
|
|
||||||
if (route2 === null || route2 === undefined) {
|
|
||||||
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<ActionIcon
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => router.push(route2)}
|
|
||||||
>
|
|
||||||
{icon}
|
|
||||||
</ActionIcon>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})()}
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentForum_HeaderTamplate from "../component/header/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutForum_Create({
|
export default function LayoutForum_Create({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ActionIcon, AppShell, Group, Header, Title } from "@mantine/core";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import ComponentForum_HeaderTamplate from "../component/header/header_tamplate";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
||||||
import { revalidatePath } from "next/cache";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 { useRouter } from "next/navigation";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
export default function LayoutForum_Detail({
|
export default function LayoutForum_Detail({
|
||||||
@@ -25,32 +20,12 @@ export default function LayoutForum_Detail({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<UIGlobal_LayoutHeaderTamplate title="Postingan" posotion={"left"} />}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</UIGlobal_LayoutTamplate>
|
|
||||||
|
|
||||||
{/* <AppComponentGlobal_LayoutTamplate
|
|
||||||
header={
|
header={
|
||||||
<Header height={50} sx={{ borderStyle: "none" }}>
|
<UIGlobal_LayoutHeaderTamplate title="Postingan" posotion={"left"} />
|
||||||
<Group h={50} px={"md"}>
|
|
||||||
<ActionIcon
|
|
||||||
loading={loading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
setLoading(true);
|
|
||||||
router.back();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconChevronLeft />
|
|
||||||
</ActionIcon>
|
|
||||||
<Title order={5}>Postingan</Title>
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate> */}
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
import {
|
||||||
|
UIGlobal_LayoutHeaderTamplate,
|
||||||
|
UIGlobal_LayoutTamplate,
|
||||||
|
} from "@/app_modules/_global/ui";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ComponentForum_HeaderTamplate from "../../component/header/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function LayoutForum_EditKomentar({
|
export default function LayoutForum_EditKomentar({
|
||||||
children,
|
children,
|
||||||
@@ -12,11 +13,11 @@ export default function LayoutForum_EditKomentar({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentForum_HeaderTamplate title="Edit Komentar" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Komentar" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentForum_HeaderTamplate from "../../component/header/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutForum_EditPosting({
|
export default function LayoutForum_EditPosting({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import React from "react";
|
|
||||||
import ComponentForum_HeaderRataKiri from "../../component/header/header_rata_kiri";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 React from "react";
|
||||||
|
|
||||||
export default function LayoutForum_ReportKomentar({
|
export default function LayoutForum_ReportKomentar({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { useShallowEffect } from "@mantine/hooks";
|
|||||||
import { gs_count_ntf, gs_user_ntf } from "@/app/lib/global_state";
|
import { gs_count_ntf, gs_user_ntf } from "@/app/lib/global_state";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import notifikasi_countUserNotifikasi from "../notifikasi/fun/count/fun_count_by_id";
|
import notifikasi_countUserNotifikasi from "../notifikasi/fun/count/fun_count_by_id";
|
||||||
|
import { Center, Text, Title } from "@mantine/core";
|
||||||
|
|
||||||
export default function HomeView({
|
export default function HomeView({
|
||||||
dataUser,
|
dataUser,
|
||||||
@@ -52,6 +53,9 @@ export default function HomeView({
|
|||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
|
// <Center>
|
||||||
|
// <Title order={3}>HIPMI</Title>
|
||||||
|
// </Center>
|
||||||
<UIGlobal_LayoutHeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="HIPMI"
|
title="HIPMI"
|
||||||
customButtonLeft={
|
customButtonLeft={
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
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 { ActionIcon, Group, Header, Title } from "@mantine/core";
|
|
||||||
import { IconChevronLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -17,31 +14,7 @@ export default function LayoutDetailInvestasi({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail" />}
|
||||||
<UIGlobal_LayoutHeaderTamplate title="Detail" />
|
|
||||||
// <Header height={50} style={{ borderStyle: "none" }}>
|
|
||||||
// <Group h={50} position="apart" px={"md"}>
|
|
||||||
// <ActionIcon
|
|
||||||
// variant="transparent"
|
|
||||||
// onClick={() => {
|
|
||||||
// router.back();
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// <IconChevronLeft />
|
|
||||||
// </ActionIcon>
|
|
||||||
// <Title order={5}>Detail Investasi</Title>
|
|
||||||
// <ActionIcon
|
|
||||||
// variant="transparent"
|
|
||||||
// disabled
|
|
||||||
// onClick={() => {
|
|
||||||
// router.replace("");
|
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
// {/* <IconEdit /> */}
|
|
||||||
// </ActionIcon>
|
|
||||||
// </Group>
|
|
||||||
// </Header>
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</UIGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDetailBeritaInvestasi({
|
export default function LayoutDetailBeritaInvestasi({
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDetailDokumenInvestasi({
|
export default function LayoutDetailDokumenInvestasi({
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
||||||
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 { ActionIcon, AppShell } from "@mantine/core";
|
import { ActionIcon } from "@mantine/core";
|
||||||
import { IconDotsVertical, IconEdit, IconFilePencil } from "@tabler/icons-react";
|
import { IconDotsVertical, IconEdit, IconFilePencil } from "@tabler/icons-react";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDetailPublishInvestasi({
|
export default function LayoutDetailPublishInvestasi({
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { AppShell } from "@mantine/core";
|
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDetailRejecttInvestasi({
|
export default function LayoutDetailRejecttInvestasi({
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDetailReviewInvestasi({
|
export default function LayoutDetailReviewInvestasi({
|
||||||
|
|||||||
@@ -3,17 +3,13 @@
|
|||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||||
import {
|
import {
|
||||||
AppShell,
|
|
||||||
CloseButton,
|
|
||||||
Footer,
|
Footer,
|
||||||
Group,
|
Group,
|
||||||
Header,
|
Text
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import router from "next/router";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutDialogPageCreateInvestasi({
|
export default function LayoutDialogPageCreateInvestasi({
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import { AppShell, CloseButton, Group, Header, Text } from "@mantine/core";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import React from "react";
|
|
||||||
import { gs_investas_menu } from "../../g_state";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function LayoutCountDownTransaksiInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [hotMenu, setHotMenu] = useAtom(gs_investas_menu);
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate
|
|
||||||
header={
|
|
||||||
<Header height={50} sx={{ borderStyle: "none" }} px={"md"}>
|
|
||||||
<Group h={50} align="center">
|
|
||||||
<CloseButton
|
|
||||||
size={"md"}
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterInvestasi_OLD.main_transaksi), setHotMenu(3);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text>Status Transfer</Text>
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import { Box, Center, Loader, Stack, Text, Title } from "@mantine/core";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import Countdown from "react-countdown";
|
|
||||||
|
|
||||||
export default function CountDownTransaksiInvestasi() {
|
|
||||||
const router = useRouter();
|
|
||||||
const [count, setCount] = useState<any | null>(10);
|
|
||||||
useShallowEffect(() => {
|
|
||||||
setTimeout(() => router.push(RouterInvestasi_OLD.status_transaksi), 10000);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const PopupCD = () => <Text>Sedang di Proses</Text>;
|
|
||||||
const countD = ({ hours, minutes, seconds, completed }: any) => {
|
|
||||||
if (completed) {
|
|
||||||
return PopupCD();
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{minutes}:{seconds}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Center h={"80vh"}>
|
|
||||||
<Stack>
|
|
||||||
<Box>
|
|
||||||
<Center>
|
|
||||||
<Stack spacing={"sm"}>
|
|
||||||
<Text>Xendit sedang memproses transaksimu</Text>
|
|
||||||
<Center>
|
|
||||||
<Title order={5}>
|
|
||||||
<Countdown date={Date.now() + 600000} renderer={countD} />
|
|
||||||
</Title>
|
|
||||||
</Center>
|
|
||||||
<Center>
|
|
||||||
<Loader size={"xl"} variant="bars" />
|
|
||||||
</Center>
|
|
||||||
</Stack>
|
|
||||||
</Center>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
|
||||||
</Center>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
import {
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
UIGlobal_LayoutHeaderTamplate,
|
||||||
import { useRouter } from "next/navigation";
|
UIGlobal_LayoutTamplate,
|
||||||
|
} from "@/app_modules/_global/ui";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutEditBeritaInvestasi({
|
export default function LayoutEditBeritaInvestasi({
|
||||||
@@ -10,14 +11,13 @@ export default function LayoutEditBeritaInvestasi({
|
|||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentGlobal_HeaderTamplate title="Edit Berita" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Berita" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
import InvestasiCreate from "./create/view";
|
import InvestasiCreate from "./create/view";
|
||||||
import InvestasiCreateLayout from "./create/layout";
|
import InvestasiCreateLayout from "./create/layout";
|
||||||
import UploadGambarInvestasi from "./upload/view";
|
|
||||||
import LayoutUploadGambarInvestasi from "./upload/layout";
|
|
||||||
import DetailInvestasi from "./detail/view";
|
import DetailInvestasi from "./detail/view";
|
||||||
import LayoutDetailInvestasi from "./detail/layout";
|
import LayoutDetailInvestasi from "./detail/layout";
|
||||||
import ProsesInvestasi from "./proses_investasi/view";
|
|
||||||
import LayoutProsesInvestasi from "./proses_investasi/layout";
|
|
||||||
import UploadBuktiTransferInvestasi from "./upload_bukti/view";
|
|
||||||
import LayoutBuktiTransferInvestasi from "./upload_bukti/layout";
|
|
||||||
import CountDownTransaksiInvestasi from "./dialog_page/transaksi_saham/view";
|
|
||||||
import LayoutCountDownTransaksiInvestasi from "./dialog_page/transaksi_saham/layout";
|
|
||||||
import PortofolioInvestasi from "./portofolio/view";
|
import PortofolioInvestasi from "./portofolio/view";
|
||||||
import LayoutPortofolioInvestasi from "./portofolio/layout";
|
import LayoutPortofolioInvestasi from "./portofolio/layout";
|
||||||
import EditIntroInvestasi from "./edit_intro/view";
|
import EditIntroInvestasi from "./edit_intro/view";
|
||||||
@@ -28,12 +20,7 @@ import DetailBeritaInvestasi from "./detail_berita/view";
|
|||||||
import LayoutDetailBeritaInvestasi from "./detail_berita/layout";
|
import LayoutDetailBeritaInvestasi from "./detail_berita/layout";
|
||||||
import BeritaInvestasi from "./berita/view";
|
import BeritaInvestasi from "./berita/view";
|
||||||
import LayoutBeritaInvestasi from "./berita/layout";
|
import LayoutBeritaInvestasi from "./berita/layout";
|
||||||
import MetodeTransferInvestasi from "./metode_transfer/view";
|
|
||||||
import LayoutMetodeTransferInvestasi from "./metode_transfer/layout";
|
|
||||||
import TransferInvestasi from "./transfer/view";
|
|
||||||
import LayoutTransferInvestasi from "./transfer/layout";
|
|
||||||
import StatusTransaksiInvestasi from "./status_transaksi/view";
|
import StatusTransaksiInvestasi from "./status_transaksi/view";
|
||||||
import LayoutStatusTransaksiInvestasi from "./status_transaksi/layout";
|
|
||||||
import DialogPageCreateInvestasi from "./dialog_page/create/view";
|
import DialogPageCreateInvestasi from "./dialog_page/create/view";
|
||||||
import LayoutDialogPageCreateInvestasi from "./dialog_page/create/layout";
|
import LayoutDialogPageCreateInvestasi from "./dialog_page/create/layout";
|
||||||
import CreateBeritaInvestasi from "./create_berita/view";
|
import CreateBeritaInvestasi from "./create_berita/view";
|
||||||
@@ -52,7 +39,6 @@ import LayoutDetailRejectInvestasi from "./detail_portofolio/reject/layout";
|
|||||||
import TransaksiInvestasi from "./transaksi/view";
|
import TransaksiInvestasi from "./transaksi/view";
|
||||||
import LayoutTransaksiInvestasi from "./transaksi/layout";
|
import LayoutTransaksiInvestasi from "./transaksi/layout";
|
||||||
import StatusTransaksiInvestasi_Gagal from "./status_transaksi/gagal/view";
|
import StatusTransaksiInvestasi_Gagal from "./status_transaksi/gagal/view";
|
||||||
import LayoutStatusTransaksiInvestasi_Gagal from "./status_transaksi/gagal/layout";
|
|
||||||
import UploadProspektusInvestasi from "./upload_prospektus/view";
|
import UploadProspektusInvestasi from "./upload_prospektus/view";
|
||||||
import LayoutUploadProspektusInvestasi from "./upload_prospektus/layout";
|
import LayoutUploadProspektusInvestasi from "./upload_prospektus/layout";
|
||||||
import UploadDokumenInvestasi from "./upload_dokumen/view";
|
import UploadDokumenInvestasi from "./upload_dokumen/view";
|
||||||
@@ -65,16 +51,8 @@ import LayoutStatusPesananInvestasi from "./status_pesanan/layout";
|
|||||||
export {
|
export {
|
||||||
InvestasiCreate,
|
InvestasiCreate,
|
||||||
InvestasiCreateLayout,
|
InvestasiCreateLayout,
|
||||||
UploadGambarInvestasi,
|
|
||||||
LayoutUploadGambarInvestasi,
|
|
||||||
DetailInvestasi,
|
DetailInvestasi,
|
||||||
LayoutDetailInvestasi,
|
LayoutDetailInvestasi,
|
||||||
ProsesInvestasi,
|
|
||||||
LayoutProsesInvestasi,
|
|
||||||
UploadBuktiTransferInvestasi,
|
|
||||||
LayoutBuktiTransferInvestasi,
|
|
||||||
CountDownTransaksiInvestasi as KonfirmasiBuktiInvestasi,
|
|
||||||
LayoutCountDownTransaksiInvestasi as LayoutKonfirmasiBuktiInvestasi,
|
|
||||||
PortofolioInvestasi,
|
PortofolioInvestasi,
|
||||||
LayoutPortofolioInvestasi,
|
LayoutPortofolioInvestasi,
|
||||||
EditIntroInvestasi,
|
EditIntroInvestasi,
|
||||||
@@ -93,12 +71,7 @@ export {
|
|||||||
LayoutDetailBeritaInvestasi,
|
LayoutDetailBeritaInvestasi,
|
||||||
BeritaInvestasi,
|
BeritaInvestasi,
|
||||||
LayoutBeritaInvestasi as LayoutBeritaInvestasi,
|
LayoutBeritaInvestasi as LayoutBeritaInvestasi,
|
||||||
MetodeTransferInvestasi,
|
|
||||||
LayoutMetodeTransferInvestasi,
|
|
||||||
TransferInvestasi,
|
|
||||||
LayoutTransferInvestasi,
|
|
||||||
StatusTransaksiInvestasi,
|
StatusTransaksiInvestasi,
|
||||||
LayoutStatusTransaksiInvestasi,
|
|
||||||
DialogPageCreateInvestasi,
|
DialogPageCreateInvestasi,
|
||||||
LayoutDialogPageCreateInvestasi,
|
LayoutDialogPageCreateInvestasi,
|
||||||
CreateBeritaInvestasi,
|
CreateBeritaInvestasi,
|
||||||
@@ -117,7 +90,6 @@ export {
|
|||||||
TransaksiInvestasi,
|
TransaksiInvestasi,
|
||||||
LayoutTransaksiInvestasi,
|
LayoutTransaksiInvestasi,
|
||||||
StatusTransaksiInvestasi_Gagal,
|
StatusTransaksiInvestasi_Gagal,
|
||||||
LayoutStatusTransaksiInvestasi_Gagal,
|
|
||||||
UploadProspektusInvestasi,
|
UploadProspektusInvestasi,
|
||||||
LayoutUploadProspektusInvestasi,
|
LayoutUploadProspektusInvestasi,
|
||||||
UploadDokumenInvestasi,
|
UploadDokumenInvestasi,
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { ActionIcon, AppShell } from "@mantine/core";
|
|
||||||
import { IconDotsVertical, IconPencilPlus } from "@tabler/icons-react";
|
|
||||||
import React from "react";
|
|
||||||
import getOneInvestasiById from "../fun/get_one_investasi_by_id";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
||||||
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
|
import { ActionIcon } from "@mantine/core";
|
||||||
|
import { IconDotsVertical, IconPencilPlus } from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutListEditBeritaInvestasi({
|
export default function LayoutListEditBeritaInvestasi({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function LayoutMetodeTransferInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate
|
|
||||||
header={
|
|
||||||
<ComponentGlobal_HeaderTamplate title="Pilih Metode Transfer" />
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
|
||||||
import {
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Flex,
|
|
||||||
Paper,
|
|
||||||
Radio,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { MODEL_INVESTASI, MODEL_MASTER_BANK } from "../_lib/interface";
|
|
||||||
import funCreateTransaksiInvestasi from "../fun/fun_create_transaksi";
|
|
||||||
import getNorekInvestasi from "../fun/get_norek";
|
|
||||||
import { gs_TransferValue } from "../g_state";
|
|
||||||
|
|
||||||
export default function MetodeTransferInvestasi({
|
|
||||||
dataInvestasi,
|
|
||||||
namaBank,
|
|
||||||
authorId,
|
|
||||||
}: {
|
|
||||||
dataInvestasi: MODEL_INVESTASI;
|
|
||||||
namaBank: MODEL_MASTER_BANK[];
|
|
||||||
authorId: string;
|
|
||||||
}) {
|
|
||||||
const [investasi, setInvestasi] = useState(dataInvestasi);
|
|
||||||
const [bank, setBank] = useState(namaBank);
|
|
||||||
const [pilihBank, setPilihBank] = useState<string | null>(null);
|
|
||||||
const router = useRouter();
|
|
||||||
const [transferValue, setTransferValue] = useAtom(gs_TransferValue);
|
|
||||||
|
|
||||||
async function onSubmit() {
|
|
||||||
// Create Transaksi
|
|
||||||
await funCreateTransaksiInvestasi(
|
|
||||||
transferValue as any,
|
|
||||||
investasi.id,
|
|
||||||
authorId
|
|
||||||
).then(async (res) => {
|
|
||||||
if (res.status === 201) {
|
|
||||||
ComponentGlobal_NotifikasiBerhasil(res.message);
|
|
||||||
router.push(RouterInvestasi_OLD.transfer + `${res.res?.id}`);
|
|
||||||
} else {
|
|
||||||
ComponentGlobal_NotifikasiGagal(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSelect(id: string) {
|
|
||||||
await getNorekInvestasi(id).then((res) => {
|
|
||||||
if (res.status === 200) {
|
|
||||||
setTransferValue({
|
|
||||||
...transferValue,
|
|
||||||
namaBank: res.res?.namaBank as any,
|
|
||||||
nomorRekening: res.res?.norek as any,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
ComponentGlobal_NotifikasiGagal(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <pre>{JSON.stringify(transferValue, null, 2)}</pre> */}
|
|
||||||
{/* Box judul */}
|
|
||||||
<Paper bg={"gray"} p={"xs"} shadow="lg" mb={"md"}>
|
|
||||||
<Title order={5}>{investasi.title}</Title>
|
|
||||||
<Text fz={"sm"}>Total Transfer : Rp.{transferValue.totalTransfer}</Text>
|
|
||||||
</Paper>
|
|
||||||
|
|
||||||
{/* Metode transfer */}
|
|
||||||
<Radio.Group
|
|
||||||
name="Metode Trf"
|
|
||||||
label="Metode Transfer"
|
|
||||||
description="Pilih salah satu bank"
|
|
||||||
withAsterisk
|
|
||||||
my={"md"}
|
|
||||||
onChange={(val) => {
|
|
||||||
setPilihBank(val);
|
|
||||||
onSelect(val);
|
|
||||||
}}
|
|
||||||
value={"" + pilihBank}
|
|
||||||
>
|
|
||||||
<Flex direction={"column"} gap={"lg"} mt="xs">
|
|
||||||
{bank.map((e) => (
|
|
||||||
<Box key={e.id}>
|
|
||||||
<Radio value={e.id} label={e.namaBank} />
|
|
||||||
</Box>
|
|
||||||
))}
|
|
||||||
</Flex>
|
|
||||||
</Radio.Group>
|
|
||||||
|
|
||||||
<Center>
|
|
||||||
{pilihBank === null ? (
|
|
||||||
<Button my={"md"} w={300} disabled radius={50}>
|
|
||||||
Pilih Bank
|
|
||||||
</Button>
|
|
||||||
) : (
|
|
||||||
<Button
|
|
||||||
my={"md"}
|
|
||||||
w={300}
|
|
||||||
bg={Warna.biru}
|
|
||||||
radius={50}
|
|
||||||
onClick={() => {
|
|
||||||
onSubmit();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Lanjutkan Untuk Transfer
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Center>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||||
import {
|
|
||||||
AppShell,
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
ScrollArea,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
export default function LayoutPortofolioInvestasi({
|
export default function LayoutPortofolioInvestasi({
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function LayoutProsesInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate
|
|
||||||
header={<ComponentGlobal_HeaderTamplate title="Proses Investasi" />}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import {
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Divider,
|
|
||||||
Group,
|
|
||||||
NumberInput,
|
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useFocusTrap } from "@mantine/hooks";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { MODEL_INVESTASI } from "../_lib/interface";
|
|
||||||
import { gs_TransferValue } from "../g_state";
|
|
||||||
|
|
||||||
export default function ProsesInvestasi({
|
|
||||||
dataInvestasi,
|
|
||||||
}: {
|
|
||||||
dataInvestasi: MODEL_INVESTASI;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const focusTrapRef = useFocusTrap();
|
|
||||||
|
|
||||||
const [jumlah, setJumlah] = useState(0);
|
|
||||||
const [hargaLembar, setHargaLembar] = useState<number>(
|
|
||||||
Number(dataInvestasi.hargaLembar)
|
|
||||||
);
|
|
||||||
const [total, setTotal] = useState(0);
|
|
||||||
const [investasi, setInvestasi] = useState(dataInvestasi);
|
|
||||||
const [maxPembelian, setMaxPembelian] = useState<number>(
|
|
||||||
Number(dataInvestasi.totalLembar)
|
|
||||||
);
|
|
||||||
const [transferValue, setTransferValue] = useAtom(gs_TransferValue);
|
|
||||||
|
|
||||||
// async function onBeli() {
|
|
||||||
// setTransferValue({
|
|
||||||
// ...transferValue,
|
|
||||||
// totalTransfer: total as any,
|
|
||||||
// lembarTerbeli: jumlah as any,
|
|
||||||
// });
|
|
||||||
// router.push(RouterInvestasi.metode_transfer + `${investasi.id}`);
|
|
||||||
// }
|
|
||||||
const date = new Date();
|
|
||||||
const randomId = date.getTime();
|
|
||||||
|
|
||||||
async function onProses() {
|
|
||||||
const body = {
|
|
||||||
transaction_details: {
|
|
||||||
order_id: "hipmi_" + `${randomId}`,
|
|
||||||
gross_amount: total,
|
|
||||||
},
|
|
||||||
item_details: [
|
|
||||||
{
|
|
||||||
id: "item_" + `${randomId}`,
|
|
||||||
name: investasi.title,
|
|
||||||
price: Number(investasi.hargaLembar),
|
|
||||||
quantity: transferValue.lembarTerbeli,
|
|
||||||
merchant_name: "Transaksi Saham",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
customer_details: {
|
|
||||||
first_name: "",
|
|
||||||
email: "test@midtrans.com",
|
|
||||||
phone: "+628123456",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <pre>{JSON.stringify(investasi, null, 2)}</pre> */}
|
|
||||||
<Box px={"md"}>
|
|
||||||
{/* Sisa Lembar Saham */}
|
|
||||||
<Group position="apart" mb={"md"}>
|
|
||||||
<Text>Sisa Lembar Saham</Text>
|
|
||||||
<Text fz={23}>
|
|
||||||
{new Intl.NumberFormat("id-ID", {
|
|
||||||
maximumFractionDigits: 10,
|
|
||||||
}).format(+investasi.totalLembar)}{" "}
|
|
||||||
</Text>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
{/* Harga perlembar saham */}
|
|
||||||
<Group position="apart" mb={"md"}>
|
|
||||||
<Text>Harga Perlembar</Text>
|
|
||||||
<Text fz={23}>
|
|
||||||
Rp.{" "}
|
|
||||||
{new Intl.NumberFormat("id-ID", {
|
|
||||||
maximumFractionDigits: 10,
|
|
||||||
}).format(+investasi.hargaLembar)}{" "}
|
|
||||||
</Text>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
{/* Lembar saham */}
|
|
||||||
<Group position="apart" mb={"md"}>
|
|
||||||
<Box>
|
|
||||||
<Text>Jumlah Pembelian</Text>
|
|
||||||
<Text c={"orange"} fs={"italic"} fz={10}>
|
|
||||||
minimal pembelian 10 lembar
|
|
||||||
</Text>
|
|
||||||
{/* <Text c={"red"} fs={"italic"} fz={10}>
|
|
||||||
maximal pembelian {maxPembelian} lembar
|
|
||||||
</Text> */}
|
|
||||||
</Box>
|
|
||||||
<NumberInput
|
|
||||||
type="number"
|
|
||||||
ref={focusTrapRef}
|
|
||||||
w={100}
|
|
||||||
max={maxPembelian}
|
|
||||||
onChange={(val: number) => {
|
|
||||||
setTotal(val * hargaLembar);
|
|
||||||
setJumlah(val);
|
|
||||||
// console.log(val);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Divider my={"lg"} />
|
|
||||||
|
|
||||||
<Group position="apart" mb={"md"}>
|
|
||||||
<Box>
|
|
||||||
<Text>Total Harga</Text>
|
|
||||||
</Box>
|
|
||||||
<Text fz={25}>Rp.{total} </Text>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Center>
|
|
||||||
{jumlah < 10 ? (
|
|
||||||
<Button w={350} radius={50} bg={"gray"} disabled>
|
|
||||||
Beli Saham
|
|
||||||
</Button>
|
|
||||||
) : (
|
|
||||||
<Button
|
|
||||||
w={350}
|
|
||||||
radius={50}
|
|
||||||
bg={Warna.biru}
|
|
||||||
onClick={() => {
|
|
||||||
// onBeli();
|
|
||||||
onProses();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Beli Saham
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Center>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
{/* <pre>{JSON.stringify(investasi, null, 2)}</pre> */}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,16 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { ActionIcon, AppShell, Box, Group, Header, Text } from "@mantine/core";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { gs_midtrans_snap } from "../g_state";
|
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
|
||||||
import { title } from "process";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
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 { useAtom } from "jotai";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import React from "react";
|
||||||
|
import { gs_midtrans_snap } from "../g_state";
|
||||||
|
|
||||||
export default function LayoutProsesTransaksiInvestasi({
|
export default function LayoutProsesTransaksiInvestasi({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
|
||||||
import router from "next/router";
|
|
||||||
import { title } from "process";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutStatusPesananInvestasi({
|
export default function LayoutStatusPesananInvestasi({
|
||||||
@@ -19,12 +13,10 @@ export default function LayoutStatusPesananInvestasi({
|
|||||||
<>
|
<>
|
||||||
<UIGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<UIGlobal_LayoutHeaderTamplate title="Status Transaksi" hideButtonLeft/>
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
// <Header height={50}>
|
title="Status Transaksi"
|
||||||
// <Group h={50} position="center" px={"md"}>
|
hideButtonLeft
|
||||||
// <Text>Status Transaksi</Text>
|
/>
|
||||||
// </Group>
|
|
||||||
// </Header>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -2,22 +2,20 @@
|
|||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||||
import {
|
import {
|
||||||
AppShell,
|
|
||||||
Header,
|
|
||||||
Group,
|
|
||||||
CloseButton,
|
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
Footer,
|
|
||||||
Center,
|
|
||||||
Button,
|
Button,
|
||||||
Text,
|
Center,
|
||||||
|
CloseButton,
|
||||||
|
Footer,
|
||||||
|
Group,
|
||||||
|
Header,
|
||||||
|
Text
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { gs_investas_menu } from "../../g_state";
|
import { gs_investas_menu } from "../../g_state";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
|
|
||||||
export default function LayoutStatusTransaksiInvestasi_Gagal({
|
export default function LayoutStatusTransaksiInvestasi_Gagal({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
CloseButton,
|
|
||||||
Footer,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import React from "react";
|
|
||||||
import { gs_investas_menu } from "../g_state";
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
|
||||||
|
|
||||||
export default function LayoutStatusTransaksiInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [hotMenu, setHotMenu] = useAtom(gs_investas_menu);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<UIGlobal_LayoutTamplate
|
|
||||||
header={
|
|
||||||
<Header height={50}>
|
|
||||||
<Group position="apart" align="center" h={50} px={"md"}>
|
|
||||||
<CloseButton
|
|
||||||
size={"md"}
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterInvestasi_OLD.main_transaksi);
|
|
||||||
setHotMenu(3);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text>Status Transaksi</Text>
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
footer={
|
|
||||||
<Footer height={70} sx={{ borderStyle: "none" }}>
|
|
||||||
<Center>
|
|
||||||
<Button
|
|
||||||
w={300}
|
|
||||||
radius={50}
|
|
||||||
bg={Warna.biru}
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterInvestasi_OLD.main_investasi), setHotMenu(2);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Kembali Ke Investasi
|
|
||||||
</Button>
|
|
||||||
</Center>
|
|
||||||
</Footer>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</UIGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
import { Title } from "@mantine/core";
|
||||||
import { AppShell, Title } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutTransaksiInvestasi({
|
export default function LayoutTransaksiInvestasi({
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
CloseButton,
|
|
||||||
Footer,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import React from "react";
|
|
||||||
import { gs_investas_menu } from "../g_state";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function LayoutTransferInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [hotMenu, setHotMenu] = useAtom(gs_investas_menu);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate
|
|
||||||
header={
|
|
||||||
<Header height={50}>
|
|
||||||
<Group position="apart" h={50} px={"md"}>
|
|
||||||
<CloseButton
|
|
||||||
size={"md"}
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterInvestasi_OLD.main_transaksi), setHotMenu(3);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text>Transfer</Text>
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
// footer={
|
|
||||||
// <Footer height={70} sx={{ borderStyle: "none" }}>
|
|
||||||
|
|
||||||
// </Footer>
|
|
||||||
// }
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,240 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import {
|
|
||||||
AspectRatio,
|
|
||||||
Avatar,
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
CopyButton,
|
|
||||||
Divider,
|
|
||||||
FileButton,
|
|
||||||
Flex,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Image,
|
|
||||||
Paper,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useInterval, useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
|
||||||
import moment from "moment";
|
|
||||||
import { redirect, useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
import { useState } from "react";
|
|
||||||
import Countdown from "react-countdown";
|
|
||||||
import {
|
|
||||||
MODEL_INVESTASI,
|
|
||||||
MODEL_Transaksi_Investasi,
|
|
||||||
} from "../_lib/interface";
|
|
||||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { gs_TransferValue, gs_investas_menu } from "../g_state";
|
|
||||||
import funGantiStatusTransaksi_Investasi from "../fun/fun_ganti_status_transaksi";
|
|
||||||
|
|
||||||
export default function TransferInvestasi({
|
|
||||||
dataTransaksi,
|
|
||||||
}: {
|
|
||||||
dataTransaksi: MODEL_Transaksi_Investasi;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [transaksi, setTransaksi] = useState(dataTransaksi);
|
|
||||||
const [countDown, setCountDown] = useState<number | any>({
|
|
||||||
jam: null,
|
|
||||||
menit: null,
|
|
||||||
detik: null,
|
|
||||||
});
|
|
||||||
|
|
||||||
// useShallowEffect(() => {
|
|
||||||
// const inter = apa_kabar("2023-11-18");
|
|
||||||
// return () => clearInterval(inter);
|
|
||||||
// }, []);
|
|
||||||
// function apa_kabar(date: string) {
|
|
||||||
// let d = moment.duration(moment(date).diff(new Date()));
|
|
||||||
// const inter = setInterval(() => {
|
|
||||||
// d = moment.duration(+d - 1000, "milliseconds");
|
|
||||||
|
|
||||||
// console.log(d.days(), "=", d.hours(), ":", d.minutes(), ":", d.seconds());
|
|
||||||
// }, 1000);
|
|
||||||
// return inter;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// useShallowEffect(() => {
|
|
||||||
// const mulai = moment(transaksi.createdAt).format();
|
|
||||||
// const selesai = moment(transaksi.createdAt).add(1, "days").format();
|
|
||||||
// const timer = funCountDown(mulai as any, selesai as any);
|
|
||||||
|
|
||||||
// return () => clearInterval(timer);
|
|
||||||
// }, []);
|
|
||||||
|
|
||||||
// functionbaru ==========================//
|
|
||||||
const selesai = moment(transaksi.createdAt).add(1, "days").format();
|
|
||||||
let durasi = moment.duration(moment(selesai).diff(new Date()));
|
|
||||||
const interval = useInterval(() => {
|
|
||||||
durasi = moment.duration(+durasi - 1000, "milliseconds");
|
|
||||||
if (durasi.hours() <= 0 && durasi.minutes() <= 0 && durasi.seconds() <= 0) {
|
|
||||||
funGantiStatusTransaksi_Investasi(transaksi.id, "4").then((res) => {
|
|
||||||
if (res.status === 200) {
|
|
||||||
router.push(
|
|
||||||
RouterInvestasi_OLD.status_transaksi_gagal + `${transaksi.id}`
|
|
||||||
);
|
|
||||||
interval.stop();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setCountDown({
|
|
||||||
...countDown,
|
|
||||||
jam: durasi.hours(),
|
|
||||||
menit: durasi.minutes(),
|
|
||||||
detik: durasi.seconds(),
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
useShallowEffect(() => {
|
|
||||||
interval.start();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <pre>{JSON.stringify(transaksi, null,2)}</pre> */}
|
|
||||||
{/* {countDown.jam} */}
|
|
||||||
<Stack spacing={"lg"}>
|
|
||||||
<Stack spacing={0} mb={"xs"}>
|
|
||||||
<Text fz={12}>Mohon transfer untuk diteruskan ke :</Text>
|
|
||||||
<Group align="center">
|
|
||||||
<Title order={5}>{transaksi.Investasi.title}</Title>
|
|
||||||
</Group>
|
|
||||||
<Divider my={"md"} />
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={4}>
|
|
||||||
<Text fz={"xs"}>Transfer sebelum</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={5}>
|
|
||||||
<Text fz={"xs"} fw={"bold"}>
|
|
||||||
{moment(transaksi.createdAt).format("lll")}
|
|
||||||
</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={3} fz={"xs"}>
|
|
||||||
<Paper bg={"red"} px={"xs"}>
|
|
||||||
<Center>
|
|
||||||
{countDown.jam <= 0 &&
|
|
||||||
countDown.menit <= 0 &&
|
|
||||||
countDown.detik <= 0 ? (
|
|
||||||
<Flex align={"center"} justify={"center"}>
|
|
||||||
<Text fz={9}>Waktu Habis</Text>
|
|
||||||
</Flex>
|
|
||||||
) : (
|
|
||||||
<Box>
|
|
||||||
{countDown.jam}:{countDown.menit}:{countDown.detik}
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Center>
|
|
||||||
</Paper>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Stack spacing={"xl"}>
|
|
||||||
{/* Nama Rekening */}
|
|
||||||
<Stack spacing={5}>
|
|
||||||
<Group>
|
|
||||||
<Avatar size={"md"} variant="filled" />
|
|
||||||
<Stack spacing={0}>
|
|
||||||
<Text>Bank {transaksi.namaBank}</Text>
|
|
||||||
<Text>PT. Xendit Jakarta</Text>
|
|
||||||
</Stack>
|
|
||||||
</Group>
|
|
||||||
<Paper
|
|
||||||
bg={"gray.3"}
|
|
||||||
sx={{ alignContent: "center" }}
|
|
||||||
p={"sm"}
|
|
||||||
radius={10}
|
|
||||||
>
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={8}>
|
|
||||||
<Text fw={"bold"}>{transaksi.nomorRekening}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={4}>
|
|
||||||
<Center>
|
|
||||||
<CopyButton value={transaksi.nomorRekening}>
|
|
||||||
{({ copied, copy }) => (
|
|
||||||
<Button
|
|
||||||
variant="filled"
|
|
||||||
radius={50}
|
|
||||||
compact
|
|
||||||
bg={copied ? "teal" : "gray"}
|
|
||||||
color="gray"
|
|
||||||
onClick={copy}
|
|
||||||
>
|
|
||||||
{copied ? "Tersalin" : "Salin"}
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</CopyButton>
|
|
||||||
</Center>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Paper>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
{/* Nomor rekening */}
|
|
||||||
<Stack spacing={5}>
|
|
||||||
<Text>Total Transfer</Text>
|
|
||||||
<Paper
|
|
||||||
bg={"gray.3"}
|
|
||||||
sx={{ alignContent: "center" }}
|
|
||||||
p={"sm"}
|
|
||||||
radius={10}
|
|
||||||
>
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={8}>
|
|
||||||
{/* <Text fw={"bold"}>Rp. {transaksi.totalTransfer}</Text> */}
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={4}>
|
|
||||||
<Center>
|
|
||||||
{/* <CopyButton value={transaksi.totalTransfer}>
|
|
||||||
{({ copied, copy }) => (
|
|
||||||
<Button
|
|
||||||
variant="filled"
|
|
||||||
radius={50}
|
|
||||||
compact
|
|
||||||
bg={copied ? "teal" : "gray"}
|
|
||||||
color="gray"
|
|
||||||
onClick={copy}
|
|
||||||
>
|
|
||||||
{copied ? "Tersalin" : "Salin"}
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</CopyButton> */}
|
|
||||||
</Center>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Paper>
|
|
||||||
<Group spacing={5}>
|
|
||||||
<IconAlertTriangle color="orange" size={10} />
|
|
||||||
<Text fz={"sm"}>Pastikan jumlahnya benar</Text>
|
|
||||||
</Group>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
{/* Tombol Sudah Transfer */}
|
|
||||||
<Center mt={100}>
|
|
||||||
<Button
|
|
||||||
radius={50}
|
|
||||||
w={300}
|
|
||||||
bg={Warna.biru}
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterInvestasi_OLD.dialog_transaksi);
|
|
||||||
// setHotMenu(1);
|
|
||||||
// router.push(RouterInvestasi.status_transaksi);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Sudah Transfer
|
|
||||||
</Button>
|
|
||||||
</Center>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function LayoutUploadGambarInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate header={<ComponentGlobal_HeaderTamplate title="Upload Gambar Investasi" />}>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import {
|
|
||||||
AspectRatio,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Divider,
|
|
||||||
FileButton,
|
|
||||||
Group,
|
|
||||||
Image,
|
|
||||||
Paper,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function UploadGambarInvestasi() {
|
|
||||||
const [img, setImg] = useState<any | null>();
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Group position="center">
|
|
||||||
<FileButton
|
|
||||||
onChange={async (files : any) => {
|
|
||||||
const buffer = URL.createObjectURL(
|
|
||||||
new Blob([new Uint8Array( await files.arrayBuffer())])
|
|
||||||
);
|
|
||||||
setImg(buffer);
|
|
||||||
}}
|
|
||||||
accept="image/png,image/jpeg"
|
|
||||||
>
|
|
||||||
{(props) => <Button {...props}>Upload image</Button>}
|
|
||||||
</FileButton>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
{img && <Image alt="" src={img}/>}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function LayoutBuktiTransferInvestasi({
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate header={<ComponentGlobal_HeaderTamplate title="Upload Bukti Transfer" />}>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import {
|
|
||||||
AspectRatio,
|
|
||||||
Button,
|
|
||||||
FileButton,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Image,
|
|
||||||
Text
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function UploadBuktiTransferInvestasi() {
|
|
||||||
const router = useRouter();
|
|
||||||
const [fl, setFl] = useState<File | null>(null);
|
|
||||||
const [img, setImg] = useState<any | null>(null);
|
|
||||||
const [total, setTotal] = useState<any | null>(null);
|
|
||||||
const [bank, setBank] = useState<any | null>(null);
|
|
||||||
|
|
||||||
useShallowEffect(() => {
|
|
||||||
if (typeof window !== undefined) {
|
|
||||||
const totalHarga = localStorage.getItem("total_harga");
|
|
||||||
const pilihBank = localStorage.getItem("bank");
|
|
||||||
setTotal(totalHarga);
|
|
||||||
setBank(pilihBank);
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* Nama Rekening */}
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={5}>
|
|
||||||
<Text>Nama Rekening</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={7}>
|
|
||||||
<Text fw={"bold"}>Xendit</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
{/* Nomor rekening */}
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={5}>
|
|
||||||
<Text>Nomor Rekening</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={7}>
|
|
||||||
<Text fw={"bold"}>{bank}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
{/* <Grid.Col span={"auto"}>
|
|
||||||
<CopyButton value="908765467897654567">
|
|
||||||
{({ copied, copy }) => (
|
|
||||||
<Button
|
|
||||||
compact
|
|
||||||
radius={50}
|
|
||||||
color={copied ? "teal" : "indigo"}
|
|
||||||
onClick={copy}
|
|
||||||
>
|
|
||||||
{copied ? "Copied url" : "Copy url"}
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</CopyButton>
|
|
||||||
</Grid.Col> */}
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
{/* Total Bayar */}
|
|
||||||
<Grid align="center">
|
|
||||||
<Grid.Col span={5}>
|
|
||||||
<Text>Total Bayar</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={7}>
|
|
||||||
<Text fw={"bold"}>Rp. {total}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
{/* Upload */}
|
|
||||||
<Group position="center" mt="lg" mb={"md"}>
|
|
||||||
<FileButton
|
|
||||||
onChange={async (files: any) => {
|
|
||||||
const buffer = URL.createObjectURL(
|
|
||||||
new Blob([new Uint8Array(await files.arrayBuffer())])
|
|
||||||
);
|
|
||||||
setImg(buffer);
|
|
||||||
setFl(files);
|
|
||||||
}}
|
|
||||||
accept="image/png,image/jpeg"
|
|
||||||
>
|
|
||||||
{(props) => (
|
|
||||||
<Button
|
|
||||||
{...props}
|
|
||||||
// w={350}
|
|
||||||
compact
|
|
||||||
radius={50}
|
|
||||||
bg={Warna.biru}
|
|
||||||
// onClick={() => router.push("/dev/investasi/upload")}
|
|
||||||
>
|
|
||||||
Upload
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</FileButton>
|
|
||||||
</Group>
|
|
||||||
<AspectRatio ratio={16 / 9} mb={"lg"}>
|
|
||||||
{img ? (
|
|
||||||
<Image alt="" src={img} />
|
|
||||||
) : (
|
|
||||||
<Image alt="" src={"/aset/no-img.png"} />
|
|
||||||
)}
|
|
||||||
</AspectRatio>
|
|
||||||
|
|
||||||
{/* <Center>
|
|
||||||
{img === null ? (
|
|
||||||
<Button
|
|
||||||
disabled
|
|
||||||
w={350}
|
|
||||||
radius={50}
|
|
||||||
bg={"gray"}
|
|
||||||
onClick={() => toast("Masukan Bukti Transfer")}
|
|
||||||
>
|
|
||||||
Selesai
|
|
||||||
</Button>
|
|
||||||
) : (
|
|
||||||
<Button
|
|
||||||
w={350}
|
|
||||||
radius={50}
|
|
||||||
bg={"blue"}
|
|
||||||
onClick={() => router.push("/dev/investasi/konfirmasi")}
|
|
||||||
>
|
|
||||||
Selesai
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Center> */}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate";
|
|
||||||
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 { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutUploadDokumenInvestasi({
|
export default function LayoutUploadDokumenInvestasi({
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user