Deskripsi: - ui edit divisi - ui informasi divisi - ui laporan per divisi - ui create divisi No Issues
46 lines
1.9 KiB
TypeScript
46 lines
1.9 KiB
TypeScript
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 SelectForm from "@/components/selectForm"
|
|
import Styles from "@/constants/Styles"
|
|
import { router, Stack } from "expo-router"
|
|
import { useState } from "react"
|
|
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"
|
|
|
|
export default function CreateDivision() {
|
|
const [chooseGroup, setChooseGroup] = useState({ val: '', label: '' })
|
|
|
|
return (
|
|
<SafeAreaView>
|
|
<Stack.Screen
|
|
options={{
|
|
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
|
headerTitle: 'Tambah Divisi',
|
|
headerTitleAlign: 'center',
|
|
}}
|
|
/>
|
|
<ScrollView>
|
|
<View style={[Styles.p15, Styles.mb100]}>
|
|
<SelectForm label="Lembaga Desa" placeholder="Pilih Lembaga Desa" value={chooseGroup.label} required onPress={() => { }} />
|
|
<InputForm label="Nama Divisi" type="default" placeholder="Nama Divisi" required />
|
|
<InputForm label="Deskripsi" type="default" placeholder="Deskripsi Divisi" />
|
|
<ButtonSelect value="Pilih 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('/division/123')
|
|
}
|
|
})
|
|
}} />
|
|
</View>
|
|
</ScrollView>
|
|
</SafeAreaView>
|
|
)
|
|
} |