diff --git a/app/(application)/group/_layout.tsx b/app/(application)/group/_layout.tsx index 5d52440..eb445e3 100644 --- a/app/(application)/group/_layout.tsx +++ b/app/(application)/group/_layout.tsx @@ -7,10 +7,9 @@ import MenuItemRow from "@/components/menuItemRow"; import { Headers } from "@/constants/Headers"; import Styles from "@/constants/Styles"; import AntDesign from "@expo/vector-icons/AntDesign"; -import MaterialIcons from "@expo/vector-icons/MaterialIcons"; import { router, Stack } from "expo-router"; import React, { useState } from "react"; -import { Modal, Pressable, Text, TextInput, ToastAndroid, View } from "react-native"; +import { ToastAndroid, View } from "react-native"; export default function RootLayout() { const [isVisible, setVisible] = useState(false) diff --git a/app/(application)/group/index.tsx b/app/(application)/group/index.tsx index 69af22c..23ad508 100644 --- a/app/(application)/group/index.tsx +++ b/app/(application)/group/index.tsx @@ -1,14 +1,28 @@ +import AlertKonfirmasi from "@/components/alertKonfirmasi"; import BorderBottomItem from "@/components/borderBottomItem"; +import { ButtonForm } from "@/components/buttonForm"; import ButtonTab from "@/components/buttonTab"; +import DrawerBottom from "@/components/drawerBottom"; +import { InputForm } from "@/components/inputForm"; import InputSearch from "@/components/inputSearch"; +import MenuItemRow from "@/components/menuItemRow"; import { ColorsStatus } from "@/constants/ColorsStatus"; import Styles from "@/constants/Styles"; import { AntDesign, Feather, MaterialCommunityIcons } from "@expo/vector-icons"; import { router, useLocalSearchParams } from "expo-router"; -import { SafeAreaView, ScrollView, View } from "react-native"; +import { useState } from "react"; +import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"; export default function Index() { - const { active } = useLocalSearchParams<{ active?: string }>(); + const { active } = useLocalSearchParams<{ active?: string }>() + const [isModal, setModal] = useState(false) + const [isVisibleEdit, setVisibleEdit] = useState(false) + + function handleEdit() { + setVisibleEdit(false) + setModal(false) + ToastAndroid.show('Berhasil mengupdate data', ToastAndroid.SHORT) + } return ( @@ -33,6 +47,7 @@ export default function Index() { { setModal(true) }} borderType="all" icon={ @@ -42,6 +57,7 @@ export default function Index() { title="Adat" /> { setModal(true) }} borderType="all" icon={ @@ -51,6 +67,7 @@ export default function Index() { title="Dinas" /> { setModal(true) }} borderType="all" icon={ @@ -60,6 +77,7 @@ export default function Index() { title="PKK" /> { setModal(true) }} borderType="all" icon={ @@ -69,6 +87,7 @@ export default function Index() { title="Karang Taruna" /> { setModal(true) }} borderType="all" icon={ @@ -80,6 +99,40 @@ export default function Index() { + + + + } + title="Non Aktifkan" + onPress={() => { + AlertKonfirmasi({ + title: 'Konfirmasi', + desc: 'Apakah anda yakin ingin menonaktifkan data?', + onPress: () => { handleEdit() } + }) + }} + /> + } + title="Edit" + onPress={() => { setVisibleEdit(true) }} + /> + + + + + + + + + + { handleEdit() }} /> + + + + + ) } \ No newline at end of file