upd: division
Deskripsi: - ui edit divisi - ui informasi divisi - ui laporan per divisi - ui create divisi No Issues
This commit is contained in:
41
app/(application)/division/[id]/edit.tsx
Normal file
41
app/(application)/division/[id]/edit.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
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 EditDivision() {
|
||||
const { id } = useLocalSearchParams()
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Edit Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Nama Divisi" type="default" placeholder="Nama Divisi" required />
|
||||
<InputForm label="Deskripsi" type="default" placeholder="Deskripsi Divisi" />
|
||||
<ButtonForm
|
||||
text="SIMPAN"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin mengubah data?',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
router.push('/division/123/info')
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
105
app/(application)/division/[id]/info.tsx
Normal file
105
app/(application)/division/[id]/info.tsx
Normal file
@@ -0,0 +1,105 @@
|
||||
import BorderBottomItem from "@/components/borderBottomItem"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightDivisionInfo from "@/components/division/headerDivisionInfo"
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { Feather } from "@expo/vector-icons"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { Image, SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
|
||||
export default function InformationDivision() {
|
||||
const { id } = useLocalSearchParams()
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Informasi Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightDivisionInfo id={id} />,
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mb05]}>Deskripsi Divisi</Text>
|
||||
<View style={[Styles.wrapPaper]}>
|
||||
<Text>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefault, Styles.mv05]}>5 Anggota</Text>
|
||||
<View style={[Styles.wrapPaper]}>
|
||||
<BorderBottomItem
|
||||
borderType="none"
|
||||
icon={
|
||||
<View style={[Styles.iconContent, ColorsStatus.gray]}>
|
||||
<Feather name="user-plus" size={25} color={'#384288'} />
|
||||
</View>
|
||||
}
|
||||
title="Tambah Anggota"
|
||||
/>
|
||||
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
style={[Styles.userProfileSmall]}
|
||||
/>
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
rightTopInfo="Admin"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
style={[Styles.userProfileSmall]}
|
||||
/>
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
rightTopInfo="Admin"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
style={[Styles.userProfileSmall]}
|
||||
/>
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
rightTopInfo="Anggota"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
style={[Styles.userProfileSmall]}
|
||||
/>
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
rightTopInfo="Anggota"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
style={[Styles.userProfileSmall]}
|
||||
/>
|
||||
}
|
||||
title="Amalia Dwi"
|
||||
rightTopInfo="Anggota"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
33
app/(application)/division/[id]/report.tsx
Normal file
33
app/(application)/division/[id]/report.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import ReportChartDocument from "@/components/division/reportChartDocument"
|
||||
import ReportChartEvent from "@/components/division/reportChartEvent"
|
||||
import ReportChartProgress from "@/components/division/reportChartProgress"
|
||||
import { InputForm } from "@/components/inputForm"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { SafeAreaView, ScrollView, View } from "react-native"
|
||||
|
||||
export default function ReportDivision() {
|
||||
const { id } = useLocalSearchParams()
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Laporan Divisi',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm bg="white" label="Tanggal Awal" type="default" placeholder="Pilih Tanggal Awal" required />
|
||||
<InputForm bg="white" label="Tanggal Akhir" type="default" placeholder="Pilih Tanggal Akhir" required />
|
||||
<ReportChartProgress />
|
||||
<ReportChartDocument />
|
||||
<ReportChartEvent />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
46
app/(application)/division/create.tsx
Normal file
46
app/(application)/division/create.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user