Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Oct 3, 2023
2 parents 77873e5 + 4b24df1 commit 522d497
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
let-iconTpl="iconTpl">
<nz-statistic
[nzTitle]="activityTitle"
[nzValue]="(activity.actionCount | number) || 0"
[nzValue]="activity ? (activity.actionCount | number) || 0 : 0"
[nzPrefix]="iconTpl">
</nz-statistic>
<ng-template #activityTitle>
{{ title }} ({{ activity.rank | ordinal }})
{{ title }}
<ng-container *ngIf="activity">
({{ activity.rank | ordinal }})
</ng-container>
</ng-template>
</ng-template>
<ng-content
Expand Down
20 changes: 10 additions & 10 deletions client/src/app/generated/civic.apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3803,10 +3803,10 @@ export type QueryVariantsArgs = {

export type Ranks = {
__typename: 'Ranks';
commentsRank: LeaderboardRank;
moderationRank: LeaderboardRank;
revisionsRank: LeaderboardRank;
submissionsRank: LeaderboardRank;
commentsRank?: Maybe<LeaderboardRank>;
moderationRank?: Maybe<LeaderboardRank>;
revisionsRank?: Maybe<LeaderboardRank>;
submissionsRank?: Maybe<LeaderboardRank>;
};

export enum ReadStatus {
Expand Down Expand Up @@ -7099,18 +7099,18 @@ export type OrganizationDetailQueryVariables = Exact<{
}>;


export type OrganizationDetailQuery = { __typename: 'Query', organization?: { __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, orgStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, orgAndSuborgsStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, moderationRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, revisionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, submissionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number } } } | undefined };
export type OrganizationDetailQuery = { __typename: 'Query', organization?: { __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, orgStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, orgAndSuborgsStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, moderationRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, revisionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, submissionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined } } | undefined };

export type OrganizationDetailFieldsFragment = { __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, orgStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, orgAndSuborgsStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, moderationRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, revisionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, submissionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number } } };
export type OrganizationDetailFieldsFragment = { __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, orgStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, orgAndSuborgsStatsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, moderationRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, revisionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, submissionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined } };

export type OrganizationGroupsQueryVariables = Exact<{
organizationId: Scalars['Int'];
}>;


export type OrganizationGroupsQuery = { __typename: 'Query', organization?: { __typename: 'Organization', subGroups: Array<{ __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, url: string }>, ranks: { __typename: 'Ranks', commentsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, moderationRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, revisionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, submissionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number } } }> } | undefined };
export type OrganizationGroupsQuery = { __typename: 'Query', organization?: { __typename: 'Organization', subGroups: Array<{ __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, url: string }>, ranks: { __typename: 'Ranks', commentsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, moderationRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, revisionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, submissionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined } }> } | undefined };

export type OrganizationGroupsFieldsFragment = { __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, url: string }>, ranks: { __typename: 'Ranks', commentsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, moderationRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, revisionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, submissionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number } } };
export type OrganizationGroupsFieldsFragment = { __typename: 'Organization', id: number, name: string, url: string, description: string, profileImagePath?: string | undefined, subGroups: Array<{ __typename: 'Organization', id: number, name: string, url: string }>, ranks: { __typename: 'Ranks', commentsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, moderationRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, revisionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, submissionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined } };

export type OrganizationMembersQueryVariables = Exact<{
organizationId: Scalars['Int'];
Expand Down Expand Up @@ -7180,9 +7180,9 @@ export type UserDetailQueryVariables = Exact<{
}>;


export type UserDetailQuery = { __typename: 'Query', user?: { __typename: 'User', id: number, name?: string | undefined, displayName: string, username: string, email?: string | undefined, profileImagePath?: string | undefined, role: UserRole, url?: string | undefined, bio?: 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 }>, country?: { __typename: 'Country', id: number, name: string } | undefined, statsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, moderationRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, revisionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, submissionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number } }, mostRecentConflictOfInterestStatement?: { __typename: 'Coi', id: number, coiPresent: boolean, coiStatement?: string | undefined, coiStatus: CoiStatus, createdAt?: any | undefined, expiresAt: any } | undefined } | undefined };
export type UserDetailQuery = { __typename: 'Query', user?: { __typename: 'User', id: number, name?: string | undefined, displayName: string, username: string, email?: string | undefined, profileImagePath?: string | undefined, role: UserRole, url?: string | undefined, bio?: 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 }>, country?: { __typename: 'Country', id: number, name: string } | undefined, statsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, moderationRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, revisionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, submissionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined }, mostRecentConflictOfInterestStatement?: { __typename: 'Coi', id: number, coiPresent: boolean, coiStatement?: string | undefined, coiStatus: CoiStatus, createdAt?: any | undefined, expiresAt: any } | undefined } | undefined };

