diff --git a/app/(application)/(user)/_layout.tsx b/app/(application)/(user)/_layout.tsx index 04c1030..6276237 100644 --- a/app/(application)/(user)/_layout.tsx +++ b/app/(application)/(user)/_layout.tsx @@ -258,6 +258,14 @@ export default function UserLayout() { }} /> + , + }} + /> + {/* ========== End Investment Section ========= */} {/* ========== Donation Section ========= */} diff --git a/app/(application)/(user)/investment/[id]/(news)/list-of-news.tsx b/app/(application)/(user)/investment/[id]/(news)/list-of-news.tsx new file mode 100644 index 0000000..aa0ddb8 --- /dev/null +++ b/app/(application)/(user)/investment/[id]/(news)/list-of-news.tsx @@ -0,0 +1,58 @@ +import { + BackButton, + BaseBox, + DrawerCustom, + MenuDrawerDynamicGrid, + TextCustom, + ViewWrapper +} from "@/components"; +import { IconPlus } from "@/components/_Icon"; +import { router, Stack, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; + +export default function InvestmentListOfNews() { + const { id } = useLocalSearchParams(); + const [openDrawer, setOpenDrawer] = useState(false); + return ( + <> + , + // headerRight: () => setOpenDrawer(true)} />, + }} + /> + + {Array.from({ length: 15 }).map((_, index) => ( + + Berita Terbaru {index + 1} + + ))} + + + setOpenDrawer(false)} + height={"auto"} + > + , + }, + ]} + onPressItem={(item) => { + router.push(item.path as any); + setOpenDrawer(false); + }} + /> + + + ); +} diff --git a/app/(application)/(user)/investment/[id]/[status]/detail.tsx b/app/(application)/(user)/investment/[id]/[status]/detail.tsx index 746a1da..6a0374d 100644 --- a/app/(application)/(user)/investment/[id]/[status]/detail.tsx +++ b/app/(application)/(user)/investment/[id]/[status]/detail.tsx @@ -1,33 +1,27 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import { - BackButton, - BaseBox, - CenterCustom, - DotButton, - DrawerCustom, - Grid, - MenuDrawerDynamicGrid, - ProgressCustom, - Spacing, - StackCustom, - TextCustom, - ViewWrapper, + BackButton, + BaseBox, + DotButton, + DrawerCustom, + MenuDrawerDynamicGrid, + ProgressCustom, + Spacing, + StackCustom, + TextCustom, + ViewWrapper } from "@/components"; -import { - IconDocument, - IconEdit, - IconNews, - IconProspectus, -} from "@/components/_Icon"; +import { IconDocument, IconEdit, IconNews } from "@/components/_Icon"; import { IMenuDrawerItem } from "@/components/_Interface/types"; -import { AccentColor, MainColor } from "@/constants/color-palet"; +import { MainColor } from "@/constants/color-palet"; import { ICON_SIZE_MEDIUM } from "@/constants/constans-value"; import { - listDataNotPublishInvesment, - listDataPublishInvesment, + listDataNotPublishInvesment, + listDataPublishInvesment, } from "@/lib/dummy-data/investment/dummy-data-not-publish"; -import BoxDetailDataSection from "@/screens/Invesment/BoxDetailDataSection"; +import Invesment_BoxDetailDataSection from "@/screens/Invesment/BoxDetailDataSection"; +import Investment_ButtonInvestasiSection from "@/screens/Invesment/ButtonInvestasiSection"; import Investment_ButtonStatusSection from "@/screens/Invesment/ButtonStatusSection"; +import Invesment_ComponentBoxOnBottomDetail from "@/screens/Invesment/ComponentBoxOnBottomDetail"; import { AntDesign, MaterialIcons } from "@expo/vector-icons"; import { router, Stack, useLocalSearchParams } from "expo-router"; import _ from "lodash"; @@ -51,37 +45,10 @@ export default function InvestmentDetailStatus() { }; const bottomSection = ( - - - - - Prospektus - - - - - - - - - - - Dokumen - - - - - - - + ); return ( @@ -98,6 +65,7 @@ export default function InvestmentDetailStatus() { ) : null, }} /> + {status === "publish" && ( @@ -108,7 +76,7 @@ export default function InvestmentDetailStatus() { )} - - + + {/* ========= Draft Drawer ========= */} diff --git a/app/(application)/(user)/investment/[id]/investor.tsx b/app/(application)/(user)/investment/[id]/investor.tsx new file mode 100644 index 0000000..703d954 --- /dev/null +++ b/app/(application)/(user)/investment/[id]/investor.tsx @@ -0,0 +1,21 @@ +import { + AvatarUsernameAndOtherComponent, + BoxWithHeaderSection, + TextCustom, + ViewWrapper, +} from "@/components"; + +export default function InvestmentInvestor() { + return ( + <> + + {Array.from({ length: 10 }).map((_, index) => ( + + + Rp. 7.000.000 + + ))} + + + ); +} diff --git a/components/Grid/GridCustom.tsx b/components/Grid/GridCustom.tsx index 6df544a..08d276b 100644 --- a/components/Grid/GridCustom.tsx +++ b/components/Grid/GridCustom.tsx @@ -90,8 +90,8 @@ const Col: React.FC = ({ children, span, style }) => { col: { flexBasis: `${(100 / columns) * colSpan}%`, paddingVertical: margin, - // marginBottom: gap, - marginBlock: gap, + marginBottom: gap, + // marginBlock: gap, }, }); diff --git a/screens/Invesment/BoxDetailDataSection.tsx b/screens/Invesment/BoxDetailDataSection.tsx index 1783b14..ad07378 100644 --- a/screens/Invesment/BoxDetailDataSection.tsx +++ b/screens/Invesment/BoxDetailDataSection.tsx @@ -8,7 +8,7 @@ import { } from "@/components"; import { View } from "react-native"; -export default function BoxDetailDataSection({ +export default function Invesment_BoxDetailDataSection({ title, data, bottomSection, @@ -41,7 +41,7 @@ export default function BoxDetailDataSection({ ))} - + {bottomSection} diff --git a/screens/Invesment/ButtonInvestasiSection.tsx b/screens/Invesment/ButtonInvestasiSection.tsx new file mode 100644 index 0000000..1a7aa9f --- /dev/null +++ b/screens/Invesment/ButtonInvestasiSection.tsx @@ -0,0 +1,17 @@ +import { ButtonCustom } from "@/components"; + +export default function Investment_ButtonInvestasiSection({ + isMine, +}: { + isMine: boolean; +}) { + return ( + <> + {isMine ? ( + Beli Saham + ) : ( + Investasi Ini Milik Anda + )} + + ); +} diff --git a/screens/Invesment/ComponentBoxOnBottomDetail.tsx b/screens/Invesment/ComponentBoxOnBottomDetail.tsx new file mode 100644 index 0000000..2e4a3ea --- /dev/null +++ b/screens/Invesment/ComponentBoxOnBottomDetail.tsx @@ -0,0 +1,126 @@ +import { + BaseBox, + CenterCustom, + Grid, + StackCustom, + TextCustom, +} from "@/components"; +import { IconDocument, IconNews, IconProspectus } from "@/components/_Icon"; +import { AccentColor, MainColor } from "@/constants/color-palet"; +import { Ionicons } from "@expo/vector-icons"; + +export default function Invesment_ComponentBoxOnBottomDetail({ + id, + status, +}: { + id: string; + status: string; +}) { + return ( + <> + {status === "publish" ? ( + <> + + + + + Prospektus + + + + + + + + + + + Dokumen + + + + + + + + + + + + + Investor + + + + + + + + + + + Berita + + + + + + + + + ) : ( + + + + + Prospektus + + + + + + + + + + + Dokumen + + + + + + + + )} + + ); +}