[users][vue3] Fixed managing roles
This commit is contained in:
parent
c61b5fcc0c
commit
48d6792fa0
|
@ -38,7 +38,7 @@
|
|||
class="col-xs-12 col-sm-6 q-pa-sm"
|
||||
label="Benutzername"
|
||||
:readonly="!newUser"
|
||||
:rules="[isUIDUsed, notEmpty]"
|
||||
:rules="[isFreeUID, notEmpty]"
|
||||
autocomplete="username"
|
||||
filled
|
||||
/>
|
||||
|
@ -183,9 +183,9 @@ export default defineComponent({
|
|||
newPassword.value = '';
|
||||
}
|
||||
|
||||
function isUIDUsed(val: string) {
|
||||
function isFreeUID(val: string) {
|
||||
return (
|
||||
userStore.users.findIndex((user) => user.userid === val) !== -1 ||
|
||||
userStore.users.findIndex((user) => user.userid === val) === -1 ||
|
||||
'Benutzername ist schon vergeben'
|
||||
);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ export default defineComponent({
|
|||
canSetRoles,
|
||||
isCurrentUser,
|
||||
isEmail,
|
||||
isUIDUsed,
|
||||
isFreeUID,
|
||||
newPassword,
|
||||
notEmpty,
|
||||
onAvatarRejected,
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
:options="permissions"
|
||||
color="primary"
|
||||
type="checkbox"
|
||||
@input="updatePermissions"
|
||||
@update:modelValue="updatePermissions"
|
||||
/>
|
||||
</q-scroll-area>
|
||||
</q-card-section>
|
||||
|
|
Loading…
Reference in New Issue