Преглед на файлове

Add search/offset/limit parameters to group fetching

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v14.0.0beta1
Julius Härtl преди 6 години
родител
ревизия
523cd0af88
No account linked to committer's email address
променени са 3 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 1
    1
      settings/src/components/appDetails.vue
  2. 3
    3
      settings/src/store/users.js
  3. 1
    1
      settings/src/views/Apps.vue

+ 1
- 1
settings/src/components/appDetails.vue Целия файл

@@ -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">

+ 3
- 3
settings/src/store/users.js Целия файл

@@ -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) {

+ 1
- 1
settings/src/views/Apps.vue Целия файл

@@ -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() {

Loading…
Отказ
Запис