fix: jabatan

Deskripsi:
- loading button on form edit dan tambah data
- toast error api edit jabatan

No Issues
This commit is contained in:
2025-08-27 17:06:43 +08:00
parent bb242c9be8
commit d460653408
4 changed files with 17 additions and 11 deletions

View File

@@ -73,12 +73,14 @@ export default function HeaderRightPositionList() {
async function handleTambah() {
try {
setDisable(true)
const hasil = await decryptToken(String(token?.current))
const response = await apiCreatePosition({ user: hasil, name: dataForm.name, idGroup: dataForm.idGroup })
dispatch(setUpdatePosition(!update))
} catch (error) {
console.error(error)
} finally {
setDisable(false)
setVisibleTambah(false)
setVisible(false)
Toast.show({ type: 'small', text1: 'Berhasil menambahkan data', })