Better name groupId variable to be more clear
This commit is contained in:
@@ -40,7 +40,7 @@ const fallbackEmail = ref('');
|
||||
const avatarUrl = ref('');
|
||||
const username = ref('');
|
||||
const role = ref('');
|
||||
const localGroups = ref([]);
|
||||
const localGroupIds = ref([]);
|
||||
const allGroups = ref([]);
|
||||
const allLocalGroups = ref([]);
|
||||
const active = ref(true);
|
||||
@@ -145,7 +145,7 @@ async function onSubmit() {
|
||||
}
|
||||
}
|
||||
|
||||
const [groupError] = await usersModel.setLocalGroups(userId, localGroups.value);
|
||||
const [groupError] = await usersModel.setLocalGroups(userId, localGroupIds.value);
|
||||
if (groupError) {
|
||||
formError.value.generic = groupError.body ? groupError.body.message : 'Internal error';
|
||||
busy.value = false;
|
||||
@@ -202,7 +202,7 @@ defineExpose({
|
||||
result.forEach(g => g.label = g.name);
|
||||
allGroups.value = result;
|
||||
allLocalGroups.value = result.filter(g => !g.source);
|
||||
localGroups.value = (u ? u.groupIds.filter(g => !g.source) : []);
|
||||
localGroupIds.value = (u ? u.groupIds.filter(g => !g.source) : []);
|
||||
|
||||
[error, result] = await profileModel.get();
|
||||
if (error) return console.error(error);
|
||||
@@ -293,7 +293,7 @@ defineExpose({
|
||||
<FormGroup>
|
||||
<label for="groupsInput">{{ $t('users.user.groups') }}</label>
|
||||
<div v-if="allGroups.length === 0">{{ $t('users.user.noGroups') }}</div>
|
||||
<MultiSelect v-if="allLocalGroups.length" v-model="localGroups" option-key="id" :options="allLocalGroups" :search-threshold="20" />
|
||||
<MultiSelect v-if="allLocalGroups.length" v-model="localGroupIds" option-key="id" :options="allLocalGroups" :search-threshold="20" />
|
||||
</FormGroup>
|
||||
|
||||
<!-- on add, this is hidden for now, until we figure why one would want to add an inactive user -->
|
||||
|
||||
Reference in New Issue
Block a user