amalia/18-mei-26 #23

Merged
amaliadwiy merged 2 commits from amalia/18-mei-26 into main 2026-05-18 17:26:02 +08:00
2 changed files with 12 additions and 3 deletions
Showing only changes of commit f98fb51cfd - Show all commits

View File

@@ -57,6 +57,7 @@ interface APIUser {
gender: string
isWithoutOTP: boolean
isActive: boolean
isApprover: boolean
role: string
village: string
group: string
@@ -118,7 +119,8 @@ function UsersIndexPage() {
idGroup: '',
idPosition: '',
isActive: true,
isWithoutOTP: false
isWithoutOTP: false,
isApprover: false
})
// Options Data (Shared for both Add and Edit modals)
@@ -212,7 +214,8 @@ function UsersIndexPage() {
idGroup: user.idGroup,
idPosition: user.idPosition,
isActive: user.isActive,
isWithoutOTP: user.isWithoutOTP
isWithoutOTP: user.isWithoutOTP,
isApprover: user.isApprover
})
setVillageSearch(user.village)
openEdit()
@@ -544,6 +547,12 @@ function UsersIndexPage() {
checked={editForm.isWithoutOTP}
onChange={(event) => setEditForm(f => ({ ...f, isWithoutOTP: event.currentTarget.checked }))}
/>
<Switch
label="Approver"
description="Grant approver privileges to this user"
checked={editForm.isApprover}
onChange={(event) => setEditForm(f => ({ ...f, isApprover: event.currentTarget.checked }))}
/>
</SimpleGrid>
<Button