upd: diskusi divisi
Deskripsi: - ui list diskusi No Issues
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightDiscussionList from "@/components/discussion/headerDiscussionList"
|
||||
import HeaderRightTaskList from "@/components/task/headerTaskList"
|
||||
import { Headers } from "@/constants/Headers"
|
||||
import { router, Stack } from "expo-router"
|
||||
@@ -14,6 +15,12 @@ export default function RootLayout() {
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightTaskList />
|
||||
}} />
|
||||
<Stack.Screen name="discussion/index" options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
title: 'Diskusi Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightDiscussionList />
|
||||
}} />
|
||||
</Stack>
|
||||
<StatusBar style="light" />
|
||||
</>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function DiscussionDetail() {
|
||||
return (
|
||||
<>
|
||||
<Text>Detail diskusi</Text>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
import BorderBottomItem from "@/components/borderBottomItem";
|
||||
import ButtonTab from "@/components/buttonTab";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import LabelStatus from "@/components/labelStatus";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { AntDesign, Feather, Ionicons } from "@expo/vector-icons";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { Image, SafeAreaView, ScrollView, Text, View } from "react-native";
|
||||
|
||||
|
||||
export default function DiscussionDivision() {
|
||||
const { active } = useLocalSearchParams<{ active?: string }>()
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<View style={[Styles.wrapBtnTab]}>
|
||||
<ButtonTab
|
||||
active={active == "false" ? "false" : "true"}
|
||||
value="true"
|
||||
onPress={() => { router.push('./discussion?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('./discussion?active=false') }}
|
||||
label="Arsip"
|
||||
icon={<AntDesign name="closecircleo" color={active == "true" ? 'black' : 'white'} size={20} />}
|
||||
n={2} />
|
||||
</View>
|
||||
<InputSearch />
|
||||
<View>
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push('./discussion/1') }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image source={require("../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
subtitle={
|
||||
<LabelStatus category='success' text='BUKA' size="small" />
|
||||
}
|
||||
rightTopInfo="3 Jan 2025"
|
||||
desc="Bagaimana dampak yg dirasakan akibat efisiensi?"
|
||||
leftBottomInfo={
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
|
||||
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Diskusikan</Text>
|
||||
</View>
|
||||
}
|
||||
rightBottomInfo='15 Komentar'
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push('./discussion/1') }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image source={require("../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
subtitle={
|
||||
<LabelStatus category='success' text='BUKA' size="small" />
|
||||
}
|
||||
rightTopInfo="3 Jan 2025"
|
||||
desc="Bagaimana dampak yg dirasakan akibat efisiensi?"
|
||||
leftBottomInfo={
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
|
||||
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Diskusikan</Text>
|
||||
</View>
|
||||
}
|
||||
rightBottomInfo='15 Komentar'
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push('./discussion/1') }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image source={require("../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
subtitle={
|
||||
<LabelStatus category='success' text='BUKA' size="small" />
|
||||
}
|
||||
rightTopInfo="3 Jan 2025"
|
||||
desc="Bagaimana dampak yg dirasakan akibat efisiensi?"
|
||||
leftBottomInfo={
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
|
||||
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Diskusikan</Text>
|
||||
</View>
|
||||
}
|
||||
rightBottomInfo='15 Komentar'
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push('./discussion/1') }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image source={require("../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
subtitle={
|
||||
<LabelStatus category='success' text='BUKA' size="small" />
|
||||
}
|
||||
rightTopInfo="3 Jan 2025"
|
||||
desc="Bagaimana dampak yg dirasakan akibat efisiensi?"
|
||||
leftBottomInfo={
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
|
||||
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Diskusikan</Text>
|
||||
</View>
|
||||
}
|
||||
rightBottomInfo='15 Komentar'
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push('./discussion/1') }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image source={require("../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
subtitle={
|
||||
<LabelStatus category='success' text='BUKA' size="small" />
|
||||
}
|
||||
rightTopInfo="3 Jan 2025"
|
||||
desc="Bagaimana dampak yg dirasakan akibat efisiensi?"
|
||||
leftBottomInfo={
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
|
||||
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Diskusikan</Text>
|
||||
</View>
|
||||
}
|
||||
rightBottomInfo='15 Komentar'
|
||||
/>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
30
components/discussion/headerDiscussionList.tsx
Normal file
30
components/discussion/headerDiscussionList.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import Styles from "@/constants/Styles"
|
||||
import { AntDesign } from "@expo/vector-icons"
|
||||
import { router } from "expo-router"
|
||||
import { useState } from "react"
|
||||
import { View } from "react-native"
|
||||
import ButtonMenuHeader from "../buttonMenuHeader"
|
||||
import DrawerBottom from "../drawerBottom"
|
||||
import MenuItemRow from "../menuItemRow"
|
||||
|
||||
export default function HeaderRightDiscussionList() {
|
||||
const [isVisible, setVisible] = 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 Diskusi"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
router.push('/discussion/create')
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -51,6 +51,7 @@ export default function FiturDivisionDetail() {
|
||||
title="Diskusi"
|
||||
subtitle='5 Diskusi'
|
||||
width={28}
|
||||
onPress={() => {router.push('/division/123/discussion?active=true')}}
|
||||
/>
|
||||
|
||||
<BorderBottomItem
|
||||
|
||||
Reference in New Issue
Block a user