Skip to content

Commit

Permalink
propagated changes to the frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhtnp committed Jul 1, 2024
1 parent 25e0990 commit 9f98f62
Show file tree
Hide file tree
Showing 9 changed files with 251 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
nzRight
nzAlign="right"
nz-tooltip
[nzColumnKey]="sortColumns.EvidenceCount"
[nzSortFn]="true"
nzTooltipTitle="Evidence Count">
<i
nz-icon
Expand All @@ -86,6 +88,8 @@
nzRight
nzAlign="right"
nz-tooltip
[nzColumnKey]="sortColumns.RevisionCount"
[nzSortFn]="true"
nzTooltipTitle="Revision Count">
<i
nz-icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
PageInfo,
SortDirection,
UserBrowseTableRowFieldsFragment,
UserConnection,
BrowseUserConnection,
UserRole,
UsersBrowseGQL,
UsersBrowseQuery,
Expand Down Expand Up @@ -71,7 +71,7 @@ export class CvcUsersTableComponent implements OnInit {
// INTERMEDIATE STREAMS
queryRef!: QueryRef<UsersBrowseQuery, UsersBrowseQueryVariables>
result$!: Observable<ApolloQueryResult<UsersBrowseQuery>>
connection$!: Observable<UserConnection>
connection$!: Observable<BrowseUserConnection>

// PRESENTATION STREAMS
pageInfo$!: Observable<PageInfo>
Expand Down Expand Up @@ -130,7 +130,7 @@ export class CvcUsersTableComponent implements OnInit {
this.connection$ = this.result$.pipe(
pluck('data', 'users'),
filter(isNonNulled)
) as Observable<UserConnection>
) as Observable<BrowseUserConnection>

// entity row nodes
this.row$ = this.connection$.pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ fragment UserBrowseTableRowFields on BrowseUser {
name
}
role
statsHash {
submittedEvidenceItems
revisions
}
evidenceCount
revisionCount
profileImagePath(size: 64)
mostRecentActivityTimestamp
}
57 changes: 57 additions & 0 deletions client/src/app/generated/civic.apollo-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,51 @@ export type BrowseTherapyEdgeFieldPolicy = {
cursor?: FieldPolicy<any> | FieldReadFunction<any>,
node?: FieldPolicy<any> | FieldReadFunction<any>
};
export type BrowseUserKeySpecifier = ('acceptedLicense' | 'areaOfExpertise' | 'bio' | 'countryId' | 'createdAt' | 'deleted' | 'deletedAt' | 'displayName' | 'email' | 'evidenceCount' | 'facebookProfile' | 'id' | 'lastSeenAt' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentOrganizationId' | 'name' | 'orcid' | 'organizations' | 'profileImagePath' | 'revisionCount' | 'role' | 'signupComplete' | 'twitterHandle' | 'updatedAt' | 'url' | 'username' | BrowseUserKeySpecifier)[];
export type BrowseUserFieldPolicy = {
acceptedLicense?: FieldPolicy<any> | FieldReadFunction<any>,
areaOfExpertise?: FieldPolicy<any> | FieldReadFunction<any>,
bio?: FieldPolicy<any> | FieldReadFunction<any>,
countryId?: FieldPolicy<any> | FieldReadFunction<any>,
createdAt?: FieldPolicy<any> | FieldReadFunction<any>,
deleted?: FieldPolicy<any> | FieldReadFunction<any>,
deletedAt?: FieldPolicy<any> | FieldReadFunction<any>,
displayName?: FieldPolicy<any> | FieldReadFunction<any>,
email?: FieldPolicy<any> | FieldReadFunction<any>,
evidenceCount?: FieldPolicy<any> | FieldReadFunction<any>,
facebookProfile?: FieldPolicy<any> | FieldReadFunction<any>,
id?: FieldPolicy<any> | FieldReadFunction<any>,
lastSeenAt?: FieldPolicy<any> | FieldReadFunction<any>,
linkedinProfile?: FieldPolicy<any> | FieldReadFunction<any>,
mostRecentActivityTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
mostRecentOrganizationId?: FieldPolicy<any> | FieldReadFunction<any>,
name?: FieldPolicy<any> | FieldReadFunction<any>,
orcid?: FieldPolicy<any> | FieldReadFunction<any>,
organizations?: FieldPolicy<any> | FieldReadFunction<any>,
profileImagePath?: FieldPolicy<any> | FieldReadFunction<any>,
revisionCount?: FieldPolicy<any> | FieldReadFunction<any>,
role?: FieldPolicy<any> | FieldReadFunction<any>,
signupComplete?: FieldPolicy<any> | FieldReadFunction<any>,
twitterHandle?: FieldPolicy<any> | FieldReadFunction<any>,
updatedAt?: FieldPolicy<any> | FieldReadFunction<any>,
url?: FieldPolicy<any> | FieldReadFunction<any>,
username?: FieldPolicy<any> | FieldReadFunction<any>
};
export type BrowseUserConnectionKeySpecifier = ('edges' | 'filteredCount' | 'lastUpdated' | 'nodes' | 'pageCount' | 'pageInfo' | 'totalCount' | BrowseUserConnectionKeySpecifier)[];
export type BrowseUserConnectionFieldPolicy = {
edges?: FieldPolicy<any> | FieldReadFunction<any>,
filteredCount?: FieldPolicy<any> | FieldReadFunction<any>,
lastUpdated?: FieldPolicy<any> | FieldReadFunction<any>,
nodes?: FieldPolicy<any> | FieldReadFunction<any>,
pageCount?: FieldPolicy<any> | FieldReadFunction<any>,
pageInfo?: FieldPolicy<any> | FieldReadFunction<any>,
totalCount?: FieldPolicy<any> | FieldReadFunction<any>
};
export type BrowseUserEdgeKeySpecifier = ('cursor' | 'node' | BrowseUserEdgeKeySpecifier)[];
export type BrowseUserEdgeFieldPolicy = {
cursor?: FieldPolicy<any> | FieldReadFunction<any>,
node?: FieldPolicy<any> | FieldReadFunction<any>
};
export type BrowseVariantKeySpecifier = ('aliases' | 'category' | 'deprecated' | 'diseases' | 'featureDeprecated' | 'featureFlagged' | 'featureId' | 'featureLink' | 'featureName' | 'flagged' | 'id' | 'link' | 'name' | 'therapies' | 'variantTypes' | BrowseVariantKeySpecifier)[];
export type BrowseVariantFieldPolicy = {
aliases?: FieldPolicy<any> | FieldReadFunction<any>,
Expand Down Expand Up @@ -2460,6 +2505,18 @@ export type StrictTypedTypePolicies = {
keyFields?: false | BrowseTherapyEdgeKeySpecifier | (() => undefined | BrowseTherapyEdgeKeySpecifier),
fields?: BrowseTherapyEdgeFieldPolicy,
},
BrowseUser?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | BrowseUserKeySpecifier | (() => undefined | BrowseUserKeySpecifier),
fields?: BrowseUserFieldPolicy,
},
BrowseUserConnection?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | BrowseUserConnectionKeySpecifier | (() => undefined | BrowseUserConnectionKeySpecifier),
fields?: BrowseUserConnectionFieldPolicy,
},
BrowseUserEdge?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | BrowseUserEdgeKeySpecifier | (() => undefined | BrowseUserEdgeKeySpecifier),
fields?: BrowseUserEdgeFieldPolicy,
},
BrowseVariant?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | BrowseVariantKeySpecifier | (() => undefined | BrowseVariantKeySpecifier),
fields?: BrowseVariantFieldPolicy,
Expand Down
88 changes: 76 additions & 12 deletions client/src/app/generated/civic.apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,70 @@ export type BrowseTherapyEdge = {
node?: Maybe<BrowseTherapy>;
};

