จัดการผู้ใช้งาน => fix role

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-13 13:02:41 +07:00
parent 4ebad6fc60
commit baaa75f4da
5 changed files with 38 additions and 10 deletions

View file

@ -74,7 +74,13 @@ function fetchlistRole() {
http
.get(config.API.managementRole)
.then((res) => {
roleOptions.value = res.data;
roleOptions.value = res.data.filter(
(e: Roles) =>
e.name === "STAFF" ||
e.name === "SUPER_ADMIN" ||
e.name === "ADMIN" ||
e.name === "USER"
);
})
.catch((err) => {
messageError($q, err);
@ -237,7 +243,7 @@ watch(
use-chips
multiple
use-input
:rules="[(val:any) => !!val && val.length > 0|| `${'กรุณาเลือก Role'}`,]"
:rules="[(val:string) => !!val && val.length > 0|| `${'กรุณาเลือก Role'}`,]"
/>
</div>
</div>