diff --git a/client/src/app/components/assertions/assertions-table/assertions-table.component.html b/client/src/app/components/assertions/assertions-table/assertions-table.component.html
index 5d8eb4e62..df7e8bf66 100644
--- a/client/src/app/components/assertions/assertions-table/assertions-table.component.html
+++ b/client/src/app/components/assertions/assertions-table/assertions-table.component.html
@@ -498,4 +498,44 @@
Loading…
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/app/components/assertions/assertions-table/assertions-table.component.ts b/client/src/app/components/assertions/assertions-table/assertions-table.component.ts
index a62de4806..e2138e42d 100644
--- a/client/src/app/components/assertions/assertions-table/assertions-table.component.ts
+++ b/client/src/app/components/assertions/assertions-table/assertions-table.component.ts
@@ -26,6 +26,7 @@ import {
EvidenceType,
Maybe,
PageInfo,
+ EvidenceLevel,
} from '@app/generated/civic.apollo'
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'
import { QueryRef } from 'apollo-angular'
@@ -118,6 +119,10 @@ export class CvcAssertionsTableComponent implements OnInit {
SignificanceInput: Maybe
molecularProfileNameInput: Maybe
ampLevelInput: Maybe
+ statusInput: Maybe = EvidenceStatusFilter.NonRejected
+
+ availableStatusFilters = EvidenceStatusFilter
+ statusFilterVisible = false
sortColumns: typeof AssertionSortColumns = AssertionSortColumns
@@ -144,7 +149,7 @@ export class CvcAssertionsTableComponent implements OnInit {
phenotypeId: this.phenotypeId,
diseaseId: this.diseaseId,
therapyId: this.therapyId,
- status: this.status,
+ status: this.status || EvidenceStatusFilter.NonRejected,
})
this.result$ = this.queryRef.valueChanges
@@ -255,6 +260,7 @@ export class CvcAssertionsTableComponent implements OnInit {
molecularProfileName: this.molecularProfileNameInput,
therapyName: this.therapyNameInput,
summary: this.summaryInput,
+ status: this.statusInput,
assertionType: this.assertionTypeInput
? this.assertionTypeInput
: undefined,
@@ -276,8 +282,16 @@ export class CvcAssertionsTableComponent implements OnInit {
this.loadedPages += 1
}
+ statusChanged() {
+ this.debouncedQuery.next()
+ this.statusFilterVisible = false
+ }
+
// virtual scroll helpers
- trackByIndex(_: number, data: Maybe): Maybe {
+ trackByIndex(
+ _: number,
+ data: Maybe
+ ): Maybe {
return data?.id
}
diff --git a/client/src/app/components/assertions/assertions-table/assertions-table.module.ts b/client/src/app/components/assertions/assertions-table/assertions-table.module.ts
index 521c9db5a..1f09c0671 100644
--- a/client/src/app/components/assertions/assertions-table/assertions-table.module.ts
+++ b/client/src/app/components/assertions/assertions-table/assertions-table.module.ts
@@ -27,6 +27,8 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { NzTypographyModule } from 'ng-zorro-antd/typography'
import { CvcAssertionsTagModule } from '../assertions-tag/assertions-tag.module'
import { CvcAssertionsTableComponent } from './assertions-table.component'
+import { NzDropDownModule } from 'ng-zorro-antd/dropdown'
+import { NzRadioModule } from 'ng-zorro-antd/radio'
@NgModule({
declarations: [CvcAssertionsTableComponent],
@@ -46,6 +48,8 @@ import { CvcAssertionsTableComponent } from './assertions-table.component'
NzTagModule,
NzToolTipModule,
NzTypographyModule,
+ NzDropDownModule,
+ NzRadioModule,
CvcAssertionsTagModule,
CvcAutoHeightCardModule,
diff --git a/client/src/app/components/evidence/evidence-table/evidence-table.component.html b/client/src/app/components/evidence/evidence-table/evidence-table.component.html
index 1eed9891f..5b51ba7b5 100644
--- a/client/src/app/components/evidence/evidence-table/evidence-table.component.html
+++ b/client/src/app/components/evidence/evidence-table/evidence-table.component.html
@@ -644,4 +644,44 @@
Loading…
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/app/components/evidence/evidence-table/evidence-table.component.ts b/client/src/app/components/evidence/evidence-table/evidence-table.component.ts
index 1192538f2..ef624c5b9 100644
--- a/client/src/app/components/evidence/evidence-table/evidence-table.component.ts
+++ b/client/src/app/components/evidence/evidence-table/evidence-table.component.ts
@@ -58,6 +58,7 @@ export interface EvidenceTableUserFilters {
evidenceRatingInput?: Maybe
molecularProfileNameInput?: Maybe
geneSymbolInput?: Maybe
+ statusInput?: Maybe
}
@UntilDestroy()
@@ -126,11 +127,18 @@ export class CvcEvidenceTableComponent implements OnInit {
evidenceTypeInput: Maybe
molecularProfileNameInput: Maybe
variantOriginInput: Maybe
+ statusInput: Maybe = EvidenceStatusFilter.NonRejected
+
+ availableStatusFilters = EvidenceStatusFilter
+ statusFilterVisible = false
sortColumns = EvidenceSortColumns
evidenceLevels = EvidenceLevel
- constructor(private gql: EvidenceBrowseGQL, private cdr: ChangeDetectorRef) {
+ constructor(
+ private gql: EvidenceBrowseGQL,
+ private cdr: ChangeDetectorRef
+ ) {
this.noMoreRows$ = new BehaviorSubject(false)
this.scrollEvent$ = new BehaviorSubject('stop')
this.sortChange$ = new Subject()
@@ -160,7 +168,7 @@ export class CvcEvidenceTableComponent implements OnInit {
phenotypeId: this.phenotypeId,
rating: this.evidenceRatingInput ? this.evidenceRatingInput : undefined,
sourceId: this.sourceId,
- status: this.status,
+ status: this.status || EvidenceStatusFilter.NonRejected,
userId: this.userId,
variantId: this.variantId,
molecularProfileId: this.molecularProfileId,
@@ -278,6 +286,7 @@ export class CvcEvidenceTableComponent implements OnInit {
diseaseName: this.diseaseNameInput,
therapyName: this.therapyNameInput,
description: this.descriptionInput,
+ status: this.statusInput,
evidenceLevel: this.evidenceLevelInput
? this.evidenceLevelInput
: undefined,
@@ -303,7 +312,15 @@ export class CvcEvidenceTableComponent implements OnInit {
this.cdr.detectChanges()
}
- trackByIndex(_: number, data: Maybe): Maybe {
+ statusChanged() {
+ this.filterChange$.next()
+ this.statusFilterVisible = false
+ }
+
+ trackByIndex(
+ _: number,
+ data: Maybe
+ ): Maybe {
return data?.id
}
}
diff --git a/client/src/app/components/evidence/evidence-table/evidence-table.module.ts b/client/src/app/components/evidence/evidence-table/evidence-table.module.ts
index 6c42020ed..09e36638c 100644
--- a/client/src/app/components/evidence/evidence-table/evidence-table.module.ts
+++ b/client/src/app/components/evidence/evidence-table/evidence-table.module.ts
@@ -28,6 +28,8 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { NzTypographyModule } from 'ng-zorro-antd/typography'
import { CvcEvidenceTagModule } from '../evidence-tag/evidence-tag.module'
import { CvcEvidenceTableComponent } from './evidence-table.component'
+import { NzDropDownModule } from 'ng-zorro-antd/dropdown'
+import { NzRadioModule } from 'ng-zorro-antd/radio'
@NgModule({
declarations: [CvcEvidenceTableComponent],
@@ -49,6 +51,8 @@ import { CvcEvidenceTableComponent } from './evidence-table.component'
NzTagModule,
NzToolTipModule,
NzTypographyModule,
+ NzDropDownModule,
+ NzRadioModule,
CvcAutoHeightCardModule,
CvcAutoHeightTableModule,
diff --git a/client/src/app/generated/civic.apollo.ts b/client/src/app/generated/civic.apollo.ts
index 45fbabf71..058b29558 100644
--- a/client/src/app/generated/civic.apollo.ts
+++ b/client/src/app/generated/civic.apollo.ts
@@ -2084,6 +2084,7 @@ export enum EvidenceStatus {
export enum EvidenceStatusFilter {
Accepted = 'ACCEPTED',
All = 'ALL',
+ NonRejected = 'NON_REJECTED',
Rejected = 'REJECTED',
Submitted = 'SUBMITTED'
}
diff --git a/client/src/app/generated/server.model.graphql b/client/src/app/generated/server.model.graphql
index bc3f4ef84..867d53844 100644
--- a/client/src/app/generated/server.model.graphql
+++ b/client/src/app/generated/server.model.graphql
@@ -3239,6 +3239,7 @@ enum EvidenceStatus {
enum EvidenceStatusFilter {
ACCEPTED
ALL
+ NON_REJECTED
REJECTED
SUBMITTED
}
diff --git a/client/src/app/generated/server.schema.json b/client/src/app/generated/server.schema.json
index d4a0c62aa..c0e2b38dd 100644
--- a/client/src/app/generated/server.schema.json
+++ b/client/src/app/generated/server.schema.json
@@ -16764,6 +16764,12 @@
"isDeprecated": false,
"deprecationReason": null
},
+ {
+ "name": "NON_REJECTED",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
{
"name": "ALL",
"description": null,
diff --git a/server/app/graphql/resolvers/top_level_assertions.rb b/server/app/graphql/resolvers/top_level_assertions.rb
index 41e22480d..549b7802c 100644
--- a/server/app/graphql/resolvers/top_level_assertions.rb
+++ b/server/app/graphql/resolvers/top_level_assertions.rb
@@ -86,14 +86,15 @@ def generate_select(field = nil)
scope.joins(:therapies).where('therapies.id = ?', value)
end
option(:status, type: Types::EvidenceStatusFilterType, description: "Filtering on the status of the assertion.") do |scope, value|
- if value != 'ALL'
- scope.unscope(where: :status).where(status: value)
- else
+ if value == 'ALL'
scope.unscope(where: :status)
+ elsif value == 'NON_REJECTED'
+ scope.unscope(where: :status).where.not(status: 'rejected')
+ else
+ scope.unscope(where: :status).where(status: value)
end
end
-
option :sort_by, type: Types::BrowseTables::AssertionSortType, description: 'Columm and direction to sort evidence on.' do |scope, value|
case value.column
when 'DISEASE_NAME'
diff --git a/server/app/graphql/resolvers/top_level_evidence_items.rb b/server/app/graphql/resolvers/top_level_evidence_items.rb
index 0c6f49c0d..62d51215e 100644
--- a/server/app/graphql/resolvers/top_level_evidence_items.rb
+++ b/server/app/graphql/resolvers/top_level_evidence_items.rb
@@ -71,10 +71,12 @@ def generate_select(field = nil)
scope.where(rating: value)
end
option(:status, type: Types::EvidenceStatusFilterType, description: 'Filtering on the evidence status.') do |scope, value|
- if value != 'ALL'
- scope.unscope(where: :status).where(status: value)
- else
+ if value == 'ALL'
scope.unscope(where: :status)
+ elsif value == 'NON_REJECTED'
+ scope.unscope(where: :status).where.not(status: 'rejected')
+ else
+ scope.unscope(where: :status).where(status: value)
end
end
option(:phenotype_id, type: GraphQL::Types::Int, description: 'Exact match filtering of the evidence items based on the internal CIViC phenotype id') do |scope, value|
diff --git a/server/app/graphql/types/evidence_status_filter_type.rb b/server/app/graphql/types/evidence_status_filter_type.rb
index d7c691008..a21a174f6 100644
--- a/server/app/graphql/types/evidence_status_filter_type.rb
+++ b/server/app/graphql/types/evidence_status_filter_type.rb
@@ -3,6 +3,7 @@ class EvidenceStatusFilterType < Types::BaseEnum
value 'ACCEPTED', value: 'accepted'
value 'SUBMITTED', value: 'submitted'
value 'REJECTED', value: 'rejected'
+ value 'NON_REJECTED'
value 'ALL'
end
end