fix : tampilan
Deskripsi: - input time pada kalender divisi - api dokumen divisi >> blm selesai No Issues
This commit is contained in:
@@ -10,6 +10,8 @@ import { stringToDateTime } from "@/lib/fun_stringToDate";
|
||||
import { Stack, router, useLocalSearchParams } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import {
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
View
|
||||
@@ -141,94 +143,99 @@ export default function CalendarDivisionCreate() {
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputForm
|
||||
label="Nama Acara"
|
||||
type="default"
|
||||
placeholder="Nama Acara"
|
||||
required
|
||||
bg="white"
|
||||
value={data.title}
|
||||
onChange={(val) => validationForm("title", val)}
|
||||
error={error.title}
|
||||
errorText="Nama acara tidak boleh kosong"
|
||||
/>
|
||||
<InputDate
|
||||
onChange={(val) => validationForm("dateStart", val)}
|
||||
mode="date"
|
||||
value={data.dateStart}
|
||||
label="Tanggal Acara"
|
||||
required
|
||||
error={error.dateStart}
|
||||
errorText="Tanggal acara tidak boleh kosong"
|
||||
placeholder="Pilih Tanggal Acara"
|
||||
/>
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv10]}>
|
||||
<View style={[{ width: "48%" }]}>
|
||||
<InputDate
|
||||
onChange={(val) => validationForm("timeStart", val)}
|
||||
mode="time"
|
||||
value={data.timeStart}
|
||||
label="Waktu Awal"
|
||||
required
|
||||
error={error.timeStart}
|
||||
errorText="Waktu awal tidak valid"
|
||||
placeholder="--:--"
|
||||
/>
|
||||
</View>
|
||||
<View style={[{ width: "48%" }]}>
|
||||
<InputDate
|
||||
onChange={(val) => validationForm("timeEnd", val)}
|
||||
mode="time"
|
||||
value={data.timeEnd}
|
||||
label="Waktu Akhir"
|
||||
required
|
||||
error={error.timeEnd}
|
||||
errorText="Waktu akhir tidak valid"
|
||||
placeholder="--:--"
|
||||
/>
|
||||
<KeyboardAvoidingView
|
||||
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
||||
keyboardVerticalOffset={110}
|
||||
>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15]}>
|
||||
<InputForm
|
||||
label="Nama Acara"
|
||||
type="default"
|
||||
placeholder="Nama Acara"
|
||||
required
|
||||
bg="white"
|
||||
value={data.title}
|
||||
onChange={(val) => validationForm("title", val)}
|
||||
error={error.title}
|
||||
errorText="Nama acara tidak boleh kosong"
|
||||
/>
|
||||
<InputDate
|
||||
onChange={(val) => validationForm("dateStart", val)}
|
||||
mode="date"
|
||||
value={data.dateStart}
|
||||
label="Tanggal Acara"
|
||||
required
|
||||
error={error.dateStart}
|
||||
errorText="Tanggal acara tidak boleh kosong"
|
||||
placeholder="Pilih Tanggal Acara"
|
||||
/>
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv10]}>
|
||||
<View style={[{ width: "48%" }]}>
|
||||
<InputDate
|
||||
onChange={(val) => validationForm("timeStart", val)}
|
||||
mode="time"
|
||||
value={data.timeStart}
|
||||
label="Waktu Awal"
|
||||
required
|
||||
error={error.timeStart}
|
||||
errorText="Waktu awal tidak valid"
|
||||
placeholder="--:--"
|
||||
/>
|
||||
</View>
|
||||
<View style={[{ width: "48%" }]}>
|
||||
<InputDate
|
||||
onChange={(val) => validationForm("timeEnd", val)}
|
||||
mode="time"
|
||||
value={data.timeEnd}
|
||||
label="Waktu Akhir"
|
||||
required
|
||||
error={error.timeEnd}
|
||||
errorText="Waktu akhir tidak valid"
|
||||
placeholder="--:--"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<InputForm
|
||||
label="Link Meet"
|
||||
type="default"
|
||||
placeholder="Link Meet"
|
||||
bg="white"
|
||||
value={data.linkMeet}
|
||||
onChange={(val) => validationForm("linkMeet", val)}
|
||||
/>
|
||||
<SelectForm
|
||||
bg="white"
|
||||
label="Ulangi Acara"
|
||||
placeholder="Ulangi Acara"
|
||||
value={choose.label}
|
||||
required
|
||||
onPress={() => { setSelect(true) }}
|
||||
/>
|
||||
<InputForm
|
||||
label="Jumlah Pengulangan"
|
||||
type="numeric"
|
||||
placeholder="Jumlah Pengulangan"
|
||||
required
|
||||
bg="white"
|
||||
value={String(data.repeatValue)}
|
||||
onChange={(val) => validationForm("repeatValue", val)}
|
||||
error={error.repeatValue}
|
||||
errorText="Jumlah pengulangan tidak valid"
|
||||
disable={choose.val == "once"}
|
||||
/>
|
||||
<InputForm
|
||||
label="Deskripsi"
|
||||
type="default"
|
||||
placeholder="Deskripsi"
|
||||
bg="white"
|
||||
value={data.desc}
|
||||
onChange={(val) => validationForm("desc", val)}
|
||||
multiline
|
||||
/>
|
||||
</View>
|
||||
<InputForm
|
||||
label="Link Meet"
|
||||
type="default"
|
||||
placeholder="Link Meet"
|
||||
bg="white"
|
||||
value={data.linkMeet}
|
||||
onChange={(val) => validationForm("linkMeet", val)}
|
||||
/>
|
||||
<SelectForm
|
||||
bg="white"
|
||||
label="Ulangi Acara"
|
||||
placeholder="Ulangi Acara"
|
||||
value={choose.label}
|
||||
required
|
||||
onPress={() => { setSelect(true) }}
|
||||
/>
|
||||
<InputForm
|
||||
label="Jumlah Pengulangan"
|
||||
type="numeric"
|
||||
placeholder="Jumlah Pengulangan"
|
||||
required
|
||||
bg="white"
|
||||
value={String(data.repeatValue)}
|
||||
onChange={(val) => validationForm("repeatValue", val)}
|
||||
error={error.repeatValue}
|
||||
errorText="Jumlah pengulangan tidak valid"
|
||||
disable={choose.val == "once"}
|
||||
/>
|
||||
<InputForm
|
||||
label="Deskripsi"
|
||||
type="default"
|
||||
placeholder="Deskripsi"
|
||||
bg="white"
|
||||
value={data.desc}
|
||||
onChange={(val) => validationForm("desc", val)}
|
||||
multiline
|
||||
/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
</KeyboardAvoidingView>
|
||||
|
||||
<ModalSelect
|
||||
category={"type-event-repeat"}
|
||||
|
||||
@@ -110,10 +110,6 @@ export default function DocumentDivision() {
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad(true);
|
||||
}, [path]);
|
||||
|
||||
const handleCheckboxChange = (index: number) => {
|
||||
setDariSelectAll(false);
|
||||
if (selectedFiles.some((i: any) => i.id == data[index].id)) {
|
||||
@@ -308,6 +304,10 @@ export default function DocumentDivision() {
|
||||
setRefreshing(false)
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad(true);
|
||||
}, [path]);
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<Stack.Screen
|
||||
|
||||
Reference in New Issue
Block a user