-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/add search box to org users tab (#5158)
* init SearchBox in OrganizationAffiliations * prevent reload error on search * add search and orderBy options to query * change AffiliationUserOrder to UserOrder * add orderBy options to org affiliations * add role priority to orderBy permission * update tests * default orderBy permission * update faker schema * fix adminpage test * add translations * conditionally render glossary toggle button
- Loading branch information
1 parent
dbb13de
commit 3ef26ec
Showing
20 changed files
with
533 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
import {GraphQLEnumType} from 'graphql' | ||
import { GraphQLEnumType } from 'graphql' | ||
|
||
export const AffiliationUserOrderField = new GraphQLEnumType({ | ||
name: 'AffiliationUserOrderField', | ||
description: 'Properties by which affiliation connections can be ordered.', | ||
values: { | ||
USER_USERNAME: { | ||
value: 'user-username', | ||
description: 'Order affiliation edges by username.', | ||
USERNAME: { | ||
value: 'username', | ||
description: 'Order affiliations by username.', | ||
}, | ||
USER_DISPLAYNAME: { | ||
value: 'user-displayName', | ||
description: 'Order affiliation edges by displayName.', | ||
DISPLAY_NAME: { | ||
value: 'display_name', | ||
description: 'Order affiliations by display name.', | ||
}, | ||
USER_EMAIL_VALIDATED: { | ||
value: 'user-emailValidated', | ||
description: 'Order affiliation edges by user verification status.', | ||
}, | ||
USER_INSIDER: { | ||
value: 'user-insider', | ||
description: 'Order affiliation edges by user insider status.', | ||
}, | ||
USER_AFFILIATIONS_COUNT: { | ||
value: 'user-affiliations-totalCount', | ||
description: 'Order affiliation edges by amount of total affiliations.', | ||
PERMISSION: { | ||
value: 'permission', | ||
description: 'Order affiliations by permission.', | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { GraphQLEnumType } from 'graphql' | ||
|
||
export const UserOrderField = new GraphQLEnumType({ | ||
name: 'UserOrderField', | ||
description: 'Properties by which affiliation connections can be ordered.', | ||
values: { | ||
USER_USERNAME: { | ||
value: 'user-username', | ||
description: 'Order affiliation edges by username.', | ||
}, | ||
USER_DISPLAYNAME: { | ||
value: 'user-displayName', | ||
description: 'Order affiliation edges by displayName.', | ||
}, | ||
USER_EMAIL_VALIDATED: { | ||
value: 'user-emailValidated', | ||
description: 'Order affiliation edges by user verification status.', | ||
}, | ||
USER_INSIDER: { | ||
value: 'user-insider', | ||
description: 'Order affiliation edges by user insider status.', | ||
}, | ||
USER_AFFILIATIONS_COUNT: { | ||
value: 'user-affiliations-totalCount', | ||
description: 'Order affiliation edges by amount of total affiliations.', | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { GraphQLNonNull } from 'graphql' | ||
|
||
import { userOrder } from '../user-order' | ||
import { OrderDirection, UserOrderField } from '../../../enums' | ||
|
||
describe('given the affiliationOrder input object', () => { | ||
describe('testing fields', () => { | ||
it('has a direction field', () => { | ||
const demoType = userOrder.getFields() | ||
|
||
expect(demoType).toHaveProperty('direction') | ||
expect(demoType.direction.type).toMatchObject(new GraphQLNonNull(OrderDirection)) | ||
}) | ||
it('has a field field', () => { | ||
const demoType = userOrder.getFields() | ||
|
||
expect(demoType).toHaveProperty('field') | ||
expect(demoType.field.type).toMatchObject(new GraphQLNonNull(UserOrderField)) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './user-order' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { GraphQLInputObjectType, GraphQLNonNull } from 'graphql' | ||
|
||
import { OrderDirection, UserOrderField } from '../../enums' | ||
|
||
export const userOrder = new GraphQLInputObjectType({ | ||
name: 'UserOrder', | ||
description: 'Ordering options for affiliation connections.', | ||
fields: () => ({ | ||
field: { | ||
type: new GraphQLNonNull(UserOrderField), | ||
description: 'The field to order affiliations by.', | ||
}, | ||
direction: { | ||
type: new GraphQLNonNull(OrderDirection), | ||
description: 'The ordering direction.', | ||
}, | ||
}), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.