summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/members
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/assets/javascripts/members
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/assets/javascripts/members')
-rw-r--r--app/assets/javascripts/members/components/action_buttons/approve_access_request_button.vue2
-rw-r--r--app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue5
-rw-r--r--app/assets/javascripts/members/components/table/members_table.vue10
-rw-r--r--app/assets/javascripts/members/constants.js18
-rw-r--r--app/assets/javascripts/members/utils.js2
5 files changed, 34 insertions, 3 deletions
diff --git a/app/assets/javascripts/members/components/action_buttons/approve_access_request_button.vue b/app/assets/javascripts/members/components/action_buttons/approve_access_request_button.vue
index 00973100e15..112f722c632 100644
--- a/app/assets/javascripts/members/components/action_buttons/approve_access_request_button.vue
+++ b/app/assets/javascripts/members/components/action_buttons/approve_access_request_button.vue
@@ -40,7 +40,7 @@ export default {
:title="$options.title"
:aria-label="$options.title"
icon="check"
- variant="success"
+ variant="confirm"
type="submit"
/>
</gl-form>
diff --git a/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue b/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue
index ca60f876c6f..cb7b963b698 100644
--- a/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue
+++ b/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue
@@ -18,6 +18,8 @@ export default {
name: 'MembersFilteredSearchBar',
components: { FilteredSearchBar },
availableTokens: AVAILABLE_FILTERED_SEARCH_TOKENS,
+ searchButtonAttributes: { 'data-qa-selector': 'search_button' },
+ searchInputAttributes: { 'data-qa-selector': 'search_bar_input' },
inject: {
namespace: {},
sourceId: {},
@@ -127,8 +129,9 @@ export default {
:recent-searches-storage-key="filteredSearchBar.recentSearchesStorageKey"
:search-input-placeholder="filteredSearchBar.placeholder"
:initial-filter-value="initialFilterValue"
+ :search-button-attributes="$options.searchButtonAttributes"
+ :search-input-attributes="$options.searchInputAttributes"
data-testid="members-filtered-search-bar"
- data-qa-selector="members_filtered_search_bar_content"
@onFilter="handleFilter"
/>
</template>
diff --git a/app/assets/javascripts/members/components/table/members_table.vue b/app/assets/javascripts/members/components/table/members_table.vue
index b4ba9aa36e7..0b97ce7e33e 100644
--- a/app/assets/javascripts/members/components/table/members_table.vue
+++ b/app/assets/javascripts/members/components/table/members_table.vue
@@ -5,6 +5,7 @@ import MembersTableCell from 'ee_else_ce/members/components/table/members_table_
import { canOverride, canRemove, canResend, canUpdate } from 'ee_else_ce/members/utils';
import { mergeUrlParams } from '~/lib/utils/url_utility';
import initUserPopovers from '~/user_popovers';
+import UserDate from '~/vue_shared/components/user_date.vue';
import {
FIELD_KEY_ACTIONS,
FIELDS,
@@ -40,6 +41,7 @@ export default {
RemoveGroupLinkModal,
RemoveMemberModal,
ExpirationDatepicker,
+ UserDate,
LdapOverrideConfirmationModal: () =>
import('ee_component/members/components/ldap/ldap_override_confirmation_modal.vue'),
},
@@ -287,6 +289,14 @@ export default {
</members-table-cell>
</template>
+ <template #cell(userCreatedAt)="{ item: member }">
+ <user-date :date="member.user.createdAt" />
+ </template>
+
+ <template #cell(lastActivityOn)="{ item: member }">
+ <user-date :date="member.user.lastActivityOn" />
+ </template>
+
<template #cell(actions)="{ item: member }">
<members-table-cell #default="{ memberType, isCurrentUser, permissions }" :member="member">
<member-action-buttons
diff --git a/app/assets/javascripts/members/constants.js b/app/assets/javascripts/members/constants.js
index 49ce00a1689..c66a19c4765 100644
--- a/app/assets/javascripts/members/constants.js
+++ b/app/assets/javascripts/members/constants.js
@@ -9,6 +9,8 @@ export const FIELD_KEY_GRANTED = 'granted';
export const FIELD_KEY_INVITED = 'invited';
export const FIELD_KEY_REQUESTED = 'requested';
export const FIELD_KEY_MAX_ROLE = 'maxRole';
+export const FIELD_KEY_USER_CREATED_AT = 'userCreatedAt';
+export const FIELD_KEY_LAST_ACTIVITY_ON = 'lastActivityOn';
export const FIELD_KEY_EXPIRATION = 'expiration';
export const FIELD_KEY_LAST_SIGN_IN = 'lastSignIn';
export const FIELD_KEY_ACTIONS = 'actions';
@@ -67,6 +69,22 @@ export const FIELDS = [
tdClass: 'col-expiration',
},
{
+ key: FIELD_KEY_USER_CREATED_AT,
+ label: __('Created on'),
+ sort: {
+ asc: 'oldest_created_user',
+ desc: 'recent_created_user',
+ },
+ },
+ {
+ key: FIELD_KEY_LAST_ACTIVITY_ON,
+ label: __('Last activity'),
+ sort: {
+ asc: 'oldest_last_activity',
+ desc: 'recent_last_activity',
+ },
+ },
+ {
key: FIELD_KEY_LAST_SIGN_IN,
label: __('Last sign-in'),
sort: {
diff --git a/app/assets/javascripts/members/utils.js b/app/assets/javascripts/members/utils.js
index 05f086c8f4f..7ec083646e9 100644
--- a/app/assets/javascripts/members/utils.js
+++ b/app/assets/javascripts/members/utils.js
@@ -32,7 +32,7 @@ export const isGroup = (member) => {
};
export const isDirectMember = (member) => {
- return isGroup(member) || member.isDirectMember;
+ return member.isDirectMember;
};
export const isCurrentUser = (member, currentUserId) => {