upd: project
Deskripsi: - update button save pada tambah edit project - ui edit tugas dan tanggal project - modal menu detail tugas dan tanggal - modal menu detail file - modal menu detail anggota project No Issues
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
|
||||||
import BorderBottomItem from "@/components/borderBottomItem"
|
import BorderBottomItem from "@/components/borderBottomItem"
|
||||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||||
import { ButtonForm } from "@/components/buttonForm"
|
import ButtonSaveHeader from "@/components/buttonSaveHeader"
|
||||||
import ButtonSelect from "@/components/buttonSelect"
|
import ButtonSelect from "@/components/buttonSelect"
|
||||||
import Styles from "@/constants/Styles"
|
import Styles from "@/constants/Styles"
|
||||||
import { MaterialCommunityIcons } from "@expo/vector-icons"
|
import { MaterialCommunityIcons } from "@expo/vector-icons"
|
||||||
@@ -18,6 +17,10 @@ export default function ProjectAddFile() {
|
|||||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||||
headerTitle: 'Tambah File',
|
headerTitle: 'Tambah File',
|
||||||
headerTitleAlign: 'center',
|
headerTitleAlign: 'center',
|
||||||
|
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||||
|
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||||
|
router.push('/project/4324')
|
||||||
|
}} />
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
@@ -40,7 +43,7 @@ export default function ProjectAddFile() {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<ButtonForm
|
{/* <ButtonForm
|
||||||
text="SIMPAN"
|
text="SIMPAN"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertKonfirmasi({
|
AlertKonfirmasi({
|
||||||
@@ -51,7 +54,7 @@ export default function ProjectAddFile() {
|
|||||||
router.push('/project/4324')
|
router.push('/project/4324')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}} />
|
}} /> */}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
|
||||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||||
import { ButtonForm } from "@/components/buttonForm"
|
import ButtonSaveHeader from "@/components/buttonSaveHeader"
|
||||||
import { InputForm } from "@/components/inputForm"
|
import { InputForm } from "@/components/inputForm"
|
||||||
import Styles from "@/constants/Styles"
|
import Styles from "@/constants/Styles"
|
||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs"
|
||||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native"
|
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native"
|
||||||
import DateTimePicker, { DateType, getDefaultStyles } from 'react-native-ui-datepicker';
|
import DateTimePicker, { DateType, getDefaultStyles } from 'react-native-ui-datepicker'
|
||||||
|
|
||||||
export default function ProjectAddTask() {
|
export default function ProjectAddTask() {
|
||||||
const { id } = useLocalSearchParams()
|
const { id } = useLocalSearchParams()
|
||||||
@@ -27,6 +26,10 @@ export default function ProjectAddTask() {
|
|||||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||||
headerTitle: 'Tambah Tugas',
|
headerTitle: 'Tambah Tugas',
|
||||||
headerTitleAlign: 'center',
|
headerTitleAlign: 'center',
|
||||||
|
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||||
|
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||||
|
router.push('/project/4324')
|
||||||
|
}} />
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
@@ -55,7 +58,7 @@ export default function ProjectAddTask() {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<InputForm label="Judul Tugas" type="default" placeholder="Judul Tugas" required bg="white" />
|
<InputForm label="Judul Tugas" type="default" placeholder="Judul Tugas" required bg="white" />
|
||||||
<ButtonForm
|
{/* <ButtonForm
|
||||||
text="SIMPAN"
|
text="SIMPAN"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertKonfirmasi({
|
AlertKonfirmasi({
|
||||||
@@ -66,7 +69,7 @@ export default function ProjectAddTask() {
|
|||||||
router.push('/project/4324')
|
router.push('/project/4324')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}} />
|
}} /> */}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
|
||||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||||
import { ButtonForm } from "@/components/buttonForm"
|
import ButtonSaveHeader from "@/components/buttonSaveHeader"
|
||||||
import { InputForm } from "@/components/inputForm"
|
import { InputForm } from "@/components/inputForm"
|
||||||
import Styles from "@/constants/Styles"
|
import Styles from "@/constants/Styles"
|
||||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||||
@@ -15,12 +14,16 @@ export default function ProjectCancel() {
|
|||||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||||
headerTitle: 'Pembatalan Kegiatan',
|
headerTitle: 'Pembatalan Kegiatan',
|
||||||
headerTitleAlign: 'center',
|
headerTitleAlign: 'center',
|
||||||
|
headerRight: () => <ButtonSaveHeader category="cancel" onPress={() => {
|
||||||
|
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||||
|
router.push('/project/4324')
|
||||||
|
}} />
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<View style={[Styles.p15, Styles.mb100]}>
|
<View style={[Styles.p15, Styles.mb100]}>
|
||||||
<InputForm label="Alasan Pembatalan" type="default" placeholder="Alasan Pembatalan" required bg="white" />
|
<InputForm label="Alasan Pembatalan" type="default" placeholder="Alasan Pembatalan" required bg="white" />
|
||||||
<ButtonForm
|
{/* <ButtonForm
|
||||||
text="SIMPAN"
|
text="SIMPAN"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertKonfirmasi({
|
AlertKonfirmasi({
|
||||||
@@ -31,7 +34,7 @@ export default function ProjectCancel() {
|
|||||||
router.push('/project/4324')
|
router.push('/project/4324')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}} />
|
}} /> */}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
|
||||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||||
import { ButtonForm } from "@/components/buttonForm"
|
import ButtonSaveHeader from "@/components/buttonSaveHeader"
|
||||||
import { InputForm } from "@/components/inputForm"
|
import { InputForm } from "@/components/inputForm"
|
||||||
import Styles from "@/constants/Styles"
|
import Styles from "@/constants/Styles"
|
||||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||||
@@ -10,30 +9,34 @@ export default function EditProject() {
|
|||||||
const { id } = useLocalSearchParams()
|
const { id } = useLocalSearchParams()
|
||||||
return (
|
return (
|
||||||
<SafeAreaView>
|
<SafeAreaView>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
options={{
|
options={{
|
||||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||||
headerTitle: 'Edit Judul Kegiatan',
|
headerTitle: 'Edit Judul Kegiatan',
|
||||||
headerTitleAlign: 'center',
|
headerTitleAlign: 'center',
|
||||||
}}
|
headerRight: () => <ButtonSaveHeader category="update" onPress={() => {
|
||||||
/>
|
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||||
<ScrollView>
|
router.push('/project/4324')
|
||||||
<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('/project/4324')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}} />
|
}} />
|
||||||
</View>
|
}}
|
||||||
</ScrollView>
|
/>
|
||||||
</SafeAreaView>
|
<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('/project/4324')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}} /> */}
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</SafeAreaView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
|
||||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||||
import { ButtonForm } from "@/components/buttonForm";
|
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||||
import ButtonSelect from "@/components/buttonSelect";
|
import ButtonSelect from "@/components/buttonSelect";
|
||||||
import { InputForm } from "@/components/inputForm";
|
import { InputForm } from "@/components/inputForm";
|
||||||
import SelectForm from "@/components/selectForm";
|
import SelectForm from "@/components/selectForm";
|
||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { router, Stack } from "expo-router";
|
import { router, Stack } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||||
|
|
||||||
export default function CreateProject() {
|
export default function CreateProject() {
|
||||||
const [chooseGroup, setChooseGroup] = useState({ val: '', label: '' })
|
const [chooseGroup, setChooseGroup] = useState({ val: '', label: '' })
|
||||||
@@ -19,6 +18,10 @@ export default function CreateProject() {
|
|||||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||||
headerTitle: 'Tambah Kegiatan',
|
headerTitle: 'Tambah Kegiatan',
|
||||||
headerTitleAlign: 'center',
|
headerTitleAlign: 'center',
|
||||||
|
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||||
|
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||||
|
router.push('/project?status=0')
|
||||||
|
}} />
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
@@ -28,7 +31,7 @@ export default function CreateProject() {
|
|||||||
<ButtonSelect value="Tambah Tanggal & Tugas" />
|
<ButtonSelect value="Tambah Tanggal & Tugas" />
|
||||||
<ButtonSelect value="Upload File" />
|
<ButtonSelect value="Upload File" />
|
||||||
<ButtonSelect value="Tambah Anggota" />
|
<ButtonSelect value="Tambah Anggota" />
|
||||||
<ButtonForm
|
{/* <ButtonForm
|
||||||
text="SIMPAN"
|
text="SIMPAN"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertKonfirmasi({
|
AlertKonfirmasi({
|
||||||
@@ -39,7 +42,7 @@ export default function CreateProject() {
|
|||||||
router.push('/project?status=0')
|
router.push('/project?status=0')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}} />
|
}} /> */}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|||||||
65
app/(application)/project/update/[detail].tsx
Normal file
65
app/(application)/project/update/[detail].tsx
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||||
|
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||||
|
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, Text, ToastAndroid, View } from "react-native";
|
||||||
|
import DateTimePicker, { DateType, getDefaultStyles } from "react-native-ui-datepicker";
|
||||||
|
|
||||||
|
export default function UpdateProjectTask() {
|
||||||
|
const { 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: 'Edit Tanggal dan Tugas',
|
||||||
|
headerTitleAlign: 'center',
|
||||||
|
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||||
|
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||||
|
router.push('/project/4324')
|
||||||
|
}} />
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<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" />
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</SafeAreaView>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ import { ButtonHeader } from "./buttonHeader"
|
|||||||
import AlertKonfirmasi from "./alertKonfirmasi"
|
import AlertKonfirmasi from "./alertKonfirmasi"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
category: 'create' | 'update'
|
category: 'create' | 'update' | 'cancel'
|
||||||
onPress?: () => void
|
onPress?: () => void
|
||||||
disable?: boolean
|
disable?: boolean
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,11 @@ export default function ButtonSaveHeader({ category, onPress, disable }: Props)
|
|||||||
onPress={() => {
|
onPress={() => {
|
||||||
AlertKonfirmasi({
|
AlertKonfirmasi({
|
||||||
title: 'Konfirmasi',
|
title: 'Konfirmasi',
|
||||||
desc: category == 'create' ? 'Apakah anda yakin ingin menambahkan data?' : 'Apakah anda yakin mengubah data?',
|
desc: category == 'create'
|
||||||
|
? 'Apakah anda yakin ingin menambahkan data?'
|
||||||
|
: category == 'cancel'
|
||||||
|
? 'Apakah anda yakin ingin membatalkan kegiatan? Pembatalan bersifat permanen'
|
||||||
|
: 'Apakah anda yakin mengubah data?',
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
onPress && onPress()
|
onPress && onPress()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
import { Text, View } from "react-native";
|
import { Pressable, Text, View } from "react-native";
|
||||||
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -8,11 +8,12 @@ type Props = {
|
|||||||
title: string
|
title: string
|
||||||
dateStart: string
|
dateStart: string
|
||||||
dateEnd: string
|
dateEnd: string
|
||||||
|
onPress?: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ItemSectionTanggalTugas({ done, title, dateStart, dateEnd }: Props) {
|
export default function ItemSectionTanggalTugas({ done, title, dateStart, dateEnd, onPress }: Props) {
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.mb15, { borderBottomColor: '#d6d8f6', borderBottomWidth: 1 }]}>
|
<Pressable style={[Styles.mb15, { borderBottomColor: '#d6d8f6', borderBottomWidth: 1 }]} onPress={onPress}>
|
||||||
<View style={[Styles.rowItemsCenter]}>
|
<View style={[Styles.rowItemsCenter]}>
|
||||||
{
|
{
|
||||||
done ?
|
done ?
|
||||||
@@ -48,6 +49,6 @@ export default function ItemSectionTanggalTugas({ done, title, dateStart, dateEn
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</Pressable>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ type Props = {
|
|||||||
open: boolean
|
open: boolean
|
||||||
close: (value: boolean) => void
|
close: (value: boolean) => void
|
||||||
title: string
|
title: string
|
||||||
category: 'group'
|
category: 'group' | 'status-task'
|
||||||
choose: string
|
choose: string
|
||||||
onSelect: (value: { val: string, label: string }) => void
|
onSelect: (value: { val: string, label: string }) => void
|
||||||
}
|
}
|
||||||
@@ -19,23 +19,43 @@ export default function ModalSelect({ open, close, title, category, choose, onSe
|
|||||||
return (
|
return (
|
||||||
<DrawerBottom animation="none" isVisible={open} setVisible={close} title={title} height={75}>
|
<DrawerBottom animation="none" isVisible={open} setVisible={close} title={title} height={75}>
|
||||||
<View>
|
<View>
|
||||||
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
|
{
|
||||||
onSelect({ val: 'dinas', label: 'Dinas' })
|
category == 'group' ?
|
||||||
setChoose('dinas')
|
<>
|
||||||
close(false)
|
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
|
||||||
}}>
|
onSelect({ val: 'dinas', label: 'Dinas' })
|
||||||
<Text style={[Styles.textDefaultSemiBold]}>Dinas</Text>
|
setChoose('dinas')
|
||||||
<AntDesign name="check" size={20} />
|
close(false)
|
||||||
</Pressable>
|
}}>
|
||||||
<Pressable style={[Styles.itemSelectModal]}>
|
<Text style={[Styles.textDefaultSemiBold]}>Dinas</Text>
|
||||||
<Text>Adat</Text>
|
<AntDesign name="check" size={20} />
|
||||||
</Pressable>
|
</Pressable>
|
||||||
<Pressable style={[Styles.itemSelectModal]}>
|
<Pressable style={[Styles.itemSelectModal]}>
|
||||||
<Text>Karang Taruna</Text>
|
<Text>Adat</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
<Pressable style={[Styles.itemSelectModal]}>
|
<Pressable style={[Styles.itemSelectModal]}>
|
||||||
<Text>PKK</Text>
|
<Text>Karang Taruna</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
<Pressable style={[Styles.itemSelectModal]}>
|
||||||
|
<Text>PKK</Text>
|
||||||
|
</Pressable>
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<>
|
||||||
|
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
|
||||||
|
onSelect({ val: 'blm-dikerjakan', label: 'Belum Dikerjakan' })
|
||||||
|
setChoose('blm-dikerjakan')
|
||||||
|
close(false)
|
||||||
|
}}>
|
||||||
|
<Text style={[Styles.textDefaultSemiBold]}>Belum Dikerjakan</Text>
|
||||||
|
<AntDesign name="check" size={20} />
|
||||||
|
</Pressable>
|
||||||
|
<Pressable style={[Styles.itemSelectModal]}>
|
||||||
|
<Text>Selesai</Text>
|
||||||
|
</Pressable>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,26 +1,72 @@
|
|||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
import { Text, View } from "react-native";
|
import { Text, ToastAndroid, View } from "react-native";
|
||||||
import BorderBottomItem from "./borderBottomItem";
|
import BorderBottomItem from "./borderBottomItem";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
import AlertKonfirmasi from "./alertKonfirmasi";
|
||||||
|
import DrawerBottom from "./drawerBottom";
|
||||||
|
import MenuItemRow from "./menuItemRow";
|
||||||
|
|
||||||
export default function SectionFile() {
|
export default function SectionFile() {
|
||||||
|
const [isModal, setModal] = useState(false)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.mb15]}>
|
<>
|
||||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>File</Text>
|
<View style={[Styles.mb15]}>
|
||||||
<View style={[Styles.wrapPaper]}>
|
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>File</Text>
|
||||||
<BorderBottomItem
|
<View style={[Styles.wrapPaper]}>
|
||||||
borderType="all"
|
<BorderBottomItem
|
||||||
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
|
borderType="all"
|
||||||
title="image_pertama.jpg"
|
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
|
||||||
titleWeight="normal"
|
title="image_pertama.jpg"
|
||||||
/>
|
titleWeight="normal"
|
||||||
<BorderBottomItem
|
onPress={() => { setModal(true) }}
|
||||||
borderType="all"
|
/>
|
||||||
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
|
<BorderBottomItem
|
||||||
title="file_kedua.pdf"
|
borderType="all"
|
||||||
titleWeight="normal"
|
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
|
||||||
/>
|
title="file_kedua.pdf"
|
||||||
|
titleWeight="normal"
|
||||||
|
onPress={() => { setModal(true) }}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
|
||||||
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
|
||||||
|
<View style={Styles.rowItemsCenter}>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<MaterialCommunityIcons name="file-eye" color="black" size={25} />}
|
||||||
|
title="Lihat File"
|
||||||
|
onPress={() => {
|
||||||
|
setModal(false)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<MaterialCommunityIcons name="download" color="black" size={25} />}
|
||||||
|
title="Download"
|
||||||
|
onPress={() => {
|
||||||
|
setModal(false)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<Ionicons name="trash" color="black" size={25} />}
|
||||||
|
title="Hapus"
|
||||||
|
onPress={() => {
|
||||||
|
AlertKonfirmasi({
|
||||||
|
title: 'Konfirmasi',
|
||||||
|
desc: 'Apakah Anda yakin ingin menghapus file ini? File yang dihapus tidak dapat dikembalikan',
|
||||||
|
onPress: () => {
|
||||||
|
setModal(false)
|
||||||
|
ToastAndroid.show('Berhasil menghapus data', ToastAndroid.SHORT)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</DrawerBottom>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1,45 +1,88 @@
|
|||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { Image, Text, View } from "react-native";
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { Image, Text, ToastAndroid, View } from "react-native";
|
||||||
|
import AlertKonfirmasi from "./alertKonfirmasi";
|
||||||
import BorderBottomItem from "./borderBottomItem";
|
import BorderBottomItem from "./borderBottomItem";
|
||||||
|
import DrawerBottom from "./drawerBottom";
|
||||||
|
import MenuItemRow from "./menuItemRow";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
|
||||||
export default function SectionMember() {
|
export default function SectionMember() {
|
||||||
|
const [isModal, setModal] = useState(false)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.mb15]}>
|
<>
|
||||||
<View style={[Styles.rowSpaceBetween, Styles.mv05]}>
|
<View style={[Styles.mb15]}>
|
||||||
<Text style={[Styles.textDefaultSemiBold]}>Anggota</Text>
|
<View style={[Styles.rowSpaceBetween, Styles.mv05]}>
|
||||||
<Text style={[Styles.textDefault]}>Total 5 Anggota</Text>
|
<Text style={[Styles.textDefaultSemiBold]}>Anggota</Text>
|
||||||
|
<Text style={[Styles.textDefault]}>Total 5 Anggota</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={[Styles.wrapPaper]}>
|
||||||
|
<BorderBottomItem
|
||||||
|
borderType="bottom"
|
||||||
|
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||||
|
title="Amalia Dwi"
|
||||||
|
subtitle="Dinas - Bendahara"
|
||||||
|
rightTopInfo="Anggota"
|
||||||
|
onPress={() => { setModal(true) }}
|
||||||
|
/>
|
||||||
|
<BorderBottomItem
|
||||||
|
borderType="bottom"
|
||||||
|
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||||
|
title="Amalia Dwi"
|
||||||
|
subtitle="Dinas - Bendahara"
|
||||||
|
rightTopInfo="Anggota"
|
||||||
|
onPress={() => { setModal(true) }}
|
||||||
|
/>
|
||||||
|
<BorderBottomItem
|
||||||
|
borderType="bottom"
|
||||||
|
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||||
|
title="Amalia Dwi"
|
||||||
|
subtitle="Dinas - Bendahara"
|
||||||
|
rightTopInfo="Anggota"
|
||||||
|
onPress={() => { setModal(true) }}
|
||||||
|
/>
|
||||||
|
<BorderBottomItem
|
||||||
|
borderType="bottom"
|
||||||
|
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||||
|
title="Amalia Dwi"
|
||||||
|
subtitle="Dinas - Bendahara"
|
||||||
|
rightTopInfo="Anggota"
|
||||||
|
onPress={() => { setModal(true) }}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[Styles.wrapPaper]}>
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
|
||||||
<BorderBottomItem
|
<View style={Styles.rowItemsCenter}>
|
||||||
borderType="bottom"
|
<MenuItemRow
|
||||||
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
icon={<MaterialCommunityIcons name="account-eye" color="black" size={25} />}
|
||||||
title="Amalia Dwi"
|
title="Lihat Profil"
|
||||||
subtitle="Dinas - Bendahara"
|
onPress={() => {
|
||||||
rightTopInfo="Anggota"
|
setModal(false)
|
||||||
/>
|
router.push('/member/123')
|
||||||
<BorderBottomItem
|
}}
|
||||||
borderType="bottom"
|
/>
|
||||||
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
|
||||||
title="Amalia Dwi"
|
<MenuItemRow
|
||||||
subtitle="Dinas - Bendahara"
|
icon={<MaterialCommunityIcons name="account-remove" color="black" size={25} />}
|
||||||
rightTopInfo="Anggota"
|
title="Keluarkan"
|
||||||
/>
|
onPress={() => {
|
||||||
<BorderBottomItem
|
AlertKonfirmasi({
|
||||||
borderType="bottom"
|
title: 'Konfirmasi',
|
||||||
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
desc: 'Apakah Anda yakin ingin mengeluarkan anggota?',
|
||||||
title="Amalia Dwi"
|
onPress: () => {
|
||||||
subtitle="Dinas - Bendahara"
|
setModal(false)
|
||||||
rightTopInfo="Anggota"
|
ToastAndroid.show('Berhasil mengeluarkan anggota', ToastAndroid.SHORT)
|
||||||
/>
|
}
|
||||||
<BorderBottomItem
|
})
|
||||||
borderType="bottom"
|
|
||||||
icon={<Image source={require("../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
}}
|
||||||
title="Amalia Dwi"
|
/>
|
||||||
subtitle="Dinas - Bendahara"
|
</View>
|
||||||
rightTopInfo="Anggota"
|
</DrawerBottom>
|
||||||
/>
|
</>
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,79 @@
|
|||||||
import Styles from "@/constants/Styles";
|
import Styles from "@/constants/Styles";
|
||||||
import { Text, View } from "react-native";
|
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { Text, ToastAndroid, View } from "react-native";
|
||||||
|
import DrawerBottom from "./drawerBottom";
|
||||||
import ItemSectionTanggalTugas from "./itemSectionTanggalTugas";
|
import ItemSectionTanggalTugas from "./itemSectionTanggalTugas";
|
||||||
|
import MenuItemRow from "./menuItemRow";
|
||||||
|
import AlertKonfirmasi from "./alertKonfirmasi";
|
||||||
|
import ModalSelect from "./modalSelect";
|
||||||
|
|
||||||
export default function SectionTanggalTugas() {
|
export default function SectionTanggalTugas() {
|
||||||
|
const [isModal, setModal] = useState(false)
|
||||||
|
const [isSelect, setSelect] = useState(false)
|
||||||
|
const [choose, setChoose] = useState({ val: '', label: '' })
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.mb15, Styles.mt10]}>
|
<>
|
||||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>Tanggal & Tugas</Text>
|
<View style={[Styles.mb15, Styles.mt10]}>
|
||||||
<View style={[Styles.wrapPaper]}>
|
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>Tanggal & Tugas</Text>
|
||||||
<ItemSectionTanggalTugas done={false} title="Pertama" dateStart="12-03-2023" dateEnd="15-03-2023" />
|
<View style={[Styles.wrapPaper]}>
|
||||||
<ItemSectionTanggalTugas done={true} title="Kedua" dateStart="15-03-2023" dateEnd="20-03-2023" />
|
<ItemSectionTanggalTugas done={false} title="Pertama" dateStart="12-03-2023" dateEnd="15-03-2023" onPress={() => { setModal(true) }} />
|
||||||
|
<ItemSectionTanggalTugas done={true} title="Kedua" dateStart="15-03-2023" dateEnd="20-03-2023" onPress={() => { setModal(true) }} />
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
|
||||||
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
|
||||||
|
<View style={Styles.rowItemsCenter}>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<MaterialCommunityIcons name="list-status" color="black" size={25} />}
|
||||||
|
title="Update Status"
|
||||||
|
onPress={() => {
|
||||||
|
setModal(false)
|
||||||
|
setSelect(true)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
||||||
|
title="Edit Tugas"
|
||||||
|
onPress={() => {
|
||||||
|
setModal(false)
|
||||||
|
router.push(`/project/update/124`)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<MenuItemRow
|
||||||
|
icon={<Ionicons name="trash" color="black" size={25} />}
|
||||||
|
title="Hapus Tugas"
|
||||||
|
onPress={() => {
|
||||||
|
AlertKonfirmasi({
|
||||||
|
title: 'Konfirmasi',
|
||||||
|
desc: 'Apakah anda yakin ingin menghapus data ini?',
|
||||||
|
onPress: () => {
|
||||||
|
setModal(false)
|
||||||
|
ToastAndroid.show('Berhasil menghapus data', ToastAndroid.SHORT)
|
||||||
|
router.push('/project/243')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</DrawerBottom>
|
||||||
|
|
||||||
|
<ModalSelect
|
||||||
|
category="status-task"
|
||||||
|
close={setSelect}
|
||||||
|
onSelect={(value) => {
|
||||||
|
setChoose(value)
|
||||||
|
setSelect(false)
|
||||||
|
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||||
|
}}
|
||||||
|
title="Status"
|
||||||
|
choose={choose.val}
|
||||||
|
open={isSelect}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user