Signed-off-by: Julius Härtl <jus@bitgrid.net>tags/v14.0.0beta1
@@ -57,7 +57,7 @@ | |||
<input type="checkbox" :value="app.id" v-model="groupCheckedAppsData" v-on:change="setGroupLimit" class="groups-enable__checkbox checkbox" :id="prefix('groups_enable', app.id)"> | |||
<label :for="prefix('groups_enable', app.id)">Auf Gruppen beschränken</label> | |||
<input type="hidden" class="group_select" title="Alle" value=""> | |||
<multiselect v-if="isLimitedToGroups(app)" :options="groups" :value="appGroups" @select="addGroupLimitation" @remove="removeGroupLimitation" | |||
<multiselect v-if="isLimitedToGroups(app)" :options="groups" :value="appGroups" @select="addGroupLimitation" @remove="removeGroupLimitation" :options-limit="5" | |||
:placeholder="t('settings', 'Limit app usage to groups')" | |||
label="name" track-by="id" class="multiselect-vue" | |||
:multiple="true" :close-on-select="false"> |
@@ -197,9 +197,9 @@ const actions = { | |||
.catch((error) => context.commit('API_FAILURE', error)); | |||
}, | |||
getGroups(context) { /* { offset, limit, search } */ | |||
//search = typeof search === 'string' ? search : ''; | |||
return api.get(OC.linkToOCS(`cloud/groups`, 2)) /* ?offset=${offset}&limit=${limit}&search=${search}` */ | |||
getGroups(context, { offset, limit, search }) { | |||
search = typeof search === 'string' ? search : ''; | |||
return api.get(OC.linkToOCS(`cloud/groups?offset=${offset}&limit=${limit}&search=${search}`, 2)) | |||
.then((response) => { | |||
if (Object.keys(response.data.ocs.data.groups).length > 0) { | |||
response.data.ocs.data.groups.forEach(function(group) { |
@@ -70,7 +70,7 @@ export default { | |||
beforeMount() { | |||
this.$store.dispatch('getCategories'); | |||
this.$store.dispatch('getAllApps'); | |||
this.$store.dispatch('getGroups'); | |||
this.$store.dispatch('getGroups', {offset: 0, limit: -1}); | |||
this.$store.commit('setUpdateCount', this.$store.getters.getServerData.updateCount) | |||
}, | |||
mounted() { |