diff --git a/app.json b/app.json index a3e8560..d60b54e 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,6 @@ { "expo": { - "name": "hipmi-mobile", + "name": "HIPMI BADUNG", "slug": "hipmi-mobile", "version": "1.0.0", "orientation": "portrait", @@ -38,7 +38,16 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" } - ] + ], + [ + "expo-camera", + { + "cameraPermission": "Allow $(PRODUCT_NAME) to access your camera", + "microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone", + "recordAudioAndroid": true + } + ], + "expo-font" ], "experiments": { "typedRoutes": true diff --git a/app/(application)/(image)/preview-image/[id]/index.tsx b/app/(application)/(image)/preview-image/[id]/index.tsx new file mode 100644 index 0000000..199ed15 --- /dev/null +++ b/app/(application)/(image)/preview-image/[id]/index.tsx @@ -0,0 +1,9 @@ +import { LandscapeFrameUploaded, ViewWrapper } from "@/components"; + +export default function PreviewImage() { + return ( + + + + ); +} diff --git a/app/(application)/(image)/take-picture/[id]/index.tsx b/app/(application)/(image)/take-picture/[id]/index.tsx new file mode 100644 index 0000000..fd56052 --- /dev/null +++ b/app/(application)/(image)/take-picture/[id]/index.tsx @@ -0,0 +1,171 @@ +import { + ButtonCustom, + Spacing, + StackCustom, + ViewWrapper +} from "@/components"; +import AntDesign from "@expo/vector-icons/AntDesign"; +import FontAwesome6 from "@expo/vector-icons/FontAwesome6"; +import { CameraType, CameraView, useCameraPermissions } from "expo-camera"; +import { Image } from "expo-image"; +import * as ImagePicker from "expo-image-picker"; +import { router, useLocalSearchParams } from "expo-router"; +import { useRef, useState } from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; + +export default function TakePicture() { + const { id } = useLocalSearchParams(); +// console.log("Take Picture ID >>", id); + + const [permission, requestPermission] = useCameraPermissions(); + const ref = useRef(null); + const [uri, setUri] = useState(null); + const [facing, setFacing] = useState("back"); + + if (!permission?.granted) { + return ( + + + We need your permission to use the camera + + + Grant permission + + + ); + } + + const takePicture = async () => { + const photo = await ref.current?.takePictureAsync(); + setUri(photo?.uri || null); + }; + + const pickImage = async () => { + const result = await ImagePicker.launchImageLibraryAsync({ + mediaTypes: ImagePicker.MediaTypeOptions.Images, + allowsEditing: true, + aspect: [1, 1], + quality: 1, + }); + + if (!result.canceled) { + setUri(result.assets[0].uri); + } + }; + + const toggleFacing = () => { + setFacing((prev) => (prev === "back" ? "front" : "back")); + }; + + const renderPicture = () => { + return ( + + + + + + setUri(null)} title="Foto ulang" /> + { + console.log("Upload picture >>", id); + router.back(); + }} + title="Upload Foto" + /> + + + ); + }; + + const renderCameraUI = () => { + return ( + + + + + + + + {({ pressed }) => ( + + + + )} + + + + + + + + ); + }; + + return ( + <> + {uri ? ( + + {renderPicture()} + + ) : ( + <> + + {renderCameraUI()} + + )} + + ); +} + +const styles = StyleSheet.create({ + container: { + justifyContent: "center", + alignItems: "center", + }, + camera: { + flex: 1, + width: "100%", + }, + cameraOverlay: { + ...StyleSheet.absoluteFillObject, + justifyContent: "flex-end", + padding: 44, + }, + shutterContainer: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + }, + shutterBtn: { + backgroundColor: "transparent", + borderWidth: 5, + borderColor: "white", + width: 85, + height: 85, + borderRadius: 45, + alignItems: "center", + justifyContent: "center", + }, + shutterBtnInner: { + width: 70, + height: 70, + borderRadius: 50, + backgroundColor: "white", + }, +}); diff --git a/app/(application)/(user)/_layout.tsx b/app/(application)/(user)/_layout.tsx new file mode 100644 index 0000000..a9b838f --- /dev/null +++ b/app/(application)/(user)/_layout.tsx @@ -0,0 +1,202 @@ +import { BackButton } from "@/components"; +import LeftButtonCustom from "@/components/Button/BackButton"; +import { MainColor } from "@/constants/color-palet"; +import { HeaderStyles } from "@/styles/header-styles"; +import { Ionicons } from "@expo/vector-icons"; +import { router, Stack } from "expo-router"; + +export default function UserLayout() { + return ( + <> + + ( + router.push("/user-search")} + /> + ), + headerRight: () => ( + router.push("/notifications")} + /> + ), + }} + /> + + {/* ========== Profile Section ========= */} + + + {/* ========== Portofolio Section ========= */} + + + {/* ========== User Search Section ========= */} + , + }} + /> + + {/* ========== Notification Section ========= */} + , + }} + /> + + {/* ========== Event Section ========= */} + ( + + ), + }} + /> + , + }} + /> + + , + }} + /> + + , + }} + /> + + {/* ========== Forum Section ========= */} + , + }} + /> + , + }} + /> + , + }} + /> + , + }} + /> + , + }} + /> + , + }} + /> + , + }} + /> + , + }} + /> + + {/* ========== Maps Section ========= */} + , + }} + /> + , + }} + /> + , + }} + /> + , + }} + /> + + {/* ========== Marketplace Section ========= */} + , + }} + /> + + + ); +} diff --git a/app/(application)/(user)/event/(tabs)/_layout.tsx b/app/(application)/(user)/event/(tabs)/_layout.tsx new file mode 100644 index 0000000..cf404cd --- /dev/null +++ b/app/(application)/(user)/event/(tabs)/_layout.tsx @@ -0,0 +1,81 @@ +import { AccentColor, MainColor } from "@/constants/color-palet"; +import { OS_IOS_HEIGHT, OS_ANDROID_HEIGHT } from "@/constants/constans-value"; +import { FontAwesome5, Ionicons } from "@expo/vector-icons"; +import { Tabs } from "expo-router"; +import { Platform, View } from "react-native"; + +export default function EventLayout() { + return ( + + ( + + ), + }} + /> + ( + + ), + }} + /> + ( + + ), + }} + /> + ( + + ), + }} + /> + + ); +} + +function CustomTabBarBackground() { + return ( + + ); +} diff --git a/app/(application)/(user)/event/(tabs)/index.tsx b/app/(application)/(user)/event/(tabs)/index.tsx new file mode 100644 index 0000000..8de5b10 --- /dev/null +++ b/app/(application)/(user)/event/(tabs)/index.tsx @@ -0,0 +1,43 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + AvatarUsernameAndOtherComponent, + BaseBox, + StackCustom, + TextCustom, +} from "@/components"; +import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; +import FloatingButton from "@/components/Button/FloatingButton"; +import { router } from "expo-router"; + +export default function Event() { + const index = "test-id-event"; + const status = "publish"; + return ( + router.push("/event/create")} /> + } + > + {Array.from({ length: 10 }).map((_, index) => ( + + + + + Lorem ipsum dolor sit + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro sed + doloremque tempora soluta. Dolorem ex quidem ipsum tempora, ipsa, + obcaecati quia suscipit numquam, voluptates commodi porro impedit + natus quos doloremque! + + + + ))} + + ); +} diff --git a/app/(application)/(user)/event/(tabs)/kontribusi.tsx b/app/(application)/(user)/event/(tabs)/kontribusi.tsx new file mode 100644 index 0000000..5d52015 --- /dev/null +++ b/app/(application)/(user)/event/(tabs)/kontribusi.tsx @@ -0,0 +1,46 @@ +import { + AvatarCustom, + AvatarUsernameAndOtherComponent, + BaseBox, + Grid, + StackCustom, + TextCustom, + ViewWrapper +} from "@/components"; + +export default function Kontribusi() { + return ( + + {Array.from({ length: 10 }).map((_, index) => ( + + + + {new Date().toDateString().split(" ")[2] + + ", " + + new Date().toDateString().split(" ")[1] + + " " + + new Date().toDateString().split(" ")[3]} + + } + /> + + + Judul Event Disini + + + + {Array.from({ length: 4 }).map((_, index2) => ( + + + + ))} + + + + ))} + + ); +} diff --git a/app/(application)/(user)/event/(tabs)/riwayat.tsx b/app/(application)/(user)/event/(tabs)/riwayat.tsx new file mode 100644 index 0000000..f3cde8a --- /dev/null +++ b/app/(application)/(user)/event/(tabs)/riwayat.tsx @@ -0,0 +1,11 @@ +import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; +import { GStyles } from "@/styles/global-styles"; +import { Text } from "react-native"; + +export default function Riwayat() { + return ( + + Riwayat + + ); +} diff --git a/app/(application)/(user)/event/(tabs)/status.tsx b/app/(application)/(user)/event/(tabs)/status.tsx new file mode 100644 index 0000000..7d48aeb --- /dev/null +++ b/app/(application)/(user)/event/(tabs)/status.tsx @@ -0,0 +1,63 @@ +import { + BaseBox, + Grid, + ScrollableCustom, + StackCustom, + TextCustom, +} from "@/components"; +import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; +import { masterStatus } from "@/lib/dummy-data/_master/status"; +import { useState } from "react"; + +export default function Status() { + const id = "test-id-event"; + + const [activeCategory, setActiveCategory] = useState( + "publish" + ); + + const handlePress = (item: any) => { + setActiveCategory(item.value); + // tambahkan logika lain seperti filter dsb. + }; + + const scrollComponent = ( + ({ + id: i, + label: e.label, + value: e.value, + }))} + onButtonPress={handlePress} + activeId={activeCategory as any} + /> + ); + + return ( + + + + + + + Lorem ipsum,{" "} + {activeCategory} dolor + sit amet consectetur adipisicing elit. + + + + {new Date().toLocaleDateString()} + + + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur + eveniet ab eum ducimus tempore a quia deserunt quisquam. Tempora, + atque. Aperiam minima asperiores dicta perferendis quis adipisci, + dolore optio porro! + + + + + ); +} diff --git a/app/(application)/(user)/event/[id]/[status]/detail-event.tsx b/app/(application)/(user)/event/[id]/[status]/detail-event.tsx new file mode 100644 index 0000000..45f8b46 --- /dev/null +++ b/app/(application)/(user)/event/[id]/[status]/detail-event.tsx @@ -0,0 +1,117 @@ +import { + BaseBox, + DotButton, + DrawerCustom, + Grid, + MenuDrawerDynamicGrid, + Spacing, + StackCustom, + TextCustom, + ViewWrapper, +} from "@/components"; +import { IMenuDrawerItem } from "@/components/_Interface/types"; +import LeftButtonCustom from "@/components/Button/BackButton"; +import Event_AlertButtonStatusSection from "@/screens/Event/AlertButtonStatusSection"; +import Event_ButtonStatusSection from "@/screens/Event/ButtonStatusSection"; +import { menuDrawerDraftEvent } from "@/screens/Event/menuDrawerDraft"; +import { router, Stack, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; + +export default function EventDetail() { + const { id, status } = useLocalSearchParams(); + const [openDrawer, setOpenDrawer] = useState(false); + const [openAlert, setOpenAlert] = useState(false); + const [openDeleteAlert, setOpenDeleteAlert] = useState(false); + + const handlePress = (item: IMenuDrawerItem) => { + console.log("PATH >> ", item.path); + router.navigate(item.path as any); + setOpenDrawer(false); + }; + + return ( + <> + , + headerRight: () => + status === "draft" ? ( + setOpenDrawer(true)} /> + ) : null, + }} + /> + + + + + Judul event {status} + + {listData.map((item, index) => ( + + + {item.title} + + + {item.value} + + + ))} + + + + + + + setOpenDrawer(false)} + height={250} + > + + + + + + ); +} + +const listData = [ + { + title: "Lokasi", + value: + "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur eveniet ab eum ducimus tempore a quia deserunt quisquam. Tempora, atque. Aperiam minima asperiores dicta perferendis quis adipisci, dolore optio porro!", + }, + { + title: "Tipe Acara", + value: "Workshop", + }, + { + title: "Tanggal Mulai", + value: "Senin, 18 Juli 2025, 10:00 WIB", + }, + { + title: "Tanggal Berakhir", + value: "Selasa, 19 Juli 2025, 12:00 WIB", + }, + { + title: "Deskripsi", + value: + "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur eveniet ab eum ducimus tempore a quia deserunt quisquam. Tempora, atque. Aperiam minima asperiores dicta perferendis quis adipisci, dolore optio porro!", + }, +]; diff --git a/app/(application)/(user)/event/[id]/edit.tsx b/app/(application)/(user)/event/[id]/edit.tsx new file mode 100644 index 0000000..316e8ef --- /dev/null +++ b/app/(application)/(user)/event/[id]/edit.tsx @@ -0,0 +1,13 @@ +import { StackCustom, TextCustom, ViewWrapper } from "@/components"; + +export default function EventEdit() { + return ( + <> + + + Edit Event + + + + ); +} diff --git a/app/(application)/(user)/event/create.tsx b/app/(application)/(user)/event/create.tsx new file mode 100644 index 0000000..030c7d4 --- /dev/null +++ b/app/(application)/(user)/event/create.tsx @@ -0,0 +1,103 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + SelectCustom, + StackCustom, + TextAreaCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import DateTimePickerCustom from "@/components/DateInput/DateTimePickerCustom"; +import { masterTypeEvent } from "@/lib/dummy-data/event/master-type-event"; +import { DateTimePickerEvent } from "@react-native-community/datetimepicker"; +import React, { useState } from "react"; +import { Platform } from "react-native"; + +export default function EventCreate() { + const [selectedDate, setSelectedDate] = useState< + Date | DateTimePickerEvent | null + >(null); + + const [selectedEndDate, setSelectedEndDate] = useState< + Date | DateTimePickerEvent | null + >(null); + + const handlerSubmit = () => { + if (selectedDate) { + console.log("Tanggal yang dipilih:", selectedDate); + console.log(`ISO Format ${Platform.OS}:`, selectedDate.toString()); + // Kirim ke API atau proses lanjutan + } else { + console.warn("Tanggal belum dipilih"); + } + + if (selectedEndDate) { + console.log("Tanggal yang dipilih:", selectedEndDate); + console.log(`ISO Format ${Platform.OS}:`, selectedEndDate.toString()); + // Kirim ke API atau proses lanjutan + } else { + console.warn("Tanggal belum dipilih"); + } + }; + + const buttonSubmit = ( + + // + // + ); + + return ( + <> + + + + console.log(value)} + /> + + + { + setSelectedDate(date as any); + }} + value={selectedDate as any} + minimumDate={new Date(Date.now())} + /> + + { + setSelectedEndDate(date as any); + }} + value={selectedEndDate as any} + /> + + + + {buttonSubmit} + + + + + ); +} diff --git a/app/(application)/(user)/event/detail/[id].tsx b/app/(application)/(user)/event/detail/[id].tsx new file mode 100644 index 0000000..372530f --- /dev/null +++ b/app/(application)/(user)/event/detail/[id].tsx @@ -0,0 +1,14 @@ +import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; +import { GStyles } from "@/styles/global-styles"; +import { useLocalSearchParams } from "expo-router"; +import { Text } from "react-native"; + +export default function DetailEvent() { + const { id } = useLocalSearchParams(); + console.log("id event >", id); + return ( + + Detail Event {id} + + ); +} diff --git a/app/(application)/(user)/forum/[id]/edit.tsx b/app/(application)/(user)/forum/[id]/edit.tsx new file mode 100644 index 0000000..0b89ee2 --- /dev/null +++ b/app/(application)/(user)/forum/[id]/edit.tsx @@ -0,0 +1,37 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextAreaCustom, + ViewWrapper, +} from "@/components"; +import { router } from "expo-router"; +import { useState } from "react"; + +export default function ForumEdit() { + const [text, setText] = useState(""); + + const buttonFooter = ( + + { + console.log("Posting", text); + router.back(); + }} + > + Update + + + ); + + return ( + + + + ); +} diff --git a/app/(application)/(user)/forum/[id]/forumku.tsx b/app/(application)/(user)/forum/[id]/forumku.tsx new file mode 100644 index 0000000..06d48ec --- /dev/null +++ b/app/(application)/(user)/forum/[id]/forumku.tsx @@ -0,0 +1,113 @@ +import { + AlertCustom, + AvatarCustom, + ButtonCustom, + CenterCustom, + DrawerCustom, + Grid, + StackCustom, + TextCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import Forum_BoxDetailSection from "@/screens/Forum/DiscussionBoxSection"; +import { listDummyDiscussionForum } from "@/screens/Forum/list-data-dummy"; +import Forum_MenuDrawerBerandaSection from "@/screens/Forum/MenuDrawerSection.tsx/MenuBeranda"; +import { useLocalSearchParams } from "expo-router"; +import { useState } from "react"; + +export default function Forumku() { + const { id } = useLocalSearchParams(); + const [openDrawer, setOpenDrawer] = useState(false); + const [status, setStatus] = useState(""); + const [alertStatus, setAlertStatus] = useState(false); + const [deleteAlert, setDeleteAlert] = useState(false); + + return ( + <> + + + + + + + + + + @bagas_banuna + + 1 postingan + + + + Kunjungi Profile + + + + {listDummyDiscussionForum.map((e, i) => ( + + ))} + + + + {/* Drawer Komponen Eksternal */} + setOpenDrawer(false)} + > + { + setOpenDrawer(false); + }} + setShowDeleteAlert={setDeleteAlert} + setShowAlertStatus={setAlertStatus} + /> + + + {/* Alert Komponen Eksternal */} + setAlertStatus(false)} + onRightPress={() => { + setOpenDrawer(false); + setAlertStatus(false); + console.log("Ubah status forum"); + }} + title="Ubah Status Forum" + message="Apakah Anda yakin ingin mengubah status forum ini?" + textLeft="Batal" + textRight="Ubah" + colorRight={MainColor.green} + /> + + {/* Alert Delete */} + setDeleteAlert(false)} + onRightPress={() => { + setOpenDrawer(false); + setDeleteAlert(false); + console.log("Hapus forum"); + }} + title="Hapus Forum" + message="Apakah Anda yakin ingin menghapus forum ini?" + textLeft="Batal" + textRight="Hapus" + colorRight={MainColor.red} + /> + + ); +} diff --git a/app/(application)/(user)/forum/[id]/index.tsx b/app/(application)/(user)/forum/[id]/index.tsx new file mode 100644 index 0000000..a02fb8c --- /dev/null +++ b/app/(application)/(user)/forum/[id]/index.tsx @@ -0,0 +1,176 @@ +import { + AlertCustom, + ButtonCustom, + DrawerCustom, + Spacing, + TextAreaCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import Forum_CommentarBoxSection from "@/screens/Forum/CommentarBoxSection"; +import Forum_BoxDetailSection from "@/screens/Forum/DiscussionBoxSection"; +import { listDummyCommentarForum } from "@/screens/Forum/list-data-dummy"; +import Forum_MenuDrawerBerandaSection from "@/screens/Forum/MenuDrawerSection.tsx/MenuBeranda"; +import Forum_MenuDrawerCommentar from "@/screens/Forum/MenuDrawerSection.tsx/MenuCommentar"; +import { router, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; + +export default function ForumDetail() { + const { id } = useLocalSearchParams(); + console.log(id); + const [openDrawer, setOpenDrawer] = useState(false); + const [status, setStatus] = useState(""); + const [alertStatus, setAlertStatus] = useState(false); + const [deleteAlert, setDeleteAlert] = useState(false); + const [text, setText] = useState(""); + + // Comentar + const [openDrawerCommentar, setOpenDrawerCommentar] = useState(false); + const [alertDeleteCommentar, setAlertDeleteCommentar] = useState(false); + + const dataDummy = { + name: "Bagas", + status: "Open", + date: "14/07/2025", + deskripsi: + "Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae inventore iure pariatur, libero omnis excepturi. Ullam ad officiis deleniti quos esse odit nesciunt, ipsam adipisci cumque aliquam corporis culpa fugit?", + jumlahBalas: 2, + }; + + return ( + <> + + {/* + */} + + + + { + console.log("Posting", text); + router.back(); + }} + > + Balas + + + + + {listDummyCommentarForum.map((e, i) => ( + + ))} + + + setOpenDrawer(false)} + > + { + setOpenDrawer(false); + }} + setShowDeleteAlert={setDeleteAlert} + setShowAlertStatus={setAlertStatus} + /> + + + {/* Alert Status */} + { + setOpenDrawer(false); + setAlertStatus(false); + console.log("Batal"); + }} + onRightPress={() => { + setOpenDrawer(false); + setAlertStatus(false); + console.log("Ubah status forum"); + }} + textLeft="Batal" + textRight="Ubah" + colorRight={MainColor.green} + /> + + {/* Alert Delete */} + { + setOpenDrawer(false); + setDeleteAlert(false); + console.log("Batal"); + }} + onRightPress={() => { + setOpenDrawer(false); + setDeleteAlert(false); + console.log("Hapus forum"); + }} + textLeft="Batal" + textRight="Hapus" + colorRight={MainColor.red} + /> + + {/* Commentar */} + setOpenDrawerCommentar(false)} + > + { + setOpenDrawerCommentar(false); + }} + setShowDeleteAlert={setAlertDeleteCommentar} + /> + + + {/* Alert Delete Commentar */} + { + setOpenDrawerCommentar(false); + setAlertDeleteCommentar(false); + console.log("Batal"); + }} + onRightPress={() => { + setOpenDrawerCommentar(false); + setAlertDeleteCommentar(false); + console.log("Hapus commentar"); + }} + textLeft="Batal" + textRight="Hapus" + colorRight={MainColor.red} + /> + + ); +} diff --git a/app/(application)/(user)/forum/[id]/other-report-commentar.tsx b/app/(application)/(user)/forum/[id]/other-report-commentar.tsx new file mode 100644 index 0000000..7eb56c3 --- /dev/null +++ b/app/(application)/(user)/forum/[id]/other-report-commentar.tsx @@ -0,0 +1,32 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextAreaCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import { router } from "expo-router"; + +export default function ForumOtherReportCommentar() { + const handleSubmit = ( + + { + console.log("Report lainnya"); + router.back(); + }} + > + Report + + + ); + return ( + <> + + + + + ); +} diff --git a/app/(application)/(user)/forum/[id]/other-report-posting.tsx b/app/(application)/(user)/forum/[id]/other-report-posting.tsx new file mode 100644 index 0000000..dfdb255 --- /dev/null +++ b/app/(application)/(user)/forum/[id]/other-report-posting.tsx @@ -0,0 +1,32 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextAreaCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import { router } from "expo-router"; + +export default function ForumOtherReportPosting() { + const handleSubmit = ( + + { + console.log("Report lainnya"); + router.back(); + }} + > + Report + + + ); + return ( + <> + + + + + ); +} diff --git a/app/(application)/(user)/forum/[id]/report-commentar.tsx b/app/(application)/(user)/forum/[id]/report-commentar.tsx new file mode 100644 index 0000000..01caa28 --- /dev/null +++ b/app/(application)/(user)/forum/[id]/report-commentar.tsx @@ -0,0 +1,42 @@ +import { + ButtonCustom, + Spacing, + StackCustom, + ViewWrapper +} from "@/components"; +import { AccentColor, MainColor } from "@/constants/color-palet"; +import Forum_ReportListSection from "@/screens/Forum/ReportListSection"; +import { router } from "expo-router"; + +export default function ForumReportCommentar() { + return ( + <> + + + + { + console.log("Report"); + router.back(); + }} + > + Report + + { + console.log("Lainnya"); + router.replace("/forum/[id]/other-report-commentar"); + }} + > + Lainnya + + + + + + ); +} diff --git a/app/(application)/(user)/forum/[id]/report-posting.tsx b/app/(application)/(user)/forum/[id]/report-posting.tsx new file mode 100644 index 0000000..309e7cc --- /dev/null +++ b/app/(application)/(user)/forum/[id]/report-posting.tsx @@ -0,0 +1,37 @@ +import { ViewWrapper, StackCustom, ButtonCustom, Spacing } from "@/components"; +import { MainColor, AccentColor } from "@/constants/color-palet"; +import Forum_ReportListSection from "@/screens/Forum/ReportListSection"; +import { router } from "expo-router"; + +export default function ForumReportPosting() { + return ( + <> + + + + { + console.log("Report"); + router.back(); + }} + > + Report + + { + console.log("Lainnya"); + router.replace("/forum/[id]/other-report-posting"); + }} + > + Lainnya + + + + + + ); +} \ No newline at end of file diff --git a/app/(application)/(user)/forum/create.tsx b/app/(application)/(user)/forum/create.tsx new file mode 100644 index 0000000..cfee048 --- /dev/null +++ b/app/(application)/(user)/forum/create.tsx @@ -0,0 +1,37 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextAreaCustom, + ViewWrapper, +} from "@/components"; +import { router } from "expo-router"; +import { useState } from "react"; + +export default function ForumCreate() { + const [text, setText] = useState(""); + + const buttonFooter = ( + + { + console.log("Posting", text); + router.back(); + }} + > + Posting + + + ); + + return ( + + + + ); +} diff --git a/app/(application)/(user)/forum/index.tsx b/app/(application)/(user)/forum/index.tsx new file mode 100644 index 0000000..4191c9b --- /dev/null +++ b/app/(application)/(user)/forum/index.tsx @@ -0,0 +1,128 @@ +import { + AlertCustom, + AvatarCustom, + BackButton, + DrawerCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import FloatingButton from "@/components/Button/FloatingButton"; +import { MainColor } from "@/constants/color-palet"; +import { ICON_SIZE_SMALL } from "@/constants/constans-value"; +import Forum_BoxDetailSection from "@/screens/Forum/DiscussionBoxSection"; +import { listDummyDiscussionForum } from "@/screens/Forum/list-data-dummy"; +import Forum_MenuDrawerBerandaSection from "@/screens/Forum/MenuDrawerSection.tsx/MenuBeranda"; +import { Ionicons } from "@expo/vector-icons"; +import { router, Stack } from "expo-router"; +import { useState } from "react"; + +export default function Forum() { + const id = "test-id-forum"; + const [openDrawer, setOpenDrawer] = useState(false); + const [status, setStatus] = useState(""); + const [alertStatus, setAlertStatus] = useState(false); + const [deleteAlert, setDeleteAlert] = useState(false); + + return ( + <> + , + headerRight: () => , + }} + /> + + + } + placeholder="Cari topik forum..." + borderRadius={50} + containerStyle={{ marginBottom: 0 }} + /> + } + floatingButton={ + + router.navigate("/(application)/(user)/forum/create") + } + /> + } + > + {listDummyDiscussionForum.map((e, i) => ( + + ))} + + + setOpenDrawer(false)} + > + { + setOpenDrawer(false); + }} + setShowDeleteAlert={setDeleteAlert} + setShowAlertStatus={setAlertStatus} + /> + + + {/* Alert Status */} + { + setOpenDrawer(false); + setAlertStatus(false); + console.log("Batal"); + }} + onRightPress={() => { + setOpenDrawer(false); + setAlertStatus(false); + console.log("Ubah status forum"); + }} + textLeft="Batal" + textRight="Ubah" + colorRight={MainColor.green} + /> + + {/* Alert Delete */} + { + setOpenDrawer(false); + setDeleteAlert(false); + console.log("Batal"); + }} + onRightPress={() => { + setOpenDrawer(false); + setDeleteAlert(false); + console.log("Hapus forum"); + }} + textLeft="Batal" + textRight="Hapus" + colorRight={MainColor.red} + /> + + ); +} diff --git a/app/(application)/(user)/home.tsx b/app/(application)/(user)/home.tsx new file mode 100644 index 0000000..657c6fe --- /dev/null +++ b/app/(application)/(user)/home.tsx @@ -0,0 +1,9 @@ +import UiHome from "@/screens/Home/UiHome"; + +export default function Application() { + return ( + <> + + + ); +} diff --git a/app/(application)/(user)/maps/[id]/custom-pin.tsx b/app/(application)/(user)/maps/[id]/custom-pin.tsx new file mode 100644 index 0000000..8ea9893 --- /dev/null +++ b/app/(application)/(user)/maps/[id]/custom-pin.tsx @@ -0,0 +1,55 @@ +import { + AvatarCustom, + BaseBox, + BoxButtonOnFooter, + ButtonCenteredOnly, + ButtonCustom, + InformationBox, + MapCustom, + Spacing, + StackCustom, + ViewWrapper, +} from "@/components"; +import CenterCustom from "@/components/Center/CenterCustom"; +import { router, useLocalSearchParams } from "expo-router"; + +export default function MapsCustomPin() { + const { id } = useLocalSearchParams(); + + const buttonFooter = ( + + { + console.log(`Simpan maps ${id}`); + router.back(); + }} + > + Simpan + + + ); + return ( + <> + + + + + + + console.log("Upload")} + icon="upload" + > + Upload + + + + + + + + + + + ); +} diff --git a/app/(application)/(user)/maps/[id]/edit.tsx b/app/(application)/(user)/maps/[id]/edit.tsx new file mode 100644 index 0000000..2688034 --- /dev/null +++ b/app/(application)/(user)/maps/[id]/edit.tsx @@ -0,0 +1,59 @@ +import { + BaseBox, + BoxButtonOnFooter, + ButtonCenteredOnly, + ButtonCustom, + InformationBox, + LandscapeFrameUploaded, + MapCustom, + Spacing, + TextInputCustom, + ViewWrapper +} from "@/components"; +import { router, useLocalSearchParams } from "expo-router"; + +export default function MapsEdit() { + const { id } = useLocalSearchParams(); + const buttonFooter = ( + + { + console.log(`Simpan maps ${id}`); + router.back() + }} + > + Simpan + + + ); + return ( + + + + + + + + + + + + + + { + console.log("Upload foto "); + router.navigate(`/take-picture/${id}`); + }} + > + Upload + + + + ); +} diff --git a/app/(application)/(user)/maps/create.tsx b/app/(application)/(user)/maps/create.tsx new file mode 100644 index 0000000..f9b7f40 --- /dev/null +++ b/app/(application)/(user)/maps/create.tsx @@ -0,0 +1,59 @@ +import { + BaseBox, + BoxButtonOnFooter, + ButtonCenteredOnly, + ButtonCustom, + InformationBox, + LandscapeFrameUploaded, + Spacing, + TextCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import { router, useLocalSearchParams } from "expo-router"; + +export default function MapsCreate() { + const { id } = useLocalSearchParams(); + const buttonFooter = ( + + { + console.log(`Simpan maps ${id}`); + router.replace(`/portofolio/${id}`); + }} + > + Simpan + + + ); + return ( + + + + + Maps Her + + + + + + + + + { + console.log("Upload foto "); + router.navigate(`/take-picture/${id}`); + }} + > + Upload + + + + ); +} diff --git a/app/(application)/(user)/maps/index.tsx b/app/(application)/(user)/maps/index.tsx new file mode 100644 index 0000000..b4a9f78 --- /dev/null +++ b/app/(application)/(user)/maps/index.tsx @@ -0,0 +1,9 @@ +import { MapCustom, ViewWrapper } from "@/components"; + +export default function Maps() { + return ( + + + + ); +} diff --git a/app/(application)/(user)/marketplace/index.tsx b/app/(application)/(user)/marketplace/index.tsx new file mode 100644 index 0000000..66431b6 --- /dev/null +++ b/app/(application)/(user)/marketplace/index.tsx @@ -0,0 +1,9 @@ +import { TextCustom, ViewWrapper } from "@/components"; + +export default function Marketplace() { + return ( + + Marketplace + + ); +} \ No newline at end of file diff --git a/app/(application)/(user)/notifications/index.tsx b/app/(application)/(user)/notifications/index.tsx new file mode 100644 index 0000000..e136aad --- /dev/null +++ b/app/(application)/(user)/notifications/index.tsx @@ -0,0 +1,111 @@ +import { + BaseBox, + Grid, + ScrollableCustom, + StackCustom, + TextCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import { useState } from "react"; +import { View } from "react-native"; + +const categories = [ + { value: "all", label: "Semua" }, + { value: "event", label: "Event" }, + { value: "job", label: "Job" }, + { value: "voting", label: "Voting" }, + { value: "donasi", label: "Donasi" }, + { value: "investasi", label: "Investasi" }, + { value: "forum", label: "Forum" }, + { value: "collaboration", label: "Collaboration" }, +]; + +const selectedCategory = (value: string) => { + const category = categories.find((c) => c.value === value); + return category?.label; +}; + +const BoxNotification = ({ + index, + activeCategory, +}: { + index: number; + activeCategory: string | null; +}) => { + return ( + <> + + console.log( + "Notification >", + selectedCategory(activeCategory as string) + ) + } + > + + + # {selectedCategory(activeCategory as string)} + + + + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint odio + unde quidem voluptate quam culpa sequi molestias ipsa corrupti id, + soluta, nostrum adipisci similique, et illo asperiores deleniti eum + labore. + + + + + + {index + 1} Agustus 2025 + + + + + Belum lihat + + + + + + + ); +}; + +export default function Notifications() { + const [activeCategory, setActiveCategory] = useState("all"); + + const handlePress = (item: any) => { + setActiveCategory(item.value); + // tambahkan logika lain seperti filter dsb. + }; + return ( + ({ + id: i, + label: e.label, + value: e.value, + }))} + onButtonPress={handlePress} + activeId={activeCategory as string} + /> + } + > + {Array.from({ length: 20 }).map((e, i) => ( + + + + ))} + + ); +} diff --git a/app/(application)/(user)/portofolio/[id]/create.tsx b/app/(application)/(user)/portofolio/[id]/create.tsx new file mode 100644 index 0000000..c39cbc3 --- /dev/null +++ b/app/(application)/(user)/portofolio/[id]/create.tsx @@ -0,0 +1,191 @@ +import { + BoxButtonOnFooter, + ButtonCenteredOnly, + ButtonCustom, + Grid, + InformationBox, + LandscapeFrameUploaded, + SelectCustom, + Spacing, + StackCustom, + TextAreaCustom, + TextCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import dummyMasterBidangBisnis from "@/lib/dummy-data/master-bidang-bisnis"; +import dummyMasterSubBidangBisnis from "@/lib/dummy-data/master-sub-bidang-bisnis"; +import { Ionicons } from "@expo/vector-icons"; +import { router, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; +import { Text, TouchableOpacity, View } from "react-native"; +import PhoneInput, { ICountry } from "react-native-international-phone-number"; + +export default function PortofolioCreate() { + const { id } = useLocalSearchParams(); + const [selectedCountry, setSelectedCountry] = useState(null); + const [inputValue, setInputValue] = useState(""); + const [data, setData] = useState({ + name: "", + bidang_usaha: "", + sub_bidang_usaha: "", + alamat: "", + nomor_telepon: "", + deskripsi: "", + }); + + function handleInputValue(phoneNumber: string) { + setInputValue(phoneNumber); + } + + function handleSelectedCountry(country: ICountry) { + setSelectedCountry(country); + } + + function handleSave() { + console.log("Selanjutnya"); + router.replace(`/maps/create`); + } + + const buttonSave = ( + + Selanjutnya + + ); + + return ( + + {/* Portofolio Create {id} */} + + + + ({ + label: item.name, + value: item.id, + }))} + value={data.bidang_usaha} + onChange={(value) => { + setData({ ...(data as any), bidang_usaha: value }); + }} + /> + + + + ({ + label: item.name, + value: item.id, + }))} + value={data.sub_bidang_usaha} + onChange={(value) => { + setData({ ...(data as any), sub_bidang_usaha: value }); + }} + /> + + + console.log("delete")}> + + + + + + console.log("add")}> + Tambah Pilihan + + + + + + + Nomor Telepon + + * + + + + + + + + + setData({ ...data, deskripsi: value })} + autosize + minRows={2} + maxRows={5} + required + showCount + maxLength={100} + /> + + + {/* Logo */} + + + { + console.log("Upload logo >>", id); + router.navigate(`/(application)/(image)/take-picture/${id}`); + }} + > + Upload + + + + {/* Social Media */} + + + + + + + + + + ); +} diff --git a/app/(application)/(user)/portofolio/[id]/edit-logo.tsx b/app/(application)/(user)/portofolio/[id]/edit-logo.tsx new file mode 100644 index 0000000..26f6e76 --- /dev/null +++ b/app/(application)/(user)/portofolio/[id]/edit-logo.tsx @@ -0,0 +1,48 @@ +import { + AvatarCustom, + BaseBox, + BoxButtonOnFooter, + ButtonCenteredOnly, + ButtonCustom, + ViewWrapper, +} from "@/components"; +import { router, useLocalSearchParams } from "expo-router"; + +export default function PortofolioEditLogo() { + const { id } = useLocalSearchParams(); + + const buttonFooter = ( + + { + console.log("Simpan logo "); + router.back(); + }} + > + Simpan + + + ); + + return ( + <> + + + + + router.navigate(`/take-picture/${id}`)} + > + Update + + + + ); +} diff --git a/app/(application)/(user)/portofolio/[id]/edit-social-media.tsx b/app/(application)/(user)/portofolio/[id]/edit-social-media.tsx new file mode 100644 index 0000000..a6ec430 --- /dev/null +++ b/app/(application)/(user)/portofolio/[id]/edit-social-media.tsx @@ -0,0 +1,36 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import { useLocalSearchParams, router } from "expo-router"; + +export default function PortofolioEditSocialMedia() { + const { id } = useLocalSearchParams(); + + const buttonFooter = ( + + { + console.log(`Simpan sosmed ${id}`); + router.back(); + }} + > + Simpan + + + ); + + return ( + <> + + + + + + + + + ); +} diff --git a/app/(application)/(user)/portofolio/[id]/edit.tsx b/app/(application)/(user)/portofolio/[id]/edit.tsx new file mode 100644 index 0000000..71f4646 --- /dev/null +++ b/app/(application)/(user)/portofolio/[id]/edit.tsx @@ -0,0 +1,151 @@ +import { + BoxButtonOnFooter, + ButtonCenteredOnly, + ButtonCustom, + Grid, + SelectCustom, + Spacing, + StackCustom, + TextAreaCustom, + TextCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import dummyMasterBidangBisnis from "@/lib/dummy-data/master-bidang-bisnis"; +import dummyMasterSubBidangBisnis from "@/lib/dummy-data/master-sub-bidang-bisnis"; +import { Ionicons } from "@expo/vector-icons"; +import { router, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; +import { Text, TouchableOpacity, View } from "react-native"; +import PhoneInput, { ICountry } from "react-native-international-phone-number"; + +export default function PortofolioEdit() { + const { id } = useLocalSearchParams(); + const [selectedCountry, setSelectedCountry] = useState(null); + const [inputValue, setInputValue] = useState(""); + + const [data, setData] = useState({ + name: "", + bidang_usaha: "", + sub_bidang_usaha: "", + alamat: "", + nomor_telepon: "", + deskripsi: "", + }); + + function handleInputValue(phoneNumber: string) { + setInputValue(phoneNumber); + } + + function handleSelectedCountry(country: ICountry) { + setSelectedCountry(country); + } + + function handleSave() { + console.log(`Update portofolio berhasil ${id}`); + router.back(); + } + + const buttonUpdate = ( + + Simpan + + ); + return ( + <> + + + + + ({ + label: item.name, + value: item.id, + }))} + value={data.bidang_usaha} + onChange={(value) => { + setData({ ...(data as any), bidang_usaha: value }); + }} + /> + + + + ({ + label: item.name, + value: item.id, + }))} + value={data.sub_bidang_usaha} + onChange={(value) => { + setData({ ...(data as any), sub_bidang_usaha: value }); + }} + /> + + + console.log("delete")}> + + + + + console.log("add")}> + Tambah Pilihan + + + + + + Nomor Telepon + + * + + + + + + + + + + setData({ ...data, deskripsi: value }) + } + autosize + minRows={2} + maxRows={5} + required + showCount + maxLength={100} + /> + + + + + ); +} diff --git a/app/(application)/(user)/portofolio/[id]/index.tsx b/app/(application)/(user)/portofolio/[id]/index.tsx new file mode 100644 index 0000000..beec8d5 --- /dev/null +++ b/app/(application)/(user)/portofolio/[id]/index.tsx @@ -0,0 +1,78 @@ +import { AlertCustom, DrawerCustom } from "@/components"; +import LeftButtonCustom from "@/components/Button/BackButton"; +import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; +import { MainColor } from "@/constants/color-palet"; +import { drawerItemsPortofolio } from "@/screens/Portofolio/ListPage"; +import Portofolio_MenuDrawerSection from "@/screens/Portofolio/MenuDrawer"; +import PorfofolioSection from "@/screens/Portofolio/PorfofolioSection"; +import { GStyles } from "@/styles/global-styles"; +import { Ionicons } from "@expo/vector-icons"; +import { Stack, useLocalSearchParams, router } from "expo-router"; +import { useState } from "react"; +import { TouchableOpacity } from "react-native"; + +export default function Portofolio() { + const { id } = useLocalSearchParams(); + const [isDrawerOpen, setIsDrawerOpen] = useState(false); + const [deleteAlert, setDeleteAlert] = useState(false); + + const openDrawer = () => { + setIsDrawerOpen(true); + }; + const closeDrawer = () => { + setIsDrawerOpen(false); + }; + return ( + <> + + {/* Header */} + , + headerRight: () => ( + + + + ), + headerStyle: GStyles.headerStyle, + headerTitleStyle: GStyles.headerTitleStyle, + }} + /> + + + + {/* Drawer Komponen Eksternal */} + + + + + {/* Alert Delete */} + setDeleteAlert(false)} + onRightPress={() => { + setDeleteAlert(false); + console.log("Hapus portofolio"); + router.back(); + }} + title="Hapus Portofolio" + message="Apakah Anda yakin ingin menghapus portofolio ini?" + textLeft="Batal" + textRight="Hapus" + colorRight={MainColor.red} + /> + + ); +} diff --git a/app/(application)/(user)/portofolio/[id]/list.tsx b/app/(application)/(user)/portofolio/[id]/list.tsx new file mode 100644 index 0000000..5c57d12 --- /dev/null +++ b/app/(application)/(user)/portofolio/[id]/list.tsx @@ -0,0 +1,47 @@ +import { BaseBox, Grid, TextCustom, ViewWrapper } from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import { ICON_SIZE_SMALL } from "@/constants/constans-value"; +import { Ionicons } from "@expo/vector-icons"; +import { router, useLocalSearchParams } from "expo-router"; + +export default function ListPortofolio() { + const { id } = useLocalSearchParams(); + return ( + + {Array.from({ length: 10 }).map((_, index) => ( + { + console.log("press to Portofolio"); + router.push(`/portofolio/${id}`); + }} + > + + + + Nama usaha portofolio + + + #id-porofolio12345 + + + + + + + + ))} + + ); +} diff --git a/app/(application)/(user)/portofolio/_layout.tsx b/app/(application)/(user)/portofolio/_layout.tsx new file mode 100644 index 0000000..9e4797e --- /dev/null +++ b/app/(application)/(user)/portofolio/_layout.tsx @@ -0,0 +1,32 @@ +import LeftButtonCustom from "@/components/Button/BackButton"; +import { HeaderStyles } from "@/styles/header-styles"; +import { Stack } from "expo-router"; + +export default function PortofolioLayout() { + return ( + <> + , + }} + > + {/* */} + + + + + + + + ); +} diff --git a/app/(application)/(user)/profile/[id]/create.tsx b/app/(application)/(user)/profile/[id]/create.tsx new file mode 100644 index 0000000..a8d2792 --- /dev/null +++ b/app/(application)/(user)/profile/[id]/create.tsx @@ -0,0 +1,110 @@ +import { + AvatarCustom, + ButtonCenteredOnly, + ButtonCustom, + SelectCustom, + Spacing, + StackCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import BoxButtonOnFooter from "@/components/Box/BoxButtonOnFooter"; +import InformationBox from "@/components/Box/InformationBox"; +import LandscapeFrameUploaded from "@/components/Image/LandscapeFrameUploaded"; +import { router, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; +import { View } from "react-native"; + +export default function CreateProfile() { + const { id } = useLocalSearchParams(); + const [data, setData] = useState({ + name: "", + email: "", + address: "", + gender: "", + }); + + const handlerSave = () => { + console.log("data create profile >>", data); + router.back(); + }; + + const footerComponent = ( + + + Simpan + + + ); + + return ( + + + + + + + router.navigate(`/take-picture/${id}`)} + > + Upload + + + + + + + + + + router.navigate(`/take-picture/${id}`)} + > + Upload + + + + + setData({ ...data, name: text })} + /> + setData({ ...data, email: text })} + /> + setData({ ...data, address: text })} + /> + setData({ ...(data as any), gender: value })} + /> + + + + ); +} diff --git a/app/(application)/(user)/profile/[id]/edit.tsx b/app/(application)/(user)/profile/[id]/edit.tsx new file mode 100644 index 0000000..d0ae6c9 --- /dev/null +++ b/app/(application)/(user)/profile/[id]/edit.tsx @@ -0,0 +1,108 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + ButtonCustom, + SelectCustom, + StackCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import BoxButtonOnFooter from "@/components/Box/BoxButtonOnFooter"; +import { router, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; +import { StyleSheet } from "react-native"; + +export default function ProfileEdit() { + const { id } = useLocalSearchParams(); + + const [data, setData] = useState({ + nama: "Bagas Banuna", + email: "bagasbanuna@gmail.com", + alamat: "Jember", + selectedValue: "", + }); + + const options = [ + { label: "Laki-laki", value: "laki-laki" }, + { label: "Perempuan", value: "perempuan" }, + ]; + + const handleSave = () => { + console.log({ + nama: data.nama, + email: data.email, + alamat: data.alamat, + selectedValue: data.selectedValue, + }); + router.back(); + }; + + return ( + + + Simpan + + + } + > + + { + setData({ ...data, nama: text }); + }} + required + /> + { + setData({ ...data, email: text }); + }} + required + /> + { + setData({ ...data, alamat: text }); + }} + required + /> + { + setData({ ...(data as any), selectedValue: value }); + }} + /> + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: "center", + padding: 20, + }, + result: { + marginTop: 20, + fontSize: 16, + fontWeight: "bold", + }, +}); diff --git a/app/(application)/(user)/profile/[id]/index.tsx b/app/(application)/(user)/profile/[id]/index.tsx new file mode 100644 index 0000000..b8aad97 --- /dev/null +++ b/app/(application)/(user)/profile/[id]/index.tsx @@ -0,0 +1,83 @@ +import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; +import AlertCustom from "@/components/Alert/AlertCustom"; +import LeftButtonCustom from "@/components/Button/BackButton"; +import DrawerCustom from "@/components/Drawer/DrawerCustom"; +import { MainColor } from "@/constants/color-palet"; +import { drawerItemsProfile } from "@/screens/Profile/ListPage"; +import Profile_MenuDrawerSection from "@/screens/Profile/MenuDrawerSection"; +import ProfilSection from "@/screens/Profile/ProfilSection"; +import { GStyles } from "@/styles/global-styles"; +import { Ionicons } from "@expo/vector-icons"; +import { router, Stack, useLocalSearchParams } from "expo-router"; +import React, { useState } from "react"; +import { TouchableOpacity } from "react-native"; + +export default function Profile() { + const { id } = useLocalSearchParams(); + const [isDrawerOpen, setIsDrawerOpen] = useState(false); + const [showLogoutAlert, setShowLogoutAlert] = useState(false); + + const openDrawer = () => { + setIsDrawerOpen(true); + }; + + const closeDrawer = () => { + setIsDrawerOpen(false); + }; + + const handleLogout = () => { + console.log("User logout"); + router.replace("/"); + setShowLogoutAlert(false); + }; + + return ( + <> + + {/* Header */} + , + headerRight: () => ( + + + + ), + headerStyle: GStyles.headerStyle, + headerTitleStyle: GStyles.headerTitleStyle, + }} + /> + + + + {/* Drawer Komponen Eksternal */} + + + + + {/* Alert Komponen Eksternal */} + setShowLogoutAlert(false)} + onRightPress={handleLogout} + title="Apakah anda yakin ingin keluar?" + textLeft="Batal" + textRight="Keluar" + colorRight={MainColor.red} + /> + + ); +} diff --git a/app/(application)/(user)/profile/[id]/take-picture2.txt b/app/(application)/(user)/profile/[id]/take-picture2.txt new file mode 100644 index 0000000..8483dde --- /dev/null +++ b/app/(application)/(user)/profile/[id]/take-picture2.txt @@ -0,0 +1,190 @@ +// COMPONENT : Jika ingin uoload gambar dan video gunakan component ini + +import { + ButtonCustom, + Spacing, + StackCustom, + ViewWrapper +} from "@/components"; +import AntDesign from "@expo/vector-icons/AntDesign"; +import Feather from "@expo/vector-icons/Feather"; +import FontAwesome6 from "@expo/vector-icons/FontAwesome6"; +import { + CameraMode, + CameraType, + CameraView, + useCameraPermissions, +} from "expo-camera"; +import { Image } from "expo-image"; +import { router } from "expo-router"; +import { useRef, useState } from "react"; +import { Button, Pressable, StyleSheet, Text, View } from "react-native"; + +export default function TakePictureProfile2() { + const [permission, requestPermission] = useCameraPermissions(); + const ref = useRef(null); + const [uri, setUri] = useState(null); + const [mode, setMode] = useState("picture"); + const [facing, setFacing] = useState("back"); + const [recording, setRecording] = useState(false); + + if (!permission?.granted) { + return ( + + + We need your permission to use the camera + +