Investment

Add:
- screens/Invesment/DetailDataPublishSection.tsx
- screens/Invesment/BoxProgressSection.tsx
- app/(application)/(user)/investment/[id]/(transaction-flow)

## No Issue
This commit is contained in:
2025-07-31 15:45:07 +08:00
parent 7205cb0736
commit 2931f6ba55
7 changed files with 229 additions and 45 deletions

View File

@@ -0,0 +1,16 @@
import { BaseBox, StackCustom, TextCustom, ProgressCustom } from "@/components";
export default function Invesment_BoxProgressSection({status}: {status: string}) {
return (
<>
{status === "publish" && (
<BaseBox>
<StackCustom>
<TextCustom bold>Progress Saham</TextCustom>
<ProgressCustom value={70} size="lg" />
</StackCustom>
</BaseBox>
)}
</>
);
}

View File

@@ -1,14 +1,23 @@
import { ButtonCustom } from "@/components";
import { router } from "expo-router";
export default function Investment_ButtonInvestasiSection({
id,
isMine,
}: {
id: string;
isMine: boolean;
}) {
return (
<>
{isMine ? (
<ButtonCustom>Beli Saham</ButtonCustom>
<ButtonCustom
onPress={() => {
router.navigate(`/investment/${id}/(transaction-flow)`);
}}
>
Beli Saham
</ButtonCustom>
) : (
<ButtonCustom disabled>Investasi Ini Milik Anda</ButtonCustom>
)}

View File

@@ -0,0 +1,35 @@
import { Spacing, StackCustom } from "@/components";
import { listDataNotPublishInvesment, listDataPublishInvesment } from "@/lib/dummy-data/investment/dummy-data-not-publish";
import React from "react";
import Invesment_BoxDetailDataSection from "./BoxDetailDataSection";
import Invesment_BoxProgressSection from "./BoxProgressSection";
import Investment_ButtonStatusSection from "./ButtonStatusSection";
export default function Invesment_DetailDataPublishSection({
status,
bottomSection,
buttonSection,
}: {
status: string;
bottomSection: React.ReactNode;
buttonSection: React.ReactNode
}) {
return (
<>
<StackCustom gap={"sm"}>
<Invesment_BoxProgressSection status={status as string} />
<Invesment_BoxDetailDataSection
data={
status === "publish"
? listDataPublishInvesment
: listDataNotPublishInvesment
}
bottomSection={bottomSection}
/>
<Investment_ButtonStatusSection status={status as string} />
{buttonSection}
</StackCustom>
<Spacing />
</>
);
}