New repo mobile after delete ! #1

Merged
bagasbanuna merged 233 commits from api/24-oct-25 into main 2025-10-27 11:32:16 +08:00
260 changed files with 17427 additions and 974 deletions
Showing only changes of commit 54fc2a3d02 - Show all commits

View File

@@ -250,6 +250,13 @@ export default function UserLayout() {
}}
/>
<Stack.Screen
name="investment/[id]/(news)/add-news"
options={{
title: "Tambah Berita",
headerLeft: () => <BackButton />,
}}
/>
{/* ========== End Investment Section ========= */}

View File

@@ -0,0 +1,76 @@
import {
AlertDefaultSystem,
BackButton,
BaseBox,
DotButton,
DrawerCustom,
DummyLandscapeImage,
MenuDrawerDynamicGrid,
StackCustom,
TextCustom,
ViewWrapper
} from "@/components";
import { IconTrash } from "@/components/_Icon/IconTrash";
import { router, Stack, useLocalSearchParams } from "expo-router";
import { useState } from "react";
export default function InvestmentNews() {
const { id, news } = useLocalSearchParams();
const [openDrawer, setOpenDrawer] = useState(false);
return (
<>
<Stack.Screen
options={{
title: "Detail Berita",
headerLeft: () => <BackButton />,
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
}}
/>
<ViewWrapper>
<BaseBox>
<StackCustom>
<DummyLandscapeImage />
<TextCustom bold align="center" size="large">
Judul Berita {news} Terbaru
</TextCustom>
<TextCustom>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laborum
fuga mollitia laboriosam voluptatibus quos molestias, illo fugiat
esse repellat, ad officia earum numquam? Aliquid corrupti quam
tempora cum harum est!
</TextCustom>
</StackCustom>
</BaseBox>
</ViewWrapper>
<DrawerCustom
isVisible={openDrawer}
closeDrawer={() => setOpenDrawer(false)}
height={"auto"}
>
<MenuDrawerDynamicGrid
data={[
{
label: "Hapus Berita",
path: `/investment/${id}/add-news`,
icon: <IconTrash />,
color: "red",
},
]}
onPressItem={(item) => {
AlertDefaultSystem({
title: "Hapus Berita",
message: "Apakah Anda yakin ingin menghapus berita ini?",
textLeft: "Batal",
textRight: "Hapus",
onPressRight: () => {
router.back();
setOpenDrawer(false);
},
});
}}
/>
</DrawerCustom>
</>
);
}

View File

@@ -0,0 +1,53 @@
import {
ButtonCenteredOnly,
ButtonCustom,
InformationBox,
LandscapeFrameUploaded,
Spacing,
StackCustom,
TextAreaCustom,
TextInputCustom,
ViewWrapper,
} from "@/components";
import { router } from "expo-router";
export default function InvestmentAddNews() {
return (
<ViewWrapper>
<StackCustom gap={"xs"}>
<InformationBox text="Pengunggahan foto ke aplikasi bersifat opsional dan tidak diwajibkan, Anda dapat menyimpan berita tanpa mengunggah foto." />
<LandscapeFrameUploaded />
<ButtonCenteredOnly
onPress={() => {
router.push("/(application)/(image)/take-picture/123");
}}
icon="upload"
>
Upload
</ButtonCenteredOnly>
<Spacing />
<TextInputCustom
label="Judul Berita"
placeholder="Masukan judul berita"
required
/>
<TextAreaCustom
label="Deskripsi Berita"
placeholder="Masukan deskripsi berita"
required
showCount
maxLength={1000}
/>
<ButtonCustom
onPress={() => {
router.back();
}}
>
Simpan
</ButtonCustom>
</StackCustom>
<Spacing />
</ViewWrapper>
);
}

View File

