upd: calendar divisi
Deskripsi: - ui list acara - ui tambah acara - ui history acara - ui detail acara - ui edit acara No Issues
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import { ButtonForm } from "@/components/buttonForm"
|
||||
import { InputForm } from "@/components/inputForm"
|
||||
import SelectForm from "@/components/selectForm"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { Stack, router } from "expo-router"
|
||||
import { useState } from "react"
|
||||
import { SafeAreaView, ScrollView, View, ToastAndroid, Text } from "react-native"
|
||||
|
||||
export default function EditEventCalendar() {
|
||||
const [chooseGroup, setChooseGroup] = useState({ val: '', label: '' })
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Edit Acara',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Nama Acara" type="default" placeholder="Nama Acara" required bg="white" />
|
||||
<InputForm label="Tanggal Acara" type="default" placeholder="Input Tanggal Acara" required bg="white" />
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv10]}>
|
||||
<View style={[{ width: '48%' }]}>
|
||||
<Text style={[Styles.mb05]}>Waktu Awal<Text style={Styles.cError}>*</Text></Text>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<Text style={{ textAlign: 'center' }}>--.--</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[{ width: '48%' }]}>
|
||||
<Text style={[Styles.mb05]}>Waktu Akhir <Text style={Styles.cError}>*</Text></Text>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<Text style={{ textAlign: 'center' }}>--.--</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<InputForm label="Link Meet" type="default" placeholder="Link Meet" bg="white" />
|
||||
<SelectForm bg="white" label="Ulangi Acara" placeholder="Ulangi Acara" value={chooseGroup.label} required onPress={() => { }} />
|
||||
<InputForm label="Jumlah Pengulangan" type="numeric" placeholder="Jumlah Pengulangan" required bg="white" />
|
||||
<InputForm label="Deskripsi" type="default" placeholder="Deskripsi" 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.back()
|
||||
}
|
||||
})
|
||||
}} />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import BorderBottomItem from "@/components/borderBottomItem"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightCalendarDetail from "@/components/calendar/headerCalendarDetail"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { Image, SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
|
||||
export default function DetailEventCalendar() {
|
||||
const { id, detail } = useLocalSearchParams()
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Detail Acara',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightCalendarDetail id={detail} />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15]}>
|
||||
<View style={[Styles.wrapPaper, Styles.mb15]}>
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MaterialCommunityIcons name="calendar-text" size={30} color="black" style={Styles.mr10} />
|
||||
<Text style={[Styles.textDefault]}>Rapat Libur Lebaran</Text>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="calendar-month-outline" size={30} color="black" style={Styles.mr10} />
|
||||
<Text style={[Styles.textDefault]}>10 Maret 2025</Text>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="clock-outline" size={30} color="black" style={Styles.mr10} />
|
||||
<Text style={[Styles.textDefault]}>07:30 | 09:45</Text>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="repeat" size={30} color="black" style={Styles.mr10} />
|
||||
<Text style={[Styles.textDefault]}>Acara 1 Kali</Text>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="link-variant" size={30} color="black" style={Styles.mr10} />
|
||||
<Text style={[Styles.textDefault]}>meet.com</Text>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="card-text-outline" size={30} color="black" style={Styles.mr10} />
|
||||
<Text style={[Styles.textDefault]}>Rapat persiapan libur panjang lebaran</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={[Styles.mb15]}>
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv05]}>
|
||||
<Text style={[Styles.textDefaultSemiBold]}>Anggota</Text>
|
||||
<Text style={[Styles.textDefault]}>Total 4 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"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={<Image source={require("../../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||
title="Amalia Dwi"
|
||||
subtitle="Dinas - Bendahara"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={<Image source={require("../../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||
title="Amalia Dwi"
|
||||
subtitle="Dinas - Bendahara"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={<Image source={require("../../../../../../../assets/images/user.jpeg")} style={[Styles.userProfileSmall]} />}
|
||||
title="Amalia Dwi"
|
||||
subtitle="Dinas - Bendahara"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi";
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import { ButtonForm } from "@/components/buttonForm";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import SelectForm from "@/components/selectForm";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { Stack, router } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
|
||||
export default function CalendarDivisionCreate() {
|
||||
const [chooseGroup, setChooseGroup] = useState({ val: '', label: '' })
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Tambah Acara',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm label="Nama Acara" type="default" placeholder="Nama Acara" required bg="white" />
|
||||
<InputForm label="Tanggal Acara" type="default" placeholder="Input Tanggal Acara" required bg="white" />
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv10]}>
|
||||
<View style={[{ width: '48%' }]}>
|
||||
<Text style={[Styles.mb05]}>Waktu Awal<Text style={Styles.cError}>*</Text></Text>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<Text style={{ textAlign: 'center' }}>--.--</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[{ width: '48%' }]}>
|
||||
<Text style={[Styles.mb05]}>Waktu Akhir <Text style={Styles.cError}>*</Text></Text>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<Text style={{ textAlign: 'center' }}>--.--</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<InputForm label="Link Meet" type="default" placeholder="Link Meet" bg="white" />
|
||||
<SelectForm bg="white" label="Ulangi Acara" placeholder="Ulangi Acara" value={chooseGroup.label} required onPress={() => { }} />
|
||||
<InputForm label="Jumlah Pengulangan" type="numeric" placeholder="Jumlah Pengulangan" required bg="white" />
|
||||
<InputForm label="Deskripsi" type="default" placeholder="Deskripsi" 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,26 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import ItemHistoryEvent from "@/components/calendar/itemHistoryEvent";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { router, Stack } from "expo-router";
|
||||
import { SafeAreaView, ScrollView, Text, View } from "react-native";
|
||||
|
||||
export default function CalendarHistory(){
|
||||
return(
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Riwayat Acara',
|
||||
headerTitleAlign: 'center',
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15]}>
|
||||
<InputSearch />
|
||||
<ItemHistoryEvent/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightCalendarList from "@/components/calendar/headerCalendarList"
|
||||
import EventItem from "@/components/eventItem"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { router, Stack } from "expo-router"
|
||||
import { useState } from "react"
|
||||
import { SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
import DateTimePicker, { CalendarComponents, CalendarDay, DateType, getDefaultStyles } from "react-native-ui-datepicker"
|
||||
|
||||
export default function CalendarDivision() {
|
||||
const defaultStyles = getDefaultStyles()
|
||||
const [selected, setSelected] = useState<DateType>()
|
||||
const components: CalendarComponents = {
|
||||
Day: (day: CalendarDay) => <Text>amalia</Text>,
|
||||
// Month: (month: CalendarMonth) => <YourCustomMonth month={month} />
|
||||
// etc
|
||||
};
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Kalender',
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightCalendarList />
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15]}>
|
||||
<View style={[Styles.wrapPaper, Styles.p10]}>
|
||||
<DateTimePicker
|
||||
// components={components}
|
||||
mode="single"
|
||||
date={selected}
|
||||
onChange={({ date }) => setSelected(date)}
|
||||
styles={defaultStyles}
|
||||
/>
|
||||
</View>
|
||||
<View style={[Styles.mb15, Styles.mt15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mb05]}>Acara</Text>
|
||||
<View style={[Styles.wrapPaper]}>
|
||||
<EventItem category="purple" title="Meeting Pertama" user="Amalia" jamAwal="10.00" jamAkhir="11.00" onPress={()=>{router.push('./calendar/321')}}/>
|
||||
<EventItem category="orange" title="Meeting Pertama" user="Amalia" jamAwal="10.00" jamAkhir="11.00" onPress={()=>{router.push('./calendar/321')}}/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user