export type BrowseUser = {
__typename: 'BrowseUser';
acceptedLicense?: Maybe<Scalars['Boolean']>;
areaOfExpertise?: Maybe<Scalars['String']>;
bio?: Maybe<Scalars['String']>;
countryId?: Maybe<Scalars['Int']>;
createdAt?: Maybe<Scalars['ISO8601DateTime']>;
deleted?: Maybe<Scalars['Boolean']>;
deletedAt?: Maybe<Scalars['ISO8601DateTime']>;
displayName: Scalars['String'];
email?: Maybe<Scalars['String']>;
evidenceCount: Scalars['Int'];
facebookProfile?: Maybe<Scalars['String']>;
id: Scalars['Int'];
lastSeenAt?: Maybe<Scalars['ISO8601DateTime']>;
linkedinProfile?: Maybe<Scalars['String']>;
mostRecentActivityTimestamp?: Maybe<Scalars['ISO8601DateTime']>;
mostRecentOrganizationId?: Maybe<Scalars['Int']>;
name?: Maybe<Scalars['String']>;
orcid?: Maybe<Scalars['String']>;
organizations: Array<Organization>;
profileImagePath?: Maybe<Scalars['String']>;
revisionCount: Scalars['Int'];
role: Scalars['String'];
signupComplete?: Maybe<Scalars['Boolean']>;
twitterHandle?: Maybe<Scalars['String']>;
updatedAt?: Maybe<Scalars['ISO8601DateTime']>;
url?: Maybe<Scalars['String']>;
username?: Maybe<Scalars['String']>;
};