@@ -0,0 +1,59 @@
import {
BackButton,
BaseBox,
DotButton,
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 InvestmentRecapOfNews() {
const { id } = useLocalSearchParams();
const [openDrawer, setOpenDrawer] = useState(false);
return (
<>
<Stack.Screen
options={{
title: "Rekap Berita",
headerLeft: () => <BackButton />,
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
}}
/>
<ViewWrapper>
{Array.from({ length: 15 }).map((_, index) => (
<BaseBox
key={index}
paddingBlock={5}
href={`/investment/${id}/(news)/${index + 1}`}
>
<TextCustom bold>Berita Terbaru {index + 1}</TextCustom>
</BaseBox>
))}
</ViewWrapper>
<DrawerCustom
isVisible={openDrawer}
closeDrawer={() => setOpenDrawer(false)}
height={"auto"}
>
<MenuDrawerDynamicGrid
data={[
{
label: "Tambah Berita",
path: `/investment/${id}/add-news`,
icon: <IconPlus />,
},
]}
onPressItem={(item) => {
router.push(item.path as any);
setOpenDrawer(false);
}}
/>
</DrawerCustom>
</>
);
}

View File

@@ -13,19 +13,22 @@ import {
TextCustom,
ViewWrapper,
} from "@/components";
import { IconEdit } from "@/components/_Icon";
import {
IconDocument,
IconEdit,
IconNews,
IconProspectus,
} from "@/components/_Icon";
import { IMenuDrawerItem } from "@/components/_Interface/types";
import { AccentColor, MainColor } from "@/constants/color-palet";
import { ICON_SIZE_MEDIUM, ICON_SIZE_SMALL } from "@/constants/constans-value";
import { listDataNotPublish } from "@/lib/dummy-data/investment/dummy-data-not-publish";
import { ICON_SIZE_MEDIUM } from "@/constants/constans-value";
import {
listDataNotPublishInvesment,
listDataPublishInvesment,
} from "@/lib/dummy-data/investment/dummy-data-not-publish";
import BoxDetailDataSection from "@/screens/Invesment/BoxDetailDataSection";
import Investment_ButtonStatusSection from "@/screens/Invesment/ButtonStatusSection";
import {
AntDesign,
FontAwesome6,
Ionicons,
MaterialIcons,
} from "@expo/vector-icons";
import { AntDesign, MaterialIcons } from "@expo/vector-icons";
import { router, Stack, useLocalSearchParams } from "expo-router";
import _ from "lodash";
import { useState } from "react";
@@ -58,11 +61,7 @@ export default function InvestmentDetailStatus() {
<StackCustom>
<TextCustom align="center">Prospektus</TextCustom>
<CenterCustom>
<FontAwesome6
name="file-contract"
size={50}
color={MainColor.white}
/>
<IconProspectus size={50} color={MainColor.white} />
</CenterCustom>
</StackCustom>
</BaseBox>
@@ -77,11 +76,7 @@ export default function InvestmentDetailStatus() {
<StackCustom>
<TextCustom align="center">Dokumen</TextCustom>
<CenterCustom>
<FontAwesome6
name="file-lines"
size={50}
color={MainColor.white}
/>
<IconDocument size={50} color={MainColor.white} />
</CenterCustom>
</StackCustom>
</BaseBox>
@@ -114,7 +109,11 @@ export default function InvestmentDetailStatus() {
</BaseBox>
)}
<BoxDetailDataSection
data={listDataNotPublish}
data={
status === "publish"
? listDataPublishInvesment
: listDataNotPublishInvesment
}
bottomSection={bottomSection}
/>
<Investment_ButtonStatusSection status={status as string} />
@@ -172,29 +171,16 @@ export default function InvestmentDetailStatus() {
<MenuDrawerDynamicGrid
data={[
{
icon: (
<FontAwesome6
name="file-lines"
size={ICON_SIZE_SMALL}
color={MainColor.white}
/>
),
icon: <IconDocument />,
label: "Update Dokumen",
path: `/investment/${id}/recap-of-document`,
},
{
icon: (
<Ionicons
name="newspaper-outline"
size={ICON_SIZE_MEDIUM}
color={MainColor.white}
/>
),
icon: <IconNews />,
label: "Update Berita",
path: `/investment/${id}/edit`,
path: `/investment/${id}/(news)/recap-of-news`,
},
]}
columns={4}
onPressItem={handlePressPublish as any}
/>
</DrawerCustom>

View File

@@ -0,0 +1,25 @@
import { FontAwesome6, MaterialIcons } from "@expo/vector-icons";
import { ICON_SIZE_MEDIUM } from "@/constants/constans-value";
import { MainColor } from "@/constants/color-palet";
export { IconDocument, IconDocumentEdit };
function IconDocument({ color, size }: { color?: string; size?: number }) {
return (
<FontAwesome6
name="file-lines"
size={size || ICON_SIZE_MEDIUM}
color={color || MainColor.white}
/>
);
}
function IconDocumentEdit({ color, size }: { color?: string; size?: number }) {
return (
<MaterialIcons
name="edit-document"
size={size || ICON_SIZE_MEDIUM}
color={color || MainColor.white}
/>
);
}

View File

@@ -0,0 +1,15 @@
import { MainColor } from "@/constants/color-palet";
import { ICON_SIZE_MEDIUM } from "@/constants/constans-value";
import { MaterialIcons } from "@expo/vector-icons";
export { IconNews };
function IconNews({ color, size }: { color?: string; size?: number }) {
return (
<MaterialIcons
name="newspaper"
size={size || ICON_SIZE_MEDIUM}
color={color || MainColor.white}
/>
);
}

View File

@@ -0,0 +1,15 @@
import { MainColor } from "@/constants/color-palet";
import { ICON_SIZE_MEDIUM } from "@/constants/constans-value";
import { Octicons } from "@expo/vector-icons";
export { IconPlus };
function IconPlus({ color, size }: { color?: string; size?: number }) {
return (
<Octicons
name="plus-circle"
size={size || ICON_SIZE_MEDIUM}
color={color || MainColor.white}
/>
);
}

View File

@@ -0,0 +1,21 @@
import { MainColor } from "@/constants/color-palet";
import { ICON_SIZE_MEDIUM } from "@/constants/constans-value";
import { FontAwesome6, MaterialIcons } from "@expo/vector-icons";
export { IconProspectus , IconProspectusEdit};
function IconProspectus({ color, size }: { color?: string; size?: number }) {
return (
<FontAwesome6 name="file-contract" size={size || ICON_SIZE_MEDIUM} color={color || MainColor.white} />
);
}
function IconProspectusEdit({ color, size }: { color?: string; size?: number }) {
return (
<MaterialIcons
name="edit-note"
size={size || ICON_SIZE_MEDIUM}
color={color || MainColor.white}
/>
);
}

View File

@@ -0,0 +1,15 @@
import { MainColor } from "@/constants/color-palet";
import { ICON_SIZE_MEDIUM } from "@/constants/constans-value";
import { Ionicons } from "@expo/vector-icons";
export { IconTrash };
function IconTrash({ color, size }: { color?: string; size?: number }) {
return (
<Ionicons
name="trash"
size={size || ICON_SIZE_MEDIUM}
color={color || MainColor.white}
/>
);
}

View File

@@ -4,6 +4,10 @@ import IconHistory from "./IconHistory";
import IconHome from "./IconHome";
import IconStatus from "./IconStatus";
import IconArchive from "./IconArchive";
import { IconProspectus, IconProspectusEdit } from "./IconProspectus";
import { IconDocument, IconDocumentEdit } from "./IconDocument";
import { IconNews } from "./IconNews";
import { IconPlus } from "./IconPlus";
export {
IconContribution,
@@ -12,4 +16,14 @@ export {
IconHome,
IconStatus,
IconArchive,
// Prospectus
IconProspectus,
IconProspectusEdit,
// Document
IconDocument,
IconDocumentEdit,
// News
IconNews,
// Plus
IconPlus,
};

View File

@@ -1,4 +1,6 @@
const listDataNotPublish = [
export {listDataNotPublishInvesment, listDataPublishInvesment};
const listDataNotPublishInvesment = [
{
label: "Target Dana",
value: "Rp. 7.500.000",
@@ -29,4 +31,41 @@ const listDataNotPublish = [
},
];
export {listDataNotPublish};
const listDataPublishInvesment = [
{
label: "Investor",
value: "10",
},
{
label: "Target Dana",
value: "Rp. 7.500.000",
},
{
label: "Harga Per Lembar",
value: "Rp. 2.400",
},
{
label: "Return Of Investment (ROI)",
value: "3 %",
},
{
label: "Total Lembar",
value: "1.200",
},
{
label: "Sisa Lembar",
value: "600",
},
{
label: "Jadwal Pembagian",
value: "Rp. 2.880.000",
},
{
label: "Pembagian Deviden",
value: "Selamanya",
},
{
label: "Pencarian Investor",
value: "30 Hari",
},
];

View File

@@ -24,7 +24,7 @@ export default function BoxDetailDataSection({
<DummyLandscapeImage />
<Spacing />
<TextCustom align="center" size="xlarge" bold>
{title || "Title of Investment"}
{title || "Judul Investasi"}
</TextCustom>
<Spacing />