upd: ui jabatan

Deskripsi:
- ui list jabatan
- ui filter modal
- ui tambah jabatan
- ui select option
- ui modal select option
- ui edit jabatan

No Issues
This commit is contained in:
amel
2025-02-28 15:15:15 +08:00
parent 9c24c9b1a5
commit 81a234d5cd
11 changed files with 402 additions and 5 deletions

46
components/selectForm.tsx Normal file
View File

@@ -0,0 +1,46 @@
import Styles from "@/constants/Styles";
import { Feather } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
type Props = {
label?: string;
placeholder?: string;
value: string;
onPress?: () => void;
info?: string;
itemLeft?: React.ReactNode;
error?: boolean;
errorText?: string;
required?: boolean;
round?: boolean
};
export default function SelectForm({ label, value, placeholder, onPress, info, error, errorText, required, itemLeft, round }: Props) {
return (
<View style={[Styles.mb10]}>
{
label != undefined && (
<Text style={[Styles.mb05, { textTransform: "capitalize" }, error && Styles.cError]}>
{label}
{required && (<Text style={Styles.cError}>*</Text>)}
</Text>
)
}
<Pressable onPress={onPress}>
<View style={[Styles.inputRoundForm, Styles.inputRoundFormRight, error && { borderColor: "red" }, round && Styles.round30, Styles.pv10]}>
<Feather name="chevron-right" size={20} color="grey" />
{
value ? (
<Text style={[Styles.cBlack]}>{value}</Text>
) : (
<Text style={[Styles.cGray]}>{placeholder}</Text>
)
}
</View>
</Pressable>
{error && (<Text style={[Styles.textInformation, Styles.cError]}>{errorText}</Text>)}
{info != undefined && (<Text style={[Styles.textInformation, , Styles.cGray]}>{info}</Text>)}
</View>
)
}