upd: division
Deskripsi: - ui list diviis - nb: blm selesai No Issues
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||||
import HeaderDiscussionGeneral from "@/components/discussion_general/headerDiscussionGeneral";
|
import HeaderDiscussionGeneral from "@/components/discussion_general/headerDiscussionGeneral";
|
||||||
|
import HeaderRightDivisionList from "@/components/division/headerDivisionList";
|
||||||
import HeaderMemberList from "@/components/member/headerMemberList";
|
import HeaderMemberList from "@/components/member/headerMemberList";
|
||||||
import HeaderRightProjectList from "@/components/project/headerProjectList";
|
import HeaderRightProjectList from "@/components/project/headerProjectList";
|
||||||
import { Headers } from "@/constants/Headers";
|
import { Headers } from "@/constants/Headers";
|
||||||
@@ -35,6 +36,12 @@ export default function RootLayout() {
|
|||||||
headerTitleAlign: 'center',
|
headerTitleAlign: 'center',
|
||||||
headerRight: () => <HeaderRightProjectList />
|
headerRight: () => <HeaderRightProjectList />
|
||||||
}} />
|
}} />
|
||||||
|
<Stack.Screen name="division/index" options={{
|
||||||
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||||
|
title: 'Divisi',
|
||||||
|
headerTitleAlign: 'center',
|
||||||
|
headerRight: () => <HeaderRightDivisionList />
|
||||||
|
}} />
|
||||||
</Stack>
|
</Stack>
|
||||||
<StatusBar style="light" />
|
<StatusBar style="light" />
|
||||||
</>
|
</>
|
||||||
|
|||||||
47
app/(application)/division/index.tsx
Normal file
47
app/(application)/division/index.tsx
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import ButtonTab from "@/components/buttonTab"
|
||||||
|
import InputSearch from "@/components/inputSearch"
|
||||||
|
import Styles from "@/constants/Styles"
|
||||||
|
import { AntDesign, Feather, MaterialCommunityIcons } from "@expo/vector-icons"
|
||||||
|
import { router, useLocalSearchParams } from "expo-router"
|
||||||
|
import { useState } from "react"
|
||||||
|
import { Pressable, SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||||
|
|
||||||
|
export default function ListDivision() {
|
||||||
|
const { active } = useLocalSearchParams<{ active?: string }>()
|
||||||
|
const [isList, setList] = useState(false)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SafeAreaView>
|
||||||
|
<ScrollView>
|
||||||
|
<View style={[Styles.p15, Styles.mb100]}>
|
||||||
|
<View style={[Styles.wrapBtnTab]}>
|
||||||
|
<ButtonTab
|
||||||
|
active={active == "false" ? "false" : "true"}
|
||||||
|
value="true"
|
||||||
|
onPress={() => { router.push('/division?active=true') }}
|
||||||
|
label="Aktif"
|
||||||
|
icon={<Feather name="check-circle" color={active == "false" ? 'black' : 'white'} size={20} />}
|
||||||
|
n={2} />
|
||||||
|
<ButtonTab
|
||||||
|
active={active == "false" ? "false" : "true"}
|
||||||
|
value="false"
|
||||||
|
onPress={() => { router.push('/division?active=false') }}
|
||||||
|
label="Tidak Aktif"
|
||||||
|
icon={<AntDesign name="closecircleo" color={active == "true" ? 'black' : 'white'} size={20} />}
|
||||||
|
n={2} />
|
||||||
|
</View>
|
||||||
|
<View style={[Styles.rowSpaceBetween]}>
|
||||||
|
<InputSearch width={68} />
|
||||||
|
<Pressable onPress={() => { setList(!isList) }}>
|
||||||
|
<MaterialCommunityIcons name={isList ? 'format-list-bulleted' : 'view-grid'} color={"black"} size={30} />
|
||||||
|
</Pressable>
|
||||||
|
</View>
|
||||||
|
<View style={[Styles.mv05]}>
|
||||||
|
<Text>Filter : Dinas</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</SafeAreaView>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ export default function Feature() {
|
|||||||
/>
|
/>
|
||||||
<View style={[Styles.p15]}>
|
<View style={[Styles.p15]}>
|
||||||
<View style={[Styles.rowSpaceBetween, Styles.mb15]}>
|
<View style={[Styles.rowSpaceBetween, Styles.mb15]}>
|
||||||
<ButtonFiturMenu icon={<MaterialIcons name="group" size={35} color="black" />} text="Divisi" />
|
<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={<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={<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') }} />
|
<ButtonFiturMenu icon={<Ionicons name="chatbubbles-sharp" size={35} color="black" />} text="Diskusi" onPress={() => { router.push('/discussion?active=true') }} />
|
||||||
|
|||||||
47
components/division/headerDivisionList.tsx
Normal file
47
components/division/headerDivisionList.tsx
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import { useState } from "react"
|
||||||
|
import ButtonMenuHeader from "../buttonMenuHeader"
|
||||||
|
import DrawerBottom from "../drawerBottom"
|
||||||
|
import { View } from "react-native"
|
||||||
|
import Styles from "@/constants/Styles"
|
||||||
|
import MenuItemRow from "../menuItemRow"
|
||||||
|
import { AntDesign, MaterialCommunityIcons } from "@expo/vector-icons"
|
||||||
|
import ModalFilter from "../modalFilter"
|
||||||
|
|
||||||
|
export default function HeaderRightDivisionList() {
|
||||||
|
const [isVisible, setVisible] = useState(false)
|
||||||
|
const [isFilter, setFilter] = useState(false)
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
|
||||||
|
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
||||||
|
<View style={Styles.rowItemsCenter}>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<AntDesign name="pluscircle" color="black" size={25} />}
|
||||||
|
title="Tambah Kegiatan"
|
||||||
|
onPress={() => {
|
||||||
|
setVisible(false)
|
||||||
|
// router.push('/project/create')
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<AntDesign name="filter" color="black" size={25} />}
|
||||||
|
title="Filter"
|
||||||
|
onPress={() => {
|
||||||
|
setVisible(false)
|
||||||
|
setFilter(true)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<MaterialCommunityIcons name="chart-bar" color="black" size={25} />}
|
||||||
|
title="Laporan"
|
||||||
|
onPress={() => {
|
||||||
|
setVisible(false)
|
||||||
|
// router.push('/project/create')
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</DrawerBottom>
|
||||||
|
<ModalFilter close={() => { setFilter(false) }} open={isFilter} page="division" />
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ export default function FiturHome() {
|
|||||||
<View style={[Styles.mb15]}>
|
<View style={[Styles.mb15]}>
|
||||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Fitur</Text>
|
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Fitur</Text>
|
||||||
<View style={[Styles.rowSpaceBetween]}>
|
<View style={[Styles.rowSpaceBetween]}>
|
||||||
<ButtonFiturMenu icon={<MaterialIcons name="group" size={35} color="black" />} text="Divisi" />
|
<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={<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={<MaterialIcons name="campaign" size={35} color="black" />} text="Pengumuman" onPress={() => { router.push('/announcement') }} />
|
||||||
<ButtonFiturMenu icon={<MaterialCommunityIcons name="view-grid" size={35} color="black" />} text="Semua" onPress={() => { router.push('/feature') }} />
|
<ButtonFiturMenu icon={<MaterialCommunityIcons name="view-grid" size={35} color="black" />} text="Semua" onPress={() => { router.push('/feature') }} />
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
|
|||||||
</Text>
|
</Text>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30]}>
|
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]}>
|
||||||
{itemRight != undefined ? itemRight : itemLeft}
|
{itemRight != undefined ? itemRight : itemLeft}
|
||||||
<TextInput
|
<TextInput
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
keyboardType={type}
|
keyboardType={type}
|
||||||
onChangeText={onChange}
|
onChangeText={onChange}
|
||||||
style={{ width: width && lebar * width / 100, backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }}
|
style={{ width: width && lebar * width / 100}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{error && (<Text style={[Styles.textInformation, Styles.cError]}>{errorText}</Text>)}
|
{error && (<Text style={[Styles.textInformation, Styles.cError]}>{errorText}</Text>)}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export default function InputSearch({ onChange, width }: { onChange?: (val: stri
|
|||||||
itemLeft={<Feather name="search" size={20} color="grey" />}
|
itemLeft={<Feather name="search" size={20} color="grey" />}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
width={width}
|
width={width}
|
||||||
|
bg="white"
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ import { router } from "expo-router"
|
|||||||
type Props = {
|
type Props = {
|
||||||
open: boolean,
|
open: boolean,
|
||||||
close: (value: boolean) => void
|
close: (value: boolean) => void
|
||||||
page: 'position' | 'member' | 'discussion' | 'project'
|
page: 'position' | 'member' | 'discussion' | 'project' | 'division'
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ModalFilter({ open, close, page }: Props) {
|
export default function ModalFilter({ open, close, page }: Props) {
|
||||||
|
|||||||
Reference in New Issue
Block a user