join #19

Merged
amaliadwiy merged 222 commits from join into v1 2026-02-09 11:18:03 +08:00
212 changed files with 5359 additions and 1809 deletions
Showing only changes of commit 74ba2641ca - Show all commits

View File

@@ -69,10 +69,9 @@ export default function CreateDivision() {
if (!response.available) {
AlertKonfirmasi({
title: 'Peringatan',
desc: 'Nama divisi sudah ada. Apakah anda yakin ingin membuat divisi dengan nama yang sama?',
onPress: () => {
handleSetData()
}
category: 'warning',
desc: 'Nama divisi sudah ada. Tidak dapat membuat divisi dengan nama yang sama',
onPress: () => { }
})
} else {
handleSetData()

View File

@@ -5,17 +5,27 @@ type Props = {
title: string,
desc: string
onPress: () => void
category?: string
}
export default function AlertKonfirmasi({ title, desc, onPress }: Props) {
Alert.alert(title, desc, [
{
text: 'Tidak',
style: 'cancel',
},
{
text: 'Ya',
onPress: () => { onPress() }
},
]);
export default function AlertKonfirmasi({ title, desc, onPress, category }: Props) {
if (category == "warning") {
Alert.alert(title, desc, [
{
text: 'Oke',
style: 'cancel',
},
]);
} else {
Alert.alert(title, desc, [
{
text: 'Tidak',
style: 'cancel',
},
{
text: 'Ya',
onPress: () => { onPress() }
},
]);
}
}