Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(admin-settings): user filters after page reload #11666

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-user-filters-after-page-reload
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: User filters after page reload

We've fixed an issue where applied user filters would not be visible after page reload.

https://github.com/owncloud/web/issues/11604
https://github.com/owncloud/web/pull/11666
2 changes: 2 additions & 0 deletions packages/web-app-admin-settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<span v-text="$gettext('Filter:')" />
</div>
<item-filter
v-if="groups.length"
:allow-multiple="true"
:filter-label="$gettext('Groups')"
:filterable-attributes="['displayName']"
Expand All @@ -64,6 +65,7 @@
</template>
</item-filter>
<item-filter
v-if="roles.length"
:allow-multiple="true"
:filter-label="$gettext('Roles')"
:filterable-attributes="['displayName']"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ItemFilter, OptionsConfig, UserAction, useAppDefaults } from '@owncloud
import { mock, mockDeep } from 'vitest-mock-extended'
import { defaultComponentMocks, defaultPlugins, mount, shallowMount } from 'web-test-helpers'
import { ClientService, queryItemAsString } from '@ownclouders/web-pkg'
import { User } from '@ownclouders/web-client/graph/generated'
import { Group, User } from '@ownclouders/web-client/graph/generated'
import { useAppDefaultsMock } from 'web-test-helpers/src/mocks/useAppDefaultsMock'
import { useUserActionsCreateUser } from '../../../src/composables/actions/users/useUserActionsCreateUser'
import { ref } from 'vue'
Expand Down Expand Up @@ -74,7 +74,7 @@ const getClientService = () => {
clientService.graphAuthenticated.users.listUsers.mockResolvedValue([mock<User>(getDefaultUser())])
clientService.graphAuthenticated.users.getUser.mockResolvedValue(mock<User>(getDefaultUser()))
clientService.graphAuthenticated.users.editUser.mockResolvedValue(mock<User>(getDefaultUser()))
clientService.graphAuthenticated.groups.listGroups.mockResolvedValue([])
clientService.graphAuthenticated.groups.listGroups.mockResolvedValue([mock<Group>()])
clientService.graphAuthenticated.applications.listApplications.mockResolvedValue(
getDefaultApplications()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`Users view > list view > renders initially warning if filters are manda
<div class="user-filters oc-flex oc-flex-between oc-flex-wrap oc-flex-bottom oc-mx-m oc-mb-m">
<div data-v-32efd9c6="" class="oc-flex oc-flex-middle">
<div data-v-32efd9c6="" class="oc-mr-m oc-flex oc-flex-middle"><span data-v-32efd9c6="" class="oc-icon oc-icon-m oc-icon-passive oc-mr-xs"><!----></span> <span data-v-32efd9c6="">Filter:</span></div>
<item-filter-stub data-v-32efd9c6="" filterlabel="Groups" items="" filtername="groups" optionfilterlabel="Filter groups" showoptionfilter="true" allowmultiple="true" idattribute="id" displaynameattribute="displayName" filterableattributes="displayName" closeonclick="false" class="oc-mr-s"></item-filter-stub>
<item-filter-stub data-v-32efd9c6="" filterlabel="Groups" items="undefined" filtername="groups" optionfilterlabel="Filter groups" showoptionfilter="true" allowmultiple="true" idattribute="id" displaynameattribute="displayName" filterableattributes="displayName" closeonclick="false" class="oc-mr-s"></item-filter-stub>
<item-filter-stub data-v-32efd9c6="" filterlabel="Roles" items="[object Object],[object Object],[object Object],[object Object]" filtername="roles" optionfilterlabel="Filter roles" showoptionfilter="true" allowmultiple="true" idattribute="id" displaynameattribute="displayName" filterableattributes="displayName" closeonclick="false"></item-filter-stub>
</div>
<div data-v-32efd9c6="" class="oc-flex oc-flex-middle">
Expand Down Expand Up @@ -71,7 +71,7 @@ exports[`Users view > list view > renders list initially 1`] = `
<div class="user-filters oc-flex oc-flex-between oc-flex-wrap oc-flex-bottom oc-mx-m oc-mb-m">
<div data-v-32efd9c6="" class="oc-flex oc-flex-middle">
<div data-v-32efd9c6="" class="oc-mr-m oc-flex oc-flex-middle"><span data-v-32efd9c6="" class="oc-icon oc-icon-m oc-icon-passive oc-mr-xs"><!----></span> <span data-v-32efd9c6="">Filter:</span></div>
<item-filter-stub data-v-32efd9c6="" filterlabel="Groups" items="" filtername="groups" optionfilterlabel="Filter groups" showoptionfilter="true" allowmultiple="true" idattribute="id" displaynameattribute="displayName" filterableattributes="displayName" closeonclick="false" class="oc-mr-s"></item-filter-stub>
<item-filter-stub data-v-32efd9c6="" filterlabel="Groups" items="undefined" filtername="groups" optionfilterlabel="Filter groups" showoptionfilter="true" allowmultiple="true" idattribute="id" displaynameattribute="displayName" filterableattributes="displayName" closeonclick="false" class="oc-mr-s"></item-filter-stub>
<item-filter-stub data-v-32efd9c6="" filterlabel="Roles" items="[object Object],[object Object],[object Object],[object Object]" filtername="roles" optionfilterlabel="Filter roles" showoptionfilter="true" allowmultiple="true" idattribute="id" displaynameattribute="displayName" filterableattributes="displayName" closeonclick="false"></item-filter-stub>
</div>
<div data-v-32efd9c6="" class="oc-flex oc-flex-middle">
Expand Down