Invesment
Fix: - tampilan list data bada beranda dan detail data main ### No Issue
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import {
|
||||
AvatarUsernameAndOtherComponent,
|
||||
BaseBox,
|
||||
BoxWithHeaderSection,
|
||||
DummyLandscapeImage,
|
||||
Grid,
|
||||
Spacing,
|
||||
@@ -10,19 +12,30 @@ import { View } from "react-native";
|
||||
|
||||
export default function Invesment_BoxDetailDataSection({
|
||||
title,
|
||||
author,
|
||||
imageId,
|
||||
data,
|
||||
bottomSection,
|
||||
}: {
|
||||
title?: string;
|
||||
author?: any;
|
||||
imageId?: string;
|
||||
data: any;
|
||||
bottomSection?: React.ReactNode;
|
||||
}) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<BaseBox paddingBottom={0}>
|
||||
<BoxWithHeaderSection>
|
||||
<StackCustom gap={"xs"}>
|
||||
{author && (
|
||||
<AvatarUsernameAndOtherComponent
|
||||
avatar={author?.Profile?.imageId}
|
||||
name={author?.username}
|
||||
rightComponent={""}
|
||||
withBottomLine={true}
|
||||
/>
|
||||
)}
|
||||
<DummyLandscapeImage imageId={imageId} />
|
||||
<Spacing />
|
||||
<TextCustom align="center" size="xlarge" bold>
|
||||
@@ -46,7 +59,7 @@ export default function Invesment_BoxDetailDataSection({
|
||||
<Spacing />
|
||||
{bottomSection}
|
||||
</StackCustom>
|
||||
</BaseBox>
|
||||
</BoxWithHeaderSection>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { BaseBox, StackCustom, TextCustom, ProgressCustom } from "@/components";
|
||||
|
||||
export default function Invesment_BoxProgressSection({status}: {status: string}) {
|
||||
export default function Invesment_BoxProgressSection({progress, status}: {progress: number, status: string}) {
|
||||
return (
|
||||
<>
|
||||
{status === "publish" && (
|
||||
<BaseBox>
|
||||
<StackCustom>
|
||||
<TextCustom bold>Progress Saham</TextCustom>
|
||||
<ProgressCustom value={70} size="lg" />
|
||||
<ProgressCustom label={progress + "%"} value={progress} size="lg" />
|
||||
</StackCustom>
|
||||
</BaseBox>
|
||||
)}
|
||||
|
||||
@@ -8,9 +8,12 @@ export default function Investment_ButtonInvestasiSection({
|
||||
id: string;
|
||||
isMine: boolean;
|
||||
}) {
|
||||
console.log("[IS MINE]", isMine);
|
||||
return (
|
||||
<>
|
||||
{isMine ? (
|
||||
<ButtonCustom disabled>Investasi Ini Milik Anda</ButtonCustom>
|
||||
) : (
|
||||
<ButtonCustom
|
||||
onPress={() => {
|
||||
router.navigate(`/investment/${id}/(transaction-flow)`);
|
||||
@@ -18,8 +21,6 @@ export default function Investment_ButtonInvestasiSection({
|
||||
>
|
||||
Beli Saham
|
||||
</ButtonCustom>
|
||||
) : (
|
||||
<ButtonCustom disabled>Investasi Ini Milik Anda</ButtonCustom>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,6 @@ export default function Invesment_ComponentBoxOnBottomDetail({
|
||||
prospectusId: string;
|
||||
status: string;
|
||||
}) {
|
||||
|
||||
return (
|
||||
<>
|
||||
{status === "publish" ? (
|
||||
@@ -28,7 +27,7 @@ export default function Invesment_ComponentBoxOnBottomDetail({
|
||||
<BaseBox
|
||||
backgroundColor={AccentColor.blue}
|
||||
style={{ borderColor: AccentColor.softblue, borderWidth: 1 }}
|
||||
href={`/(file)/${id}`}
|
||||
href={`/(file)/${prospectusId}`}
|
||||
>
|
||||
<StackCustom>
|
||||
<TextCustom align="center">Prospektus</TextCustom>
|
||||
|
||||
@@ -19,13 +19,14 @@ export default function Invesment_DetailDataPublishSection({
|
||||
bottomSection?: React.ReactNode;
|
||||
buttonSection?: React.ReactNode;
|
||||
}) {
|
||||
// console.log("[DATA DETAIL]", JSON.stringify(data, null, 2));
|
||||
|
||||
return (
|
||||
<>
|
||||
<StackCustom gap={"sm"}>
|
||||
<Invesment_BoxProgressSection status={status as string} />
|
||||
<Invesment_BoxProgressSection progress={data?.progress} status={status as string} />
|
||||
<Invesment_BoxDetailDataSection
|
||||
title={data?.title}
|
||||
author={data?.author}
|
||||
imageId={data?.imageId}
|
||||
data={
|
||||
status === "publish"
|
||||
|
||||
Reference in New Issue
Block a user