- Tampilan buat berita
- Tampilan dialog page buat proyek investasi
- Tampilan list edit beritq
- # No issue
fix:
- Perubahan minor
This commit is contained in:
2023-10-31 16:18:44 +08:00
parent a75f92c478
commit 54eae1bce3
38 changed files with 730 additions and 192 deletions

View File

@@ -0,0 +1,43 @@
"use client";
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
import {
AppShell,
CloseButton,
Footer,
Group,
Header,
Text,
} from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
import { IconAlertTriangle } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import router from "next/router";
import React from "react";
export default function LayoutDialogPageCreateInvestasi({
children,
}: {
children: React.ReactNode;
}) {
const router = useRouter()
useShallowEffect(() => {
setTimeout(() => router.push(RouterInvestasi.portofolio), 3000)
},[])
return (
<>
<AppShell
footer={
<Footer height={70} sx={{ borderStyle: "none" }}>
<Group spacing={4} position="center">
<IconAlertTriangle color="orange" size={20} />
<Text fz={"sm"}>Proyek Investasi anda akan berstatus DRAFT</Text>
</Group>
</Footer>
}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,16 @@
"use client";
import { Group, Highlight, Stack, Text, Title } from "@mantine/core";
import { IconAlertTriangle, IconCircleCheck } from "@tabler/icons-react";
export default function DialogPageCreateInvestasi() {
return (
<>
<Stack h={"80vh"} align="center" justify="center">
<Title order={3}>Berhasil Membuat Proyek Investasi</Title>
<IconCircleCheck size={100} color="green" />
</Stack>
</>
);
}

View File

@@ -4,32 +4,44 @@ import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
import { Box, Center, Loader, Stack, Text, Title } from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
import { IconCircleCheck } from "@tabler/icons-react";
import moment from "moment";
import { useRouter } from "next/navigation";
import { useState } from "react";
import toast from "react-simple-toasts";
import Countdown from "react-countdown";
export default function CountDownTransaksiInvestasi() {
const router = useRouter();
const [count, setCount] = useState<any | null>(10);
useShallowEffect(() => {
setTimeout(() => router.push(RouterInvestasi.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>
<Text>Transfer Berhasil</Text>
</Center>
<Center>
<IconCircleCheck size={100} />
</Center>
</Box> */}
<Box>
<Center>
<Stack spacing={"sm"}>
<Text>Xendit sedang memproses transaksimu</Text>
<Center>
<Title order={5}>09:57</Title>
<Title order={5}>
<Countdown date={Date.now() + 600000} renderer={countD} />
</Title>
</Center>
<Center>
<Loader size={"xl"} variant="bars" />