upd: task division
Deskripsi: - update button save button pada tambah edit tugas divisi - update button save pada tambah file, tambah task, cancel tugas divisi - ui tambah task tugas tanggal divisi No Issues
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import BorderBottomItem from "@/components/borderBottomItem";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ButtonSelect from "@/components/buttonSelect";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
@@ -17,6 +16,10 @@ export default function TaskDivisionAddFile() {
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Tambah File',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
@@ -39,7 +42,7 @@ export default function TaskDivisionAddFile() {
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<ButtonForm
|
||||
{/* <ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
@@ -50,7 +53,7 @@ export default function TaskDivisionAddFile() {
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
}} /> */}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
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, View, ToastAndroid, Text } from "react-native";
|
||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import DateTimePicker, { DateType, getDefaultStyles } from "react-native-ui-datepicker";
|
||||
|
||||
export default function TaskDivisionAddTask() {
|
||||
@@ -27,6 +26,10 @@ export default function TaskDivisionAddTask() {
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Tambah Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
@@ -55,7 +58,7 @@ export default function TaskDivisionAddTask() {
|
||||
</View>
|
||||
</View>
|
||||
<InputForm label="Judul Tugas" type="default" placeholder="Judul Tugas" required bg="white" />
|
||||
<ButtonForm
|
||||
{/* <ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
@@ -66,7 +69,7 @@ export default function TaskDivisionAddTask() {
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
}} /> */}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import { ButtonForm } from "@/components/buttonForm"
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader"
|
||||
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(){
|
||||
export default function TaskDivisionCancel() {
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
return (
|
||||
<SafeAreaView>
|
||||
@@ -15,12 +14,16 @@ export default function TaskDivisionCancel(){
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Pembatalan Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <ButtonSaveHeader category="cancel" onPress={() => {
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Alasan Pembatalan" type="default" placeholder="Alasan Pembatalan" required bg="white" />
|
||||
<ButtonForm
|
||||
{/* <ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
@@ -31,7 +34,7 @@ export default function TaskDivisionCancel(){
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
}} /> */}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
@@ -15,12 +14,16 @@ export default function TaskDivisionEdit() {
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Edit Judul Tugas',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <ButtonSaveHeader category="update" onPress={() => {
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
router.push('./')
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Judul Kegiatan" type="default" placeholder="Judul Kegiatan" required bg="white" />
|
||||
<ButtonForm
|
||||
{/* <ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
@@ -31,7 +34,7 @@ export default function TaskDivisionEdit() {
|
||||
router.push('./')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
}} /> */}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function DetailTaskDivision() {
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Judul Tugas',
|
||||
headerTitle: 'Judul Tugas Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightTaskDetail id={detail} />,
|
||||
}}
|
||||
@@ -25,7 +25,7 @@ export default function DetailTaskDivision() {
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<SectionProgress text="Kemajuan Kegiatan 50%" />
|
||||
<SectionTanggalTugas />
|
||||
<SectionTanggalTugas category="task" />
|
||||
<SectionFile />
|
||||
<SectionMember />
|
||||
</View>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ButtonSelect from "@/components/buttonSelect";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Styles from "@/constants/Styles";
|
||||
@@ -17,6 +16,10 @@ export default function CreateTaskDivision() {
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: `Tambah Tugas`,
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <ButtonSaveHeader category="create" onPress={() => {
|
||||
ToastAndroid.show('Berhasil menambah data', ToastAndroid.SHORT)
|
||||
router.push('../task?status=0')
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
@@ -25,7 +28,7 @@ export default function CreateTaskDivision() {
|
||||
<ButtonSelect value="Tambah Tanggal & Tugas" />
|
||||
<ButtonSelect value="Upload File" />
|
||||
<ButtonSelect value="Tambah Anggota" />
|
||||
<ButtonForm
|
||||
{/* <ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
@@ -36,7 +39,7 @@ export default function CreateTaskDivision() {
|
||||
router.push('../task?status=0')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
}} /> */}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
|
||||
@@ -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 UpdateProjectTaskDivision() {
|
||||
const { id } = 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 Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <ButtonSaveHeader category="update" onPress={() => {
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
router.push('../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>
|
||||
)
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import SectionProgress from "@/components/sectionProgress";
|
||||
import SectionTanggalTugas from "@/components/sectionTanggalTugas";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { SafeAreaView, ScrollView, Text, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
|
||||
export default function DetailProject() {
|
||||
const { id } = useLocalSearchParams()
|
||||
@@ -23,9 +23,9 @@ export default function DetailProject() {
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<SectionProgress text="Kemajuan Kegiatan 50%" />
|
||||
<SectionTanggalTugas />
|
||||
<SectionFile/>
|
||||
<SectionMember/>
|
||||
<SectionTanggalTugas category="project" />
|
||||
<SectionFile />
|
||||
<SectionMember />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
|
||||
@@ -3,13 +3,17 @@ import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { router } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { Text, ToastAndroid, View } from "react-native";
|
||||
import AlertKonfirmasi from "./alertKonfirmasi";
|
||||
import DrawerBottom from "./drawerBottom";
|
||||
import ItemSectionTanggalTugas from "./itemSectionTanggalTugas";
|
||||
import MenuItemRow from "./menuItemRow";
|
||||
import AlertKonfirmasi from "./alertKonfirmasi";
|
||||
import ModalSelect from "./modalSelect";
|
||||
|
||||
export default function SectionTanggalTugas() {
|
||||
type Props = {
|
||||
category: 'project' | 'task'
|
||||
}
|
||||
|
||||
export default function SectionTanggalTugas({ category }: Props) {
|
||||
const [isModal, setModal] = useState(false)
|
||||
const [isSelect, setSelect] = useState(false)
|
||||
const [choose, setChoose] = useState({ val: '', label: '' })
|
||||
@@ -39,7 +43,9 @@ export default function SectionTanggalTugas() {
|
||||
title="Edit Tugas"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
router.push(`/project/update/124`)
|
||||
category == 'project'
|
||||
? router.push(`/project/update/124`)
|
||||
: router.push(`./update/124`)
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -53,7 +59,6 @@ export default function SectionTanggalTugas() {
|
||||
onPress: () => {
|
||||
setModal(false)
|
||||
ToastAndroid.show('Berhasil menghapus data', ToastAndroid.SHORT)
|
||||
router.push('/project/243')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user