diff --git a/src/app/admin/(dashboard)/user&role/user/page.tsx b/src/app/admin/(dashboard)/user&role/user/page.tsx index 5f133409..6147337d 100644 --- a/src/app/admin/(dashboard)/user&role/user/page.tsx +++ b/src/app/admin/(dashboard)/user&role/user/page.tsx @@ -93,6 +93,7 @@ function ListUser({ search }: { search: string }) { const success = await stateUser.update.submit({ id: userId, roleId: newRoleId, + }); if (success) { @@ -136,9 +137,10 @@ function ListUser({ search }: { search: string }) { } }; - const filteredData = (data || []).filter( - (item) => item.roleId !== "0" // asumsikan id role SUPERADMIN = "0" - ); + const filteredData = (data || []).filter((item) => { + return item.roleId !== "0" && item.roleId !== "1"; + }); + if (loading || !data) { return ( @@ -183,7 +185,7 @@ function ListUser({ search }: { search: string }) {