export type UserDetailFieldsFragment = { __typename: 'User', id: number, name?: string | undefined, displayName: string, username: string, email?: string | undefined, profileImagePath?: string | undefined, role: UserRole, url?: string | undefined, bio?: 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 }>, country?: { __typename: 'Country', id: number, name: string } | undefined, statsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, moderationRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, revisionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number }, submissionsRank: { __typename: 'LeaderboardRank', rank: number, actionCount: number } }, mostRecentConflictOfInterestStatement?: { __typename: 'Coi', id: number, coiPresent: boolean, coiStatement?: string | undefined, coiStatus: CoiStatus, createdAt?: any | undefined, expiresAt: any } | undefined };
export type UserDetailFieldsFragment = { __typename: 'User', id: number, name?: string | undefined, displayName: string, username: string, email?: string | undefined, profileImagePath?: string | undefined, role: UserRole, url?: string | undefined, bio?: 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 }>, country?: { __typename: 'Country', id: number, name: string } | undefined, statsHash: { __typename: 'Stats', comments: number, revisions: number, appliedRevisions: number, submittedEvidenceItems: number, acceptedEvidenceItems: number, suggestedSources: number, submittedAssertions: number, acceptedAssertions: number }, ranks: { __typename: 'Ranks', commentsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, moderationRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, revisionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined, submissionsRank?: { __typename: 'LeaderboardRank', rank: number, actionCount: number } | undefined }, mostRecentConflictOfInterestStatement?: { __typename: 'Coi', id: number, coiPresent: boolean, coiStatement?: string | undefined, coiStatus: CoiStatus, createdAt?: any | undefined, expiresAt: any } | undefined };

export type UserNotificationsQueryVariables = Exact<{
first?: InputMaybe<Scalars['Int']>;
Expand Down
8 changes: 4 additions & 4 deletions client/src/app/generated/server.model.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6290,10 +6290,10 @@ type Query {
}

type Ranks {
commentsRank: LeaderboardRank!
moderationRank: LeaderboardRank!
revisionsRank: LeaderboardRank!
submissionsRank: LeaderboardRank!
commentsRank: LeaderboardRank
moderationRank: LeaderboardRank
revisionsRank: LeaderboardRank
submissionsRank: LeaderboardRank
}

enum ReadStatus {
Expand Down
40 changes: 12 additions & 28 deletions client/src/app/generated/server.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28044,13 +28044,9 @@
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
}
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
Expand All @@ -28060,13 +28056,9 @@
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
}
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
Expand All @@ -28076,13 +28068,9 @@
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
}
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
Expand All @@ -28092,13 +28080,9 @@
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
}
"kind": "OBJECT",
"name": "LeaderboardRank",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
Expand Down
8 changes: 4 additions & 4 deletions server/app/graphql/types/entities/ranks_type.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Types::Entities
class RanksType < Types::BaseObject
field :moderation_rank, Types::Entities::LeaderboardRank, null: false
field :comments_rank, Types::Entities::LeaderboardRank, null: false
field :submissions_rank, Types::Entities::LeaderboardRank, null: false
field :revisions_rank, Types::Entities::LeaderboardRank, null: false
field :moderation_rank, Types::Entities::LeaderboardRank, null: true
field :comments_rank, Types::Entities::LeaderboardRank, null: true
field :submissions_rank, Types::Entities::LeaderboardRank, null: true
field :revisions_rank, Types::Entities::LeaderboardRank, null: true
end
end

0 comments on commit 522d497

Please sign in to comment.