diff options
Diffstat (limited to 'app/assets/javascripts/members')
3 files changed, 12 insertions, 4 deletions
diff --git a/app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue b/app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue index ce28283ccdf..01f145e0862 100644 --- a/app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue +++ b/app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue @@ -4,6 +4,7 @@ import { mapState } from 'vuex'; import { visitUrl } from '~/lib/utils/url_utility'; import { FIELDS } from '~/members/constants'; import { parseSortParam, buildSortHref } from '~/members/utils'; +import { SORT_DIRECTION_UI } from '~/search/sort/constants'; export default { name: 'SortDropdown', @@ -30,6 +31,9 @@ export default { isAscending() { return !this.sort.sortDesc; }, + sortDirectionData() { + return this.isAscending ? SORT_DIRECTION_UI.asc : SORT_DIRECTION_UI.desc; + }, filteredOptions() { return FIELDS.filter( (field) => this.tableSortableFields.includes(field.key) && field.sort, @@ -70,7 +74,7 @@ export default { data-testid="members-sort-dropdown" :text="activeOptionLabel" :is-ascending="isAscending" - :sort-direction-tool-tip="__('Sort direction')" + :sort-direction-tool-tip="sortDirectionData.tooltip" @sortDirectionChange="handleSortDirectionChange" > <gl-sorting-item diff --git a/app/assets/javascripts/members/components/table/members_table.vue b/app/assets/javascripts/members/components/table/members_table.vue index 460dc0041ab..0512bc04085 100644 --- a/app/assets/javascripts/members/components/table/members_table.vue +++ b/app/assets/javascripts/members/components/table/members_table.vue @@ -2,7 +2,7 @@ import { GlTable, GlBadge, GlPagination } from '@gitlab/ui'; import { mapState } from 'vuex'; import MembersTableCell from 'ee_else_ce/members/components/table/members_table_cell.vue'; -import { canOverride, canRemove, canResend, canUpdate } from 'ee_else_ce/members/utils'; +import { canUnban, canOverride, canRemove, canResend, canUpdate } from 'ee_else_ce/members/utils'; import { mergeUrlParams } from '~/lib/utils/url_utility'; import UserDate from '~/vue_shared/components/user_date.vue'; import { @@ -90,7 +90,8 @@ export default { canRemove(member) || canResend(member) || canUpdate(member, this.currentUserId) || - canOverride(member) + canOverride(member) || + canUnban(member) ); }, showField(field) { diff --git a/app/assets/javascripts/members/utils.js b/app/assets/javascripts/members/utils.js index 0da44b7d468..bf87ab53d36 100644 --- a/app/assets/javascripts/members/utils.js +++ b/app/assets/javascripts/members/utils.js @@ -105,9 +105,12 @@ export const buildSortHref = ({ return setUrlParams({ ...filterParams, sort: sortParam }, window.location.href, true); }; -// Defined in `ee/app/assets/javascripts/vue_shared/components/members/utils.js` +// Defined in `ee/app/assets/javascripts/members/utils.js` export const canOverride = () => false; +// Defined in `ee/app/assets/javascripts/members/utils.js` +export const canUnban = () => false; + export const parseDataAttributes = (el) => { const { membersData } = el.dataset; |