fix:
Deksripsi: - Progress investasi - Tampilan voting ## No issue
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { ComponentGlobal_CardLoadingOverlay } from "@/app_modules/_global/component";
|
||||
import { Card } from "@mantine/core";
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
|
||||
export function Investasi_ComponentStylesCard({
|
||||
children,
|
||||
@@ -13,9 +14,9 @@ export function Investasi_ComponentStylesCard({
|
||||
backgroundColor?: string;
|
||||
border?: string;
|
||||
marginBottom?: string | number;
|
||||
onClickHandler?: (val: any) => void;
|
||||
onClickHandler?: React.MouseEventHandler<HTMLDivElement>;
|
||||
}) {
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
@@ -24,9 +25,8 @@ export function Investasi_ComponentStylesCard({
|
||||
? backgroundColor
|
||||
: AccentColor.darkblue,
|
||||
border: `2px solid ${border ? border : AccentColor.blue}`,
|
||||
paddingInline: "20px",
|
||||
paddingTop: "15px",
|
||||
paddingBottom: "20px",
|
||||
paddingInline: "15px",
|
||||
paddingBlock: "15px",
|
||||
borderRadius: "10px",
|
||||
color: "white",
|
||||
marginBottom: marginBottom ? marginBottom : "0x",
|
||||
|
||||
@@ -9,17 +9,21 @@ import { Investasi_ComponentCardBeranda } from "./main/comp_card_beranda";
|
||||
import { Investasi_ComponentCardDaftarTransaksi } from "./main/comp_card_daftar_transaksi";
|
||||
import { Investasi_ComponentSahamSaya } from "./main/comp_card_saham_saya";
|
||||
import { Investasi_ComponentFooterMain } from "./main/comp_footer_main";
|
||||
import { Investasi_ComponentCardPortofolioPublish } from "./main/comp_card_portofolio_publish";
|
||||
import { Investasi_ComponentButtonUpdateBeranda } from "./main/comp_update_beranda";
|
||||
import { Investasi_ComponentCardPortofolio_NotPublish } from "./main/comp_card_portofolio_not_publish";
|
||||
|
||||
export { Investasi_ComponentFooterMain };
|
||||
export { Investasi_ComponentCardBeranda };
|
||||
export { Investasi_ComponentButtonUpdateBeranda };
|
||||
export { Investasi_ComponentCardDaftarTransaksi };
|
||||
export { Investasi_ComponentSahamSaya };
|
||||
export { Investasi_ComponentStylesCard as Investasasi_ComponentBoxBorderAndBackground };
|
||||
export { Investasi_ComponentStylesCard };
|
||||
export { Investasi_ComponentBoxProspektus };
|
||||
export { Investasi_ComponentBoxDaftarDokumen };
|
||||
export { Investasi_ComponentBoxDaftarBerita };
|
||||
export { Investasi_ComponentBoxHargaDanLembarSaham };
|
||||
export { Investasi_ComponentBoxProgress };
|
||||
export { Investasi_ComponentBoxDetailData };
|
||||
export { Investasi_ComponentCardPortofolioPublish };
|
||||
export { Investasi_ComponentCardPortofolio_NotPublish };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
||||
import { Warna } from "@/app/lib/warna";
|
||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import {
|
||||
Card,
|
||||
CardSection,
|
||||
@@ -70,14 +70,17 @@ export function Investasi_ComponentCardBeranda({
|
||||
<Title align="center" order={3}>
|
||||
{data?.title}
|
||||
</Title>
|
||||
{/* <Progress
|
||||
label={(+e.progress).toFixed(2) + " %"}
|
||||
value={+e.progress}
|
||||
color="teal"
|
||||
size="xl"
|
||||
radius="xl"
|
||||
/> */}
|
||||
<Progress
|
||||
label={(+data?.progress).toFixed(2) + " %"}
|
||||
value={+data?.progress}
|
||||
color={MainColor.yellow}
|
||||
size="xl"
|
||||
radius="xl"
|
||||
styles={{
|
||||
label:{color: MainColor.black}
|
||||
}}
|
||||
/>
|
||||
{/* <Progress
|
||||
label={
|
||||
"" +
|
||||
(
|
||||
@@ -97,7 +100,7 @@ export function Investasi_ComponentCardBeranda({
|
||||
color="teal"
|
||||
size="xl"
|
||||
radius="xl"
|
||||
/>
|
||||
/> */}
|
||||
</Stack>
|
||||
</CardSection>
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
|
||||
import { Grid, Stack, AspectRatio, Paper, Text, Image } from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
import { MODEL_INVESTASI } from "../../_lib/interface";
|
||||
import { Investasi_ComponentStylesCard } from "../comp_card_border_and_background";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { ComponentGlobal_CardLoadingOverlay } from "@/app_modules/_global/component";
|
||||
|
||||
export function Investasi_ComponentCardPortofolio_NotPublish({
|
||||
data,
|
||||
path,
|
||||
}: {
|
||||
data: MODEL_INVESTASI;
|
||||
path: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_ComponentStylesCard
|
||||
onClickHandler={() => {
|
||||
router.push(path + data?.id);
|
||||
setVisible(true);
|
||||
}}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col span={8}>
|
||||
<Text fw={"bold"} lineClamp={1}>
|
||||
{" "}
|
||||
{_.startCase(data.title)}
|
||||
</Text>
|
||||
<Stack spacing={0}>
|
||||
<Text fz={10}>Target Dana:</Text>
|
||||
<Text>
|
||||
Rp.{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
maximumSignificantDigits: 10,
|
||||
}).format(+data.targetDana)}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Grid.Col>
|
||||
|
||||
<Grid.Col span={4}>
|
||||
<AspectRatio ratio={16 / 9}>
|
||||
<Paper radius={"md"}>
|
||||
<Image
|
||||
alt=""
|
||||
src={RouterInvestasi_OLD.api_gambar + `${data.imagesId}`}
|
||||
/>
|
||||
</Paper>
|
||||
</AspectRatio>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
{visible && <ComponentGlobal_CardLoadingOverlay />}
|
||||
</Investasi_ComponentStylesCard>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
import {
|
||||
NEW_RouterInvestasi,
|
||||
RouterInvestasi_OLD,
|
||||
} from "@/app/lib/router_hipmi/router_investasi";
|
||||
import {
|
||||
Grid,
|
||||
Stack,
|
||||
AspectRatio,
|
||||
Paper,
|
||||
Group,
|
||||
Box,
|
||||
Text,
|
||||
Image,
|
||||
} from "@mantine/core";
|
||||
import { IconCircleCheck, IconChecklist } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import { MODEL_INVESTASI } from "../../_lib/interface";
|
||||
import { Investasi_ComponentStylesCard } from "../comp_card_border_and_background";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { ComponentGlobal_CardLoadingOverlay } from "@/app_modules/_global/component";
|
||||
|
||||
export function Investasi_ComponentCardPortofolioPublish({
|
||||
data,
|
||||
}: {
|
||||
data: MODEL_INVESTASI;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_ComponentStylesCard
|
||||
marginBottom={"15px"}
|
||||
onClickHandler={() => {
|
||||
router.push(NEW_RouterInvestasi.detail_publish + data?.id);
|
||||
setVisible(true);
|
||||
}}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col span={8}>
|
||||
<Text fw={"bold"}> {_.capitalize(data?.title)}</Text>
|
||||
<Stack spacing={0}>
|
||||
<Text fz={10}>Target Dana:</Text>
|
||||
<Text>
|
||||
Rp.{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
maximumSignificantDigits: 10,
|
||||
}).format(+data?.targetDana)}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Grid.Col>
|
||||
|
||||
<Grid.Col span={4}>
|
||||
<AspectRatio ratio={16 / 9}>
|
||||
<Paper radius={"md"}>
|
||||
<Image
|
||||
alt=""
|
||||
src={NEW_RouterInvestasi.api_gambar + `${data?.imagesId}`}
|
||||
/>
|
||||
</Paper>
|
||||
</AspectRatio>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Group position="center" mt={"md"}>
|
||||
{Number(data?.MasterPencarianInvestor.name) -
|
||||
moment(new Date()).diff(new Date(data?.updatedAt), "days") <=
|
||||
0 ? (
|
||||
<Group position="right">
|
||||
<IconCircleCheck color="green" />
|
||||
<Text c={"green"}>Selesai</Text>
|
||||
</Group>
|
||||
) : (
|
||||
<Group
|
||||
position="center"
|
||||
style={{ fontSize: 10, fontWeight: "bold" }}
|
||||
>
|
||||
<Group>
|
||||
{Number(data?.MasterPencarianInvestor.name) -
|
||||
moment(new Date()).diff(new Date(data?.countDown), "days") <=
|
||||
0 ? (
|
||||
<Group>
|
||||
<IconChecklist />
|
||||
<Text>Selesai</Text>
|
||||
</Group>
|
||||
) : (
|
||||
<Box>
|
||||
Sisa Waktu : {}
|
||||
{Number(data?.MasterPencarianInvestor.name) -
|
||||
moment(new Date()).diff(
|
||||
new Date(data?.countDown),
|
||||
"days"
|
||||
)}{" "}
|
||||
hari
|
||||
</Box>
|
||||
)}
|
||||
</Group>
|
||||
</Group>
|
||||
)}
|
||||
</Group>
|
||||
{visible && <ComponentGlobal_CardLoadingOverlay />}
|
||||
</Investasi_ComponentStylesCard>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user