diff --git a/app/(application)/_layout.tsx b/app/(application)/_layout.tsx index 0bdec61..4a53b50 100644 --- a/app/(application)/_layout.tsx +++ b/app/(application)/_layout.tsx @@ -1,5 +1,7 @@ +import ButtonBackHeader from "@/components/buttonBackHeader"; +import HeaderMemberList from "@/components/member/headerMemberList"; import { Headers } from "@/constants/Headers"; -import { Stack } from "expo-router"; +import { router, Stack } from "expo-router"; import { StatusBar } from 'expo-status-bar'; export default function RootLayout() { @@ -13,6 +15,13 @@ export default function RootLayout() { + { router.back() }} />, + title: 'Anggota', + headerTitleAlign: 'center', + headerRight: () => + }} /> + diff --git a/app/(application)/feature.tsx b/app/(application)/feature.tsx index af217a9..db893b4 100644 --- a/app/(application)/feature.tsx +++ b/app/(application)/feature.tsx @@ -23,7 +23,7 @@ export default function Feature() { } text="Diskusi" /> - } text="Anggota" /> + } text="Anggota" onPress={() => { router.push('/member?active=true') }}/> } text="Jabatan" onPress={() => { router.push('/position?active=true') }}/> } text="Lembaga Desa" onPress={() => { router.push('/group?active=true') }} /> } text="Tema" onPress={() => { }} /> diff --git a/app/(application)/group/_layout.tsx b/app/(application)/group/_layout.tsx index eb445e3..05de47e 100644 --- a/app/(application)/group/_layout.tsx +++ b/app/(application)/group/_layout.tsx @@ -37,7 +37,19 @@ export default function RootLayout() { } title="Tambah Lembaga" - onPress={() => { setVisibleTambah(true) }} + onPress={() => { + console.log('yeal') + setVisible(false); + // open the 2nd modal + setTimeout( + () => { + setVisibleTambah(true) + }, + // any small number will do, maybe animation duration + 100, + ); + + }} /> @@ -45,7 +57,7 @@ export default function RootLayout() { - + { handleTambah() }} /> diff --git a/app/(application)/member/create.tsx b/app/(application)/member/create.tsx new file mode 100644 index 0000000..24577e2 --- /dev/null +++ b/app/(application)/member/create.tsx @@ -0,0 +1,7 @@ +import { Text } from "react-native"; + +export default function CreateMember() { + return ( + Tambah Member + ) +} \ No newline at end of file diff --git a/app/(application)/member/index.tsx b/app/(application)/member/index.tsx new file mode 100644 index 0000000..f764692 --- /dev/null +++ b/app/(application)/member/index.tsx @@ -0,0 +1,119 @@ +import BorderBottomItem from "@/components/borderBottomItem"; +import ButtonTab from "@/components/buttonTab"; +import InputSearch from "@/components/inputSearch"; +import Styles from "@/constants/Styles"; +import { AntDesign, Feather } from "@expo/vector-icons"; +import { router, useLocalSearchParams } from "expo-router"; +import { Image, SafeAreaView, ScrollView, Text, View } from "react-native"; + +export default function Index() { + const { active } = useLocalSearchParams<{ active?: string }>() + + return ( + + + + + { router.push('/member?active=true') }} + label="Aktif" + icon={} + n={2} /> + { router.push('/member?active=false') }} + label="Tidak Aktif" + icon={} + n={2} /> + + + + Filter : Dinas + + + { }} + borderType="all" + icon={ + + } + title="Amalia Dwi" + subtitle="Dinas - Sekretaris" + /> + + { }} + borderType="all" + icon={ + + } + title="Amalia Dwi" + subtitle="Dinas - Sekretaris" + /> + + { }} + borderType="all" + icon={ + + } + title="Amalia Dwi" + subtitle="Dinas - Sekretaris" + /> + + { }} + borderType="all" + icon={ + + } + title="Amalia Dwi" + subtitle="Dinas - Sekretaris" + /> + + { }} + borderType="all" + icon={ + + } + title="Amalia Dwi" + subtitle="Dinas - Sekretaris" + /> + + { }} + borderType="all" + icon={ + + } + title="Amalia Dwi" + subtitle="Dinas - Sekretaris" + /> + + + + + ) +} \ No newline at end of file diff --git a/components/borderBottomItem.tsx b/components/borderBottomItem.tsx index 3b91634..8f82c8d 100644 --- a/components/borderBottomItem.tsx +++ b/components/borderBottomItem.tsx @@ -13,7 +13,7 @@ type Props = { export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, rightTopInfo, borderType }: Props) { return ( - + {icon} diff --git a/components/buttonHeader.tsx b/components/buttonHeader.tsx index ceb0d3e..d029c02 100644 --- a/components/buttonHeader.tsx +++ b/components/buttonHeader.tsx @@ -1,17 +1,17 @@ import Styles from "@/constants/Styles"; -import { TouchableWithoutFeedback, View } from "react-native"; +import { Pressable, Text, TouchableWithoutFeedback, View } from "react-native"; type PropsBtnHeader = { - onPress?: () => void; + onPress: () => void; item: React.ReactNode; }; export function ButtonHeader({ onPress, item }: PropsBtnHeader) { return ( - + {onPress()}}> {item} - + ) } \ No newline at end of file diff --git a/components/buttonMenuHeader.tsx b/components/buttonMenuHeader.tsx index 1bb5ce2..31bc4a6 100644 --- a/components/buttonMenuHeader.tsx +++ b/components/buttonMenuHeader.tsx @@ -2,7 +2,7 @@ import { Feather } from "@expo/vector-icons" import { ButtonHeader } from "./buttonHeader" type Props = { - onPress?: () => void + onPress: () => void } export default function ButtonMenuHeader({ onPress }: Props) { @@ -10,7 +10,7 @@ export default function ButtonMenuHeader({ onPress }: Props) { <> } - onPress={onPress} + onPress={() => onPress()} /> ) diff --git a/components/drawerBottom.tsx b/components/drawerBottom.tsx index 1807736..76b69f5 100644 --- a/components/drawerBottom.tsx +++ b/components/drawerBottom.tsx @@ -18,7 +18,7 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a {title} - setVisible(false)}> + setVisible(false)}> diff --git a/components/member/headerMemberList.tsx b/components/member/headerMemberList.tsx new file mode 100644 index 0000000..d7ce15a --- /dev/null +++ b/components/member/headerMemberList.tsx @@ -0,0 +1,32 @@ +import { router, Stack } from "expo-router" +import ButtonBackHeader from "../buttonBackHeader" +import ButtonMenuHeader from "../buttonMenuHeader" +import { useState } from "react" +import DrawerBottom from "../drawerBottom" +import { View } from "react-native" +import Styles from "@/constants/Styles" +import MenuItemRow from "../menuItemRow" +import { AntDesign } from "@expo/vector-icons" + +export default function HeaderMemberList() { + const [isVisible, setVisible] = useState(false) + return ( + <> + { setVisible(true) }} /> + + + } + title="Tambah Anggota" + onPress={() => { }} + /> + } + title="Filter" + onPress={() => { }} + /> + + + + ) +} \ No newline at end of file diff --git a/components/menuItemRow.tsx b/components/menuItemRow.tsx index 14d4880..31668c0 100644 --- a/components/menuItemRow.tsx +++ b/components/menuItemRow.tsx @@ -9,7 +9,7 @@ type Props = { export default function MenuItemRow({ onPress, icon, title }: Props) { return ( - { onPress() }} style={[Styles.btnMenuRow]}> + { console.log('press'); onPress() }} style={[Styles.btnMenuRow]}> {icon} {title} diff --git a/components/modalSelect.tsx b/components/modalSelect.tsx index f9d4215..18c087e 100644 --- a/components/modalSelect.tsx +++ b/components/modalSelect.tsx @@ -19,7 +19,7 @@ export default function ModalSelect({ open, close, title, category, choose, onSe return ( - { + { onSelect({ val: 'dinas', label: 'Dinas' }) setChoose('dinas') close(false) diff --git a/components/selectForm.tsx b/components/selectForm.tsx index 2bc57e2..f00d7ef 100644 --- a/components/selectForm.tsx +++ b/components/selectForm.tsx @@ -27,7 +27,7 @@ export default function SelectForm({ label, value, placeholder, onPress, info, e ) } - + {