fix: disable tombol detail jika tanggal mulai atau berakhir belum diisi
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -238,7 +238,7 @@ export default function TaskDivisionAddTask() {
|
|||||||
>
|
>
|
||||||
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
||||||
</Pressable> */}
|
</Pressable> */}
|
||||||
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} />
|
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} disabled={from == "" || to == ""} />
|
||||||
</View>
|
</View>
|
||||||
<InputForm
|
<InputForm
|
||||||
label="Judul Tugas"
|
label="Judul Tugas"
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ export default function CreateTaskAddTugas() {
|
|||||||
>
|
>
|
||||||
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
||||||
</Pressable> */}
|
</Pressable> */}
|
||||||
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} />
|
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} disabled={from == "" || to == ""} />
|
||||||
</View>
|
</View>
|
||||||
<InputForm
|
<InputForm
|
||||||
label="Judul Tugas"
|
label="Judul Tugas"
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ export default function UpdateProjectTaskDivision() {
|
|||||||
>
|
>
|
||||||
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
||||||
</Pressable> */}
|
</Pressable> */}
|
||||||
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} />
|
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} disabled={from == "" || to == ""} />
|
||||||
</View>
|
</View>
|
||||||
<InputForm
|
<InputForm
|
||||||
label="Judul Tugas"
|
label="Judul Tugas"
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ export default function ProjectAddTask() {
|
|||||||
>
|
>
|
||||||
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
||||||
</Pressable> */}
|
</Pressable> */}
|
||||||
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} />
|
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} disabled={from == "" || to == ""} />
|
||||||
</View>
|
</View>
|
||||||
<InputForm
|
<InputForm
|
||||||
label="Judul Tugas"
|
label="Judul Tugas"
|
||||||
|
|||||||
@@ -204,14 +204,7 @@ export default function CreateProjectAddTask() {
|
|||||||
{
|
{
|
||||||
(error.endDate || error.startDate) && <Text style={[Styles.textInformation, Styles.mt05, { color: colors.error }]}>Tanggal tidak boleh kosong</Text>
|
(error.endDate || error.startDate) && <Text style={[Styles.textInformation, Styles.mt05, { color: colors.error }]}>Tanggal tidak boleh kosong</Text>
|
||||||
}
|
}
|
||||||
{/* <Pressable
|
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} disabled={from == "" || to == ""} />
|
||||||
style={[Styles.btnTab, Styles.btnLainnya, dsbButton && Styles.btnDisabled]}
|
|
||||||
disabled={dsbButton}
|
|
||||||
onPress={() => { setModalDetail(true) }}
|
|
||||||
>
|
|
||||||
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
|
||||||
</Pressable> */}
|
|
||||||
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} />
|
|
||||||
</View>
|
</View>
|
||||||
<InputForm
|
<InputForm
|
||||||
label="Judul Tugas"
|
label="Judul Tugas"
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ export default function UpdateProjectTask() {
|
|||||||
>
|
>
|
||||||
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
<Text style={[dsbButton ? Styles.cGray : Styles.cWhite]}>Detail</Text>
|
||||||
</Pressable> */}
|
</Pressable> */}
|
||||||
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} />
|
<ButtonSelect value="Detail" onPress={() => { setModalDetail(true) }} disabled={from == "" || to == ""} />
|
||||||
</View>
|
</View>
|
||||||
<InputForm
|
<InputForm
|
||||||
label="Judul Tugas"
|
label="Judul Tugas"
|
||||||
|
|||||||
@@ -10,20 +10,22 @@ type Props = {
|
|||||||
round?: boolean
|
round?: boolean
|
||||||
error?: boolean
|
error?: boolean
|
||||||
errorText?: string
|
errorText?: string
|
||||||
|
disabled?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ButtonSelect({ value, onPress, round, error, errorText }: Props) {
|
export default function ButtonSelect({ value, onPress, round, error, errorText, disabled }: Props) {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.mv05]}>
|
<View style={[Styles.mv05]}>
|
||||||
<Pressable onPress={onPress}>
|
<Pressable onPress={onPress} disabled={disabled}>
|
||||||
<View style={[
|
<View style={[
|
||||||
Styles.inputRoundForm,
|
Styles.inputRoundForm,
|
||||||
Styles.inputRoundFormRight,
|
Styles.inputRoundFormRight,
|
||||||
round && Styles.round30,
|
round && Styles.round30,
|
||||||
Styles.pv10,
|
Styles.pv10,
|
||||||
{ borderColor: colors.icon + '20', backgroundColor: colors.input },
|
{ borderColor: colors.icon + '20', backgroundColor: colors.input },
|
||||||
error && { borderColor: "red" }
|
error && { borderColor: "red" },
|
||||||
|
disabled && { opacity: 0.4 }
|
||||||
]}>
|
]}>
|
||||||
<Feather name="arrow-right-circle" size={20} color={colors.text} />
|
<Feather name="arrow-right-circle" size={20} color={colors.text} />
|
||||||
<Text style={[{ color: colors.text }]}>{value}</Text>
|
<Text style={[{ color: colors.text }]}>{value}</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user