Compare commits
6 Commits
amalia/13-
...
9afe9297e0
| Author | SHA1 | Date | |
|---|---|---|---|
| 9afe9297e0 | |||
| f98fb51cfd | |||
| 3b8eabc111 | |||
| 88ddb7527e | |||
| abca720f89 | |||
| a69b0aad48 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bun-react-template",
|
"name": "bun-react-template",
|
||||||
"version": "0.1.8",
|
"version": "0.1.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ interface APIUser {
|
|||||||
gender: string
|
gender: string
|
||||||
isWithoutOTP: boolean
|
isWithoutOTP: boolean
|
||||||
isActive: boolean
|
isActive: boolean
|
||||||
|
isApprover: boolean
|
||||||
role: string
|
role: string
|
||||||
village: string
|
village: string
|
||||||
group: string
|
group: string
|
||||||
@@ -118,7 +119,8 @@ function UsersIndexPage() {
|
|||||||
idGroup: '',
|
idGroup: '',
|
||||||
idPosition: '',
|
idPosition: '',
|
||||||
isActive: true,
|
isActive: true,
|
||||||
isWithoutOTP: false
|
isWithoutOTP: false,
|
||||||
|
isApprover: false
|
||||||
})
|
})
|
||||||
|
|
||||||
// Options Data (Shared for both Add and Edit modals)
|
// Options Data (Shared for both Add and Edit modals)
|
||||||
@@ -212,7 +214,8 @@ function UsersIndexPage() {
|
|||||||
idGroup: user.idGroup,
|
idGroup: user.idGroup,
|
||||||
idPosition: user.idPosition,
|
idPosition: user.idPosition,
|
||||||
isActive: user.isActive,
|
isActive: user.isActive,
|
||||||
isWithoutOTP: user.isWithoutOTP
|
isWithoutOTP: user.isWithoutOTP,
|
||||||
|
isApprover: user.isApprover
|
||||||
})
|
})
|
||||||
setVillageSearch(user.village)
|
setVillageSearch(user.village)
|
||||||
openEdit()
|
openEdit()
|
||||||
@@ -544,6 +547,12 @@ function UsersIndexPage() {
|
|||||||
checked={editForm.isWithoutOTP}
|
checked={editForm.isWithoutOTP}
|
||||||
onChange={(event) => setEditForm(f => ({ ...f, isWithoutOTP: event.currentTarget.checked }))}
|
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>
|
</SimpleGrid>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ function AppVillagesIndexPage() {
|
|||||||
<Select
|
<Select
|
||||||
label="Gender"
|
label="Gender"
|
||||||
placeholder="Select gender"
|
placeholder="Select gender"
|
||||||
data={['Male', 'Female']}
|
data={[{ label: 'Male', value: 'M' }, { label: 'Female', value: 'F' }]}
|
||||||
mt="sm"
|
mt="sm"
|
||||||
required
|
required
|
||||||
value={form.gender}
|
value={form.gender}
|
||||||
|
|||||||
Reference in New Issue
Block a user