- Tambah halaman /village-calendar dengan monthly grid dan agenda view - Tampilkan acara divisi (DivisionCalendarReminder) dan kegiatan (ProjectTask) se-village - Indikator dot dua warna pada kalender: ungu untuk acara divisi, biru-abu untuk kegiatan - Tambah endpoint apiGetVillageCalendarByDate dan apiGetVillageCalendarIndicator - Tambah menu Kalender di halaman /feature dengan grid layout flexWrap - Sesuaikan warna EventItem dengan TYPE_COLORS village-calendar - Pindahkan inline style ke Styles.ts sebagai class baru
48 lines
3.1 KiB
TypeScript
48 lines
3.1 KiB
TypeScript
import AppHeader from "@/components/AppHeader";
|
|
import { ButtonFiturMenu } from "@/components/buttonFiturMenu";
|
|
import Styles from "@/constants/Styles";
|
|
import { useTheme } from "@/providers/ThemeProvider";
|
|
import { AntDesign, Entypo, Feather, 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)
|
|
const { colors } = useTheme();
|
|
|
|
return (
|
|
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
|
|
<Stack.Screen
|
|
options={{
|
|
headerTitle: 'Fitur',
|
|
headerTitleAlign: 'center',
|
|
header: () => (
|
|
<AppHeader title="Fitur" showBack={true} onPressLeft={() => router.back()} />
|
|
)
|
|
}}
|
|
/>
|
|
<View style={[Styles.p15]}>
|
|
<View style={{ flexDirection: 'row', flexWrap: 'wrap', rowGap: 20 }}>
|
|
<ButtonFiturMenu icon={<Feather name="users" size={30} color={colors.icon} />} text="Divisi" onPress={() => { router.push('/division?active=true') }} />
|
|
<ButtonFiturMenu icon={<Feather name="bar-chart" size={30} color={colors.icon} />} text="Kegiatan" onPress={() => { router.push('/project?status=0') }} />
|
|
<ButtonFiturMenu icon={<Ionicons name="megaphone-outline" size={30} color={colors.icon} />} text="Pengumuman" onPress={() => { router.push('/announcement') }} />
|
|
<ButtonFiturMenu icon={<Ionicons name="chatbubbles-outline" size={30} color={colors.icon} />} text="Diskusi" onPress={() => { router.push('/discussion?active=true') }} />
|
|
<ButtonFiturMenu icon={<Feather name="calendar" size={30} color={colors.icon} />} text="Kalender" onPress={() => { router.push('/village-calendar') }} />
|
|
<ButtonFiturMenu icon={<MaterialCommunityIcons name="account-group-outline" size={30} color={colors.icon} />} text="Anggota" onPress={() => { router.push('/member') }} />
|
|
<ButtonFiturMenu icon={<MaterialCommunityIcons name="account-tie-outline" size={30} color={colors.icon} />} text="Jabatan" onPress={() => { router.push('/position') }} />
|
|
{
|
|
entityUser.role == "cosupadmin" && <ButtonFiturMenu icon={<Ionicons name="images-outline" size={30} color={colors.icon} />} text="Banner" onPress={() => { router.push('/banner') }} />
|
|
}
|
|
{
|
|
(entityUser.role == "supadmin" || entityUser.role == "developer") &&
|
|
<>
|
|
<ButtonFiturMenu icon={<Ionicons name="bookmarks-outline" size={30} color={colors.icon} />} text="Lembaga Desa" onPress={() => { router.push('/group') }} />
|
|
<ButtonFiturMenu icon={<Ionicons name="images-outline" size={30} color={colors.icon} />} text="Banner" onPress={() => { router.push('/banner') }} />
|
|
</>
|
|
}
|
|
</View>
|
|
</View>
|
|
</SafeAreaView>
|
|
)
|
|
} |