2021-01-03 14:25:43 +05:30
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
|
|
|
export const FIELDS = [
|
|
|
|
{
|
|
|
|
key: 'account',
|
|
|
|
label: __('Account'),
|
2021-02-22 17:27:13 +05:30
|
|
|
sort: {
|
|
|
|
asc: 'name_asc',
|
|
|
|
desc: 'name_desc',
|
|
|
|
},
|
2021-01-03 14:25:43 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'source',
|
|
|
|
label: __('Source'),
|
|
|
|
thClass: 'col-meta',
|
|
|
|
tdClass: 'col-meta',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'granted',
|
|
|
|
label: __('Access granted'),
|
|
|
|
thClass: 'col-meta',
|
|
|
|
tdClass: 'col-meta',
|
2021-02-22 17:27:13 +05:30
|
|
|
sort: {
|
|
|
|
asc: 'last_joined',
|
|
|
|
desc: 'oldest_joined',
|
|
|
|
},
|
2021-01-03 14:25:43 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'invited',
|
|
|
|
label: __('Invited'),
|
|
|
|
thClass: 'col-meta',
|
|
|
|
tdClass: 'col-meta',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'requested',
|
|
|
|
label: __('Requested'),
|
|
|
|
thClass: 'col-meta',
|
|
|
|
tdClass: 'col-meta',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'expires',
|
|
|
|
label: __('Access expires'),
|
|
|
|
thClass: 'col-meta',
|
|
|
|
tdClass: 'col-meta',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'maxRole',
|
|
|
|
label: __('Max role'),
|
|
|
|
thClass: 'col-max-role',
|
|
|
|
tdClass: 'col-max-role',
|
2021-02-22 17:27:13 +05:30
|
|
|
sort: {
|
|
|
|
asc: 'access_level_asc',
|
|
|
|
desc: 'access_level_desc',
|
|
|
|
},
|
2021-01-03 14:25:43 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'expiration',
|
|
|
|
label: __('Expiration'),
|
|
|
|
thClass: 'col-expiration',
|
|
|
|
tdClass: 'col-expiration',
|
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
{
|
|
|
|
key: 'lastSignIn',
|
|
|
|
label: __('Last sign-in'),
|
|
|
|
sort: {
|
|
|
|
asc: 'recent_sign_in',
|
|
|
|
desc: 'oldest_sign_in',
|
|
|
|
},
|
|
|
|
},
|
2021-01-03 14:25:43 +05:30
|
|
|
{
|
|
|
|
key: 'actions',
|
|
|
|
thClass: 'col-actions',
|
2021-01-29 00:20:46 +05:30
|
|
|
showFunction: 'showActionsField',
|
2021-03-08 18:12:59 +05:30
|
|
|
tdClassFunction: 'tdClassActions',
|
2021-01-03 14:25:43 +05:30
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
export const DEFAULT_SORT = {
|
|
|
|
sortByKey: 'account',
|
|
|
|
sortDesc: false,
|
|
|
|
};
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
export const AVATAR_SIZE = 48;
|
|
|
|
|
|
|
|
export const MEMBER_TYPES = {
|
|
|
|
user: 'user',
|
|
|
|
group: 'group',
|
|
|
|
invite: 'invite',
|
|
|
|
accessRequest: 'accessRequest',
|
|
|
|
};
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
export const TAB_QUERY_PARAM_VALUES = {
|
|
|
|
group: 'groups',
|
|
|
|
invite: 'invited',
|
|
|
|
accessRequest: 'access_requests',
|
|
|
|
};
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
export const DAYS_TO_EXPIRE_SOON = 7;
|
|
|
|
|
|
|
|
export const LEAVE_MODAL_ID = 'member-leave-modal';
|
|
|
|
|
|
|
|
export const REMOVE_GROUP_LINK_MODAL_ID = 'remove-group-link-modal-id';
|
2021-02-22 17:27:13 +05:30
|
|
|
|
|
|
|
export const SEARCH_TOKEN_TYPE = 'filtered-search-term';
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
export const SORT_QUERY_PARAM_NAME = 'sort';
|
|
|
|
export const ACTIVE_TAB_QUERY_PARAM_NAME = 'tab';
|
2021-03-11 19:13:27 +05:30
|
|
|
|
|
|
|
export const MEMBER_ACCESS_LEVEL_PROPERTY_NAME = 'access_level';
|
|
|
|
|
|
|
|
export const GROUP_LINK_BASE_PROPERTY_NAME = 'group_link';
|
|
|
|
export const GROUP_LINK_ACCESS_LEVEL_PROPERTY_NAME = 'group_access';
|