51 lines
3.2 KiB
TypeScript
51 lines
3.2 KiB
TypeScript
import ButtonBackHeader from "@/components/buttonBackHeader";
|
|
import { ButtonFiturMenu } from "@/components/buttonFiturMenu";
|
|
import Styles from "@/constants/Styles";
|
|
import { AntDesign, Entypo, Ionicons, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";
|
|
import { router, Stack } from "expo-router";
|
|
import { SafeAreaView, View } from "react-native";
|
|
import { useSelector } from "react-redux";
|
|
|
|
export default function Feature() {
|
|
const entityUser = useSelector((state: any) => state.user)
|
|
|
|
return (
|
|
<SafeAreaView>
|
|
<Stack.Screen
|
|
options={{
|
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
|
headerTitle: 'Fitur',
|
|
headerTitleAlign: 'center'
|
|
}}
|
|
/>
|
|
<View style={[Styles.p15]}>
|
|
<View style={[Styles.rowSpaceBetween, Styles.mb15]}>
|
|
<ButtonFiturMenu icon={<MaterialIcons name="group" size={35} color="black" />} text="Divisi" onPress={() => { router.push('/division?active=true') }} />
|
|
<ButtonFiturMenu icon={<AntDesign name="areachart" size={35} color="black" />} text="Kegiatan" onPress={() => { router.push('/project?status=0') }} />
|
|
<ButtonFiturMenu icon={<MaterialIcons name="campaign" size={35} color="black" />} text="Pengumuman" onPress={() => { router.push('/announcement') }} />
|
|
<ButtonFiturMenu icon={<Ionicons name="chatbubbles-sharp" size={35} color="black" />} text="Diskusi" onPress={() => { router.push('/discussion?active=true') }} />
|
|
</View>
|
|
<View style={[Styles.rowSpaceBetween, Styles.mb15, (entityUser.role != 'supadmin' && entityUser.role != 'developer' && entityUser.role != 'cosupadmin' && Styles.w40)]}>
|
|
<ButtonFiturMenu icon={<MaterialIcons name="groups" size={35} color="black" />} text="Anggota" onPress={() => { router.push('/member?active=true') }} />
|
|
<ButtonFiturMenu icon={<MaterialCommunityIcons name="account-tie" size={35} color="black" />} text="Jabatan" onPress={() => { router.push('/position?active=true') }} />
|
|
{
|
|
entityUser.role == "cosupadmin" && <ButtonFiturMenu icon={<Entypo name="image-inverted" size={35} color="black" />} text="Banner" onPress={() => { router.push('/banner') }} />
|
|
}
|
|
{
|
|
(entityUser.role == "supadmin" || entityUser.role == "developer") &&
|
|
<>
|
|
<ButtonFiturMenu icon={<AntDesign name="tags" size={35} color="black" />} text="Lembaga Desa" onPress={() => { router.push('/group?active=true') }} />
|
|
<ButtonFiturMenu icon={<Ionicons name="color-palette-sharp" size={35} color="black" />} text="Tema" onPress={() => { }} />
|
|
</>
|
|
}
|
|
</View>
|
|
{
|
|
(entityUser.role == "supadmin" || entityUser.role == "developer") &&
|
|
<View style={[Styles.rowSpaceBetween, Styles.mb15]}>
|
|
<ButtonFiturMenu icon={<Entypo name="image-inverted" size={35} color="black" />} text="Banner" onPress={() => { router.push('/banner') }} />
|
|
</View>
|
|
}
|
|
</View>
|
|
</SafeAreaView>
|
|
)
|
|
} |