export type BrowseUserProfileImagePathArgs = {
size?: InputMaybe<Scalars['Int']>;
};

/** The connection type for BrowseUser. */
export type BrowseUserConnection = {
__typename: 'BrowseUserConnection';
/** A list of edges. */
edges: Array<BrowseUserEdge>;
/** The total number of records in this set. */
filteredCount: Scalars['Int'];
/** The last time the data in this browse table was refreshed */
lastUpdated: Scalars['ISO8601DateTime'];
/** A list of nodes. */
nodes: Array<BrowseUser>;
/** Total number of pages, based on filtered count and pagesize. */
pageCount: Scalars['Int'];
/** Information to aid in pagination. */
pageInfo: PageInfo;
/** The total number of records of this type, regardless of any filtering. */
totalCount: Scalars['Int'];
};

/** An edge in a connection. */
export type BrowseUserEdge = {
__typename: 'BrowseUserEdge';
/** A cursor for use in pagination. */
cursor: Scalars['String'];
/** The item at the end of the edge. */
node?: Maybe<BrowseUser>;
};

export type BrowseVariant = {
__typename: 'BrowseVariant';
aliases: Array<VariantAlias>;
Expand Down Expand Up @@ -4275,7 +4339,7 @@ export type Query = {
/** Retrieve user type typeahead fields for a search term. */
userTypeahead: Array<User>;
/** List and filter users. */
users: UserConnection;
users: BrowseUserConnection;
validateRevisionsForAcceptance: ValidationErrors;
/** Find a variant by CIViC ID */
variant?: Maybe<VariantInterface>;
Expand Down Expand Up @@ -6347,9 +6411,11 @@ export type UsersSort = {
};

export enum UsersSortColumns {
EvidenceCount = 'EVIDENCE_COUNT',
Id = 'ID',
LastAction = 'LAST_ACTION',
Name = 'NAME',
RevisionCount = 'REVISION_COUNT',
Role = 'ROLE'
}

Expand Down Expand Up @@ -7566,9 +7632,9 @@ export type UsersBrowseQueryVariables = Exact<{
}>;


export type UsersBrowseQuery = { __typename: 'Query', users: { __typename: 'UserConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | undefined }, edges: Array<{ __typename: 'UserEdge', cursor: string, node?: { __typename: 'User', id: number, name?: string | undefined, displayName: string, role: UserRole, profileImagePath?: string | undefined, mostRecentActivityTimestamp?: any | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string }>, statsHash: { __typename: 'Stats', submittedEvidenceItems: number, revisions: number } } | undefined }> } };
export type UsersBrowseQuery = { __typename: 'Query', users: { __typename: 'BrowseUserConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | undefined }, edges: Array<{ __typename: 'BrowseUserEdge', cursor: string, node?: { __typename: 'BrowseUser', id: number, name?: string | undefined, username?: string | undefined, role: string, evidenceCount: number, revisionCount: number, profileImagePath?: string | undefined, mostRecentActivityTimestamp?: any | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string }> } | undefined }> } };

export type UserBrowseTableRowFieldsFragment = { __typename: 'User', id: number, name?: string | undefined, displayName: string, role: UserRole, profileImagePath?: string | undefined, mostRecentActivityTimestamp?: any | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string }>, statsHash: { __typename: 'Stats', submittedEvidenceItems: number, revisions: number } };
export type UserBrowseTableRowFieldsFragment = { __typename: 'BrowseUser', id: number, name?: string | undefined, username?: string | undefined, role: string, evidenceCount: number, revisionCount: number, profileImagePath?: string | undefined, mostRecentActivityTimestamp?: any | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string }> };

export type VariantGroupPopoverQueryVariables = Exact<{
variantGroupId: Scalars['Int'];
Expand Down Expand Up @@ -8564,9 +8630,9 @@ export type OrganizationMembersQueryVariables = Exact<{
}>;


export type OrganizationMembersQuery = { __typename: 'Query', users: { __typename: 'UserConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | undefined, endCursor?: string | undefined }, edges: Array<{ __typename: 'UserEdge', cursor: string, node?: { __typename: 'User', id: number, name?: string | undefined, displayName: string, username: string, profileImagePath?: string | undefined, role: UserRole, url?: string | undefined, areaOfExpertise?: AreaOfExpertise | undefined, orcid?: string | undefined, twitterHandle?: string | undefined, facebookProfile?: string | undefined, linkedinProfile?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, url: string }> } | undefined }> } };
export type OrganizationMembersQuery = { __typename: 'Query', users: { __typename: 'BrowseUserConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | undefined, endCursor?: string | undefined }, edges: Array<{ __typename: 'BrowseUserEdge', cursor: string, node?: { __typename: 'BrowseUser', id: number, name?: string | undefined, displayName: string, username?: string | undefined, profileImagePath?: string | undefined, role: string, url?: string | undefined, areaOfExpertise?: string | undefined, orcid?: string | undefined, twitterHandle?: string | undefined, facebookProfile?: string | undefined, linkedinProfile?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, url: string }> } | undefined }> } };

export type OrganizationMembersFieldsFragment = { __typename: 'User', id: number, name?: string | undefined, displayName: string, username: string, profileImagePath?: string | undefined, role: UserRole, url?: string | undefined, areaOfExpertise?: AreaOfExpertise | undefined, orcid?: string | undefined, twitterHandle?: string | undefined, facebookProfile?: string | undefined, linkedinProfile?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, url: string }> };
export type OrganizationMembersFieldsFragment = { __typename: 'BrowseUser', id: number, name?: string | undefined, displayName: string, username?: string | undefined, profileImagePath?: string | undefined, role: string, url?: string | undefined, areaOfExpertise?: string | undefined, orcid?: string | undefined, twitterHandle?: string | undefined, facebookProfile?: string | undefined, linkedinProfile?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, url: string }> };

export type PhenotypeDetailQueryVariables = Exact<{
phenotypeId: Scalars['Int'];
Expand Down Expand Up @@ -9969,19 +10035,17 @@ export const PopoverUserFragmentDoc = gql`
}
`;
export const UserBrowseTableRowFieldsFragmentDoc = gql`
fragment UserBrowseTableRowFields on User {
fragment UserBrowseTableRowFields on BrowseUser {
id
name
displayName
username
organizations {
id
name
}
role
statsHash {
submittedEvidenceItems
revisions
}
evidenceCount
revisionCount
profileImagePath(size: 64)
mostRecentActivityTimestamp
}
Expand Down Expand Up @@ -11448,7 +11512,7 @@ export const OrganizationGroupsFieldsFragmentDoc = gql`
}
`;
export const OrganizationMembersFieldsFragmentDoc = gql`
fragment OrganizationMembersFields on User {
fragment OrganizationMembersFields on BrowseUser {
id
name
displayName
Expand Down
7 changes: 5 additions & 2 deletions client/src/app/generated/server.model.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1331,12 +1331,13 @@ type BrowseTherapyEdge {

type BrowseUser {
acceptedLicense: Boolean
areaOfExpertise: Int
areaOfExpertise: String
bio: String
countryId: Int
createdAt: ISO8601DateTime
deleted: Boolean
deletedAt: ISO8601DateTime
displayName: String!
email: String
evidenceCount: Int!
facebookProfile: String
Expand All @@ -1347,8 +1348,10 @@ type BrowseUser {
mostRecentOrganizationId: Int
name: String
orcid: String
organizations: [Organization!]!
profileImagePath(size: Int = 56): String
revisionCount: Int!
role: Int
role: String!
signupComplete: Boolean
twitterHandle: String
updatedAt: ISO8601DateTime
Expand Down
Loading

0 comments on commit 9f98f62

Please sign in to comment.