feat: fixing management user admin
This commit is contained in:
parent
6cbd29bfe5
commit
0526fca68c
|
|
@ -145,6 +145,7 @@ export default function EditUserForm() {
|
||||||
password: data.password,
|
password: data.password,
|
||||||
passwordConf: data.confirmPassword,
|
passwordConf: data.confirmPassword,
|
||||||
isDefault: false,
|
isDefault: false,
|
||||||
|
isAdmin: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
loading();
|
loading();
|
||||||
|
|
|
||||||
|
|
@ -285,6 +285,7 @@ export default function CreateUserForm() {
|
||||||
password: data.password,
|
password: data.password,
|
||||||
passwordConf: data.confirmPassword,
|
passwordConf: data.confirmPassword,
|
||||||
isDefault: false,
|
isDefault: false,
|
||||||
|
isAdmin: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.role == "OPT-ID") {
|
if (data.role == "OPT-ID") {
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ export default function EditUserForm() {
|
||||||
|
|
||||||
async function save(data: z.infer<typeof FormSchema>) {
|
async function save(data: z.infer<typeof FormSchema>) {
|
||||||
let req: any = {
|
let req: any = {
|
||||||
id: id,
|
id: Number(id),
|
||||||
firstName: data.fullname,
|
firstName: data.fullname,
|
||||||
username: data.username,
|
username: data.username,
|
||||||
roleId: data.role,
|
roleId: data.role,
|
||||||
|
|
@ -313,6 +313,7 @@ export default function EditUserForm() {
|
||||||
password: data.password,
|
password: data.password,
|
||||||
passwordConf: data.confirmPassword,
|
passwordConf: data.confirmPassword,
|
||||||
isDefault: false,
|
isDefault: false,
|
||||||
|
isAdmin: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.role == "OPT-ID") {
|
if (data.role == "OPT-ID") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue