upd: task divisi
Deskripsi: - list task divisi - create task divisi - detail task divisi - tambah tugas task divisi - tambah file tasi divisi - edit task divisi - pembatalan task divisi No Issues
This commit is contained in:
@@ -42,6 +42,7 @@ export default function RootLayout() {
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightDivisionList />
|
||||
}} />
|
||||
<Stack.Screen name="division/[id]/(fitur-division)" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
<StatusBar style="light" />
|
||||
</>
|
||||
|
||||
21
app/(application)/division/[id]/(fitur-division)/_layout.tsx
Normal file
21
app/(application)/division/[id]/(fitur-division)/_layout.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightTaskList from "@/components/task/headerTaskList"
|
||||
import { Headers } from "@/constants/Headers"
|
||||
import { router, Stack } from "expo-router"
|
||||
import { StatusBar } from "expo-status-bar"
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<>
|
||||
<Stack screenOptions={Headers.shadow}>
|
||||
<Stack.Screen name="task/index" options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
title: 'Tugas Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightTaskList />
|
||||
}} />
|
||||
</Stack>
|
||||
<StatusBar style="light" />
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import BorderBottomItem from "@/components/borderBottomItem";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import ButtonSelect from "@/components/buttonSelect";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
|
||||
export default function TaskDivisionAddFile() {
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Tambah File',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<ButtonSelect value="Upload File" />
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>File</Text>
|
||||
<View style={[Styles.wrapPaper]}>
|
||||
<BorderBottomItem
|
||||
borderType="all"
|
||||
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
|
||||
title="image_pertama.jpg"
|
||||
titleWeight="normal"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="all"
|
||||
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
|
||||
title="file_kedua.pdf"
|
||||
titleWeight="normal"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin menambahkan data?',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Styles from "@/constants/Styles";
|
||||
import dayjs from "dayjs";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { SafeAreaView, ScrollView, View, ToastAndroid, Text } from "react-native";
|
||||
import DateTimePicker, { DateType, getDefaultStyles } from "react-native-ui-datepicker";
|
||||
|
||||
export default function TaskDivisionAddTask() {
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
const [range, setRange] = useState<{ startDate: DateType; endDate: DateType; }>({ startDate: undefined, endDate: undefined });
|
||||
const defaultStyles = getDefaultStyles()
|
||||
|
||||
const from = range.startDate
|
||||
? dayjs(range.startDate).format('MMM DD, YYYY')
|
||||
: '';
|
||||
const to = range.endDate ? dayjs(range.endDate).format('MMM DD, YYYY') : '';
|
||||
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Tambah Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<DateTimePicker
|
||||
mode="range"
|
||||
startDate={range.startDate}
|
||||
endDate={range.endDate}
|
||||
onChange={(param) => setRange(param)}
|
||||
styles={defaultStyles}
|
||||
/>
|
||||
</View>
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv10]}>
|
||||
<View style={[{ width: '48%' }]}>
|
||||
<Text style={[Styles.mb05]}>Tanggal Mulai <Text style={Styles.cError}>*</Text></Text>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<Text style={{ textAlign: 'center' }}>{from}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[{ width: '48%' }]}>
|
||||
<Text style={[Styles.mb05]}>Tanggal Berakhir <Text style={Styles.cError}>*</Text></Text>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<Text style={{ textAlign: 'center' }}>{to}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<InputForm label="Judul Tugas" type="default" placeholder="Judul Tugas" required bg="white" />
|
||||
<ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin menambahkan data?',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import { ButtonForm } from "@/components/buttonForm"
|
||||
import { InputForm } from "@/components/inputForm"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"
|
||||
|
||||
export default function TaskDivisionCancel(){
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Pembatalan Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Alasan Pembatalan" type="default" placeholder="Alasan Pembatalan" required bg="white" />
|
||||
<ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin membatalkan tugas? Pembatalan bersifat permanen',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
|
||||
export default function TaskDivisionEdit() {
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Edit Judul Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Judul Kegiatan" type="default" placeholder="Judul Kegiatan" required bg="white" />
|
||||
<ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin mengubah data?',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import SectionFile from "@/components/sectionFile";
|
||||
import SectionMember from "@/components/sectionMember";
|
||||
import SectionProgress from "@/components/sectionProgress";
|
||||
import SectionTanggalTugas from "@/components/sectionTanggalTugas";
|
||||
import HeaderRightTaskDetail from "@/components/task/headerTaskDetail";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
|
||||
export default function DetailTaskDivision() {
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Judul Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightTaskDetail id={detail} />,
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<SectionProgress text="Kemajuan Kegiatan 50%" />
|
||||
<SectionTanggalTugas />
|
||||
<SectionFile />
|
||||
<SectionMember />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import ButtonSelect from "@/components/buttonSelect";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
|
||||
export default function CreateTaskDivision() {
|
||||
const { id } = useLocalSearchParams()
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: `Tambah Tugas`,
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Judul Tugas" type="default" placeholder="Judul Tugas" required />
|
||||
<ButtonSelect value="Tambah Tanggal & Tugas" />
|
||||
<ButtonSelect value="Upload File" />
|
||||
<ButtonSelect value="Tambah Anggota" />
|
||||
<ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin menambahkan data?',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
||||
router.push('../task?status=0')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
134
app/(application)/division/[id]/(fitur-division)/task/index.tsx
Normal file
134
app/(application)/division/[id]/(fitur-division)/task/index.tsx
Normal file
@@ -0,0 +1,134 @@
|
||||
import BorderBottomItem from "@/components/borderBottomItem";
|
||||
import ButtonTab from "@/components/buttonTab";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import LabelStatus from "@/components/labelStatus";
|
||||
import PaperGridContent from "@/components/paperGridContent";
|
||||
import ProgressBar from "@/components/progressBar";
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { AntDesign, Ionicons, 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 ListTask() {
|
||||
const { status } = useLocalSearchParams<{ status: string }>()
|
||||
const [isList, setList] = useState(false)
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<ScrollView horizontal style={[Styles.mb10]}>
|
||||
<ButtonTab
|
||||
active={status}
|
||||
value="0"
|
||||
onPress={() => { router.push('./task?status=0') }}
|
||||
label="Segera"
|
||||
icon={<MaterialCommunityIcons name="clock-alert-outline" color={status == "0" ? 'white' : 'black'} size={20} />}
|
||||
n={4} />
|
||||
<ButtonTab
|
||||
active={status}
|
||||
value="1"
|
||||
onPress={() => { router.push('./task?status=1') }}
|
||||
label="Dikerjakan"
|
||||
icon={<MaterialCommunityIcons name="progress-check" color={status == "1" ? 'white' : 'black'} size={20} />}
|
||||
n={4} />
|
||||
<ButtonTab
|
||||
active={status}
|
||||
value="2"
|
||||
onPress={() => { router.push('./task?status=2') }}
|
||||
label="Selesai"
|
||||
icon={<Ionicons name="checkmark-done-circle-outline" color={status == "2" ? 'white' : 'black'} size={20} />}
|
||||
n={4} />
|
||||
<ButtonTab
|
||||
active={status}
|
||||
value="3"
|
||||
onPress={() => { router.push('./task?status=3') }}
|
||||
label="Batal"
|
||||
icon={<AntDesign name="closecircleo" color={status == "3" ? 'white' : 'black'} size={20} />}
|
||||
n={4} />
|
||||
</ScrollView>
|
||||
<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>
|
||||
{
|
||||
isList
|
||||
?
|
||||
<View>
|
||||
<BorderBottomItem
|
||||
onPress={() => { }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
||||
<AntDesign name="areachart" size={25} color={'#384288'} />
|
||||
</View>
|
||||
}
|
||||
title="Pembangunan Jembatan"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
||||
<AntDesign name="areachart" size={25} color={'#384288'} />
|
||||
</View>
|
||||
}
|
||||
title="Pembangunan Jembatan"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
||||
<AntDesign name="areachart" size={25} color={'#384288'} />
|
||||
</View>
|
||||
}
|
||||
title="Pembangunan Jembatan"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
onPress={() => { }}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<View style={[Styles.iconContent, ColorsStatus.lightGreen]}>
|
||||
<AntDesign name="areachart" size={25} color={'#384288'} />
|
||||
</View>
|
||||
}
|
||||
title="Pembangunan Jembatan"
|
||||
/>
|
||||
</View>
|
||||
:
|
||||
|
||||
<View>
|
||||
<PaperGridContent onPress={() => { router.push('./task/321') }} content="page" title="Pembangunan Jembatan" headerColor="primary">
|
||||
<ProgressBar />
|
||||
<View style={[Styles.rowSpaceBetween]}>
|
||||
<Text style={[Styles.textDefault, Styles.cGray]}>13 Februari 2025</Text>
|
||||
<LabelStatus size="default" category="primary" text="SEGERA" />
|
||||
</View>
|
||||
</PaperGridContent>
|
||||
<PaperGridContent content="page" title="Pembangunan Jembatan" headerColor="primary">
|
||||
<ProgressBar />
|
||||
<View style={[Styles.rowSpaceBetween]}>
|
||||
<Text style={[Styles.textDefault, Styles.cGray]}>13 Februari 2025</Text>
|
||||
<LabelStatus size="default" category="primary" text="SEGERA" />
|
||||
</View>
|
||||
</PaperGridContent>
|
||||
<PaperGridContent content="page" title="Pembangunan Jembatan" headerColor="primary">
|
||||
<ProgressBar />
|
||||
<View style={[Styles.rowSpaceBetween]}>
|
||||
<Text style={[Styles.textDefault, Styles.cGray]}>13 Februari 2025</Text>
|
||||
<LabelStatus size="default" category="primary" text="SEGERA" />
|
||||
</View>
|
||||
</PaperGridContent>
|
||||
</View>
|
||||
|
||||
}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import Styles from "@/constants/Styles"
|
||||
import { AntDesign, MaterialIcons, SimpleLineIcons } from "@expo/vector-icons"
|
||||
import { Text, View } from "react-native"
|
||||
import BorderBottomItem from "../borderBottomItem"
|
||||
import { router } from "expo-router"
|
||||
|
||||
export default function FiturDivisionDetail() {
|
||||
return (
|
||||
@@ -21,6 +22,7 @@ export default function FiturDivisionDetail() {
|
||||
title="Tugas"
|
||||
subtitle='15 Tugas'
|
||||
width={28}
|
||||
onPress={() => {router.push('/division/123/task?status=0')}}
|
||||
/>
|
||||
|
||||
<BorderBottomItem
|
||||
|
||||
70
components/task/headerTaskDetail.tsx
Normal file
70
components/task/headerTaskDetail.tsx
Normal file
@@ -0,0 +1,70 @@
|
||||
import Styles from "@/constants/Styles"
|
||||
import { AntDesign, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { useState } from "react"
|
||||
import { View } from "react-native"
|
||||
import ButtonMenuHeader from "../buttonMenuHeader"
|
||||
import DrawerBottom from "../drawerBottom"
|
||||
import MenuItemRow from "../menuItemRow"
|
||||
import { router } from "expo-router"
|
||||
|
||||
type Props = {
|
||||
id: string | string[]
|
||||
}
|
||||
|
||||
export default function HeaderRightTaskDetail({ id }: Props) {
|
||||
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 Tugas"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
router.push(`./${id}/add-task`)
|
||||
}}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="file-plus" color="black" size={25} />}
|
||||
title="Tambah File"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
router.push(`./${id}/add-file`)
|
||||
}}
|
||||
/>
|
||||
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color="black" size={25} />}
|
||||
title="Tambah Anggota"
|
||||
onPress={() => {
|
||||
// setVisible(false)
|
||||
|
||||
}}
|
||||
/>
|
||||
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
||||
title="Edit"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
router.push(`./${id}/edit`)
|
||||
}}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="close" color="black" size={25} />}
|
||||
title="Batal"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
router.push(`./${id}/cancel`)
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
</>
|
||||
)
|
||||
}
|
||||
29
components/task/headerTaskList.tsx
Normal file
29
components/task/headerTaskList.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import Styles from "@/constants/Styles"
|
||||
import { AntDesign } from "@expo/vector-icons"
|
||||
import { useState } from "react"
|
||||
import { View } from "react-native"
|
||||
import ButtonMenuHeader from "../buttonMenuHeader"
|
||||
import DrawerBottom from "../drawerBottom"
|
||||
import MenuItemRow from "../menuItemRow"
|
||||
import { router } from "expo-router"
|
||||
|
||||
export default function HeaderRightTaskList() {
|
||||
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 Tugas Divisi"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
router.push('./task/create')
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user