upd: modal konfirmasi

Deskripsi:
- menerapkan semua modal baru pada semua fitur

No Issues''
This commit is contained in:
2026-02-14 14:01:41 +08:00
parent 10212aa5de
commit 039b26f5aa
31 changed files with 718 additions and 245 deletions

View File

@@ -1,4 +1,4 @@
import AlertKonfirmasi from "@/components/alertKonfirmasi";
import ModalConfirmation from "@/components/ModalConfirmation";
import BorderBottomItem from "@/components/borderBottomItem";
import { ButtonForm } from "@/components/buttonForm";
import ButtonTab from "@/components/buttonTab";
@@ -35,6 +35,7 @@ export default function Index() {
const [search, setSearch] = useState('')
const arrSkeleton = Array.from({ length: 5 }, (_, index) => index)
const [loading, setLoading] = useState(true)
const [showDeleteModal, setShowDeleteModal] = useState(false)
const [status, setStatus] = useState<'true' | 'false'>('true')
const [loadingSubmit, setLoadingSubmit] = useState(false)
const [idChoose, setIdChoose] = useState('')
@@ -205,11 +206,9 @@ export default function Index() {
title={activeChoose ? "Non Aktifkan" : "Aktifkan"}
onPress={() => {
setModal(false)
AlertKonfirmasi({
title: 'Konfirmasi',
desc: activeChoose ? 'Apakah anda yakin ingin menonaktifkan data?' : 'Apakah anda yakin ingin mengaktifkan data?',
onPress: () => { handleDelete() }
})
setTimeout(() => {
setShowDeleteModal(true)
}, 600)
}}
/>
<MenuItemRow
@@ -244,6 +243,19 @@ export default function Index() {
</View>
</View>
</DrawerBottom>
<ModalConfirmation
visible={showDeleteModal}
title="Konfirmasi"
message={activeChoose ? 'Apakah anda yakin ingin menonaktifkan data?' : 'Apakah anda yakin ingin mengaktifkan data?'}
onConfirm={() => {
setShowDeleteModal(false)
handleDelete()
}}
onCancel={() => setShowDeleteModal(false)}
confirmText={activeChoose ? "Nonaktifkan" : "Aktifkan"}
cancelText="Batal"
/>
</View >
)